* corelow.c: Include "arch-utils.h", "regset.h" and
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
62f3bb11
AM
12003-10-29 Alan Modra <amodra@bigpond.net.au>
2
d37c89e5
AM
3 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
4 (elf_backend_grok_psinfo): Define.
5 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
6
62f3bb11
AM
7 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
8 sections with the same name.
9 (elfcore_grok_lwpstatus): Likewise.
10 (elfcore_grok_win32pstatus): Likewise.
11 (elfcore_grok_note): Likewise.
12 (elfcore_grok_nto_status): Likewise.
13 (elfcore_grok_nto_gregs): Likewise.
14
35a0f415
DJ
152003-10-27 Daniel Jacobowitz <drow@mvista.com>
16
17 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
18 objects.
19
e3d54347
RS
202003-10-14 Richard Sandiford <rsandifo@redhat.com>
21
22 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
23
5e35cbc2
L
242003-10-24 H.J. Lu <hongjiu.lu@intel.com>
25
26 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
27 hash table for real symbols.
28
9c3ed942
MS
292003-10-23 Michael Snyder <msnyder@redhat.com>
30
31 * section.c (asection): Fix typo in comment.
32
0d4792f7
AM
332003-10-23 Alan Modra <amodra@bigpond.net.au>
34
35 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
36 reloc symbol index to it. Don't allow gd syms in shared libs
37 to be optimized.
38 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
39 (ppc64_elf_size_stubs): Likewise.
40 (ppc64_elf_relocate_section): Check that tls relocs are only used
41 with tls syms, and similarly for non-tls. Correct symbol used
42 when optimizing toc tls code.
43
c9ac8978
NC
442003-10-22 Nick Clifton <nickc@redhat.com>
45
46 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
47 processing an executable.
48
108ba305
JJ
492003-10-22 Jakub Jelinek <jakub@redhat.com>
50
51 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
52 field changes.
53 (_bfd_elf_link_assign_sym_version): Likewise.
54 * elflink.h (size_dynamic_sections): Likewise.
55
af9ba621
CV
562003-10-21 Alexandre Oliva <aoliva@redhat.com>,
57 Michael Snyder <msnyder@redhat.com>
58
59 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
60 bfd_mach_sh4a_nofpu): New machine types.
61 * bfd-in2.h: Rebuilt.
62 * cpu-sh.c (compatible): Remove unused function.
63 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
64 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
65 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
66
5a21e886
NC
672003-10-21 Wouter van Heyst <wouter@vidicode.nl>
68
69 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
70 describing mismatched formats involving the Maverick FP type.
71
b749473b
NC
722003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
73
74 * binary.c (binary_object_p): Pass machine flag along with
75 architecture.
76
3e602632
NC
772003-10-21 Thorsten Brehm <brehm@gmx.net>
78
79 * archures.c (bfd_default_scan): Add support for mcf528x.
80 * ieee.c (ieee_write_processor): Likewise.
81
822003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
62f3bb11 83 Bernardo Innocenti <bernie@develer.com>
3e602632
NC
84
85 * archures.c: Add MCF528x (MCFv4) support.
86 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
87 * bfd-in2.h: Regenerate.
88
198beae2
AC
892003-10-20 Andrew Cagney <cagney@redhat.com>
90
91 * targets.c: Replace "struct sec" with "struct bfd_section"
92 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
93 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
94 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
95 * aout-tic30.c, aout-target.h:
96 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
62f3bb11 97
4e2147ff
HPN
982003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
99
f60ebe14
HPN
100 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
101 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
102 (struct _mmix_elf_section_data): New member pjs.
103 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
104 functions.
105 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
106 (mmix_reloc_map): Ditto.
107 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
108 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
109 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
110 unused.
111 (mmix_elf_check_relocs): Move early return to after
112 mmix_elf_check_common_relocs call.
113 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
114 (_bfd_mmix_before_linker_allocation): Rename from
115 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
116 Arrange to set the initial relaxable size of sections.
117 (_bfd_mmix_after_linker_allocation): Rename from
118 _bfd_mmix_finalize_linker_allocated_gregs.
119 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
120 (bfd_elf64_get_section_contents): Define.
121 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
122 * libbfd.h, bfd-in2.h: Regenerate.
123
4e2147ff
HPN
124 * reloc.c (bfd_generic_relax_section): Default-set
125 section->_cooked_size here.
126 (bfd_generic_get_relocated_section_contents): Don't set it here.
127 Explain why.
128
4b71bec0
DA
1292003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
130
131 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
132 output section has been discarded.
133
d4e2de6b 1342003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
62f3bb11 135
d4e2de6b
NC
136 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
137 (h8300_reloc16_extra_cases): Likewise.
138 (h8300_bfd_link_add_symbols): Likewise.
139
1402003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
141
142 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
143 (h8300sn_info_struct): Likewise.
144 (h8300hn_info_struct): Likewise.
145
98a96df7
CF
1462003-10-16 Pavel Roskin <proski@gnu.org>
147
148 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
149 for sections which lack size info.
150
2cefff79
DS
1512003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
152
153 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
154 mingw32.
155
3e0e1ef1
L
1562003-10-16 H.J. Lu <hongjiu.lu@intel.com>
157
158 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
159 undefined patterns with '*'.
160
9da84788
L
1612003-10-16 H.J. Lu <hongjiu.lu@intel.com>
162
163 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
164 use the last CIE from a different section.
165 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
166 size of the output section.
167
ac393995
RM
1682003-10-07 Roland McGrath <roland@redhat.com>
169
170 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
171 new section from p_align header field.
172
7aaa0689
L
1732003-10-16 H.J. Lu <hongjiu.lu@intel.com>
174
175 * elf32-xtensa.c (xtensa_read_table_entries): The external size
176 of entry is 8 bytes.
177
6cee3f79
AC
1782003-10-15 Andrew Cagney <cagney@redhat.com>
179
180 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
181 with NAME##_canonicalize_symtab.
182 * libcoff-in.h (coff_canonicalize_symtab): Update.
183 * xsym.h (bfd_sym_canonicalize_symtab): Update.
184 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
185 * coffgen.c (coff_canonicalize_symtab): Update.
186 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
187 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
188 * ieee.c (ieee_vec): Update comment.
189 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
190 * mmo.c (mmo_canonicalize_symtab): Update.
191 * nlm-target.h (nlm_canonicalize_symtab): Update.
192 * nlmcode.h (nlm_canonicalize_symtab): Update.
193 * i386msdos.c (msdos_canonicalize_symtab): Update.
194 * hp300hpux.c (MY (canonicalize_symtab)): Update.
195 * oasys.c (oasys_canonicalize_symtab): Update.
196 * som.c (som_canonicalize_symtab): Update.
197 * pef.c (bfd_pef_canonicalize_symtab): Update.
198 * nlmcode.h (nlm_canonicalize_symtab): Update.
199 * xsym.c (bfd_sym_canonicalize_symtab): Update.
200 * vms.c (vms_canonicalize_symtab): Update.
201 * versados.c (versados_canonicalize_symtab): Update.
202 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
203 * ieee.c (ieee_canonicalize_symtab): Update.
204 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
205 * reloc.c: Update comment.
206 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
207 * coff64-rs6000.c (aix5coff64_vec): Update.
208 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
209 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
210 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
211 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
212 * hp300hpux.c (MY_canonicalize_symtab): Update.
213 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
214 * aout-tic30.c (MY_canonicalize_symtab): Update.
215 * aout-target.h (MY_canonicalize_symtab): Update.
216 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
217 * elf.c (_bfd_elf_canonicalize_symtab): Update.
218 * elfcode.h (elf_canonicalize_symtab): Update.
219 * ihex.c (ihex_canonicalize_symtab): Update.
220 * tekhex.c (tekhex_canonicalize_symtab): Update.
221 * binary.c (binary_canonicalize_symtab): Update.
222 * srec.c (srec_canonicalize_symtab): Update.
223
6288878d
KH
2242003-10-15 Kazu Hirata <kazu@cs.umass.edu>
225
226 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
227
46e993b9
KK
2282003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
229
230 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
231 relocations.
232 (sh_elf_check_relocs): Likewise.
233
234 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
235 (sh64_elf_merge_symbol_attribute): New.
236 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
237 (sh64_elf64_merge_symbol_attribute): New.
238
9bf7216d
KK
2392003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
240
241 * elf-bfd.h (struct elf_backend_data): New function pointer member
242 elf_backend_merge_symbol_attribute.
243 * elflink.h (elf_link_add_object_symbols): Adjust call to
244 elf_backend_merge_symbol_attribute if the backend defined it.
62f3bb11
AM
245 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
246 (elfNN_bed): Add that to the initializer.
9bf7216d 247
b614a702
BW
2482003-10-14 Bob Wilson <bob.wilson@acm.org>
249
250 * elf32-xtensa.c (get_is_linkonce_section): Delete.
251 (xtensa_is_property_section, xtensa_is_littable_section): Use
252 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
253 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
254 (xtensa_get_property_section_name): Check section name instead of
255 calling get_is_linkonce_section. Remove unused bfd parameter. Use
256 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
257 linkonce section names by appending ".xt.insn" or ".xt.lit".
258 (xtensa_read_table_entries): Remove bfd argument in call to
259 xtensa_get_property_section_name. Free section name when done.
260 (elf_xtensa_combine_prop_entries): Free leaking table.
261
98a8deaf
RS
2622003-10-13 Richard Sandiford <rsandifo@redht.com>
263
264 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
265 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
266 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
267 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
268 that were needed.
269 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
270 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
271
3f7deb8a
L
2722003-10-13 H.J. Lu <hongjiu.lu@intel.com>
273
274 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
275 (bfd_elf64_ia64_after_parse): Likewise.
276 * bfd-in2.h: Regenerated.
277
278 * elfxx-ia64.c (oor_ip): New.
279 (oor_branch_size): Likewise.
280 (bfd_elfNN_ia64_after_parse): Likewise.
281 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
282 equals sizeof (oor_ip).
283
0c72ffe0
KK
2842003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
285
286 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
287 renumbering of some relocation numbers.
288
8d6ad26e
AM
2892003-10-11 Alan Modra <amodra@bigpond.net.au>
290
291 * coff-sh.c: Move definition of MAP and guard more code with
292 COFF_IMAGE_WITH_PE.
a7f49d81
AM
293
294 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 295 * bfd-in2.h: Regenerate.
a7f49d81 296
ede6aaf3
L
2972003-10-10 H.J. Lu <hongjiu.lu@intel.com>
298
299 * Makefile.am: Run "make dep-am".
300 * Makefile.in: Regenerate.
301 * doc/Makefile.in: Likewise.
302
a3aa4448
L
3032003-10-09 H.J. Lu <hongjiu.lu@intel.com>
304
305 * cofflink.c: Include "safe-ctype.h".
306 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
307
9c8ee639
DB
3082003-10-08 Dave Brolley <brolley@redhat.com>
309 On behalf of Michael Snyder <msnyder@redhat.com>
310
311 * archures.c: Add FRV fr550 machine.
312 * cpu-frv.c: Ditto.
313 * elf32-frv.c: Ditto.
314 * bfd-in2.h: Regenerate.
315
6a691779
TS
3162003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
317
318 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
319 for non-SGI N64 ABI. Improve code consitency.
320
b15b52ef
AO
3212003-10-07 Alexandre Oliva <aoliva@redhat.com>
322
323 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
324 rightshift to 2.
325
cd339148
NS
3262003-10-07 Nathan Sidwell <nathan@codesourcery.com>
327
29ca8dc5
NS
328 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
329 parameter.
330 * cofflink.c (coff_link_add_symbols): Deal with split stab
331 sections.
332 * elflink.h (elf_link_add_object_symbols): Deal with split stab
333 sections.
334 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
335 * libbfd.h: Regenerated.
336
cd339148
NS
337 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
338 overflow, set reloc start position to after the count
339 reloc. Subtract one from num relocs. Give error on 0xffff relocs
340 and no overflow.
341 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
342 overflow.
343 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
344 0xffff.
345
10cf14ea
L
3462003-10-06 H.J. Lu <hongjiu.lu@intel.com>
347
348 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
349 last CIE/FDE if needed.
350
afa105f8
NC
3512003-10-06 Nick Clifton <nickc@redhat.com>
352
353 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
354 BFD64 is enabled.
355
85cf2a8a
NC
3562003-10-06 Matt Thomas <matt@3am-software.com>
357
8d6ad26e 358 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 359
4615568e
NC
3602003-10-06 Robert Millan <robertmh@gnu.org>
361
362 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
363 * config.bfd: Likewise.
364 * configure: Regenerate.
365
8b7cf393
CG
3662003-10-04 Christian Groessler <chris@groessler.org>
367
368 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
369 and R_CALLR.
370
0a6a3ebe
SC
3712003-10-04 Stephane Carrez <stcarrez@nerim.fr>
372
373 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
374 * elf32-m68hc11.c: Likewise.
375 * elf32-m68hc12.c: Likewise.
376 * elf32-m68hc1x.h: Likewise.
377
17e58af0
SC
3782003-10-04 Stephane Carrez <stcarrez@nerim.fr>
379
380 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
381 of flags between HC12 and HCS12.
382
27c630ba
NC
3832003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
384
385 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
386 which become empty after merging.
387
1fc0d173
JJ
3882003-09-30 Jakub Jelinek <jakub@redhat.com>
389
390 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
391 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
392
5f74bc13
CD
3932003-09-30 Chris Demetriou <cgd@broadcom.com>
394
395 * archures.c (bfd_mach_mipsisa64r2): New define.
396 * bfd-in2.h: Regenerate.
397 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
398 * cpu-mips.c (I_mipsisa64r2): New enum value.
399 (arch_info_struct): Add entry for I_mipsisa64r2.
400 * elfxx-mips.c (_bfd_elf_mips_mach)
401 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
402 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
403 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
404
b59dd4a5
L
4052003-09-29 H.J. Lu <hongjiu.lu@intel.com>
406
407 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
408 Handle SHN_IA_64_ANSI_COMMON.
409 (elf_backend_section_from_bfd_section): Defined.
410
243ef1e0
L
4112003-09-26 H.J. Lu <hongjiu.lu@intel.com>
412
413 * elflink.c (elf_link_read_relocs_from_section): Add an argument
414 of a pointer to section. Check bad symbol index.
415 (_bfd_elf_link_read_relocs): Modify calls to
416 elf_link_read_relocs_from_section.
417
d38eb334
DD
4182003-09-23 DJ Delorie <dj@redhat.com>
419
420 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
421 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
422 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
423 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
424 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
425 R_SH_PSHA, R_SH_PSHL added.
426 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
427 (sh_elf_relocate_section): Support new relocs.
428
f0578e28
BW
4292003-09-23 Bob Wilson <bob.wilson@acm.org>
430
431 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
432 dynamic relocation offsets.
433
62f3bb11 4342003-09-23 Alan Modra <amodra@bigpond.net.au>
010b84c1
AM
435
436 * simple.c (bfd_simple_get_relocated_section_contents): Free the
437 hash table using _bfd_generic_link_hash_table_free.
438
62f3bb11 4392003-09-23 Alan Modra <amodra@bigpond.net.au>
7dcb9820
AM
440
441 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
442 type of prefix_length and suffix_length to int. Rename "attributes"
443 to "attr". Comment.
444 (_bfd_elf_get_sec_type_attr): Update prototype.
445 * elf.c (get_special_section): Rewrite.
446 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
447 attr and type pointers.
448 (_bfd_elf_new_section_hook): Adjust for above.
449 (special_sections): Merge suffix with prefix. Set
450 prefix_length for all entries. Set suffix_length appropriately.
451 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
452 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
453 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
454 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
455 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
456 * elf32-v850.c (v850_elf_special_sections): Likewise.
457 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
458 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
459 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
460 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
461 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
462 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
463 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
464 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
465
61bcf373
DJ
4662003-09-21 Daniel Jacobowitz <drow@mvista.com>
467
468 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
469 ->got if the section already exists.
470
8bfd78b3
NS
4712003-09-19 Nathan Sidwell <nathan@codesourcery.com>
472
473 * dwarf2.c (decode_line_info): Cope with an initially empty
474 filename table.
475
6726e1ea
L
4762003-09-18 H.J. Lu <hongjiu.lu@intel.com>
477
478 * acinclude.m4: Include ../config/accross.m4.
479 * aclocal.m4: Regenerated.
480
481 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
482 or long long.
483 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
484 (host64): Remove if HOST_64BIT_TYPE is set to long.
485
486 * configure.in (HOST_64BIT_TYPE): Set according to the size of
487 long and long long.
488 (HOST_U_64BIT_TYPE): Likewise.
489 (host64): Likewise.
490 * configure: Regenerated.
491
5de3bf90
AM
4922003-09-19 Alan Modra <amodra@bigpond.net.au>
493
494 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
495 since some ABIs round up the size of the struct.
496
9e4d8df3
L
4972003-09-18 H.J. Lu <hongjiu.lu@intel.com>
498
499 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
500 the old symbol is undefined and the new symbol is defined.
501
228ce064
AS
5022003-09-18 Andreas Schwab <schwab@suse.de>
503
504 * simple.c (bfd_simple_get_relocated_section_contents): Use
505 _bfd_generic_link_hash_table_create instead of
506 bfd_link_hash_table_create.
507
fdbdabdd
L
5082003-09-10 H.J. Lu <hongjiu.lu@intel.com>
509
510 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
511 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
512
a252afa4
DA
5132003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
514 Randolph Chung <randolph@tausq.org>
515
516 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
517 hppa_link_hash_newfunc, hppa_build_one_stub,
518 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
519 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
520 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
521 for generating import stubs for calls to statically linked PIC
522 functions.
523 (hppa_type_of_stub): Don't generate an import stub for calls to
524 statically linked pic functions. Generate import stubs for calls
525 in a shared object, to functions not in a regular file, and to
526 defined weak functions. Add new argument INFO.
527 (hppa_build_one_stub): Don't undef ADDIL_DP.
528 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
529 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
530 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
531 non-shared link. Convert instructions that use the the linkage table
532 pointer, or a facsimile thereof, to use the global data pointer when
533 the reloc has been changed.
534
42acdc7c
JB
5352003-09-08 Joel Brobecker <brobecker@gnat.com>
536
537 * archures.c: Add new machine names for hppa.
538 * bfd-in2.h: Regenerate.
539 * cpu-hppa.c: Use the new machine names.
540
2a0e29b4
SC
5412003-09-06 Stephane Carrez <stcarrez@nerim.fr>
542
543 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
544 all_local_syms member.
545 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
546 to get the local symbols.
547
3f533aa9
SC
5482003-09-06 Stephane Carrez <stcarrez@nerim.fr>
549
550 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
551 (elf_backend_special_sections): Define.a
552
553 PR savannah/4950:
554 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
555 section is read-only.
556
8ad30312
NC
5572003-09-04 Nick Clifton <nickc@redhat.com>
558
559 * archures.c (bfd_mach_v850e1): Define.
560 * bfd-in2.h: Regenerate.
561 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
562 (arch_info_struct): Include an entry for bfd_mach_v850e1.
563 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
564 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
565 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
566 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
567 linked with v850e binaries. Mark the output as v850e.
5de3bf90 568
3922a8c1
NC
5692003-09-03 Nick Clifton <nickc@redhat.com>
570
5de3bf90 571 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
572 symbols that are used in relocs.
573
13dfd2d0
NC
5742003-08-30 Robert Millan <robertmh@gnu.org>
575
576 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
577 * config.bfd: Likewise.
578 * configure: Regenerate.
579
1c0881dd
CG
5802003-08-31 Christian Groessler <chris@groessler.org>
581
582 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
583 instead of returning bfd_reloc_continue.
584
ac0e732e
AJ
5852003-08-31 Andreas Jaeger <aj@suse.de>
586
587 * merge.c: Update to ISO C90.
588
ec317fb1
ILT
5892003-08-27 Ian Lance Taylor <ian@airs.com>
590
49c97a80
ILT
591 * configure.in: Check for strtoull.
592 * bfd.c (bfd_scan_vma): Use strtoull when available.
593 * configure, config.in: Regenerate.
594
ec317fb1
ILT
595 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
596 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
597 __GNUC__ when deciding whether to use long long for
598 BFD_HOST_64_BIT.
599 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
600
d539b3aa
CG
6012003-08-27 Christian Groessler <chris@groessler.org>
602
603 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
604 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
605 functions.
606 (elf32_i860_howto_table): Insert the new functions as
607 'special_function's in the proper reloc type entries.
608
73052b5e
RS
6092003-08-27 Richard Sandiford <rsandifo@redhat.com>
610
611 * elf32-frv.c (elf32_frv_relocate_section): Use
612 _bfd_elf_rela_local_sym.
613
2c848f79
MS
6142003-08-26 Michael Snyder <msnyder@redhat.com>
615
616 * cpu-frv.c: Remove unused enum.
617
980491e6
MR
6182003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
619
620 * reloc.c: Fix documentation for MIPS ELF relocations.
621 libbfd.h: Regenerate.
622 bfd-in2.h: Regenerate.
623
6d1227b8
JE
6242003-08-24 Jason Eckhardt <jle@rice.edu>
625
5de3bf90 626 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 627
f680ea79
JE
6282003-08-24 Jason Eckhardt <jle@rice.edu>
629
630 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
631 shift by 2 before storing the relocated value.
632
c28b1c28
JE
6332003-08-23 Jason Eckhardt <jle@rice.edu>
634
5de3bf90 635 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
636 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
637 LOWn, SPLITn, and BRADDR.
638 (RTYPE2HOWTO): Check that the r_type is within the howto_table
639 before trying to access the entry.
640 (coff_i860_rtype_to_howto): Likewise.
641 (coff_i860_reloc_type_lookup): New function.
642 (i860_reloc_processing): New function.
643 (coff_bfd_reloc_type_lookup): Define macro.
644 (RELOC_PROCESSING): Define macro.
645 Minor formatting adjustments.
646
40a0491a
AM
6472003-08-23 Alan Modra <amodra@bigpond.net.au>
648
649 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
650
69bbc4c0
L
6512003-08-22 H.J. Lu <hongjiu.lu@intel.com>
652
653 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
654 .got section at 8 bytes.
655
8b956130
NC
6562003-08-21 Nick Clifton <nickc@redhat.com>
657
85db1db4 658 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 659
6c21aa76
NC
6602003-08-21 Randolph Chung <tausq@debian.org>
661
662 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
663 can have OSABI=Linux or OSABI=SysV. Check for both.
664 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
665
3673a93e
NC
6662003-08-21 Nick Clifton <nickc@redhat.com>
667
668 * po/sv.po: Updated Swedish translation.
669
427b80f4
RS
6702003-08-20 Richard Sandiford <rsandifo@redhat.com>
671
672 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
673
560e09e9
NC
6742003-08-20 Nick Clifton <nickc@redhat.com>
675
676 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
677 replace some duplicated code in most elfxx-xxxx.c files. This
678 version uses the new fields in bfd_link_info.
679
40a0491a
AM
680 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
681 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
682 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
683 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
684 * elf32-i386.c (elf_i386_relocate_section): Likewise.
685 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
686 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
687 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
688 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
689 * elf32-s390.c (elf_s390_relocate_section): Likewise.
690 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
691 * elf32-vax.c (elf_vax_relocate_section): Likewise.
692 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
693 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
694 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
695 * elf64-s390.c (elf_s390_relocate_section): Likewise.
696 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
697 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
698 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
699
700 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
701 elf_hppa_remark_useless_dynamic_symbols,
702 elf_hppa_relocate_section): Use the new fields in
703 bfd_link_info structure.
704 * elf32-sh.c (sh_elf_relocate_section): Likewise.
705 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
706 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
707 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
708 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
709 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
710
711 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
712 undefined symbols in shared libraries. Remove redundant test
713 of shlib_undefined when reporting references to forced local
714 symbols.
560e09e9 715
4091ea4e
L
7162003-08-18 Andreas Schwab <schwab@suse.de>
717
718 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
719 executables.
720
b0cdc7bc
HPN
7212003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
722
723 * simple.c (bfd_simple_get_relocated_section_contents): Move
724 reloc_done hack to before first bfd_section_size call. Change all
725 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
726
c1993d04
AM
7272003-08-16 Alan Modra <amodra@bigpond.net.au>
728
729 * elf64-ppc.c: Don't include elf/ppc.h.
730
792b4a53
RS
7312003-08-14 Richard Sandiford <rsandifo@redhat.com>
732
733 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
734 code to work with 64-bit bfds.
735
fdc09da8
AM
7362003-08-14 Alan Modra <amodra@bigpond.net.au>
737
738 * dep-in.sed: Remove libintl.h.
739 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
740 (POTFILES.in): Remove target.
741 * Makefile.in: Regenerate.
742
ee87f2da
AM
7432003-08-12 Alan Modra <amodra@bigpond.net.au>
744
745 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
746 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
747 use the function sym from the previous reloc.
748
15f40dfc
JJ
7492003-08-11 Jakub Jelinek <jakub@redhat.com>
750
751 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
752 fatal if -pie.
753 * elf32-s390.c (elf_s390_relocate_section): Likewise.
754 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
755 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
756 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
757 * elf64-s390.c (elf_s390_relocate_section): Likewise.
758 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
759 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
760 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
761 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
762 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
763 on undefined symbols if -pie.
764 * elf32-sh.c (sh_elf_relocate_section): Likewise.
765
6ab189d5
AM
7662003-08-11 Alan Modra <amodra@bigpond.net.au>
767
768 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
769 branch to __libc_start_main.
770
3b260895
NC
7712003-08-08 Dmitry Diky <diwil@mail.ru>
772
6ab189d5
AM
773 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
774 gcc order.
3b260895
NC
775 * cpu-msp430.c: Likewise.
776 * elf32-msp430.c: Likewise.
777 * bfd-in2.h: Regenerate.
778
c39a58e6
AM
7792003-08-07 Alan Modra <amodra@bigpond.net.au>
780
9c5bfbb7
AM
781 * elfxx-target.h: Remove PTR cast.
782 * targets.c (bfd_target): Make backend_data const void *.
783 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
784 * elf-m10300.c: Likewise.
785 * elf.c: Likewise.
786 * elf32-hppa.c: Likewise.
787 * elf32-i386.c: Likewise.
788 * elf32-m68hc1x.c: Likewise.
789 * elf32-ppc.c: Likewise.
790 * elf32-s390.c: Likewise.
791 * elf32-sh.c: Likewise.
792 * elf32-sh64.c: Likewise.
793 * elf32-sparc.c: Likewise.
794 * elf32-xtensa.c: Likewise.
795 * elf64-mips.c: Likewise.
796 * elf64-ppc.c: Likewise.
797 * elf64-s390.c: Likewise.
798 * elf64-sh64.c: Likewise.
799 * elf64-sparc.c: Likewise.
800 * elf64-x86-64.c: Likewise.
801 * elfcode.h: Likewise.
802 * elfcore.h: Likewise.
803 * elflink.c: Likewise.
804 * elflink.h: Likewise.
805 * elfxx-ia64.c: Likewise.
806 * elfxx-mips.c: Likewise.
807 * elfxx-mips.h: Likewise.
808 * elf.c (prep_headers): Remove useless check for null backend_data.
809 * bfd-in2.h: Regenerate.
810
c39a58e6
AM
811 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
812 (NAME): Use ## rather than CONCAT4 macro.
813 * elfcode.h: Remove one remaining PARAMS macro.
814 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
815 * elf-strtab.c: Likewise.
816 * elf-hppa.h: Likewise.
817 * elf32-hppa.h: Likewise.
818 * elf32-hppa.c: Likewise.
819 (elf32_hppa_add_symbol_hook): Delete.
820 (elf_backend_add_symbol_hook): Don't define.
821 * libhppa.h: Convert to C90. Replace INLINE with inline.
822
97b639ba
AM
8232003-08-06 Alan Modra <amodra@bigpond.net.au>
824
825 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
826 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
827 function descriptors, but warn.
828 (ppc_build_one_stub): Remove a couple of vars. Move code creating
829 stub syms so that we can avoid a stub sym if we already have a
830 plt sym. Do not redefine an existing symbol.
831 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
832 glink.
833
9e7d479d
NC
8342003-08-06 Nick Clifton <nickc@redhat.com>
835
836 * po/fr.po: Updated French translation.
837
77f3d027
AM
8382003-08-06 Alan Modra <amodra@bigpond.net.au>
839
840 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
841 SEC_LINKER_CREATED.
842
50d6c878
DJ
8432003-08-05 Daniel Jacobowitz <drow@mvista.com>
844
845 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
846 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
847
14abcef9
NC
8482003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
849
4a21a492 850 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
851 message if the line number table could not be read.
852
8c675694
NC
8532003-08-04 Nick Clifton <nickc@redhat.com>
854
855 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
856 to messages produced for .gnu.warning.SYMBOL sections.
857
268b6b39
AM
8582003-08-04 Alan Modra <amodra@bigpond.net.au>
859
860 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
861 * elfcore.h: Likewise.
862 * elflink.c: Likewise.
863 * elflink.h: Likewise.
864 * elf.c (sym_is_global): Remove INLINE.
865 (align_file_position): Replace INLINE with inline.
866 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
867 (elf_file_p): Replace INLINE with inline.
868
866f48b7
KK
8692003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
870
871 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
872
8651fcf9
L
8732003-08-01 H.J. Lu <hongjiu.lu@intel.com>
874
875 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
876
37cd2629
L
8772003-08-01 H.J. Lu <hongjiu.lu@intel.com>
878
879 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
880 ElfNN_External_Rela instead of Elf64_External_Rela.
881
91fb2a9d
NC
8822003-08-01 Nick Clifton <nickc@redhat.com>
883
884 * config.bfd: Add code to catch obsolete configurations and warn
885 about them unless --enable-obsolete is used. Use this to mark
886 vax-vms port as obsolete.
887
e656e369
AM
8882003-07-30 Alan Modra <amodra@bigpond.net.au>
889
890 * elf32-ppc.c (ppc_elf_install_value): Tidy.
891 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
892 Formatting.
893 * elfxx-target.h: Remove PARAMS macro. Formatting.
894
50bc7936
AM
8952003-07-30 Alan Modra <amodra@bigpond.net.au>
896
897 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
898 * elf64-ppc.c (get_fdh): New function, split out from
899 ppc64_elf_edit_opd.
900 (ppc64_elf_check_relocs): Use get_fdh.
901 (func_desc_adjust): Likewise. Tidy.
902 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
903 exit. Use get_fdh. Account for superfluous dynamic relocs.
904 (ppc64_elf_relocate_section): Warning fix.
905
a62d170c
JE
9062003-07-30 Jason Eckhardt <jle@rice.edu>
907
908 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
909
7734b6e9
JE
9102003-07-30 Jason Eckhardt <jle@rice.edu>
911
912 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
913
37f4508b
AM
9142003-07-30 Randolph Chung <tausq@debian.org>
915
916 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
917 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
918
217aa764
AM
9192003-07-30 Alan Modra <amodra@bigpond.net.au>
920
921 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
922 Replace PTR with void *. Formatting.
923 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
924 (make_mapping): Likewise.
925
494dac0c
AM
9262003-07-29 Alan Modra <amodra@bigpond.net.au>
927
928 * elf64-ppc.c (func_desc_adjust): Give linker created function
929 descriptor symbols a size and type.
930 (ppc64_elf_relocate_section): Correct lq insn test.
931
deaaf2f3
EC
9322003-07-28 Eric Christopher <echristo@redhat.com>
933
934 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
935 (ppc_elf_install_value): New function.
936 (ppc_elf_sort_rela): Remove.
937 (ppc_elf_relax_section): Rewrite. Remove old relaxation
938 and replace with out of range branch stubs.
939 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
940
709e685d
AO
9412003-07-29 Alexandre Oliva <aoliva@redhat.com>
942
943 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
944 from input_bfd.
945
36c506c5
AM
9462003-07-28 Alan Modra <amodra@bigpond.net.au>
947
948 * elf.c (special_sections): Set attributes for .got and .plt.
949
5d35169e
AM
9502003-07-27 Alan Modra <amodra@bigpond.net.au>
951
952 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
953 on function descriptors.
954 (ELIMINATE_COPY_RELOCS): Expand comment.
955 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
956 Do include ".toc1".
957
3cddba1e
L
9582003-07-25 H.J. Lu <hongjiu.lu@intel.com>
959
960 * elf.c (_bfd_elf_new_section_hook): Set the default section
961 type to SHT_NULL.
962 (elf_fake_sections): Set the section type based on asect->flags
963 if it is SHT_NULL. Don't abort on processor specific section
964 types.
965
d622ef4b
L
9662003-07-25 H.J. Lu <hongjiu.lu@intel.com>
967
968 * bfd-in2.h: Regenerated.
969
2f89ff8d
L
9702003-07-25 H.J. Lu <hongjiu.lu@intel.com>
971
972 * elf-bfd.h (bfd_elf_special_section): New.
973 (elf_backend_data): Add special_sections, a pointer to
974 bfd_elf_special_section.
975 (elf_section_type). New.
976 (elf_section_flags): New.
977 (_bfd_elf_get_sec_type_attr): New.
978
979 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
980 real section type/flags.
981 (special_sections): New.
982 (get_special_section): New.
983 (_bfd_elf_get_sec_type_attr): New.
984 (_bfd_elf_new_section_hook): Check special_section to set
985 elf_section_type and elf_section_flags.
986 (elf_fake_sections): Don't use section name to set ELF section
987 data.
988
989 * elf32-m32r.c (m32r_elf_special_sections): New.
990 (elf_backend_special_sections): Defined.
991
992 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
993 (elf_backend_special_sections): Defined.
994
995 * elf32-mcore.c (mcore_elf_special_sections): New.
996 (elf_backend_special_sections): Defined.
997
998 * elf32-ppc.c (ppc_elf_special_sections): New.
999 (elf_backend_special_sections): Defined.
1000
1001 * elf32-sh64.c (sh64_elf_special_sections): New.
1002 (elf_backend_special_sections): Defined.
1003
1004 * elf32-v850.c (v850_elf_special_sections): New.
1005 (elf_backend_special_sections): Defined.
1006
1007 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1008 (elf_backend_special_sections): Defined.
1009
1010 * elf64-alpha.c (elf64_alpha_special_sections): New.
1011 (elf_backend_special_sections): Defined.
1012
1013 * elf64-hppa.c (elf64_hppa_special_sections): New.
1014 (elf_backend_special_sections): Defined.
1015
1016 * elf64-ppc.c (ppc64_elf_special_sections): New.
1017 (elf_backend_special_sections): Defined.
1018
1019 * elf64-sh64.c (sh64_elf64_special_sections): New.
1020 (elf_backend_special_sections): Defined.
1021
1022 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1023 (elf_backend_special_sections): Defined.
1024
1025 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1026
1027 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1028 (elf_backend_special_sections): Defined.
1029
1030 * elfxx-target.h (elf_backend_special_sections): New. Default
1031 to NULL.
1032 (elfNN_bed): Initialize special_sections.
1033
1034 * section.c (bfd_abs_section): Remove const.
1035 (bfd_und_section): Likewise.
1036 (bfd_com_section): Likewise.
1037 (bfd_ind_section): Likewise.
1038
20650579
NC
10392003-07-24 Nick Clifton <nickc@redhat.com>
1040
1041 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1042 sections are assigned the LOAD attribute.
1043
deaaf2f3 10442003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
1045
1046 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1047 * elf32-sh64-com.c: Likewise.
1048 * elf32-sh64.c: Likewise.
1049 * elf32-sh64.h: Likewise.
1050 * elf64-sh64.c: Likewise.
1051
3d85aebe
KK
10522003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1053
1054 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1055 (allocate_dynrelocs): Likewise.
1056 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1057 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1058
834d807b
NC
10592003-07-24 Nick Clifton <nickc@redhat.com>
1060
1061 * po/fr.po: Updated French translation.
1062
571b5725
BW
10632003-07-23 Bob Wilson <bob.wilson@acm.org>
1064
1065 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1066 near the beginning of the file. Swap order of arguments. Call
1067 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1068 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1069 (elf_xtensa_relocate_section): Likewise.
1070 (shrink_dynamic_reloc_sections): Likewise.
1071
b536dc1e
BW
10722003-07-23 Bob Wilson <bob.wilson@acm.org>
1073
1074 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1075 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1076 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1077 first printing an error message.
1078 (elf_xtensa_finish_dynamic_sections): Likewise.
1079 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1080 discarding literal table entries.
1081 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1082 (elf_xtensa_do_asm_simplify): Likewise.
1083
7f888330
SC
10842003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1085
1086 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1087 we have a local symbol in common section.
1088
ecc27c31
L
10892003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1090
1091 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1092 weak symbols.
1093
f9f3cf65
NC
10942003-07-22 Nick Clifton <nickc@redhat.com>
1095
1096 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1097 expected RS6000 storage classes.
1098
bb32e54f
L
10992003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1100
1101 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1102 output_bfd unused to silence gcc.
1103
796f2a93
NC
11042003-07-21 Nick Clifton <nickc@redhat.com>
1105
1106 * po/sv.po: Updated Swedish translation.
1107
f6c52c13
AM
11082003-07-21 Alan Modra <amodra@bigpond.net.au>
1109
1110 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1111 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1112 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1113 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1114 now done in _bfd_elf_symbol_refs_local_p.
1115 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1116 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1117 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1118
aa37626c
L
11192003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1120
1121 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1122
1e364ec9
L
11232003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1124
1125 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1126 (SYMBOL_CALLS_LOCAL): Likewise.
1127
1128 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1129 immediately if symbol isn't defined locally.
1130
986a241f
RH
11312003-07-18 Richard Henderson <rth@redhat.com>
1132
1133 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1134 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1135 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1136 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1137 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1138 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1139 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1140 Update all callers to provide the relocation being resolved.
1141
ac4b3dd8
NC
11422003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1143
1144 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1145 targ_cflags.
1146
6c37ac4d
NC
11472003-07-17 Nick Clifton <nickc@redhat.com>
1148
1149 * po/es.po: New Spanish translation.
1150 * po/sv.po: New Swedish translation.
1151 * po/opcodes.pot: Regenerate.
1152
02e6ad56
RH
11532003-07-16 Richard Henderson <rth@redhat.com>
1154
1155 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1156 * elfxx-ia64.c, targets.c: Likewise.
1157
5686517c
RH
11582003-07-16 Richard Henderson <rth@redhat.com>
1159
1160 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1161 for symbols defined locally plus -Bsymbolic. Tidy logic.
1162
5a7ea749
RS
11632003-07-15 Richard Sandiford <rsandifo@redhat.com>
1164
1165 * archures.c (bfd_mach_mips7000): New.
1166 * bfd-in2.h: Regenerated.
1167 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1168 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1169 (mips_mach_extensions): Add an entry for it.
1170
76bff705
NC
11712003-07-14 Nick Clifton <nickc@redhat.com>
1172
1173 * po/tr.po: Update with latest version.
1174 * po/SRC-POTFILES.in: Regenerate.
1175 * po/bfd.pot: Regenerate.
1176 * Makfile.in: Regenerate.
1177 * configure: Regenerate.
1178
d0facd1b
NC
11792003-07-12 Jeff Baker <jbaker@qnx.com>
1180
1181 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1182 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1183 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1184 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1185
bcb9b88d
NC
11862003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1187
1188 * coffcode.h (coff_set_section_contents): Set the
1189 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1190
7a9823f1
RS
11912003-07-11 Richard Sandiford <rsandifo@redhat.com>
1192
1193 * bfd-in.h (bfd_h8300_pad_address): Declare.
1194 * bfd-in2.h: Regenerate.
1195 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1196 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1197 addresses before checking whether they can be relaxed.
1198 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1199 Don't complain about overflows in general 8-bit relocations.
1200 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1201 Fix handling of R_H8_DIR24A8.
1202
c6baf75e
RS
12032003-07-11 Richard Sandiford <rsandifo@redhat.com>
1204
1205 * elf32-h8300.c: Convert function prototypes and definitions
1206 to C90 syntax.
1207 * coff-h8300.c: Likewise.
1208 * cpu-h8300.c: Likewise.
1209
fce00800
AM
12102003-07-11 Alan Modra <amodra@bigpond.net.au>
1211
1212 * po/SRC-POTFILES.in: Regenerate.
1213 * po/bfd.pot: Likewise.
1214
e901de89
BW
12152003-07-10 Bob Wilson <bob.wilson@acm.org>
1216
1217 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1218 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1219 .xt.lit.plt section.
1220 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1221 and allocate memory for it.
1222 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1223 section to the .got.loc section.
1224 (elf_xtensa_finish_dynamic_sections): Fix up call to
1225 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1226 the address of .got.loc.
1227 (relax_property_section): Shrink .got.loc to match changes in any
1228 literal table section.
1229 (xtensa_is_property_section): Change to match
1230 xtensa_get_property_section_name.
1231 (xtensa_is_littable_section): New.
1232
eff26f78
L
12332003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1234
1235 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1236 -1LL.
1237
942e0f42
AM
12382003-07-10 Alan Modra <amodra@bigpond.net.au>
1239
1240 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1241 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1242 Run "make dep-am".
1243 * Makefile.in: Regenerate.
1244
73c3cd1c
AO
12452003-07-10 Alexandre Oliva <aoliva@redhat.com>
1246
1247 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1248 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1249 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1250 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1251 * elf32-am33lin.c: Rename global functions.
1252 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1253 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1254 * configure.in (bfd_elf32_am33lin_vec): Added.
1255 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1256 (elf32-am33lin.lo): List dependencies.
1257 * aclocal.m4, configure, Makefile.in: Rebuilt.
1258 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1259 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1260 ELF_ARCH was not defined before.
1261 (elf_symbol_leading_char): Define if not defined.
1262 * elf32-am33lin.c: Override the definitions above.
1263 * targets.c (bfd_elf32_am33lin_vec): New.
1264
03a12831
AO
12652003-07-09 Alexandre Oliva <aoliva@redhat.com>
1266
1267 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1268 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1269 pcrel_relocs_copied.
1270 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1271 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1272 ld-linux.so.2 to ld.so.1.
1273 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1274 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1275 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1276 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1277 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1278 .rela.* section contents with bfd_zalloc.
1279 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1280 * elf-m10300.c: Added declarations for functions missing them.
1281 Merge some shared-library changes from the i386 back-end. Use
1282 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1283 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1284 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1285 members of elf_link_hash_entry. Adjusted references.
1286 (mn10300_elf_final_link_relocate): dynobj was already loaded
1287 into a local variable, use it.
1288 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1289 * elf-m10300.c: Add missing function prototypes.
1290 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1291 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1292 relocation for dynamic relocations.
1293 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1294 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1295 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1296 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1297 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1298 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1299 adress is already known at the time we compute relaxations.
1300 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1301 and PLT32 to narrower relocations.
1302 * libbfd.h, bfd-in2.h: Rebuilt.
1303 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1304 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1305 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1306 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1307 BFD_RELOC_MN10300_RELATIVE): New relocs.
1308 * libbfd.h, bfd-in2.h: Rebuilt.
1309 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1310 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1311 fields.
1312 (elf_mn10300_howto): Defined new relocation types.
1313 (mn10300_reloc_map): Map them.
1314 (_bfd_mn10300_elf_create_got_section): New fn.
1315 (mn10300_elf_check_relocs): Handle PIC relocs.
1316 (mn10300_elf_final_link_relocate): Likewise.
1317 (mn10300_elf_relocate_section): Handle DSOs.
1318 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1319 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1320 elf_mn10300_pic_plt_entry): New.
1321 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1322 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1323 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1324 elf_mn10300_plt_reloc_offset: New macros.
1325 (ELF_DYNAMIC_INTERPRETER): Likewise.
1326 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1327 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1328 (_bfd_mn10300_elf_discard_copies): Likewise.
1329 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1330 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1331 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1332 (elf_backend_can_gc_sections,
1333 elf_backend_create_dynamic_sections,
1334 elf_backend_adjust_dynamic_sections,
1335 elf_backend_size_dynamic_sections,
1336 elf_backend_finish_dynamic_symbol,
1337 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1338 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1339 elf_backend_got_header_size, elf_backend_plt_header_size): New
1340 macros.
1341
b08fa4d3
AO
13422003-07-09 Alexandre Oliva <aoliva@redhat.com>
1343
1344 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1345 * elf-m10300.c (compute_function_info): Account for AM33
1346 registers in `movm' when computing stack space for `call' when
1347 linking for AM33/2.0 link.
1348 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1349 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1350 * bfd-in2.h: Rebuilt.
1351 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1352 * elf-m10300.c: Updated.
1353 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1354 * archures.c (bfd_mach_am332): Defined.
1355 * bfd-in2.h: Rebuilt.
1356 * cpu-m10300.c (bfd_am332_arch): Defined.
1357 (bfd_am33_arch): Chained with am33-2.
1358 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1359 (_bfd_mn10300_elf_final_write_processing): Likewise.
1360
201933ea
L
13612003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1362
1363 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1364
e717da7e
AM
13652003-07-10 Alan Modra <amodra@bigpond.net.au>
1366
1367 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1368 (struct ppc64_elf_obj_tdata): New.
1369 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1370 (ppc64_elf_mkobject): New function.
1371 (struct got_entry): Add "owner". Move "tls_type".
1372 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1373 (ppc64_elf_init_stub_bfd): New function.
1374 (create_got_section): Create header .got in dynobj. Create .got
1375 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1376 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1377 Look for dynobj .got, and test it.
1378 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1379 (update_local_sym_info): Likewise.
1380 (ppc64_elf_check_relocs): Likewise.
1381 (ppc64_elf_gc_sweep_hook): Likewise.
1382 (ppc64_elf_tls_optimize): Likewise.
1383 (allocate_dynrelocs): Likewise.
1384 (ppc64_elf_size_dynamic_sections): Likewise.
1385 (ppc64_elf_relocate_section): Likewise.
1386 (ppc64_elf_next_toc_section): Update comment.
1387 (toc_adjusting_stub_needed): Remove unneeded cast.
1388 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1389 testing section flags.
1390 (ppc64_elf_build_stubs): Likewise.
1391 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1392 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1393 (func_desc_adjust): Copy over dynamic info for undef weaks.
1394 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1395 (ppc64_elf_size_stubs): Update prototype.
1396 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1397 input sections rather than scanning dynobj.
1398
18ad015f
RS
13992003-07-09 Richard Sandiford <rsandifo@redhat.com>
1400
1401 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1402 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1403 (mips_elf_create_msym_section): Delete.
1404 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1405 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1406 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1407 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1408 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1409 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1410 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1411
e10609d3
RS
14122003-07-09 Richard Sandiford <rsandifo@redhat.com>
1413
1414 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1415 symbols protected.
1416
0d591ff7
RS
14172003-07-09 Richard Sandiford <rsandifo@redhat.com>
1418
1419 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1420 of relocations whose offset is -2.
1421
fdd07405
RS
14222003-07-09 Richard Sandiford <rsandifo@redhat.com>
1423
1424 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1425 forced-local symbols like other locals. Don't create relocations
1426 against STN_UNDEF in irix objects.
1427
d2fba50d
RS
14282003-07-09 Richard Sandiford <rsandifo@redhat.com>
1429
1430 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1431 compatible objects, add the values of defined external symbols
1432 to the addend.
1433
6eaa6adc
RS
14342003-07-09 Richard Sandiford <rsandifo@redhat.com>
1435
1436 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1437 initialize a GOT entry to the symbol's st_value.
1438
0c83546a
AM
14392003-07-08 Alan Modra <amodra@bigpond.net.au>
1440
43c40ab2
AM
1441 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1442 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1443 (ppc_elf_tdata): Define.
1444 (elf_local_ptr_offsets): Adjust.
1445 (ppc_elf_mkobject): New function.
1446 (bfd_elf32_mkobject): Define.
1447
0c83546a
AM
1448 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1449 * elfcore.h (elf_core_file_p): Likewise.
1450 * section.c (bfd_section_init): Remove prototype.
1451
58111eb7
AM
14522003-07-08 Alan Modra <amodra@bigpond.net.au>
1453
1454 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1455 field.
1456 (enum elf_linker_section_enum): Delete.
1457 (struct elf_linker_section): Delete.
1458 (struct elf_linker_section_pointers): Delete.
1459 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1460 Make linker_section_pointers a void**.
1461 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1462 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1463 of old item in elf-bfd.h.
1464 (struct elf_linker_section): Likewise.
1465 (struct elf_linker_section_pointers): Likewise.
1466 (elf_local_ptr_offsets): Define.
1467 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1468 (ppc_elf_link_hash_newfunc): Init it.
1469 (struct ppc_elf_link_hash_table): Add sbss.
1470 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1471 individual fields.
1472 (elf_create_linker_section): Fold into..
1473 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1474 Make rela section here if shared.
1475 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1476 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1477 clearing in a loop.
1478 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1479 section here.
1480 (ppc_elf_check_relocs): Adjust.
1481 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1482 creating .sbss by hand.
1483 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1484
15f8604d
JJ
14852003-07-04 Jakub Jelinek <jakub@redhat.com>
1486
1487 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1488 complain_overflow_bitfield.
1489 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1490 complain_overflow_bitfield.
1491
3368a7fb
JJ
14922003-07-04 Jakub Jelinek <jakub@redhat.com>
1493
1494 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1495 true even if -pie.
1496
9203ba99
JJ
14972003-07-04 Jakub Jelinek <jakub@redhat.com>
1498
1499 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1500 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1501 !info->executable.
1502 (get_fptr): For -pie create .opd as writable section and create
1503 .rela.opd as well.
1504 (elfNN_ia64_check_relocs): Change info->shared into
1505 !info->executable.
1506 (allocate_fptr): Likewise.
1507 (allocate_dynrel_entries): Account for a relative reloc for -pie
1508 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1509 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1510 section if -pie.
1511 (set_got_entry): Don't create a relative reloc if -pie
1512 want_ltoff_fptr for undefweak symbol.
1513 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1514 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1515 @fptr().
1516
1517 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1518 even if -pie.
1519 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1520 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1521 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1522 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1523 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1524 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1525 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1526 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1527 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1528
e0a868d1 15292003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1530
1531 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1532 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1533 <R_H8_DIR32A16>: Fix type of relocation.
1534
35cad4c4
KK
15352003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1536
1537 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1538 sections were created already. Remove unnecessary tests of
1539 the previous change.
1540
03151a5a
KK
15412003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1542
1543 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1544 bfd_make_section for existing sections.
1545
003d627e
AM
15462003-07-04 Alan Modra <amodra@bigpond.net.au>
1547
2293c499
AM
1548 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1549 create_got_section if we already have done so.
1550 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1551 (sh_elf_check_relocs): Likewise.
1552 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1553 htab->root.dynobj instead.
1554 (sh_elf_check_relocs): Likewise.
1555 (sh_elf_finish_dynamic_sections): Likewise.
1556
003d627e
AM
1557 * section.c (bfd_make_section): Return NULL for existing section.
1558
fa681e5d
AM
15592003-07-04 Alan Modra <amodra@bigpond.net.au>
1560
1561 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1562 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1563
1564 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1565 (_bfd_elf_find_pointer_linker_section): Likewise.
1566 (bfd_elf32_create_pointer_linker_section): Likewise.
1567 (bfd_elf32_finish_pointer_linker_section): Likewise.
1568 (bfd_elf64_create_pointer_linker_section): Likewise.
1569 (bfd_elf64_finish_pointer_linker_section): Likewise.
1570 (_bfd_elf_make_linker_section_rela): Likewise.
1571 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1572 (elf_finish_pointer_linker_section): Likewise.
1573 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1574 (_bfd_elf_create_linker_section): Move this function..
1575 (_bfd_elf_find_pointer_linker_section): ..and this..
1576 * elflink.h (elf_create_pointer_linker_section): ..and this..
1577 (elf_finish_pointer_linker_section): ..and this..
1578 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1579 calls.
1580 (elf_create_linker_section): Convert to C90, tidy.
1581 (elf_find_pointer_linker_section): Likewise.
1582 (elf_create_pointer_linker_section): Likewise.
1583 (elf_finish_pointer_linker_section): Likewise.
1584 * elf32-i370.c: Delete #if 0 code.
1585
772119ce
AM
15862003-07-02 Alan Modra <amodra@bigpond.net.au>
1587
1588 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1589 _restf* to be satisfied by shared libs, and always force them local.
1590 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1591 Correct test for "bl".
1592 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1593 primary opcode 31.
1594
bd1ea41b
MS
15952003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1596
1597 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1598 (s390_tls_reloc): New function.
1599 (elf_howto_table): Add long displacement relocations R_390_20,
1600 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1601 (elf_s390_reloc_type_lookup): Likewise.
1602 (elf_s390_check_relocs): Likewise.
1603 (elf_s390_gc_sweep_hook): Likewise.
1604 (elf_s390_relocate_section): Likewise.
1605 * elf64-s390.c: Same changes as for elf32-s390.c.
1606 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1607 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1608 BFD_RELOC_390_TLS_GOTIE20.
1609 * bfd-in2.h: Regenerate.
1610 * libbfd.h: Likewise.
1611
113202d6
AM
16122003-06-30 Alan Modra <amodra@bigpond.net.au>
1613
1614 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1615 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1616
c58b9523
AM
16172003-06-29 Alan Modra <amodra@bigpond.net.au>
1618
1619 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1620 Replace PTR with void *. Formatting.
1621 * archive64.c: Likewise.
1622 * archures.c: Likewise.
1623 * bfd-in.h: Likewise.
1624 * bfd.c: Likewise.
1625 * bfdio.c: Likewise.
1626 * bfdwin.c: Likewise.
1627 * cache.c: Likewise.
1628 * corefile.c: Likewise.
1629 * format.c: Likewise.
1630 * init.c: Likewise.
1631 * libbfd-in.h: Likewise.
1632 * libbfd.c: Likewise.
1633 * linker.c: Likewise.
1634 * opncls.c: Likewise.
1635 * reloc.c: Likewise.
1636 * section.c: Likewise.
1637 * simple.c: Likewise.
1638 * syms.c: Likewise.
1639 * targets.c: Likewise.
1640 * bfd-in2.h: Regenerate.
1641 * libbfd.h: Regenerate.
1642
1643 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1644 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1645 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1646 (bfd_getb64): Rewrite without parens.
1647 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1648 * cache.c (insert, snip): Remove INLINE.
1649 * linker.c (bfd_link_add_undef): Likewise.
1650
27482721
AJ
16512003-06-29 Andreas Jaeger <aj@suse.de>
1652
1653 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1654 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1655 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1656 trim plt entries. Move undefweak non-default visibility test ...
1657 (allocate_dynrelocs): ... from here.
1658 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1659 Change all callers.
1660 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1661 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1662 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1663 dynreloc and .got relocs.
1664 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1665 for .got relocs.
27482721 1666
2b86c02e
TS
16672003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1668
1669 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1670
e7c81c25
NC
16712003-06-27 Nick Clifton <nickc@redhat.com>
1672
1673 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1674 bfd_add_gnu_debuglink_section and only create the section, do not
1675 fill in its contents.
1676 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1677 contents of a .gnu-debuglink section.
1678 * bfd-in2.h: Regenerate.
1679
72b4917c
TS
16802003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1681
1682 * elfxx-mips.c: Revert .got alignment to 2**4.
1683
91709090
TS
16842003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1685
1686 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1687
7a79a000
TS
16882003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1689
1690 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1691 relocation header setup.
1692
e47cd125
AM
16932003-06-25 Alan Modra <amodra@bigpond.net.au>
1694
1695 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1696 (ppc_elf_reloc_type_lookup): Modify comment.
1697 (ppc_elf_info_to_howto): Ditto.
1698 (ppc_elf_relocate_section): Ditto.
1699 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1700
1049f94e
AM
17012003-06-25 Alan Modra <amodra@bigpond.net.au>
1702
1703 * aout-ns32k.c: Correct spelling of "relocatable".
1704 * aoutx.h: Likewise.
1705 * bfd-in.h: Likewise.
1706 * bfd.c: Likewise.
1707 * bout.c: Likewise.
1708 * coff-a29k.c: Likewise.
1709 * coff-alpha.c: Likewise.
1710 * coff-arm.c: Likewise.
1711 * coff-i386.c: Likewise.
1712 * coff-i860.c: Likewise.
1713 * coff-i960.c: Likewise.
1714 * coff-m68k.c: Likewise.
1715 * coff-m88k.c: Likewise.
1716 * coff-mcore.c: Likewise.
1717 * coff-mips.c: Likewise.
1718 * coff-or32.c: Likewise.
1719 * coff-ppc.c: Likewise.
1720 * coff-rs6000.c: Likewise.
1721 * coff-sh.c: Likewise.
1722 * coff-tic80.c: Likewise.
1723 * coff64-rs6000.c: Likewise.
1724 * cofflink.c: Likewise.
1725 * cpu-ns32k.c: Likewise.
1726 * ecoff.c: Likewise.
1727 * ecofflink.c: Likewise.
1728 * elf-bfd.h: Likewise.
1729 * elf-eh-frame.c: Likewise.
1730 * elf-hppa.h: Likewise.
1731 * elf-m10200.c: Likewise.
1732 * elf-m10300.c: Likewise.
1733 * elf.c: Likewise.
1734 * elf32-arm.h: Likewise.
1735 * elf32-avr.c: Likewise.
1736 * elf32-cris.c: Likewise.
1737 * elf32-d10v.c: Likewise.
1738 * elf32-dlx.c: Likewise.
1739 * elf32-fr30.c: Likewise.
1740 * elf32-frv.c: Likewise.
1741 * elf32-h8300.c: Likewise.
1742 * elf32-hppa.c: Likewise.
1743 * elf32-i370.c: Likewise.
1744 * elf32-i386.c: Likewise.
1745 * elf32-i860.c: Likewise.
1746 * elf32-i960.c: Likewise.
1747 * elf32-ip2k.c: Likewise.
1748 * elf32-iq2000.c: Likewise.
1749 * elf32-m32r.c: Likewise.
1750 * elf32-m68hc11.c: Likewise.
1751 * elf32-m68hc1x.c: Likewise.
1752 * elf32-m68k.c: Likewise.
1753 * elf32-mcore.c: Likewise.
1754 * elf32-mips.c: Likewise.
1755 * elf32-msp430.c: Likewise.
1756 * elf32-openrisc.c: Likewise.
1757 * elf32-ppc.c: Likewise.
1758 * elf32-s390.c: Likewise.
1759 * elf32-sh.c: Likewise.
1760 * elf32-sh64.c: Likewise.
1761 * elf32-sparc.c: Likewise.
1762 * elf32-v850.c: Likewise.
1763 * elf32-vax.c: Likewise.
1764 * elf32-xstormy16.c: Likewise.
1765 * elf32-xtensa.c: Likewise.
1766 * elf64-alpha.c: Likewise.
1767 * elf64-hppa.c: Likewise.
1768 * elf64-mips.c: Likewise.
1769 * elf64-mmix.c: Likewise.
1770 * elf64-ppc.c: Likewise.
1771 * elf64-s390.c: Likewise.
1772 * elf64-sh64.c: Likewise.
1773 * elf64-sparc.c: Likewise.
1774 * elf64-x86-64.c: Likewise.
1775 * elfcode.h: Likewise.
1776 * elflink.h: Likewise.
1777 * elfn32-mips.c: Likewise.
1778 * elfxx-ia64.c: Likewise.
1779 * elfxx-mips.c: Likewise.
1780 * i386linux.c: Likewise.
1781 * ieee.c: Likewise.
1782 * libcoff-in.h: Likewise.
1783 * linker.c: Likewise.
1784 * m68klinux.c: Likewise.
1785 * pdp11.c: Likewise.
1786 * pe-mips.c: Likewise.
1787 * peXXigen.c: Likewise.
1788 * reloc.c: Likewise.
1789 * reloc16.c: Likewise.
1790 * sparclinux.c: Likewise.
1791 * sunos.c: Likewise.
1792 * syms.c: Likewise.
1793 * versados.c: Likewise.
1794 * vms.c: Likewise.
1795 * xcofflink.c: Likewise.
1796 * bfd-in2.h: Regenerate.
1797 * libcoff.h: Regenerate.
1798 * libbfd.h: Regenerate.
1799
55fd94b0
AM
18002003-06-24 Alan Modra <amodra@bigpond.net.au>
1801
d85f2c7d
AM
1802 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1803 local sym errors.
1804
55fd94b0
AM
1805 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1806 prototypes and casts. Replace PTR with void *. Formatting.
1807 * elf32-ppc.c: Likewise. Break long strings too.
1808 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1809 (ppc_elf_unhandled_reloc): Internationalize error message.
1810 * elf32-ppc.h: Remove PARAMS.
1811
88810f8c
MM
18122003-06-23 Mark Mitchell <mark@codesourcery.com>
1813
1814 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1815 APUinfo slots.
1816 (ppc_elf_final_write_processing): Likewise.
1817
6e35c4da
L
18182003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1819
1820 * elflink.h (elf_link_input_bfd): Check raw size when using
1821 kept_section to preserve debug information discarded by
1822 linkonce.
1823
8f3bab57
AM
18242003-06-20 Alan Modra <amodra@bigpond.net.au>
1825
1826 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1827 (ppc64_elf_setup_section_lists): Set it.
1828 (ppc64_elf_relocate_section): Check sym section id against top_id.
1829 (ppc_build_one_stub): Comment on top_id.
1830
efbc813e
NC
18312003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1832
1833 * config.bfd: Add tic4x-*-rtems*.
1834
4ce794b7
AM
18352003-06-20 Alan Modra <amodra@bigpond.net.au>
1836
1837 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1838 prototypes and casts. Replace PTR with void *. Format copyright.
1839 Mention ABI links.
1840 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1841 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1842 (ppc_type_of_stub): Make r_type an enum.
1843 (ppc64_elf_size_stubs): Likewise.
1844 * elf64-ppc.h: Remove PARAMS macro.
1845
d2a300cf
AM
18462003-06-19 Alan Modra <amodra@bigpond.net.au>
1847
3254fd24
AM
1848 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1849 elf hash tab fields.
1850
d2a300cf
AM
1851 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1852 (ppc64_elf_info_to_howto): Likewise.
1853 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1854 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1855
83615de0
AM
18562003-06-19 Alan Modra <amodra@bigpond.net.au>
1857
1858 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1859 reloc overflow on discarded eh_frame entries.
1860
9b5ecbd0
AM
18612003-06-19 Alan Modra <amodra@bigpond.net.au>
1862
1863 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1864 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1865 Return error condition.
1866 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1867 that have has_gp_reloc set.
1868 (struct ppc_link_hash_table): Add stub_count.
1869 (ppc_build_one_stub): Increment it.
1870 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1871 individual fields.
1872 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1873
64c456e1
AM
18742003-06-18 Alan Modra <amodra@bigpond.net.au>
1875
1876 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1877 size calculation from addend. Round size up.
1878
3dab95d3
HPN
18792003-06-18 Hans-Peter Nilsson <hp@axis.com>
1880
1881 * elf32-cris.c (cris_elf_relocate_section) <case
1882 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1883 symbol from a normal object or an undefined weak symbol.
1884
0b13192e
AM
18852003-06-18 Alan Modra <amodra@bigpond.net.au>
1886
1887 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1888 R_PPC64_TOC relocs.
1889
f97b9cb8
L
18902003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1891
1892 * section.c (struct sec): Put back kept_section.
1893 (STD_SECTION): Put back kept_section initialization.
1894 * bfd-in2.h: Regenerate.
1895
1896 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1897 sections for relocateable output. Use kept_section to preserve
1898 debug information discarded by linkonce.
1899
9f1c3a0a
L
19002003-06-17 Roland McGrath <roland@redhat.com>
1901
1902 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1903 segment-relative relocation between different segments.
1904
734b6cf9
AM
19052003-06-17 Alan Modra <amodra@bigpond.net.au>
1906
1cf1f670
AM
1907 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1908 optimizations earlier.
1909
734b6cf9
AM
1910 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1911 Restore previous input_list type.
1912 (ppc64_elf_link_hash_table_create): Undo last change.
1913 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1914 per output section, but don't bother with bfd_abs_section marker.
1915 (ppc64_elf_next_input_section): Adjust for multiple input section
1916 lists.
1917 (group_sections): Likewise.
1918
23fbd6fa
JJ
19192003-06-17 Jakub Jelinek <jakub@redhat.com>
1920
1921 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1922 *r_offset == r_addend for RELATIVE relocs against .got.
1923
dad27d18
AM
19242003-06-17 Alan Modra <amodra@bigpond.net.au>
1925
1926 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1927
b613960a
NC
19282003-06-17 Nick Clifton <nickc@redhat.com>
1929
1930 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1931 in the vtable_entries_used array to allow for the accessing
1932 the largest element.
b613960a 1933
000732f7
AM
19342003-06-17 Alan Modra <amodra@bigpond.net.au>
1935
3d6f9012
AM
1936 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1937 input_list.
1938 (ppc64_elf_link_hash_table_create): Init input_list here.
1939 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1940 per output section. Set toc_off for abs and other standard sections.
1941 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1942 (ppc64_elf_next_input_section): Adjust for single input section list.
1943 Don't set toc_curr from input bfds that haven't set elf_gp.
1944 (group_sections): Adjust for single input section list.
1945
000732f7
AM
1946 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1947
81407a69
AM
19482003-06-16 Alan Modra <amodra@bigpond.net.au>
1949
1950 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1951 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1952 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1953 got section for RELATIVE relocs. Fix wrong comment. Change condition
1954 under which dynamic relocs update the section contents.
1955
a06a29f2
NC
19562003-06-13 Robert Millan <zeratul2@wanadoo.es>
1957
1958 * config.bfd: Add i386-netbsd-gnu target.
1959
7d1ebfb2
NC
19602003-06-12 Nick Clifton <nickc@redhat.com>
1961
1962 * opncls.c (calc_crc32): Rename to
1963 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1964 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1965 hard-coded ".gnu_debuglink" in the code.
81407a69 1966 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1967 xmalloc with a call to malloc.
81407a69 1968 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1969 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1970 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1971 section to a bfd.
1972 * bfd-in2.h: Regenerate.
1973
19742003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1975
7d1ebfb2
NC
1976 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1977 New target (was i[3-7]86-*-openbsd* before).
1978 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1979 (vax-*-openbsd*): New target.
1980
d80dcc6a
TS
19812003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1982
1983 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1984 for n32, too.
1985 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1986 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1987 (mips_elf_create_got_section): Likewise.
1988 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1989
a7ebbfdf
TS
19902003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1991
1992 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1993 (elf_mips_howto_table_rel): Use it.
1994 (gprel32_with_gp): Move prototype.
1995 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1996 Use mips_elf_generic_reloc.
1997 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1998 Code cleanup.
1999 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2000 zero addend.
2001 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2002 as in the other *_gprel*_reloc functions.
2003 (gprel32_with_gp): Handle partial_inplace properly.
2004 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2005 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2006 Do addend handling directly instead of calling
2007 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2008 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2009 of zero addend. Handle partial_inplace properly.
2010 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2011 addend.
2012 (mips_elf64_gprel16_reloc): Likewise.
2013 (mips_elf64_literal_reloc): Likewise.
2014 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2015 logic as in the other *_gprel*_reloc functions. Handle
2016 partial_inplace properly.
2017 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2018 addend. Handle partial_inplace properly.
2019 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2020 of calling _bfd_mips_elf_gprel16_with_gp.
2021 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2022 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2023 of zero addend.
2024 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2025 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2026 of calling _bfd_mips_elf_gprel16_with_gp.
2027 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2028 partial_inplace properly. Fix wrong addend handling. Fix overflow
2029 check.
2030 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2031 exported.
2032 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2033 (_bfd_mips_elf_relocate_section): Likewise.
2034 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2035 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2036 (_bfd_mips_elf_sign_extend): New prototype.
2037
49ba19a4 20382003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2039
49ba19a4
NC
2040 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2041 New target (was sparc-*-openbsd* before).
2042 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 2043
de6e5e1a
NC
2044 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2045 * configure: Regenerate.
2046
3b443373
L
20472003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2048
2049 * po/Make-in (DESTDIR): New.
2050 (install-data-yes): Support $(DESTDIR).
2051 (uninstall): Likewise.
2052
795bb480
AM
20532003-06-11 Alan Modra <amodra@bigpond.net.au>
2054
2055 * Makefile.am (config.status): Depend on version.h.
2056 Run "make dep-am".
2057 * Makefile.in: Regenerate.
2058 * po/SRC-POTFILES.in: Regenerate.
2059
adadcc0c
AM
20602003-06-10 Alan Modra <amodra@bigpond.net.au>
2061 Gary Hade <garyhade@us.ibm.com>
2062
2063 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2064
f4984206
RS
20652003-06-10 Richard Sandiford <rsandifo@redhat.com>
2066
2067 * archures.c (bfd_mach_h8300sxn): New architecture.
2068 * bfd-in2.h: Regenerate.
2069 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2070 (h8300sxn_info_struct): New.
2071 (h8300sx_info_struct): Link to it.
2072 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2073 (elf32_h8_final_write_processing): Likewise.
2074
ad8e1ba5
AM
20752003-06-08 Alan Modra <amodra@bigpond.net.au>
2076
2077 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2078 elfxx-target.h so that we can use elf_backend_got_header_size.
2079 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2080 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2081 associated macros.
2082 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2083 dst_mask.
2084 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2085 ppc_stub_plt_branch_r2off.
2086 (struct ppc_stub_hash_entry): Reorganize.
2087 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2088 toc_curr, toc_off and emit_stub_syms.
2089 (ppc64_elf_link_hash_table_create): Init them.
2090 (ppc_stub_name): Correct string size.
2091 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2092 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2093 used.
2094 (ppc_type_of_stub): Tweak root.type test.
2095 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2096 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2097 ppc_stub_plt_branch_r2off.
2098 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2099 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2100 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2101 Initialize elf_gp and toc_curr.
2102 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2103 (ppc64_elf_next_input_section): Set toc_off.
2104 (group_sections): Ensure groups have the same TOC.
2105 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2106 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2107 Build new glink stub.
2108 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2109 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2110 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2111 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2112 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2113 (STD_SECTION): Update.
2114 * ecoff.c (bfd_debug_section): Update comment.
2115 * bfd-in2.h: Regenerate.
2116
90fff0d4
DJ
21172003-06-05 Daniel Jacobowitz <drow@mvista.com>
2118
2119 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2120 NULL function pointers.
2121
c82b20e4
DJ
21222003-06-05 Daniel Jacobowitz <drow@mvista.com>
2123
2124 * simple.c (bfd_simple_get_relocated_section_contents): Call
2125 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2126
53d4437a
SS
21272003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2128
5a5b9651
SS
2129 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2130 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2131 swaptables.
2132 * coff-tic4x.c: Ditto
53d4437a
SS
2133 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2134 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
2135 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2136 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2137 swap tables.
53d4437a
SS
2138 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2139 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2140 * coff-apollo.c: Ditto
2141 * coff-arm.c: Ditto
2142 * coff-h8300.c: Ditto
2143 * coff-h8500.c: Ditto
2144 * coff-i960.c: Ditto
2145 * coff-m68k.c: Ditto
2146 * coff-m88k.c: Ditto
2147 * coff-mcore.c: Ditto
2148 * coff-sh.c: Ditto
2149 * coff-sparc.c: Ditto
2150 * coff-tic80.c: Ditto
2151 * coff-we32k.c: Ditto
2152 * coff-z8k.c: Ditto
2153 * coff-w65.c: Ditto
2154
736694c8
SS
21552003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2156
2157 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2158 initialization bug
2159
9ee5e499
JJ
21602003-06-03 Jakub Jelinek <jakub@redhat.com>
2161
2162 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2163 (bfd_section_from_phdr): Likewise.
2164 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2165 (get_program_header_size): Count with PT_GNU_STACK.
2166 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2167 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2168
6f6f27f8
L
21692003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2170
2171 * elflink.h (elf_link_input_bfd): Call linker error_handler
2172 for discarded definitions.
2173
a3b6428f
NC
21742003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2175
2176 * syms.c (decode_section_type): Return 'n' if section flags are
2177 SEC_HAS_CONTENTS && SEC_READONLY.
2178
e30ddb24
NC
21792003-06-03 Nick Clifton <nickc@redhat.com>
2180
2181 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2182 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2183 (v850_elf_reloc_map): Likewise.
2184 (v850_elf_check_relocs): Likewise.
2185 (v850_elf_perform_relocation): Likewise.
2186 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2187 to make R_V850_REl32 pc-relative.
adadcc0c 2188
2558b9a9
KK
21892003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2190
2191 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2192 and DT_DEBUG dynamic tag even for position independent executables.
2193 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2194
f15398ef
DJ
21952003-06-02 Daniel Jacobowitz <drow@mvista.com>
2196
2197 * config.bfd: Move obsolete entries out of the range of the
2198 targmatch sed script.
2199
cad28985
DJ
22002003-06-02 Daniel Jacobowitz <drow@mvista.com>
2201
2202 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2203
f2c822e3
JJ
22042003-05-31 Jakub Jelinek <jakub@redhat.com>
2205
2206 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2207 plt entries, not just 8191.
2208
c9c27aad
DJ
22092003-05-30 Daniel Jacobowitz <drow@mvista.com>
2210
2211 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2212 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2213
36af4a4e
JJ
22142003-05-30 Ulrich Drepper <drepper@redhat.com>
2215 Jakub Jelinek <jakub@redhat.com>
2216
2217 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2218 instead of info->shared where appropriate.
2219 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2220 * elflink.c (_bfd_elf_create_got_section): Likewise.
2221 (_bfd_elf_link_create_dynamic_sections): Likewise.
2222 (_bfd_elf_link_assign_sym_version): Likewise.
2223 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2224 and DT_DEBUG dynamic tag even for position independent executables.
2225 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2226 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2227 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2228 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2229 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2230 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2231 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2232 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2233 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2234
f8843e87
AM
22352003-05-30 Kris Warkentin <kewarken@qnx.com>
2236
2237 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2238 signalled thread.
2239 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2240
29e1a6e4
NC
22412003-05-29 Nick Clifton <nickc@redhat.com>
2242
2243 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2244 Tidy up formatting.
2245 * Makefile.am: Add dependency on safe-ctype.h.
2246 * Makefile.in: Regenerate.
2247
4b555070
TS
22482003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2249
2250 * elfxx-mips.c: Don't force symbols local unconditionally.
2251
0236e03e
L
22522003-05-28 Alan Modra <amodra@bigpond.net.au>
2253
2254 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2255 undefined_symbol call.
2256
9e4aeb93
RS
22572003-05-27 Richard Sandiford <rsandifo@redhat.com>
2258
2259 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2260 (mips_elf_link_hash_table): Likewise.
2261
d0c728db
TS
22622003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2263
2264 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2265 R_MIPS_GNU_REL16_S2 support.
2266 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2267 (mips_elf64_rtype_to_howto): Use it.
2268 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2269 R_MIPS_GNU_REL16_S2 support.
2270 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2271 (mips_elf_n32_rtype_to_howto): Use it.
2272
759ebd76
DA
22732003-05-21 Stuart F. Downing <sdowning@fame.com>
2274
2275 * som.h: Define PA_2_0 before including a.out.h
2276
143d77c5
EC
22772003-05-07 Eric Christopher <echristo@redhat.com>
2278 Alexandre Oliva <aoliva@redhat.com>
2279
2280 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2281 pic tests, change to warning.
2282 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2283
cea3d58d
NC
22842003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2285
2286 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2287 well as shle-...-netbsdelf. Remove duplicate entry.
2288
385a4c14
NC
22892003-05-21 Nick Clifton <nickc@redhat.com>
2290
60e42408
NC
2291 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2292 for X_STORMY16_REL_12 reloc.
2293
385a4c14 2294 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2295 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2296 (bfd_elf_get_runpath_list): Likewise.
2297
129b8c20
RM
22982003-05-19 Roland McGrath <roland@redhat.com>
2299
2300 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2301 * bfd-in.h: Declare it.
2302 * bfd-in2.h: Regenerated.
2303 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2304 * elf-bfd.h (struct elf_backend_data): New function pointer member
2305 elf_backend_bfd_from_remote_memory.
2306 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2307 Declare them.
2308 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2309 (elfNN_bed): Add that to the initializer.
2310
23112003-05-15 Roland McGrath <roland@redhat.com>
2312
2313 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2314
22d5e339
L
23152003-05-20 Jakub Jelinek <jakub@redhat.com>
2316
2317 * elflink.h (elf_link_output_extsym): Only issue error about !=
2318 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2319
23202003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2321
2322 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2323 when removing the old definition for symbols with non-default
2324 visibility.
2325
b645cb17
JE
23262003-05-18 Jason Eckhardt <jle@rice.edu>
2327
2328 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2329
d2ff124f
AS
23302003-05-17 Andreas Schwab <schwab@suse.de>
2331
2332 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2333 elf_section_data during processing of pc-relative and absolute
2334 relocations.
2335 (elf_m68k_relocate_section): Use the cached reloc section instead
2336 of computing it again. Fix handling of visibility. Don't modify
2337 addend when copying over a relocation into the output.
2338
9c7a29a3
AM
23392003-05-17 Alan Modra <amodra@bigpond.net.au>
2340
2341 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2342 to trim plt entries. Move undefweak non-default visibility test..
2343 (allocate_dynrelocs): ..from here.
2344 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2345 dynamic_sections_created here. Update comment. Move undefweak
2346 non-default visibility test..
2347 (allocate_dynrelocs): ..from here. Fix comment.
2348 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2349 to trim plt entries. Move undefweak non-default visibility test..
2350 (allocate_dynrelocs): ..from here. Fix comment.
2351 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2352 STV_DEFAULT rather than comparing with zero.
2353 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2354 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2355
9bcf4de0
TS
23562003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2357
2358 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2359 pointers.
2360 (_bfd_set_gp_value): Likewise.
2361
5d1db417
MS
23622003-05-16 Michael Snyder <msnyder@redhat.com>
2363 From Bernd Schmidt <bernds@redhat.com>
2364 * archures.c (bfd_mach_h8300sx): New.
2365 * bfd-in2.h: Regenerate.
2366 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2367 (h8300sx_info_struct): New.
2368 (h8300s_info_struct): Link to it.
2369 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2370 (elf32_h8_final_write_processing): Likewise.
2371 (elf32_h8_relax_section): Likewise.
2372
80c7c40a
NC
23732003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2374
2375 * config.bfd: Accept i[3-7]86 variants.
2376 * configure.host: Likewise.
2377 * configure.in: Likewise.
2378 * configure: Regenerate.
2379
c1be741f
L
23802003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2381
2382 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2383 symbol.
2384
a15d9d3a
L
23852003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2386
2387 * elflink.h (elf_link_check_versioned_symbol): Also allow
2388 the base version.
2389
09695f56
AM
23902003-05-15 Alan Modra <amodra@bigpond.net.au>
2391 H.J. Lu <hongjiu.lu@intel.com>
2392
2393 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2394 (elf_i386_relocate_section): Likewise.
2395 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2396 (ppc_elf_relocate_section): Likewise.
2397 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2398 (ppc64_elf_relocate_section): Likewise.
2399
40f62fa0
TS
24002003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2401
2402 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2403
47247ced
SC
24042003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2405
2406 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2407 processor capability, allow merge of HC12 and HCS12 in some cases.
2408 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2409 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2410 (bfd_m68hc12_arch): Link it.
2411 (scan_mach): New function.
2412
32dfa85d
AH
24132003-05-13 Andrew Haley <aph@redhat.com>
2414
2415 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2416
586119b3
AM
24172003-05-13 Alan Modra <amodra@bigpond.net.au>
2418 H.J. Lu <hongjiu.lu@intel.com>
2419
2420 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2421 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2422 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2423 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2424 (ppc_elf_relocate_section): Likewise.
2425 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2426 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2427 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2428 relocs need no other types.
2429 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2430 dynreloc check.
2431 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2432 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2433 .got relocs.
2434
04e534c3
KK
24352003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2436
2437 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2438 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2439 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2440 visibility, a) don't allocate plt entries, b) don't allocate
2441 .got relocs, c) discard dyn rel space
adadcc0c
AM
2442 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2443 don't generate dynamic relocs.
04e534c3
KK
2444 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2445 for weakdefs when symbol already adjusted.
2446
0afb2dc0
NC
24472003-05-12 Nick Clifton <nickc@redhat.com>
2448
2449 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2450 overflow detection for R_XSTORMY16_16 reloc.
2451
9d29900b
NC
24522003-05-12 Paul Clarke <paulc@senet.com.au>
2453
2454 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2455
a48c6a54
JE
24562003-05-11 Jason Eckhardt <jle@rice.edu>
2457
2458 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2459 adjust upper bits.
2460 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2461 proper place.
2462 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2463 proper place.
2464
44f745a6
AS
24652003-05-11 Andreas Schwab <schwab@suse.de>
2466
2467 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2468 complicated tests for unresolvable relocs with a simple direct
2469 scheme using "unresolved_reloc" var. Report some detail on
2470 bfd_reloc_outofrange and similar errors.
2471
4ec72bde
MS
24722003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2473
2474 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2475 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2476 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2477 * elf64-s390.c: Likewise.
2478
64285810
MS
24792003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2480
2481 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2482 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2483 ELF_LINK_NON_GOT_REF from weakdef.
2484 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2485 already been adjusted before treating it specially.
2486 * el64-s390.c: Likwise.
2487
82058a73
MS
24882003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2489
2490 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2491 non-default visibility, a) don't make them dynamic, b) discard
2492 space for dynamic relocs.
2493 (elf_s390_relocate_section): Initialize the GOT entries and skip
2494 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2495 symbols with non-default visibility.
2496 * elf64-s390.c: Likewise.
2497
60d8b524
AM
24982003-05-09 Alan Modra <amodra@bigpond.net.au>
2499
2500 * cpu-arm.c (arm_check_note): Warning fix.
2501 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2502 to keep relocs if edited.
2503 (iq2000_elf_print_private_bfd_data): Return TRUE.
2504 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2505 ELF64_R_SYM.
2506 (elfNN_ia64_relax_ldxmov): Warning fix.
2507 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2508 * xtensa-modules.c (get_num_opcodes): Warning fix.
2509
e57b5356
AM
25102003-05-09 Andrey Petrov <petrov@netbsd.org>
2511
2512 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2513
45d6a902
AM
25142003-05-09 Alan Modra <amodra@bigpond.net.au>
2515
2516 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2517 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2518 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2519 (bfd_elf_record_link_assignment): Move from elflink.h.
2520 (_bfd_elf_merge_symbol): Likewise.
2521 (_bfd_elf_add_default_symbol): Likewise.
2522 (_bfd_elf_export_symbol): Likewise.
2523 (_bfd_elf_link_find_version_dependencies): Likewise.
2524 (_bfd_elf_link_assign_sym_version): Likewise.
2525 (_bfd_elf_link_read_relocs): Likewise.
2526 (_bfd_elf_link_size_reloc_section): Likewise.
2527 (_bfd_elf_fix_symbol_flags): Likewise.
2528 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2529 (_bfd_elf_link_sec_merge_syms): Likewise.
2530 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2531 and bed->s->sizeof_rela.
2532 (_bfd_elf_link_output_relocs): Likewise.
2533 * elf-bfd.h (struct elf_size_info): Rename file_align to
2534 log_file_align.
2535 (struct elf_info_failed): Move from elflink.h.
2536 (struct elf_assign_sym_version_info): Likewise.
2537 (struct elf_find_verdep_info): Likewise.
2538 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2539 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2540 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2541 _bfd_elf_link_assign_sym_version,
2542 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2543 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2544 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2545 _bfd_elf_link_sec_merge_syms): Declare.
2546 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2547 (_bfd_elf32_link_read_relocs): Likewise.
2548 (bfd_elf64_link_create_dynamic_sections): Likewise.
2549 (_bfd_elf64_link_read_relocs): Likewise.
2550 * elflink.h: Move lots o' stuff elsewhere.
2551 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2552 (bfd_elf64_record_link_assignment): Likewise.
2553 (bfd_elf_record_link_assignment): Declare.
2554 * bfd-in2.h: Regenerate.
2555 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2556 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2557 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2558 (assign_file_positions_for_segments): Likewise.
2559 (assign_file_positions_except_relocs): Likewise.
2560 (swap_out_syms, elfcore_write_note): Likewise.
2561 * elf-m10200.c: Adjust for changed function names.
2562 * elf-m10300.c: Likewise.
2563 * elf32-arm.h: Likewise.
2564 * elf32-h8300.c: Likewise.
2565 * elf32-hppa.c: Likewise.
2566 * elf32-ip2k.c: Likewise.
2567 * elf32-m32r.c: Likewise.
2568 * elf32-m68hc11.c: Likewise.
2569 * elf32-m68hc1x.c: Likewise.
2570 * elf32-m68k.c: Likewise.
2571 * elf32-mips.c: Likewise.
2572 * elf32-ppc.c: Likewise.
2573 * elf32-sh.c: Likewise.
2574 * elf32-v850.c: Likewise.
2575 * elf32-xtensa.c: Likewise.
2576 * elf64-alpha.c: Likewise.
2577 * elf64-hppa.c: Likewise.
2578 * elf64-mmix.c: Likewise.
2579 * elf64-ppc.c: Likewise.
2580 * elf64-sh64.c: Likewise.
2581 * elfxx-ia64.c: Likewise.
2582 * elfxx-mips.c: Likewise.
2583 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2584 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2585 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2586 * elf64-mips.c (mips_elf64_size_info): Likewise.
2587 * elf64-s390.c (s390_elf64_size_info): Likewise.
2588 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2589
bf1e742e
L
25902003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2591
2592 * elflink.h (elf_add_default_symbol): After skipping the
2593 unversioned symbol, go to non-default one.
2594
6a32c710
L
25952003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2596
2597 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2598 want_plt field.
2599 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2600 for symbols with non-default visibility.
2601
71552942
L
26022003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2603
2604 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2605 case that a DSO references a hidden symbol which may be
2606 satisfied by a versioned symbol in another DSO.
2607 (elf_link_output_extsym): Check versioned definition for hidden
2608 symbol referenced by a DSO.
2609
208c2cd6
NC
26102003-05-07 Nick Clifton <nickc@redhat.com>
2611
2612 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2613 R_XSTORMY16_16 reloc to ignore overflows.
2614
aa701218
AO
26152003-05-06 Alexandre Oliva <aoliva@redhat.com>
2616
2617 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2618 error message for mixing different-endian files. Check for ABI
2619 compatibility of input files with the selected emulation.
2620
4e795f50
AM
26212003-05-05 Alan Modra <amodra@bigpond.net.au>
2622
2623 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2624 non-default visibility, a) don't make them dynamic, b) discard
2625 space for dynamic relocs.
2626 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2627
2628 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2629 non-default visibility, a) don't allocate plt entries, b) don't
2630 allocate .got relocs, c) discard dyn rel space,
2631 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2632 don't generate dynamic relocs.
2633 * elf64-ppc.c (allocate_dynrelocs): As above.
2634 (ppc64_elf_relocate_section): As above.
2635
4bc6e03a
AJ
26362003-05-05 Andreas Jaeger <aj@suse.de>
2637
2638 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2639 relocation entries for weak undefined symbols with non-default
2640 visibility.
2641 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2642 skip R_386_32/R_386_PC32 for weak undefined symbols with
2643 non-default visibility.
2644
ef5aade5
L
26452003-05-04 H.J. Lu <hjl@gnu.org>
2646
2647 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2648 relocation entries for weak undefined symbols with non-default
2649 visibility.
2650 (elf_i386_relocate_section): Initialize the GOT entries and
2651 skip R_386_32/R_386_PC32 for weak undefined symbols with
2652 non-default visibility.
129b8c20 2653
ef5aade5
L
2654 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2655 descriptors for weak undefined symbols with non-default
2656 visibility.
2657 (allocate_dynrel_entries): Don't allocate relocation entries
2658 for symbols resolved to 0.
2659 (set_got_entry): Don't install dynamic relocation for weak
2660 undefined symbols with non-default visibility.
2661 (set_pltoff_entry): Likewise.
2662
2663 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2664 with non-default visibility.
2665 (elf_link_output_extsym): Don't make weak undefined symbols
2666 with non-default visibility dynamic.
2667
c424e0e9
L
26682003-05-04 H.J. Lu <hjl@gnu.org>
2669
2670 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2671
d31e3dfe
L
26722003-05-04 H.J. Lu <hjl@gnu.org>
2673
2674 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2675 symbol dynamic. Check indirection when removing the old
2676 definition for symbols with non-default visibility.
2677 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2678
4d2e1ff0
NC
26792003-05-02 Nick Clifton <nickc@redhat.com>
2680
2681 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2682 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2683 unsigned overflow.
2684
d40d037c
AJ
26852003-05-02 Andreas Jaeger <aj@suse.de>
2686
2687 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2688 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2689 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2690 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2691 ELF_LINK_NON_GOT_REF from weakdef.
2692
c5d1701e
NC
26932003-05-02 Charles Lepple <clepple@ghz.cc>
2694 Nick Clifton <nickc@redhat.com>
2695
2696 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2697 * aclocal.m4: Regenerate.
2698 * configure: Regenerate.
2699 * Makefile.in: Regenerate.
2700
81848ca0
AM
27012003-05-01 Alan Modra <amodra@bigpond.net.au>
2702
2703 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2704 weakdef sym has already been adjusted before treating it specially.
2705 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2706 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2707 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2708 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2709
c7996ad6
L
27102003-04-28 H.J. Lu <hjl@gnu.org>
2711
2712 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2713 the relax finalize pass.
2714
2715 * section.c (struct sec): Add need_finalize_relax and remove
2716 flag11.
2717 (STD_SECTION): Update struct sec initializer.
2718 * bfd-in2.h: Regenerated.
2719
f006af20
L
27202003-04-28 H.J. Lu <hjl@gnu.org>
2721
2722 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2723 to copy any information related to dynamic linking when we flip
2724 the indirection.
2725
1b1fe8fe
L
27262003-04-27 H.J. Lu <hjl@gnu.org>
2727
2728 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2729 (ELF_LINK_DYNAMIC_WEAK): New.
2730
2731 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2732 a symbol should be skipped. Ignore definitions in dynamic
2733 objects for symbols with non-default visibility.
2734 (elf_add_default_symbol): Adjusted.
2735 (elf_link_add_object_symbols): Check if a symbol should be
2736 skipped. Don't merge the visibility field with the one from
2737 a dynamic object.
2738 (elf_link_check_versioned_symbol): Use undef_bfd.
2739 (elf_link_output_extsym): Warn if a forced local symbol is
2740 referenced from dynamic objects. Make non-weak undefined symbol
2741 with non-default visibility a fatal error.
2742
052a450c
DJ
27432003-04-27 Daniel Jacobowitz <drow@mvista.com>
2744
2745 * configure.in: Bump version on HEAD to 2.14.90.
2746 * configure: Regenerated.
2747
d204f4c0
SC
27482003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2749
2750 PR savannah/3331:
2751 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2752 when we couldn't relax something.
2753
3c0a515d
L
27542003-04-25 Alan Modra <amodra@bigpond.net.au>
2755
2756 * elflink.h (elf_merge_symbol): When we find a regular definition
2757 for an indirect symbol, flip the indirection so that the old
2758 direct symbol now points to the new definition.
2759
d145330d
RM
27602003-04-24 Roland McGrath <roland@redhat.com>
2761
2762 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2763
fc0bffd6
AM
27642003-04-24 Alan Modra <amodra@bigpond.net.au>
2765
2766 * elf32-ppc.c: Formatting and comment fixes.
2767 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2768 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2769
27702003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2771
2772 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2773 * bfd-in2.h: Rebuilt.
2774 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2775 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2776 & H8300SNMAGIC.
2777 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2778 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2779 (h8300sn_info_struct, h8300hn_info_struct): New.
2780 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2781 (elf32_h8_final_write_processing): Likewise.
2782
267fb3c1
KK
27832003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2784
2785 * elf32-sh.c (tpoff): New.
2786 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2787 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2788 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2789 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2790 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2791 (dtpoff_base): Fix wrong indentation.
2792 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2793 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2794 R_SH_TLS_TPOFF32 relocations.
2795
ef230218
JR
27962003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2797
2798 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2799 * cpu-sh.c: Likewise.
2800 * elf32-sh.c: Likewise.
2801 * reloc.c (bfd_reloc_code_real): Likewise.
2802 * elf32-sh64-com.c: Change comment to refer to SuperH.
2803 * elf32-sh64.c: Likewise.
2804 * elf64-sh64.c: Likewise.
2805 * bfd-in2.h (enum bfd_architecture): Regenerate.
2806
8c29f035
AM
28072003-04-23 Alan Modra <amodra@bigpond.net.au>
2808
2809 From Julien LEMOINE <speedblue@debian.org>
2810 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2811 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2812
26597c86
NC
28132003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2814
2815 * archures.c: Replace references to Mitsubishi M32R with references
2816 to Renesas M32R.
2817 * relocs.c: Likewise.
2818 * bfd-in2.h: Regenerate.
2819
cc13e3ef
RH
28202003-04-21 Richard Henderson <rth@redhat.com>
2821
2822 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2823 executable when a symbol is defined both regular and dynamic.
2824
f5a6f915
SC
28252003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2826
2827 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2828 (elf32-m68hc1x.lo): Update dependencies
2829 * configure.in: Add elf32-m68hc1x.lo.
2830 * configure: Rebuild.
2831 * Makefile.in: Rebuild.
2832
3a65329d
SC
28332003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2834
2835 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2836 (m68hc11_elf_hash_table_create): New function.
2837 (elf32_m68hc11_link_hash_table_free): New function.
2838 (stub_hash_newfunc): New function.
2839 (m68hc11_add_stub): New function.
2840 (elf32_m68hc11_add_symbol_hook): New function.
2841 (elf32_m68hc11_setup_section_lists): New function.
2842 (elf32_m68hc11_next_input_section): New function.
2843 (elf32_m68hc11_size_stubs): New function.
2844 (elf32_m68hc11_build_stubs): New function.
2845 (m68hc11_get_relocation_value): New function.
2846 (elf32_m68hc11_relocate_section): Call the above to redirect
2847 some relocations to the trampoline code.
2848 (m68hc11_elf_export_one_stub): New function.
2849 (m68hc11_elf_set_symbol): New function.
2850 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2851 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2852 is not yet initialized.
2853
2854 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2855 (elf32_m68hc11_stub_hash_entry): New struct.
2856 (m68hc11_page_info): Add trampoline handler address.
2857 (m68hc11_elf_link_hash_table): Add stubs generation members.
2858 (elf32_m68hc11_add_symbol_hook): Declare.
2859 (elf32_m68hc11_setup_section_lists): Declare.
2860 (elf32_m68hc11_size_stubs): Declare.
2861 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2862
3a65329d
SC
2863 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2864 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2865 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2866 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2867 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2868 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2869 (bfd_elf32_bfd_link_hash_table_create): Define.
2870 (elf_backend_add_symbol_hook): Define.
2871 (m68hc11_elf_bfd_link_hash_table_create): New function.
2872 (m68hc11_elf_build_one_stub): New function.
2873 (m68hc11_elf_size_one_stub): New function.
2874 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2875 (bfd_elf32_bfd_link_hash_table_create): Define.
2876
2877 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2878 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2879 (m68hc12_phys_addr): Ditto.
2880 (m68hc12_phys_page): Ditto.
2881 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2882 (elf32_m68hc11_gc_mark_hook): Likewise.
2883 (elf32_m68hc11_gc_sweep_hook): Likewise.
2884 (elf32_m68hc11_check_relocs): Likewise.
2885 (elf32_m68hc11_relocate_section): Likewise.
2886 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2887 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2888 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2889 (m68hc12_elf_build_one_stub): New function.
2890 (m68hc12_elf_size_one_stub): New function.
2891 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2892 (elf_backend_add_symbol_hook): Define.
2893 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2894
4081944f
NC
28952003-04-18 Nick Clifton <nickc@redhat.com>
2896
2897 * format.c (bfd_check_format_matches): Only check associated
2898 vector if the matching_vector has been created.
2899
060dc71d
AO
29002003-04-15 Alexandre Oliva <aoliva@redhat.com>
2901
2902 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2903 2003-04-09's change.
2904
a3476bef
NC
29052003-04-15 Brian Ford <ford@vss.fsi.com>
2906
2907 * peicode.h (coff_swap_scnhdr_in): If a section holds
2908 uninitialized data and is from an object file or from an
2909 executable image that has not initialized the s_size field, or if
2910 the physical size is padded, use the virtual size (stored in
2911 s_paddr) instead.
2912
ca4fa240
NC
29132003-04-15 H.J. Lu <hjl@gnu.org>
2914
2915 * elflink.h (elf_link_add_object_symbols): Properly report
2916 filename for alignment reduction.
2917
c2dcd04e
NC
29182003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2919
2920 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2921 * reloc.c: Likewise.
2922 * coff-h8300.c: Likewise.
2923 * coff-h8500.c: Likewise.
2924 * coff-sh.c: Likewise.
2925 * cpu-h8300.c: Likewise.
2926 * cpu-sh.c: Likewise.
2927 * elf32-h8300.c: Likewise.
2928 * elf32-sh.c: Likewise.
2929 * elf32-sh64-com.c: Likewise.
2930 * elf32-sh64.c: Likewise.
2931 * elf64-sh64.c: Likewise.
2932 * bfd-in2.h: Regenerate.
2933
f7661995
NC
29342003-04-14 H.J. Lu <hjl@gnu.org>
2935
2936 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2937 alignment for common symbols. Warn reducing alignment for
2938 common symbols. Report old filename when symbol size changes.
2939
93a2b7ae
AO
29402003-04-12 Alexandre Oliva <aoliva@redhat.com>
2941
2942 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2943 occurrences of the same test changed in the previous patch.
2944 Optimize.
2945
0176c794
AO
29462003-04-11 Alexandre Oliva <aoliva@redhat.com>
2947
2948 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2949 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2950 GOT_DISP/addend only if the symbol got a global GOT entry.
2951
0fdc1bf1
AO
29522003-04-10 Alexandre Oliva <aoliva@redhat.com>
2953
2954 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2955 GOT_PAGE/GOT_OFST referencing overridable symbol to
2956 GOT_DISP/addend.
2957 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2958 global symbol as GOT_DISP.
2959
9b8c98a4
BW
29602003-04-10 Bob Wilson <bob.wilson@acm.org>
2961
2962 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2963 next relocation on an undefined symbol.
2964
ec1659c8
RH
29652003-04-09 Richard Henderson <rth@redhat.com>
2966
2967 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2968 Ignore relocations against r_symndx == 0.
2969
7dfb07f7
L
29702003-04-09 H.J. Lu <hjl@gnu.org>
2971
2972 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2973 FALSE for undefined symbols.
2974 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2975
a3805e4e
AO
29762003-04-09 Alexandre Oliva <aoliva@redhat.com>
2977
2978 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2979 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2980 addr_size.
2981
69931e60
AO
29822003-04-08 Alexandre Oliva <aoliva@redhat.com>
2983
2984 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2985 pointer size from ABI, not arch_bits_per_address.
2986
59a8c196
KB
29872003-04-07 Kevin Buettner <kevinb@redhat.com>
2988
2989 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2990 constants for n32 ABI.
2991
8e16317c
NC
29922003-04-06 Andrew Cagney <cagney@redhat.com>
2993
2994 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2995 free that leads to GDB vs BFD memory corruption.
2996
196486be
SC
29972003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2998
2999 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3000 symbols that mark the end of the section.
3001 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3002 converting to a relative branch so that the offset is computed after
3003 the relaxation; also relocate a jsr into a bsr if possible but don't
3004 relax them if they are to a far symbol as we need to call the
3005 trampoline code.
3006 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3007
be33c5dd
SS
30082003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3009
3010 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3011 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3012 * bfd-in2.h: Regenerate
3013 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3014 * cpu-tic4x.c: Ditto
3015
ff0c9faf
NC
30162003-04-03 Nick Clifton <nickc@redhat.com>
3017
3018 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3019 differently for object files and executables.
3020 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3021 for object files or for executables who have not already
3022 initialised the field.
3023 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3024 the PE format bfd is an executable.
3025
2b98e6c0
AM
30262003-04-03 Alan Modra <amodra@bigpond.net.au>
3027
3028 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3029 here as it's too early to reliably determine locality.
3030 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 3031 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 3032
92403579
BW
30332003-04-02 Bob Wilson <bob.wilson@acm.org>
3034
3035 * xtensa-modules.c: Remove comment indicating that this is a
3036 generated file.
3037
c45a316a
AM
30382003-04-02 Alan Modra <amodra@bigpond.net.au>
3039
3040 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3041
e0001a05
NC
30422003-04-01 Bob Wilson <bob.wilson@acm.org>
3043
8c29f035
AM
3044 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3045 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3046 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3047 xtensa-modules.lo.
3048 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3049 xtensa-modules.c.
3050 (cpu-xtensa.lo): New target.
3051 (elf32-xtensa.lo): Likewise.
3052 (xtensa-isa.lo): Likewise.
3053 (xtensa-modules.lo): Likewise.
3054 * Makefile.in: Regenerate.
3055 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3056 (bfd_archures_list): Add bfd_xtensa_arch.
3057 * config.bfd: Handle xtensa-*-*.
3058 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3059 * configure: Regenerate.
3060 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3061 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3062 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3063 (bfd_elf32_xtensa_le_vec): Likewise.
3064 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3065 * cpu-xtensa.c: New file.
3066 * elf32-xtensa.c: Likewise.
3067 * xtensa-isa.c: Likewise.
3068 * xtensa-modules.c: Likewise.
3069 * libbfd.h: Regenerate.
3070 * bfd-in2.h: Likewise.
e0001a05 3071
5a6c6817
NC
30722003-04-01 Nick Clifton <nickc@redhat.com>
3073
3074 * archures.c (bfd_mach_arm_unknown): Define.
3075 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3076 bfd_arm_get_mach_from_notes): Prototype.
3077 * bfd-in2.h: Regenerate.
3078 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3079 bfd_arm_merge_machines.
3080 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3081 * coffcode.h (coff_set_arch_mach_hook): Call
3082 bfd_arm_get_mach_from_notes.
3083 * coffgen.c (coff_real_object_p): Revert previous delta.
3084 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3085 .note section.
3086 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3087 binaries compiled for different architectures..
3088 (bfd_arm_update_notes): New function: Update an ARM note section.
3089 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3090 number from an ARM note section.
3091 * elf32-arm.h (elf32_arm_object_p): Use
3092 bfd_arm_get_mach_from_notes.
3093 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3094 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 3095
0cc1cf99
BE
30962003-04-01 Ben Elliston <bje@wasabisystems.com>
3097
3098 * dwarf2.c (read_attribute_value): Correct typo in comment.
3099
af3ef9fe
NC
31002003-04-01 Nick Clifton <nickc@redhat.com>
3101
3102 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3103 instead of concat().
3104 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
3105 (add_line_info): Make a copy of the filename when storing it into
3106 the info structure.
af3ef9fe 3107
6e84a906
DJ
31082003-03-31 Andreas Schwab <schwab@suse.de>
3109 Daniel Jacobowitz <drow@mvista.com>
3110
3111 * simple.c (bfd_simple_get_relocated_section_contents): Add
3112 parameter symbol_table. Optionally use it instead of the symbol
3113 table from the bfd. Save and restore output offsets and output
3114 sections around bfd_get_relocated_section_contents. Fix a memory
3115 leak.
3116 (simple_save_output_info, simple_restore_output_info): New
3117 functions.
3118 * bfd-in2.h: Regenerate.
3119 * dwarf2.c (read_abbrevs): Use
3120 bfd_simple_get_relocated_section_contents instead of
3121 bfd_get_section_contents.
3122 (decode_line_info): Likewise.
3123 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3124 find_rela_addend.
3125 (find_rela_addend): Remove.
3126 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3127 debugging sections.
3128 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3129 not bfd_zalloc.
3130
5ed6aba4
NC
31312003-03-31 David Heine <dlheine@suif.stanford.edu>
3132
3133 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3134 bfd_alloc.
3135 * dwarf2.c (concat_filename): Always allocate space for the
3136 returned filename.
3137 (decode_line_info): Free the allocated filename returned by
3138 concat_filename.
3139 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3140 * elf.c (copy_private_bfd_data): Likewise.
3141 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3142 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3143 * format.c (bfd_check_format_matches): Likewise.
3144 * linker.c (bfd_generic_final_link): Likewise.
3145 * opncls.c (find_separate_debug_info): Likewise.
3146 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3147
5941afc1
L
31482003-03-28 H.J. Lu <hjl@gnu.org>
3149
3150 * elflink.h (elf_link_add_object_symbols): Correctly combine
3151 visibilities.
3152
9d73f260
JJ
31532003-03-27 Jakub Jelinek <jakub@redhat.com>
3154
3155 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3156 to -1 before recomputing got offsets.
3157
a5ad465a
AS
31582003-03-26 Andreas Schwab <schwab@suse.de>
3159
3160 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3161 (elf_m68k_relocate_section): Use it to correctly handle symbols
3162 forced to be local.
3163 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3164 entries for symbols that are forced to be local.
3165
d0647110
AO
31662003-03-25 Alexandre Oliva <aoliva@redhat.com>
3167
3168 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3169 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3170 * elfn32-mips.c, elf64-mips.c: Use it.
3171
e16bb312
NC
31722003-03-25 Stan Cox <scox@redhat.com>
3173 Nick Clifton <nickc@redhat.com>
8c29f035 3174
9b5ecbd0 3175 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3176
3177 * archures.c: Add bfd_mach_arm_iWMMXt.
3178 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3179 * bfd-in2.h: Regenerate.
3180 * libbfd.h: Regenerate.
3181 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3182 object files to be linked with XScale ones.
3183 (coff_arm_final_link_postscript): Update note section.
3184 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3185 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3186 after identifying a coff binary.
3187 * cpu-arm.c (processors): Add iWMMXt.
3188 (arch_inf): Likewise.
3189 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3190 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3191 be linked with XScale ones.
3192 (elf32_arm_section_flags): New function: Set flags on note section.
3193 (elf32_arm_final_write_processing): Handle note section.
3194
25f14c34
DD
31952003-03-21 DJ Delorie <dj@redhat.com>
3196
3197 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3198 _bfd_elf_rela_local_sym.
3199
04b3329b
L
32002003-03-20 H.J. Lu <hjl@gnu.org>
3201
3202 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3203 non-ELF outputs.
3204
c25cfdf8
NC
32052003-03-20 Nick Clifton <nickc@redhat.com>
3206
3207 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3208 $idata5 in case bfd_coff_final_link is not called.
3209
3e1d7f19
JJ
32102003-03-19 Jakub Jelinek <jakub@redhat.com>
3211
3212 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3213 field.
3214 (canon_reloc_count): Define.
3215 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3216 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3217 reloc_count.
3218 (sparc64_elf_canonicalize_reloc): New routine.
3219 (bfd_elf64_canonicalize_reloc): Define.
3220
3fa1d917
JJ
32212003-03-18 Jakub Jelinek <jakub@redhat.com>
3222
3223 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3224 againt mergeable sections. Take r_addend into account when caching
3225 trampolines.
3226
f86b235a
RH
32272003-03-18 Richard Henderson <rth@redhat.com>
3228
8c29f035
AM
3229 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3230 local symbols that have no dyninfo.
f86b235a 3231
49ae03bf
NC
32322003-03-14 Gene Smith <gene.smith@siemens.com>
3233
3234 * ieee.c (ieee_write_expression): Handle the case where symbol is
3235 NULL.
3236 General formatting improvements.
3237
6a457e5c
NC
32382003-03-13 Nick Clifton <nickc@redhat.com>
3239
3240 * configure.in (LINGUAS): Add zh_CN.
3241 * configure: Regenerate.
3242 * po/zh_CN.po: New file.
3243
93516ec3
NC
32442003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3245
3246 * aout-cris.c (BYTES_IN_WORD): Don't define.
3247 aout-encap.c: Likewise.
3248 aout-ns32k.c: Likewise.
3249 aout-tic30.c: Likewise.
3250 hp300bsd.c: Likewise.
3251 i386aout.c: Likewise.
3252 i386dynix.c: Likewise.
3253 i386linux.c: Likewise.
3254 i386lynx.c: Likewise.
3255 i386mach3.c: Likewise.
3256 m68k4knetbsd.c: Likewise.
3257 m68klinux.c: Likewise.
3258 m68klynx.c: Likewise.
3259 m68knetbsd.c: Likewise.
3260 m88kmach3.c: Likewise.
3261 mipsbsd.c: Likewise.
3262 newsos3.c: Likewise.
3263 sparclinux.c: Likewise.
3264 sparclynx.c: Likewise.
3265 sparcnetbsd.c: Likewise.
3266 vaxbsd.c: Likewise. Fix comment formatting.
3267
fee24f1c
AO
32682003-03-12 Alexandre Oliva <aoliva@redhat.com>
3269
0b25d3e6
AO
3270 * Reverted 2003-03-02's patch.
3271
fee24f1c
AO
3272 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3273 overridable.
3274 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3275 mips_elf64_get_dynamic_reloc_upper_bound,
3276 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3277 (bfd_elf64_get_canonicalize_reloc,
3278 bfd_elf64_get_dynamic_reloc_upper_bound,
3279 bfd_elf64_canonicalize_dynamic_reloc): Define.
3280 (mips_elf64_slurp_reloc_table): Support dynamic.
3281 (mips_elf64_slurp_one_reloc_table): Adjust.
3282
64fb1839
NC
32832003-03-12 Nick Clifton <nickc@redhat.com>
3284
3285 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3286 'index' to 'offset' in test for zero value.
3287
908488f1
AO
32882003-03-11 Alexandre Oliva <aoliva@redhat.com>
3289
3290 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3291 dynamic relocations pointing to local or section symbols, use the
3292 NULL symbol instead. Document the choice to not emit an
3293 additional R_MIPS_64 relocation.
3294
e515b051
AM
32952003-03-11 Alan Modra <amodra@bigpond.net.au>
3296
3297 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3298 zero index dynamic tls relocs generated for the GOT. Tidy code.
3299 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3300 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3301
a23b6845
AM
33022003-03-07 Alan Modra <amodra@bigpond.net.au>
3303
87d243f1
AM
3304 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3305 a tls_get_addr call.
3306
a23b6845
AM
3307 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3308 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3309 ELF_LINK_NON_GOT_REF from weakdef.
3310 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3311 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3312 ELF_LINK_NON_GOT_REF from weakdef.
3313 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3314 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3315 ELF_LINK_NON_GOT_REF from weakdef.
3316
2d36fe5f
AH
33172003-03-06 Jakub Jelinek <jakub@redhat.com>
3318 Andrew Haley <aph@redhat.com>
3319
3320 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3321 output is relocateable.
3322
34f304a7
NC
33232003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3324
3325 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3326 R_COMMENT.
3327
7b609f53
AM
33282003-03-06 Alan Modra <amodra@bigpond.net.au>
3329
3330 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3331 error messages.
3332 (ELIMINATE_COPY_RELOCS): Define to zero.
3333 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3334 TLSLD relocs. Report reloc types on a number of errors. Optimize
3335 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3336 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3337 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3338 calculating TLSLD relocs. Report reloc types on a number of errors.
3339 Don't capitalize error messages.
3340
6a0fb186
L
33412003-03-03 H.J. Lu <hjl@gnu.org>
3342
3343 * elfxx-ia64.c (USE_BRL): Removed.
3344 (oor_ip): Removed.
3345
34f304a7 33462003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3347
3348 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3349 relocation (no special function), and make it non-partial_inplace.
3350 (sh_elf_relax_section): When creating a bsr, use a consistent value
3351 no matter if the symbol is extern or not; set addend to -4.
3352 Don't swap load / non-load instructions for SH4.
3353 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3354 rather than if the symbol is external to determine if adjusting the
3355 offset makes sense. Adjust the addend too if appropriate.
3356 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3357 relocation.
3358
a9d68a1e
NC
33592003-03-03 Nick Clifton <nickc@redhat.com>
3360
3361 * po/da.po: Installed latest translation.
3362
7c2be35c
TS
33632003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3364
3365 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3366 R_MIPS_PC16 to rightshift 2.
3367 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3368 (bfd_elf32_bfd_reloc_type_lookup): Support
3369 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3370 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3371 R_MIPS_PC16 to rightshift 2.
3372 (mips_elf64_howto_table_rela): Likewise.
3373 (mips_reloc_map): Map to rightshifted BFD reloc.
3374 * elfn32-mips.c: The same as in elf64-mips.c.
3375 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3376 (mips_elf_calculate_relocation): Handle rightshifted addends for
3377 R_MIPS_PC16.
3378 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3379 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3380 * libbfd.h: Regenerate.
3381 * bfd-in2.h: Regenerate.
3382
484a4f9c
RH
33832003-02-28 Richard Henderson <rth@redhat.com>
3384
3385 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3386 for ltoff22x relaxation.
3387
2ce40c65
AM
33882003-03-01 Alan Modra <amodra@bigpond.net.au>
3389
3390 * bfd-in.h (_bfd): Don't define.
3391 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3392 * syms.c: Likewise.
3393 * bfd-in2.h: Regenerate.
3394
2c4c2bc0
RH
33952003-02-27 Richard Henderson <rth@redhat.com>
3396
3397 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3398 (elfNN_ia64_check_relocs): Set it.
3399 (allocate_global_data_got): Check it.
3400 (allocate_local_got): Likewise.
3401 (allocate_dynrel_entries): Likewise.
3402 (elfNN_ia64_relax_ldxmov): New.
3403 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3404 (elfNN_ia64_choose_gp): Split out from ...
3405 (elfNN_ia64_final_link): ... here.
8c29f035 3406
c2852e88
AC
34072003-02-27 Andrew Cagney <cagney@redhat.com>
3408
3409 * bfd.c (struct bfd): Rename "struct _bfd".
3410 * bfd-in.h: Update copyright.
3411 (struct bfd): Rename "struct _bfd".
3412 (_bfd): Define for backward compatibility.
3413 * bfd-in2.h: Regenerate.
3414
3f87cb70
AM
34152003-02-25 Alan Modra <amodra@bigpond.net.au>
3416
3f9a32bd
AM
3417 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3418 and rel_hdr2 when initially counting input relocs rather than after
3419 creating output reloc sections.
4fabe71e
AM
3420 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3421 sizes.
3f9a32bd 3422
3f87cb70
AM
3423 * Makefile.am: Run "make dep-am".
3424 * Makefile.in: Regenerate.
3425
07c6e936
NC
34262003-02-24 Kris Warkentin <kewarken@qnx.com>
3427
3428 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3429 (elfcore_grog_nto_note): New function.
3430 (elfcore_grog_nto_gregs): New function.
3431 (elfcore_grog_nto_status): New function.
3432
aad5d350
AM
34332003-02-24 Alan Modra <amodra@bigpond.net.au>
3434
3435 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3436 section flags before concluding that we've already been called.
3437 Don't use register keyword.
3438 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3439 (_bfd_elf_create_linker_section): Formatting.
3440
2ab1486e
NC
34412003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3442
3443 * coff-h8300.c: Fix typo: intial -> initial.
3444 * coff-ppc.c: Likewise.
3445
70bccea4
AM
34462003-02-20 Alan Modra <amodra@bigpond.net.au>
3447
3448 * elf32-ppc.c: Formatting.
3449 (allocate_dynrelocs): LD and GD relocs against the same sym need
3450 separate GOT entries.
3451 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3452 entries per symbol.
3453
ee05f2fe
AM
34542003-02-19 Alan Modra <amodra@bigpond.net.au>
3455
26e41594
AM
3456 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3457 removal. Localize vars. Remove unnecessary dynobj test.
3458 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3459 of INFO.
3460 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3461 and optimize.
3462 (elf_i386_relocate_section): Likewise.
3463 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3464 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3465 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3466 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3467 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3468 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3469 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3470 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3471 Formatting.
3472
f4656909
AM
3473 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3474 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3475 test.
3476 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3477 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3478 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3479 and optimize. Use ELIMINATE_COPY_RELOCS.
3480 (ppc64_elf_relocate_section): Likewise.
3481
ee05f2fe
AM
3482 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3483 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3484 (ELIMINATE_COPY_RELOCS): Define.
3485 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3486 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3487 (MUST_BE_DYN_RELOC): Define.
3488 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3489 and optimize. Trim dyn_relocs.
3490 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3491 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3492 track of pc_rel dyn relocs.
3493 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3494 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3495 allocate_dynrelocs. Don't recalculate "sec".
3496
7619e7c7
AM
34972003-02-18 Alan Modra <amodra@bigpond.net.au>
3498
d881513a
AM
3499 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3500 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3501 on invalid LD relocs.
3502 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3503 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3504 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3505
7619e7c7
AM
3506 * elf32-ppc.h: New file.
3507 * elf32-ppc.c: Include elf32-ppc.h.
3508 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3509 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3510 Add "tls_mask" field.
3511 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3512 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3513 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3514 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3515 Make use of htab shortcuts throughout file.
3516 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3517 (ppc_elf_link_hash_table_create): Init new fields.
3518 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3519 (ppc_elf_howto_raw): Add tls relocs.
3520 (ppc_elf_reloc_type_lookup): Handle them.
3521 (ppc_elf_unhandled_reloc): New function.
3522 (ppc_elf_create_got): Stash got section pointer in hash table,
3523 return status. Make .rela.got too.
3524 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3525 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3526 NON_GOT_REF set. Don't allocate space in .plt here..
3527 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3528 not allocating plt entries unnecessarily. Allocate got entries here.
3529 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3530 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3531 "info" during allocate_dynrelocs hash traversal. Use htab section
3532 shortcuts rather than searching for named sections. Get rid of
3533 "plt" and "strip" booleans.
3534 (update_local_sym_info, bad_shared_reloc): New functions.
3535 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3536 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3537 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3538 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3539 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3540 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3541 relocs that might use a plt entry. Set NON_GOT_REF too.
3542 Enumerate all do-nothing relocs.
3543 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3544 tls relocs and all plt relocs.
3545 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3546 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3547 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3548 shortcuts.
3549 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3550 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3551 entries and got relocs here. Warn on non-zero got reloc addend.
3552 Split out branch taken/not taken reloc code into a separate switch
3553 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3554 Split out HA reloc adjustments to separate switch statement. Don't
3555 warn on reloc overflow if we've already warned about undefined.
3556 Don't rebuild sym name when reporting errors. Report all possible
3557 errors from _bfd_final_link_relocate.
3558 (bfd_elf32_bfd_final_link): Don't define.
3559
cd27b276
AM
35602003-02-18 Alan Modra <amodra@bigpond.net.au>
3561
3562 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3563 rebuild sym name when reporting errors.
3564
ae9a127f
NC
35652003-02-17 Nick Clifton <nickc@redhat.com>
3566
3f9a32bd 3567 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3568 allow_shlib_undefined for shared libraries.
3569 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3570 of allow_shlib_undefined.
3571 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3572 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3573 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3574 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3575 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3576 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3577 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3578 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3579 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3580 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3581 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3582 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3583 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3584 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3585 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3586 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3587
b5f852ea
NC
35882003-02-17 Nick Clifton <nickc@redhat.com>
3589
3590 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3591 address field to use in the comparison.
3f9a32bd 3592 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3593
3193e234
NC
35942003-02-14 Bob Wilson <bob.wilson@acm.org>
3595
3596 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3597 backends when checking if the generic ELF target should be used.
3598
21efdc8d
NC
3599 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3600 outside of functions, treat values as absolute addresses.
3601
ed781d5d
NC
3602 * bfd.c: Change embedded documentation to use consistent indentation
3603 and to split up long lines. Change informal style of description
3604 for functions lacking real documentation.
3605 * coffcode.h: Break up long lines in embedded documentation.
3606 * format.c: Likewise.
3607 * targets.c: Likewise.
3608 * libcoff.h: Regenerate.
3609 * bfd-in2.h: Regenerate.
3610
58ac9f71
AM
36112003-02-14 Alan Modra <amodra@bigpond.net.au>
3612
3613 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3614 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3615 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3616 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3617 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3618 (group_sections): Don't share a stub section if stubs are for a large
3619 section. Adjust comment.
3620 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3621 !stubs_always_before_branch.
3622 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3623 treat undefined and undefweak specially when processing dyn relocs.
3624
9147e853
JJ
36252003-02-13 Jakub Jelinek <jakub@redhat.com>
3626
3627 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3628
427bfd90
NC
36292003-02-13 Nick Clifton <nickc@redhat.com>
3630
3631 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3632 in computation of offset to insert into BL instruction.
3633
42b5d0ea
NC
36342003-02-11 Uwe Stieber <uwe@wwws.de>
3635
3636 * config.bfd: Add support for kaOS as cross build target system.
3637
a48ebf4d
AM
36382003-02-11 Alan Modra <amodra@bigpond.net.au>
3639
3640 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3641 .__tls_get_addr too.
3642 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3643
c95b8a7a
KK
36442003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3645
3646 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3647 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3648 (sh_elf_link_hash_newfunc): Remove the initialization of
3649 tls_tpoff32 field.
3650 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3651 for which tls_tpoff32 flag is set.
3652 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3653 of the symbol includes the entry matched with the input_section
3654 and having tls_tpoff32 flag on. When linking statically, set
3655 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3656 is defined in this executable.
3657 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3658
a779acda
JJ
36592003-02-10 Jakub Jelinek <jakub@redhat.com>
3660
3661 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3662 even if there is just non-empty .rela.plt.
3663
fde78edd
NC
36642003-02-10 Nick Clifton <nickc@redhat.com>
3665
3666 * archures.c (bfd_mach_arm_ep9312): Define.
3667 * bfd-in2.h: Regenerate.
3668 * cpu-arm.c (processors[]): Add ep9312.
3669 (bfd_arm_arch): Add ep9312.
3670 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3671 messages and add test for Maverick floating point support.
3672 (elf32_arm_print_private_bfd_data): Handle
3673 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3674 (elf32_arm_object_p): New function.
3675 (elf_backend_object_p): Define.
fde78edd 3676
e7b938ca
AM
36772003-02-10 Alan Modra <amodra@bigpond.net.au>
3678
3679 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3680 variables, structure fields or function params to tls_mask or
3681 similar to better reflect usage.
3682 (struct got_entry): Comment.
9b5ecbd0 3683 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3684 (get_tls_mask): Rename from get_tls_type.
3685
951fd09b
AM
36862003-02-09 Alan Modra <amodra@bigpond.net.au>
3687
3688 * elf64-ppc.c (TLS_GD_LD): Don't define..
3689 (TLS_GD): ..define this instead and update all uses.
3690 (TLS_TPRELGD): Define.
3691 (ppc64_elf_link_hash_table_create): Tweak initialization of
3692 init_refcount and init_offset.
3693 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3694 Mark second slot of GD or LD toc entries.
3695 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3696 from other tls types.
3697 (ppc64_elf_tls_setup): New function, split out from..
3698 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3699 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3700 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3701 return value to properly decide whether toc GD and LD entries can
3702 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3703 to determine GD or LD rather than looking at TLS_LD flag. Don't
3704 attempt to adjust got entry tls_type here..
3705 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3706 look for possible merges.
3707 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3708 optimization.
3709 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3710 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3711 Make use of return value from get_tls_type to properly detect GD and
3712 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3713 handle tls_get_addr removal when looking at REL24 relocs, do it when
3714 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3715 GD or LD.
3716 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3717
acc990f2
AM
37182003-02-08 Alan Modra <amodra@bigpond.net.au>
3719
00b28bb0
AM
3720 * elf32-hppa.c (group_sections): Don't share a stub section if
3721 stubs are for a large section.
3722
acc990f2
AM
3723 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3724 stubs if !stubs_always_before_branch.
3725
589e6347
NC
37262003-02-07 Nick Clifton <nickc@redhat.com>
3727
3728 * elf.c (swap_out_syms): Generate an error message if an
3729 equivalent output section cannot be found for a symbol.
3730
c328dc3f
JJ
37312003-02-07 Jakub Jelinek <jakub@redhat.com>
3732
3733 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3734 local_got_entries is NULL.
3735
84f97cb6
AS
37362003-02-06 Andreas Schwab <schwab@suse.de>
3737
3738 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3739 (read_value): Add parameter is_signed, use signed extraction if
3740 the value is signed.
3741 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3742 encoding to read_value.
3743
6349e628
AM
37442003-02-06 Alan Modra <amodra@bigpond.net.au>
3745
3746 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3747 plt info when called to transfer weak sym info.
3748
411e1bfb
AM
37492003-02-05 Alan Modra <amodra@bigpond.net.au>
3750
3751 * reloc.c: Add PPC and PPC64 TLS relocs.
3752 * libbfd.h: Regenerate.
3753 * bfd-in2.h: Regenerate.
3754 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3755 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3756 against a 32 bit field.
3757 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3758 (_ppc64_elf_section_data): Add t_symndx and comments.
3759 (ppc64_elf_section_data): Use elf_section_data macro.
3760 (ppc64_elf_new_section_hook): American spelling.
3761 (struct got_entry, struct plt_entry): New.
3762 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3763 (struct ppc_stub_hash_entry): Add "addend" field.
3764 (struct ppc_link_hash_entry): Add "tls_type".
3765 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3766 TLS_EXPLICIT): Define.
3767 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3768 (link_hash_newfunc): Init new fields.
58ac9f71 3769 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3770 init_offset to NULL.
3771 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3772 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3773 there.
3774 (update_local_sym_info, update_plt_info): New functions.
3775 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3776 handling to use got.glist rather than got.refcount. Likewise for PLT.
3777 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3778 (func_desc_adjust): Adjust for new PLT list.
3779 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3780 (get_sym_h, get_tls_type): New functions.
3781 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3782 (ppc64_elf_tls_optimize): New function.
3783 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3784 TLS relocs.
3785 (ppc64_elf_size_dynamic_sections): Likewise.
3786 (ppc_type_of_stub): Adjust for new PLT list.
3787 (ppc_build_one_stub): Likewise.
3788 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3789 calls specially.
3790 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3791 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3792 init GOT entries that have a reloc. Generate GOT relocs here..
3793 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3794 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3795
0cca5f05
AS
37962003-02-04 Andreas Schwab <schwab@suse.de>
3797
3798 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3799 (elf_m68k_link_hash_traverse): Remove.
3800 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3801 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3802 reduce casting.
3803 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3804 casting.
3805 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3806 instead of elf_m68k_link_hash_traverse.
3807 (elf_m68k_discard_copies): Change first parameter to pointer to
3808 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3809 elf_m68k_link_hash_entry is needed.
3810
5cab59f6
AM
38112003-02-04 Alan Modra <amodra@bigpond.net.au>
3812
3813 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3814 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3815 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3816 "plt" field.
3817 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3818 Add "init_offset" field.
3819 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3820 (elf_local_got_ents): Declare.
3821 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3822 and "plt".
3823 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3824 (_bfd_elf_link_hash_table_init): Set "init_offset".
3825 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3826 from init_offset.
3827 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3828
3829 * elf.c (bfd_elf_local_sym_name): Split out from..
3830 (group_signature): ..here.
3831 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3832
68bfbfcc
AM
38332003-02-04 Alan Modra <amodra@bigpond.net.au>
3834
3835 * elf-bfd.h (enum elf_link_info_type): Remove.
3836 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3837 to struct sec. Remove linkonce_p field.
3838 (elf_linkonce_p): Delete.
3839 (elf_discarded_section): Update for sec_info_type change.
3840 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3841 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3842 (ELF_INFO_TYPE_NONE): Define.
3843 (ELF_INFO_TYPE_STABS): Define.
3844 (ELF_INFO_TYPE_MERGE): Define.
3845 (ELF_INFO_TYPE_EH_FRAME): Define.
3846 (ELF_INFO_TYPE_JUST_SYMS): Define.
3847 (STD_SECTION): Update struct sec initializer.
3848 * ecoff.c (bfd_debug_section): Likewise.
3849 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3850 * elflink.h: Likewise.
3851 * elf-eh-frame.c: Likewise.
3852 * elf64-alpha.c: Likewise.
3853 * elfxx-ia64.c: Likewise.
3854 * elfxx-mips.c: Likewise.
3855 * bfd-in2.h: Regenerate.
3856
3857 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3858 referring to used_by_bfd.
3859 * elf64-sparc.c (sec_do_relax): Likewise.
3860 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3861 * elfxx-mips.c (mips_elf_section_data): Likewise.
3862 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3863 (ieee_get_section_contents): Likewise.
3864 (ieee_new_section_hook): Formatting.
3865 (ieee_canonicalize_reloc): Remove commented out code.
3866 * mmo.c (mmo_section_data): Define. Use throughout file.
3867 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3868
31f7ba04
NC
38692003-01-31 Graydon Hoare <graydon@redhat.com>
3870
3871 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3872 * Makefile.in: Regenerate.
3873 * opncls.c (calc_crc32, get_debug_link_info,
3874 seperate_debug_file_exists, find_seperate_debug_file): New
3875 internal functions.
3876 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3877 contained inside a .gnu_debuglink section.
3878 * bfd-in2.h: Regenerate.
3879
38985a1c
AO
38802003-01-29 Alexandre Oliva <aoliva@redhat.com>
3881
3882 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3883 entry->abfd when it's NULL.
3884
4bb9a95f
AO
38852003-01-27 Alexandre Oliva <aoliva@redhat.com>
3886
3887 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3888 _bfd_elf_section_offset returning -2 the same way as -1.
3889
f4416af6
AO
3890 * elfxx-mips.c (mips_elf_multi_got): New function.
3891 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3892 addend into union along with address and link hash entry.
3893 (struct mips_got_info): Added bfd2got and next.
3894 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3895 (mips_elf_got_section, mips_elf_create_got_section): Use
3896 SEC_EXCLUDE bit to tell whether we really need the got
3897 section. Take boolean arguments to disregard an excluded
3898 section, or to create it as excluded. Adjust all callers.
3899 Use mips_elf_got_section all over.
3900 (mips_elf_local_got_index, mips_elf_got_page,
3901 mips_elf_got16_entry): Take input bfd as argument, and pass it
3902 on to mips_elf_create_local_got_entry.
3903 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3904 Take input bfd as argument, and manage entries in the
3905 appropriate GOT.
3906 (mips_elf_got_offset_from_index): Take input bfd as argument,
3907 and use it to adjust the GP offset of the bfd.
3908 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3909 unreferenced GOT entries of global symbols to the end.
3910 (mips_elf_record_global_got_symbol): Take input bfd as
3911 argument. Add entries to the master GOT hash table.
3912 (struct mips_elf_bfd2got_hash): New.
3913 (struct mips_elf_got_per_bfd_arg): New.
3914 (struct mips_elf_set_global_got_offset_arg): New.
3915 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3916 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3917 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3918 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3919 mips_elf_resolve_final_got_entry,
3920 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3921 mips_elf_got_for_ibfd): New functions.
3922 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3923 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3924 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3925 (mips_elf_got_entry_hash): Take new fields into account. Use
3926 mips_elf_hash_bfd_vma.
3927 (mips_elf_got_entry_eq): Take new fields into account.
3928 (mips_elf_create_got_section): Initialize new fields.
3929 (mips_elf_calculate_relocation): Pass input_bfd to functions
3930 that now take it. Adjust gp for the input_bfd.
3931 (mips_elf_allocate_dynamic_relocation,
3932 mips_elf_create_dynamic_relocation,
3933 _bfd_mips_elf_create_dynamic_sections): Use...
3934 (mips_elf_rel_dyn_section): New function. Borrow code from...
3935 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3936 now take it. Create the got section if needed, even if
3937 excluded, before recording a global got symbol. Move some
3938 code to...
3939 (mips_elf_record_local_got_symbol): New fn.
3940 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3941 Compute multi-got global entries offsets. Move GOT code to...
3942 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3943 if the GOT is too big.
3944 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3945 undefweak symbol to zero. Generate dynamic relocations for
3946 non-primary GOT entries for global symbols.
3947 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3948 case. Generate dynamic relocations for local got entries.
3949 Sort dynamic relocations on N64 too, using...
3950 (sort_dynamic_relocs_64): New fns.
3951 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3952 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3953
52b69c9e
AO
39542003-01-27 Alexandre Oliva <aoliva@redhat.com>
3955
3956 * bfd.c (struct _bfd): Added id field.
3957 * opncls.c (_bfd_id_counter): New static variable.
3958 (_bfd_new_bfd): Use it.
3959 * bfd-in2.h: Rebuilt.
3960
71e5db1c
AM
39612003-01-25 Alan Modra <amodra@bigpond.net.au>
3962
3963 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3964
b9734f35
JJ
39652003-01-25 Jakub Jelinek <jakub@redhat.com>
3966
3967 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3968 (elf32_sparc_rev32_howto): New variable.
3969 (sparc_reloc_map): Add TLS relocs.
3970 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3971 Handle REV32.
3972 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3973 New functions.
3974 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3975 struct elf32_sparc_link_hash_table):
3976 New structures.
3977 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3978 elf32_sparc_hash_table): Define.
3979 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3980 create_got_section, elf32_sparc_create_dynamic_sections,
3981 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3982 functions.
3983 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3984 reference counting.
3985 (elf32_sparc_gc_sweep_hook): Likewise.
3986 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3987 (elf32_sparc_size_dynamic_sections): Likewise.
3988 (elf32_sparc_relocate_section): Likewise.
3989 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3990 New functions.
3991 (elf32_sparc_object_p): Allocate backend private object data.
3992 (bfd_elf32_bfd_link_hash_table_create,
3993 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3994 elf_backend_can_refcount): Define.
3995 (elf_backend_create_dynamic_sections): Define to
3996 elf32_sparc_create_dynamic_sections.
3997 * reloc.c: Add SPARC TLS relocs.
3998 * bfd-in2.h, libbfd.h: Rebuilt.
3999 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4000 (sparc_reloc_map): Likewise.
4001
69fc87f1
MS
40022003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4003
4004 * bfd-in2.h: Regenerate.
4005 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4006 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4007 (elf_howto_table): Add TLS relocs.
4008 (elf_s390_reloc_type_lookup): Likewise.
4009 (elf_s390_link_hash_entry): Add tls_type.
4010 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4011 New macros.
4012 (elf_s390_link_hash_table): Add tls_ldm_got.
4013 (link_hash_newfunc): Initialize tls_type.
4014 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4015 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4016 (elf_s390_check_relocs): Support TLS relocs.
4017 (elf_s390_gc_sweep_hook): Likewise.
4018 (allocate_dynrelocs): Likewise.
4019 (elf_s390_size_dynamic_sections): Likewise.
4020 (elf_s390_relocate_section): Likewise.
4021 (elf_s390_finish_dynamic_symbol): Likewise.
4022 (bfd_elf32_mkobject): Define for TLS.
4023 * elf64-s390.c: Same changes as for elf32-s390.c.
4024 * libbfd.h: Regenerate.
4025 * reloc.c: Add s390 TLS relocations.
4026
c5d1701e 40272003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
4028
4029 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4030
5177500f
NC
40312003-01-23 Nick Clifton <nickc@redhat.com>
4032
4033 * Add sh2e support:
5177500f 4034 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
4035 * archures.c (bfd_mach_sh2e): Added.
4036 * bfd-in2.h: Rebuilt.
4037 * cpu-sh.c (arch_info_struct): Added SH2e.
4038 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 4039
f0abc2a1
AM
40402003-01-23 Alan Modra <amodra@bigpond.net.au>
4041
4042 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4043 dynindx to an int. Rearrange for better packing.
4044 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4045 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4046 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4047 (struct _sh64_elf_section_data): New struct.
4048 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4049 * elf32-sh64-com.c: Include elf32-sh64.h.
4050 * elf32-sh64.c: Likewise.
4051 (sh64_elf_new_section_hook): New function.
4052 (bfd_elf32_new_section_hook): Define.
4053 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4054 (sh64_bfd_elf_copy_private_section_data): Likewise.
4055 (sh64_elf_final_write_processing): Likewise.
4056 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4057 (elf32_sparc_new_section_hook): New function.
4058 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4059 (sec_do_relax): Define.
4060 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4061 (elf32_sparc_relocate_section): Likewise.
4062 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4063 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4064 (mmix_elf_section_data): Define. Use throughout file.
4065 (mmix_elf_new_section_hook): New function.
4066 (bfd_elf64_new_section_hook): Define.
4067 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4068 (ppc64_elf_section_data): Define. Use throughout.
4069 (ppc64_elf_new_section_hook): New function.
4070 (bfd_elf64_new_section_hook): Define.
4071 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4072 (sparc64_elf_new_section_hook): New function.
4073 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4074 (sec_do_relax): Define.
4075 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4076 (sparc64_elf_relocate_section): Likewise.
4077 (bfd_elf64_new_section_hook): Define.
4078 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4079 * elfxx-mips.c (struct _mips_elf_section_data): New.
4080 (mips_elf_section_data): Define. Use throughout.
4081 (_bfd_mips_elf_new_section_hook): New function.
4082 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4083 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4084 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4085 * Makefile.am: Run "make dep-am".
4086 * Makefile.in: Regenerate.
4087
cc03ec80
RH
40882003-01-21 Richard Henderson <rth@redhat.com>
4089
4090 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4091 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4092 (elf64_alpha_adjust_dynamic_symbol): Set them.
4093 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4094 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4095 symbol index when relaxing LDM to TPREL.
4096 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4097 relocs, even if the target isn't locally defined.
4098 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4099 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4100 relocs vs symndx 0 to the tp base.
4101
da896d3f
NC
41022003-01-21 Fabio Alemagna <falemagn@aros.org>
4103
4104 * config.bfd: Handle i[3456]86-*-aros*.
4105
7fce784e
AS
41062003-01-21 Andreas Schwab <schwab@suse.de>
4107
4108 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4109 (struct ppc_elf_link_hash_entry): Define.
4110 (ppc_elf_hash_entry): New function.
4111 (struct ppc_elf_link_hash_table): Define.
4112 (ppc_elf_hash_table): New function.
4113 (ppc_elf_link_hash_newfunc): New function.
4114 (ppc_elf_link_hash_table_create): New function.
4115 (ppc_elf_copy_indirect_symbol): New function.
4116 (allocate_dynrelocs): New function.
4117 (readonly_dynrelocs): New function.
4118 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4119 relocs and determine DT_TEXTREL.
4120 (ppc_elf_check_relocs): Don't do that here, just count the
4121 dynamic relocs.
4122 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4123 removed section.
4124 (bfd_elf32_bfd_link_hash_table_create): Define.
4125 (elf_backend_copy_indirect_symbol): Define.
4126
1bbc9cec
RH
41272003-01-21 Richard Henderson <rth@redhat.com>
4128
4129 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4130 TPREL also get a reloc if shared. Remove SREL support.
4131 (elf64_alpha_emit_dynrel): New.
acc990f2 4132 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
4133 and GOTTPREL relocs to local symbols against the tp base.
4134 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4135
4136 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4137 use count before clobbering r_type.
4138 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4139 ordering would mean dataflow inspection is necessary.
4140
0da35f8b
SS
41412003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4142
4143 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 4144
571fe01f
NC
41452003-01-20 Fabio Alemagna <falemagn@aros.org>
4146
4147 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4148 elfxx-target.h and #undef it before #define'ing it.
4149 * elf32-i386.c: Likewise.
acc990f2
AM
4150 * elf32-sh64.c: Likewise.
4151 * elf64-alpha.c: Likewise.
4152 * elf64-sh64.c: Likewise.
571fe01f 4153
5236c819
MS
41542003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4155
4156 * bfd-in2.h: Regenerate.
4157 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4158 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4159 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4160 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4161 R_390_PLTOFF32 and R_390_PLTOFF64.
4162 (elf_s390_reloc_type_lookup): Likewise.
4163 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4164 of GOTPLT references to a function.
4165 (link_hash_newfunc): Initialize gotplt_refcount.
4166 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4167 and creation of the got section out of the main switch. Add support
4168 for the gotoff, gotplt and pltoff relocations.
4169 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4170 and pltoff.
4171 (elf_s390_adjust_gotplt): New function.
4172 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4173 plt entries.
4174 (allocate_dynrelocs): Add comment.
4175 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4176 for gotoff, gotplt and pltoff relocations.
4177 * elf64-s390.c: Same changes as for elf32-s390.c.
4178 * libbfd.h: Regenerate.
4179 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4180 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4181 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4182 and BFD_RELOC_390_PLTOFF64.
4183
a823975a
JJ
41842003-01-18 Jakub Jelinek <jakub@redhat.com>
4185
4186 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4187 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4188
b3dfd7fe
JJ
41892003-01-16 Jakub Jelinek <jakub@redhat.com>
4190
4191 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4192 self_dtpmod_done and self_dtpmod_offset.
4193 (allocate_global_data_got): Only use one got entry for all
4194 dtpmod relocs against local symbols.
4195 (allocate_dynrel_entries): Only need .rela.got entry for
4196 dtpmod against global symbol.
4197 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4198 Reserve space in .rela.got for the local dtpmod entry.
4199 (set_got_entry): Initialize the common local dtpmod .got entry.
4200 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4201 and R_IA_64_DTPREL64MSB.
4202
04c9666a
AM
42032003-01-16 Alan Modra <amodra@bigpond.net.au>
4204
4205 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4206 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4207 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4208 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4209 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4210 relative relocs, not with absolute ones.
4211 * Makefile.am: Run "make dep-am".
4212 * Makefile.in: Regenerate.
4213 * po/SRC-POTFILES.in: Regenerate.
4214
c87f1ff7
AS
42152003-01-15 Andreas Schwab <schwab@suse.de>
4216
4217 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4218 relocation against a non-allocated readonly section.
4219
86bbe32f
AM
42202003-01-10 Alan Modra <amodra@bigpond.net.au>
4221
4222 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4223 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4224
32d95f29
KD
42252002-01-08 Klee Dienes <kdienes@apple.com>
4226
4227 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4228 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4229 * Makefile.in: Regenerate.
acc990f2 4230
ab7d0aa0
AO
42312003-01-08 Alexandre Oliva <aoliva@redhat.com>
4232
4233 * elfn32-mips.c (prev_reloc_section): New.
4234 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4235 (SET_RELOC_ADDEND): Parenthesize macro argument.
4236
95d0f04a
DA
42372003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4238
4239 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4240 adjust addil instructions if the symbol has no section.
4241
5c9e189c
DD
42422003-01-07 DJ Delorie <dj@redhat.com>
4243
4244 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4245 partial_inplace.
4246
3e829b4a
AS
42472003-01-07 Andreas Schwab <schwab@suse.de>
4248
4249 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4250 PC relative relocations.
4251 (elf_m68k_discard_copies): Set it here instead.
4252
a75473eb
SC
42532002-01-02 Ben Elliston <bje@redhat.com>
4254 Jeff Johnston <jjohnstn@redhat.com>
4255
4256 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4257 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4258 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4259 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4260 (cpu-iq2000.lo): New target.
4261 * Makefile.in: Regenerate.
4262 * config.bfd: Handle iq2000-*-elf.
4263 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4264 (bfd_archures_list): Add bfd_iq2000_arch.
4265 * configure.in: Handle bfd_elf32_iq2000_vec.
4266 * configure: Regenerate.
acc990f2 4267 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4268 and BFD_RELOC_IQ2000_UHI16.
4269 * targets.c (bfd_elf32_iq2000_vec): Declare.
4270 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4271 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4272 * cpu-iq2000.c: New file.
4273 * elf32-iq2000.c: Likewise.
4274 * libbfd.h: Regenerate.
4275 * bfd-in2.h: Likewise.
4276
64543e1a
RS
42772003-01-02 Richard Sandiford <rsandifo@redhat.com>
4278
4279 * elfxx-mips.c: Include libiberty.h.
4280 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4281 (mips_set_isa_flags): New function, split out from...
4282 (_bfd_mips_elf_final_write_processing): ...here. Only call
4283 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4284 (mips_mach_extensions): New array.
4285 (mips_32bit_flags_p): New function.
4286 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4287 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4288 other is 64-bit. When adopting IBFD's architecture, adopt the
4289 bfd_mach as well as the flags.
4290
4852a44e
NC
42912003-01-02 Nick Kelsey <nickk@ubicom.com>
4292
4293 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4294 fix internal errors, fix bad code generation, fix incorrect stabs
4295 information, and improve ability to eliminate redundant page
4296 instructions. Added code to ip2k_final_link_relocate to self-verify
4297 the linker relaxation. Fix formatting problems.
4298
af7ee8bf
CD
42992002-12-30 Chris Demetriou <cgd@broadcom.com>
4300
4301 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4302 * archures.c (bfd_mach_mipsisa32r2): New define.
4303 * bfd-in2.h: Regenerate.
4304 * cpu-mips.c (I_mipsisa32r2): New enum value.
4305 (arch_info_struct): Add entry for I_mipsisa32r2.
4306 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4307 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4308 (_bfd_mips_elf_final_write_processing): Add
4309 bfd_mach_mipsisa32r2 case.
4310 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4311 binaries marked as using MIPS32 Release 2.
4312
2469cfa2
NC
43132002-12-30 Dmitry Diky <diwil@mail.ru>
4314
4315 * Makefile.am: Add msp430 target.
4316 * configure.in: Likewise.
4317 * Makefile.in: Regenerate.
4318 * configure: Regenerate.
4319 * archures.c: Add msp430 architecture vector.
4320 * config.bfd: Likewise.
4321 * reloc.c: Add msp430 relocs.
4322 * targets.c: Add msp320 target.
4323 * cpu-msp430.c: New file: msp430 cpu detection.
4324 * elf32-msp430.c: New file: msp430 reloc processing.
4325 * bfd-in2.h: Regenerate.
4326 * libbfd.h: Regenerate.
4327
eecdbe52
JJ
43282002-12-28 Jakub Jelinek <jakub@redhat.com>
4329
4330 * elf.c (elf_sort_sections): Don't reorder .tbss.
4331 (assign_file_positions_for_segments): Only adjust off/voff
4332 for increased alignment in PT_LOAD or PT_NOTE segment,
4333 but adjust p_filesz for .tbss too. in PT_LOAD consider
4334 .tbss to have zero memory size.
4335 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4336 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4337 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4338 into PT_TLS segment. Never put SHF_TLS sections in
4339 segments other than PT_TLS or PT_LOAD.
4340
4341 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4342 sh_entsize.
4343
213e90f4
DD
43442002-12-23 DJ Delorie <dj@redhat.com>
4345
4346 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4347
75828352
AM
43482002-12-23 Alan Modra <amodra@bigpond.net.au>
4349
4350 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4351
312b768e
NC
43522002-12-23 Nick Clifton <nickc@redhat.com>
4353
4354 * archures.c (bfd_arch_get_compatible): Add third parameter
4355 'accept_unknowns'. Only accept unknown format BFDs if
4356 accept_unknowns is true, or if the format is "binary".
acc990f2 4357 * bfd-in2.h: Regenerate.
312b768e 4358
63222ec9
NC
43592002-12-21 Nick Clifton <nickc@redhat.com>
4360
4361 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4362 that subtracted 8 from pc relative relocations.
4363
19852a2a
KH
43642002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4365
4366 * coff-h8300.c: Fix comment typos.
4367 * coffcode.h: Likewise.
4368 * cpu-cris.c: Likewise.
4369 * elf32-vax.c: Likewise.
4370 * genlink.h: Likewise.
4371 * linker.c: Likewise.
4372 * som.c: Likewise.
4373 * tekhex.c: Likewise.
4374 * vms-misc.c: Likewise.
4375
5fd63999
DD
43762002-12-20 DJ Delorie <dj@redhat.com>
4377
4378 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4379 * libbfd.h: Regenerate.
4380 * bfd-in2.h: Regenerate.
4381 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4382 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4383
4ee79850
KH
43842002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4385
4386 * doc/bfdint.texi: Fix typos.
4387
66e25bab
AM
43882002-12-20 Paul Eggert <eggert@twinsun.com>
4389
4390 Port to POSIX 1003.1-2001.
4391 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4392 * configure.in (build-warnings): Likewise.
4393 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4394 * aclocal.m4: Regenerate.
4395 * config.in: Regenerate.
4396 * configure: Regenerate.
4397
7dc77aaa
AM
43982002-12-19 Alan Modra <amodra@bigpond.net.au>
4399
0171ee92
AM
4400 * coff-h8300.c: Include libiberty.h.
4401 (h8300_reloc16_extra_cases): Check the hash table creator before
4402 referencing h8300 specific fields. Stash the hash table pointer
4403 in a local var. Comment typo fixes.
4404 (h8300_bfd_link_add_symbols): Likewise.
4405
1049f94e 4406 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4407 dst_mask comments.
4408 * bfd-in2.h: Regenerate.
4409
47388f4c
AM
44102002-12-18 Alan Modra <amodra@bigpond.net.au>
4411
4412 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4413 code a little. Comment on dynamic relocs against section symbols.
4414
1b3e3744
AM
44152002-12-17 Roger Sayle <roger@eyesopen.com>
4416
4417 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4418 the HP compiler's "long long".
4419
46f2b541
DD
44202002-12-16 Andrew MacLeod <amacleod@redhat.com>
4421
4422 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4423 and R_XSTORMY16_HI16) howto entries.
4424 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4425 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4426 determine the start of the second reloc table.
4427
af738ea7
NC
44282002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4429
4430 * ecofflink.c: Fix the reading of the debugging information
4431 of Tru64/Alpha binaries that are produced by recent Compaq
4432 compilers.
4433 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4434 table.
4435 (lookup_line): Because of the strange information sometimes
4436 generated by Compaq's recent compilers, change how the FDR
4437 table is searched so that PDRs (procedure descriptors) are
4438 correctly found. Note that this change is really more of a hack;
4439 however, I have included extensive documentation as to why
4440 this is the best solution short of an extensive rewrite or
4441 another hack.
4442 (fdrtab_lookup): Add comments to explain the algorithm.
4443
5354b572
AO
44442002-12-12 Alexandre Oliva <aoliva@redhat.com>
4445
4446 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4447 initializers to match struct declaration.
4448
ab3acfbe
AM
44492002-12-12 Alan Modra <amodra@bigpond.net.au>
4450
4451 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4452 * elf.c (get_program_header_size): Likewise.
4453 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4454 (m32r_elf_generic_reloc): Likewise.
4455 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4456 * elflink.h (elf_bfd_discard_info): Likewise.
4457
6348e046
AM
44582002-12-12 Alan Modra <amodra@bigpond.net.au>
4459
4460 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4461 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4462 DT_RELSZ adjustment, not output section. Avoid writing tags when
4463 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4464 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4465 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4466 DT_RELASZ adjustment, not output section. Avoid writing tags when
4467 unchanged. Adjust DT_RELA.
4468 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4469 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4470
2e7a68a8
AO
44712002-12-12 Alexandre Oliva <aoliva@redhat.com>
4472
4473 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4474 addend by 4.
4475
b15e6682
AO
44762002-12-12 Alexandre Oliva <aoliva@redhat.com>
4477
4478 * elfxx-mips.c (struct mips_got_entry): New.
4479 (struct mips_got_info): Added got_entries field.
4480 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4481 (mips_elf_local_got_index, mips_elf_got_page,
4482 mips_elf_got16_entry): Re-implement in terms of new...
4483 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4484 Change return type.
4485 (mips_elf_highest): Warning clean-up.
4486 (mips_elf_create_got_section): Initialize got_entries.
4487 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4488 local got size.
4489 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4490 GOT_PAGE entries, since we now reuse GOT16 entries.
4491
e6af3a53
NC
44922002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4493
4494 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4495 read-only section that lies after .text and before .data to be
4496 written into the output file and included in a_text.
4497 (translate_to_native_sym_flags): If an otherwise unrepresentable
4498 section was merged with .text, convert its symbols to N_TEXT
4499 symbols.
4500 * libaout.h (aout_section_merge_with_text_p): New macro.
4501
cf3d882d
AM
45022002-12-08 Alan Modra <amodra@bigpond.net.au>
4503
4504 * bfd-in.h: Comment typo fix. Formatting.
4505 * bfd-in2.h: Regenerate.
4506 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4507 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4508 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4509
2f9bd3f6
RH
45102002-12-05 Richard Henderson <rth@redhat.com>
4511
4512 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4513 Only send PCREL21B though the plt. Fix installed reloc type.
4514 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4515 against PCREL22 or PCREL64I; clean up error messages for
4516 branch relocs.
4517
d0112f73
KB
45182002-12-04 Kevin Buettner <kevinb@redhat.com>
4519
4520 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4521 New functions.
4522 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4523
c10d9d8f
JW
45242002-12-04 David Mosberger <davidm@hpl.hp.com>
4525
4526 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4527
d48770d4
L
45282002-12-04 H.J. Lu <hjl@gnu.org>
4529
4530 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4531 BFD address when constructing local name.
4532
b6152c34
AS
45332002-12-04 Andreas Schwab <schwab@suse.de>
4534
4535 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4536 member.
4537 (elf_m68k_link_hash_table_create): Initialize it.
4538 (elf_m68k_check_relocs): Handle symbols that are forced to be
4539 local due to visibility changes.
4540 (elf_m68k_adjust_dynamic_symbol): Likewise.
4541 (elf_m68k_size_dynamic_sections): Likewise.
4542 (elf_m68k_discard_copies): Likewise.
4543 (elf_m68k_relocate_section): Likewise.
4544
73374ef1
AM
45452002-12-04 Alan Modra <amodra@bigpond.net.au>
4546
4547 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4548
c5c1944d
AM
45492002-12-04 Alan Modra <amodra@bigpond.net.au>
4550
4551 * srec.c (srec_write_symbols): Restore '$' prefix to address
4552 accidentally removed in 2002-04-04 change.
4553 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4554
e1a9cb8e
NC
45552002-12-03 Nick Clifton <nickc@redhat.com>
4556
4557 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4558 (apuinfo_list_add): New function: Add a value to the list.
4559 (apuinfo_list_length): New function: Return the number of
4560 values on the list.
4561 (apuinfo_list_element): New function: Return a value on the
4562 list.
4563 (apuinfo_list_finish): New function: Free the resources used
4564 by the list.
4565 (ppc_elf_begin_write_processing): New function. Scan the
4566 input bfds for apuinfo sections.
4567 (ppc_elf_write_section): New function: Delay the creation of
4568 the contents of an apuinfo section in an output bfd.
4569 (ppc_elf_final_write_processing): New function. Create the
4570 contents of an apuinfo section in an output bfd.
4571 (elf_backend_begin_write_processing): Define.
4572 (elf_backend_final_write_processing): Define.
4573 (elf_backend_write_section): Define.
e1a9cb8e 4574
a823923b
RH
45752002-12-03 Richard Henderson <rth@redhat.com>
4576
4577 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4578
30491647
SC
45792002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4580
4581 Fix PR savannah/1417:
4582 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4583 branch if it goes to the start of the deleted region.
4584
bc7c6a90
SC
45852002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4586
4587 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4588 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4589 bfd_mach_m6812s): Declare.
4590
4591 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4592 (_bfd_m68hc12_elf_set_private_flags): Call it.
4593 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4594 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4595 report microcontroller incompatibilities (HC12 vs HCS12).
4596 (elf_backend_object_p): Update.
4597
b34976b6
AM
45982002-11-30 Alan Modra <amodra@bigpond.net.au>
4599
4600 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4601 (enum bfd_boolean, boolean): Delete.
4602 (bfd_boolean): Typedef to an int.
4603 (FALSE, TRUE): Define.
4604 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4605 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4606 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4607 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4608 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4609 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4610 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4611 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4612 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4613 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4614 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4615 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4616 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4617 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4618 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4619 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4620 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4621 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4622 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4623 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4624 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4625 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4626 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4627 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4628 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4629 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4630 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4631 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4632 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4633 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4634 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4635 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4636 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4637 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4638 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4639 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4640 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4641 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4642 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4643 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4644 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4645 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4646 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4647 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4648 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4649 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4650 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4651 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4652 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4653 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4654 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4655 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4656 of bfd_boolean vars with TRUE/FALSE. Formatting.
4657 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4658
947216bf
AM
46592002-11-28 Alan Modra <amodra@bigpond.net.au>
4660
4661 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4662 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4663 with Elf_Internal_Rela.
4664 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4665 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4666 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4667 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4668 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4669 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4670 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4671 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4672 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4673 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4674 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4675 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4676 throughout instead.
4677 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4678 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4679 Remove INLINE keyword.
4680 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4681 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4682 as a bfd_byte *.
4683 (elf_write_relocs): Consolidate REL and RELA code.
4684 (elf_slurp_reloc_table_from_section): Simplify REL code.
4685 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4686 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4687 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4688 RELA code.
4689 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4690 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4691 (elf_link_output_relocs): Likewise.
4692 (elf_reloc_link_order): Likewise.
4693 (elf_finish_pointer_linker_section): Likewise.
4694 (struct elf_link_sort_rela): Remove union.
4695 (elf_link_sort_cmp1): Update to suit.
4696 (elf_link_sort_cmp2): Here too.
4697 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4698 over-allocation for int_rels_per_ext_rel != 1 case.
4699 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4700 * elf32-i386.c: Likewise.
4701 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4702 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4703 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4704 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4705 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4706 elf64-sparc.c, elf64-x86-64.c: Likewise.
4707 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4708 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4709 bfd_elf32_swap_reloc_in.
4710
4711 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4712 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4713 (mips_elf64_swap_reloc_in): Zero r_addend.
4714 (mips_elf64_be_swap_reloc_in): Likewise.
4715 (mips_elf64_slurp_one_reloc_table): Simplify.
4716
4717 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4718 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4719 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4720
1448fa32
KK
47212002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4722
4723 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4724 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4725 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4726
73722af0
AM
47272002-11-26 Alan Modra <amodra@bigpond.net.au>
4728
4729 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4730 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4731 on a relocatable link. Comment typos.
4732 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4733 in the order they are declared. Clear elf_hash_value too.
4734 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4735 eh_info and tls_segment.
4736 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4737 sorted when discarding relocs by turning them into R_*_NONE.
4738
4739 * libbfd.c (warn_deprecated): Comment spelling.
4740 * po/SRC-POTFILES.in: Regenerate.
4741
7c25b72c
RH
47422002-11-21 Richard Henderson <rth@redhat.com>
4743
4744 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4745 arch's st_other bits when merging visibilities.
4746 (elf_link_output_extsym): Tidy clearing of visibility field.
4747
dc12c51f
AM
47482002-11-21 Alan Modra <amodra@bigpond.net.au>
4749
4750 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4751 (SWAP_OUT_RELOC_OFFSET): Define.
4752
963f13ec
AO
47532002-11-20 Alexandre Oliva <aoliva@redhat.com>
4754
4755 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4756 can_refcount is properly extended to the type of
4757 init_refcount.
4758
ee6423ed
AO
47592002-11-19 Alexandre Oliva <aoliva@redhat.com>
4760
4ffba85c
AO
4761 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4762 (_bfd_mips_elf_relocate_section): Use it.
4763
ee6423ed
AO
4764 * elfxx-mips.c (MNAME): New macro.
4765 (_bfd_mips_elf_check_relocs): Use it.
4766 (_bfd_mips_elf_discard_info): Likewise.
4767 (_bfd_mips_elf_final_link): Likewise.
4768
cdcf6e38
AM
47692002-11-19 Alan Modra <amodra@bigpond.net.au>
4770
4771 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4772 rel_hdr.sh_size too.
4773
93509525
KD
47742002-11-18 Klee Dienes <kdienes@apple.com>
4775
4776 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4777 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4778 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4779 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4780 Add dependencies for bfdwin.c, bfdio.c.
4781 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4782 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4783 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4784 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4785 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4786 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4787 bfd_get_size (moved from libbfd.c and bfd.c).
4788 * bfdwin.c New file. Contains _bfd_window_internal,
4789 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4790 libbfd.c and bfd.c).
4791 * po/SRC-POTFILES.in: Regenerate.
4792 * po/bfd.pot: Regenerate.
4793 * libbfd.h: Regenerate.
4794 * bfd-in2.h: Regenerate.
4795 * aclocal.m4: Regenerate.
4796 * Makefile.in: Regenerate.
4797 * configure: Regenerate.
4798
3ae41454
AM
47992002-11-18 Klee Dienes <kdienes@apple.com>
4800
4801 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4802
e514ac71
NC
48032002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4804
4805 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4806 jsr after a short jump.
4807 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4808
eddc4f81
KD
48092002-11-15 Klee Dienes <kdienes@apple.com>
4810
4811 * pef.c (bfd_pef_convert_architecture): Move declaration of
4812 ARCH_POWERPC and ARCH_M68K to the start of the function.
4813
51908eee
SS
48142002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4815
4816 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4817
3416d2e7
HPN
48182002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4819
4820 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4821 For bpo_gregs_section->contents, allocate _raw_size, not
4822 _cooked_size.
4823
b1c58715
AM
48242002-11-13 Klee Dienes <kdienes@apple.com>
4825
4826 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4827
077ca68b
L
48282002-11-13 H.J. Lu <hjl@gnu.org>
4829
4830 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4831
e84d6fca
AM
48322002-11-13 Klee Dienes <kdienes@apple.com>
4833 Alan Modra <amodra@bigpond.net.au>
4834
4835 * bfd.c (struct bfd_preserve): New.
4836 (bfd_preserve_save): New function.
4837 (bfd_preserve_restore): Ditto.
4838 (bfd_preserve_finish): Ditto.
4839 * bfd-in2.h: Regenerate.
4840 * mach-o.c: Formatting.
4841 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4842 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4843 (bfd_mach_o_core_p): Ditto.
4844 (bfd_mach_o_scan): Pass in mdata.
4845 * mach-o.h (bfd_mach_o_scan): Update prototype.
4846 * pef.c: Formatting.
4847 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4848 (bfd_pef_xlib_object_p): Ditto.
4849 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4850 * pef.h (bfd_pef_scan): Update prototype.
4851 * xsym.c: Formatting, K&R fixes.
4852 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4853 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4854 * xsym.h (bfd_sym_scan): Declare.
4855 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4856 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4857 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4858
cd24c222
NC
48592002-11-12 Nick Clifton <nickc@redhat.com>
4860
4861 * po/da.po: Updated Danish translation.
4862
99eb2ac8
AM
48632002-11-12 Alan Modra <amodra@bigpond.net.au>
4864
d6fe2dc1
AM
4865 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4866 relocatable link too.
4867 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4868 eh_frame and stab sections. Zap deleted relocs.
4869 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4870 (elf_bfd_discard_info): Run for relocatable link too.
4871 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4872 Handle ld -r case.
4873 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4874 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4875
126495ed
AM
4876 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4877 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4878 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4879 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4880 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4881 (struct elf_link_hash_table): Add eh_info.
4882 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4883 (_bfd_elf_discard_section_eh_frame): Update prototype.
4884 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4885 (_bfd_elf_write_section_eh_frame): Likewise.
4886 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4887 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4888 param. Get "hdr_info" from link hash table.
4889 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4890 header section from link hash table. Save header section to elf_tdata.
4891 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4892 header section from link hash table. Don't alloc hdr_info. Clear
4893 hdr_sec instead of setting "strip".
4894 (_bfd_elf_eh_frame_section_offset): Formatting.
4895 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4896 Get header section from link hash table.
4897 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4898 Get header section from link hash table.
4899 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4900 (get_program_header_size): Likewise.
4901 (_bfd_elf_section_offset): Formatting.
4902 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4903 section pointer in link hash table.
4904 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4905 and _bfd_elf_write_section_eh_frame calls. Update comment about
4906 eh_frame entries.
4907 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4908 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4909
4910 * po/SRC-POTFILES.in: Regenerate.
4911
99eb2ac8
AM
4912 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4913 relocs for discarded FDEs. Remove dead code.
4914 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4915 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4916 Tidy conditions under which stabs are edited. Formatting.
4917 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4918 from discarded relocs.
4919 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4920 section adjustments after testing magic values.
4921
7c319a27
AM
49222002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4923
4924 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4925 references to large plt symbols.
4926
a95a4550
AM
49272002-11-12 Klee Dienes <kdienes@apple.com>
4928
4929 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4930 looking for an unused section name.
4931
bc7eab72
KH
49322002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4933
4934 * coff-h8300.c: Fix formatting.
4935 * elf32-h8300.c: Likewise.
4936 * reloc16.c: Likewise.
4937
52585bb8
AM
49382002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4939
4940 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4941 section when dynamic section unused; _bfd_strip_section_from_output
4942 instead.
4943
9f632188
AM
49442002-11-08 Alan Modra <amodra@bigpond.net.au>
4945
207b304b
AM
4946 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4947 and sym_vec.
3b029f65 4948
9f632188
AM
4949 * dwarf2.c: Revert last change.
4950
ec4530b5
NC
49512002-11-07 Michal Ludvig <mludvig@suse.cz>
4952
9b5ecbd0 4953 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4954 _bfd_dwarf2_find_nearest_line): Use
4955 bfd_simple_get_relocated_section_contents() instead of
4956 bfd_get_section_contents().
4957 * reloc.c (bfd_perform_relocation): Add sanity check.
4958 * simple.c (simple_get_relocated_section_contents): If the section
4959 does not have any relocs associated with it, just return the
4960 unadjusted contents.
4961
205cfeb0
HPN
49622002-11-07 Hans-Peter Nilsson <hp@axis.com>
4963
4964 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4965 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4966 contents, enabling for a non-DSO, for symbols defined in the
4967 program with --export-dynamic.
4968
87e226ce
AM
49692002-11-07 Alan Modra <amodra@bigpond.net.au>
4970
4971 * elf64-ppc.c: Comment typo fixes.
4972 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4973
235c4794
NC
49742002-11-07 Nick Clifton <nickc@redhat.com>
4975
4976 * po/da.po: Updated Danish translation.
4977
49179469
AO
49782002-11-06 Alexandre Oliva <aoliva@redhat.com>
4979
4980 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4981 exactly three internal relocs per external reloc. Set reloc_count
4982 to the external reloc count.
4983
246178f2
NC
49842002-11-06 Klee Dienes <kdienes@apple.com>
4985
3ae41454 4986 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4987 Fix comment formatting.
4988
3af9a47b
NC
49892002-11-06 Klee Dienes <kdienes@apple.com>
4990
3ae41454 4991 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4992 xsym.lo.
4993 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4994 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4995 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4996 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4997 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4998 sym.
3ae41454 4999 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
5000 * Makefile.in: Regenerate.
5001 * doc/Makefile.in: Regenerate.
3ae41454 5002 * bfd-in2.h: Regenerate.
3af9a47b
NC
5003 * xsym.c: New file. Contains support for the Apple/Metrowerks
5004 xSYM debugging format.
5005 * xsym.h: New file.
5006 * pef.c: New file. Contains support for the Apple Code Fragment
5007 Manager Preferred Executable Format
5008 * pef.h: New file.
5009 * pef-traceback.h: New file. Contains support for parsing PowerPC
5010 traceback tables as used by PEF executables (and perhaps other
5011 systems as well).
3ae41454 5012 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
5013 format.
5014 * mach-o.h: New file.
5015 * mach-o-target.c: New file. Declares the mach-o targets
5016 themselves. Included three times by mach-o.c; each time with a
5017 different set of macros set.
3ae41454 5018
b6821651 50192002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
5020
5021 * Makefile.am: Remove entries for elf32-qnx.[ch].
5022 * Makefile.in: Regenerate.
5023 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5024 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5025 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5026 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5027 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5028 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5029 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5030 * configure: Regenerate.
5031 * elf32-qnx.c: Remove.
5032 * elf32-qnx.h: Remove.
5033 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5034 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
5035 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5036 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
5037 * elf32-i386.c: Remove QNX extended bfd support.
5038 * elf32-ppc.c: Remove QNX extended bfd support.
5039 * elf32-sh.c: Remove QNX extended bfd support.
5040 * elfarm-nabi.c: Remove QNX extended bfd support.
5041 * targets.c: Remove qnx vectors.
5042 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5043 (elf_backend_is_contained_by_filepos): Remove.
5044 (elf_backend_copy_private_bfd_data_p): Remove.
5045 * po/SRC-POTFILES.in: Regenerate.
5046
b6821651
AM
50472002-11-06 David O'Brien <obrien@FreeBSD.org>
5048 Alan Modra <amodra@bigpond.net.au>
5049
5050 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5051 dynamic relocs against section symbols for the output section vma.
5052
50532002-11-05 Alan Modra <amodra@bigpond.net.au>
5054
5055 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5056 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5057
08f74004
AM
50582002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5059 Alan Modra <amodra@bigpond.net.au>
5060
5061 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5062 vectors in target_selvecs.
5063 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5064 in target_selvecs.
5065 (sh-*-netbsdelf*): Likewise.
5066 * configure.in (assocvecs): New variable. Handle assocvecs like
5067 selvecs.
5068 * configure: Regenerate.
5069 * format.c (bfd_check_format_matches): Store bfd_target pointers
5070 in matching_vector instead of target names. Select first target
5071 from bfd_associated_vector that matches a list of ambiguous targets.
5072 * targets.c (_bfd_associated_vector): New array.
5073 (bfd_associated_vector): New variable.
5074 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5075 * libbfd-in.h (bfd_associated_vector): Declare.
5076 * libbfd.h: Regenerate.
5077
89117aab
AM
50782002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5079
5080 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5081 non-NULL before dereferencing.
5082
5e9aae3e
KK
50832002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5084
5085 * vms.c (vms_object_p): Restore the start address when returning
5086 NULL.
5087
c97e73dd
AM
50882002-11-04 Alan Modra <amodra@bigpond.net.au>
5089 Hans-Peter Nilsson <hp@axis.com>
5090
5091 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5092 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5093 Set up a larger symshndxbuf, and write it out. Free it on
5094 exit rather than freeing symbuf twice. Correct section index
5095 on output section symbol loop.
5096 (elf_link_output_sym): Accumulate symbol extension section
5097 indices, reallocating symshndxbuf rather than writing it out.
5098 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5099 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5100 Use bfd_zalloc to clear i_shdrp[0] too.
5101
3463048e
SC
51022002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5103
5104 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5105 _raw_size of cranges section if _cooked_size not yet set.
5106
63a23799
HPN
51072002-11-03 Hans-Peter Nilsson <hp@axis.com>
5108
5109 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5110 for bfd_elf32_swap_symbol_out.
5111
e68cc12e
DB
51122002-10-31 David O'Brien <obrien@FreeBSD.org>
5113
5114 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5115 signed and unsigned in comparison.
5116
db4b6d01
DJ
51172002-10-30 Daniel Jacobowitz <drow@mvista.com>
5118
5119 * coffcode.h: Remove extraneous '\'.
5120
840f0243
L
51212002-10-28 H.J. Lu <hjl@gnu.org>
5122
5123 * Makefile.am (targets.lo): Depend on Makefile instead of
5124 config.status.
5125 (archures.lo): Likewise.
5126 * Makefile.in: Regenerated.
5127
05a7e2db
JT
51282002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5129
5130 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5131 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5132 targ_selvecs.
5133
a0087177
JW
51342002-10-25 Jim Wilson <wilson@redhat.com>
5135
5136 * elf64-sh64.c (sh_elf64_relocate_section): Call
5137 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5138 of SHF_MERGE section.
5139
8718ac9c
HPN
51402002-10-25 Hans-Peter Nilsson <hp@axis.com>
5141
5142 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5143
d45913a0
DA
51442002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5145
5146 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5147 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5148 unsigned int.
5149 (NAME(aout,final_link)): Cast enum used in assignment.
5150 (aout_link_write_symbols): Cast enums in comparisons, int values to
5151 boolean, enums in assignments to int.
5152 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5153 (aout_link_input_section_ext): Likewise. Cast enums used in
5154 comparisons with unsigned ints.
d45913a0
DA
5155 (aout_link_reloc_link_order): Cast enum to int in assignment.
5156 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5157 calls to char *.
5158 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5159 assignment.
5160 * bfd-in2.h (bfd_set_section_vma): Likewise.
5161 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5162 * binary.c (bfd_alloc): Cast enum to long.
5163 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5164 * dwarf2.c (read_abbrevs): Add casts to enum types.
5165 (read_attribute_value): Likewise.
5166 (arange_add): Cast result of bfd_zalloc call.
5167 (comp_unit_contains_address): Return true and false.
5168 (comp_unit_find_nearest_line): Cast return to boolean.
5169 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5170 * gen-aout.c: define macro '_' if not defined.
5171 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5172 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5173 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5174 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5175 (bfd_generic_is_local_label_name): Cast return to boolean.
5176 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5177 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5178 struct bfd_hash_entry *.
5179 (_bfd_generic_link_hash_newfunc): likewise.
5180 (_bfd_generic_final_link): Cast enum to unsigned int.
5181 * merge.c (sec_merge_emit): Cast return to boolean.
5182 (merge_strings): Add casts to const unsigned char *.
5183 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5184 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5185 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5186 to struct bfd_hash_entry *.
d45913a0
DA
5187 (bfd_set_section_content): Add cast to PTR in comparison.
5188 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5189 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5190 simple_dummy_unattached_reloc,
5191 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5192 function definitions.
5193 * srec.c (S3Forced): Initialize to false.
5194 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5195 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5196 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5197 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5198 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5199 comparisons.
5200
475c2a7e
JJ
52012002-10-23 Jakub Jelinek <jakub@redhat.com>
5202
5203 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5204 relocs into shared lib non-allocated reloc sections.
5205
e82ce529
AM
52062002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5207
5208 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5209 sorted even when given an out-of-order line sequence.
5210 (lookup_address_in_line_info_table): When an exact VMA match is
5211 not found, return line information with the closest VMA.
5212
f2482cb2
NC
52132002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5214
5215 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5216 HPUX 11.00 patch PHSS_26559.
5217
c1fd6598
AO
52182002-10-22 Alexandre Oliva <aoliva@redhat.com>
5219
5220 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5221 the options section into a separate section unless IRIX 6
5222 compatibility is enabled.
5223
033fd5f9
AO
52242002-10-22 Alexandre Oliva <aoliva@redhat.com>
5225
5226 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5227 into arrays.
5228 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5229 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5230 into account.
5231 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5232 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5233
ef485c01
AM
52342002-10-21 Graeme Peterson <gp@qnx.com>
5235
5236 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5237
b50afec9
AM
52382002-10-21 Alan Modra <amodra@bigpond.net.au>
5239
5240 * targets.c (bfd_target_list): Don't return the default target twice.
5241
5fe39cae
AM
52422002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5243
5244 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5245 perror with bfd_perror.
5246
5d603aa9
L
52472002-10-19 H.J. Lu <hjl@gnu.org>
5248
5249 * elflink.h (elf_link_add_object_symbols): Correctly handle
5250 DT_RPATH and DT_RUNPATH.
5251
e377ab71
MK
52522002-10-19 Mark Kettenis <kettenis@gnu.org>
5253
5254 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5255
0d09fec6
DC
52562002-10-17 Denis Chertykov <denisc@overta.ru>
5257
5258 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5259 for ip2k port.
5260
acf8aed4
AM
52612002-10-17 Alan Modra <amodra@bigpond.net.au>
5262
5263 * elfxx-target.h (USE_REL): Don't define as 1.
5264 * elf32-arm.h (USE_REL): Provide a default define of 0.
5265 Use #if rather than #ifdef when testing USE_REL.
5266 * elf32-m32r.c: Likewise.
5267
5268 * elf32-arc.c (USE_REL): Define as 1.
5269 * elf32-d10v.c (USE_REL): Likewise.
5270 * elf32-m32r.c (USE_REL): Likewise.
5271 * elf32-m68hc11.c (USE_REL): Likewise.
5272 * elf32-m68hc12.c (USE_REL): Likewise.
5273 * elf32-or32.c (USE_REL): Likewise.
5274 * elfarm-nabi.c (USE_REL): Likewise.
5275
f52d1d64
JJ
52762002-10-16 Jakub Jelinek <jakub@redhat.com>
5277
5278 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5279 (s390x-*-linux*): Add targ_selvecs.
5280
2bc3c89a
AM
52812002-10-16 Alan Modra <amodra@bigpond.net.au>
5282
5283 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5284 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5285 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5286 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5287 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5288 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5289 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5290 (SOURCE_HFILES): Add elf32-qnx.h.
5291 (BUILD_HFILES): Add bfdver.h.
5292 Run "make dep-am".
5293 * Makefile.in: Regenerate.
5294 * configure.in Update bfd vector dependencies.
5295 * configure: Regenerate.
5296 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5297 * elf32-i386qnx.c: Likewise.
5298 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5299 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5300 * elf32-sh-lin.c: Likewise.
5301 * elf32-shqnx.c: Likewise.
5302 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5303 * elf32-sh64-nbsd.c: Likewise.
5304 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5305 * elf64-sh64-nbsd.c: Likewise.
5306 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5307 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5308 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5309 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5310 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5311 (elf_backend_is_contained_by_filepos): Likewise.
5312 (elf_backend_copy_private_bfd_data_p): Likewise.
5313 Globalize and move functions to..
5314 * elf32-qnx.c: ..here. New file.
5315 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5316 emit target vectors when INCLUDE_SHMEDIA.
5317 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5318 end of file.
5319 * elf64-sh64.c: Remove ELF_ARCH test.
5320 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5321 * po/BLD-POTFILES.in: Regenerate.
5322 * po/SRC-POTFILES.in: Regenerate.
5323
90c9df85
AM
53242002-10-16 Alan Modra <amodra@bigpond.net.au>
5325
366f2964
AM
5326 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5327 loaded with --just-symbols.
5328
90c9df85
AM
5329 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5330 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5331 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5332 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5333
2238051f
RH
53342002-10-15 Richard Henderson <rth@redhat.com>
5335
5336 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5337 (BFD64_BACKENDS_CFILES): Likewise.
5338 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5339 * elf64-alpha-fbsd.c: Remove file, move code ...
5340 * elf64-alpha.c: ... here.
5341 * Makefile.in, configure: Rebuild.
5342
64e04ecd
RH
53432002-10-14 Richard Henderson <rth@redhat.com>
5344
5345 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5346 VALUE, not ADDEND.
5347
396a6083
SC
53482002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5349
5350 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5351 datalabel_got_offset with union of datalabel_got
5352 offset and refcount.
5353 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5354 (allocate_dynrelocs): Delete unnecessary code for
5355 STT_DATALABEL type. Create entry in got for
5356 datalabel version of symbol if datalabel_got.refcount > 0.
5357 (sh_elf_relocate_section): Use datalabel_got union.
5358 (sh_elf_gc_sweep_hook): Pull common code to initialize
5359 h and eh out of switch statement. Declare seen_stt_datalabel.
5360 Initialize it. Decrement datalabel_got.refcount for
5361 got relocs when seen_stt_datalabel is true.
5362 Decrement local_got_refcounts entry for datalabel got relocs
5363 of local symbols.
5364 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5365 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5366 Initialize it. When seen_stt_datalabel is true, increment
5367 datalabel_got refcount rather than got.refcount.
5368 (sh_elf_finish_dynamic_symbol): Create relocs to
5369 initialize got entry for datalabel version of symbol.
5370
6a0735ef
AM
53712002-10-14 Alan Modra <amodra@bigpond.net.au>
5372
5373 * Makefile.am: Run "make dep-am".
5374 (BFD_H_FILES): Remove version.h.
5375 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5376 * version.h: ..to here.
5377 * configure.in (bfd_version_date): Remove.
5378 (AC_OUTPUT): Make bfdver.h from version.h.
5379 * bfd.c: #include "bfdver.h".
5380 * vms-hdr.c: Likewise.
5381 * Makefile.in: Regenerate.
5382 * bfd-in2.h: Regenerate.
5383 * configure: Regenerate.
5384 * po/SRC-POTFILES.in: Regenerate.
5385
686e4055
AM
53862002-10-14 Alan Modra <amodra@bigpond.net.au>
5387
5388 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5389 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5390 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5391 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5392 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5393 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5394 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5395 bfd_mach_ip2022, bfd_mach_ip2022ext,
5396 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5397 * bfd-in2.h: Regenerate.
5398
019dca2b
KK
53992002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5400
5401 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5402 endian vector to targ_selvecs.
5403
bce03d3d
AO
54042002-10-13 Alexandre Oliva <aoliva@redhat.com>
5405
5406 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5407 save_addend argument. Don't apply the 32-bit mask to a
5408 GPREL32 value if it's to be used in another relocation. Don't
5409 use forced-check computation of local_p to decide whether to
5410 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5411 of the addend of a non-in-place GPREL16 relocation.
5412 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5413 mips_elf_calculate_relocation().
5414
9b691193
SC
54152002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5416
5417 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5418 with symbols in other sections if we relaxed something; the sections
5419 output offsets must be re-computed before.
5420
1f4c5b47
SC
54212002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5422
5423 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5424 handling to use Elf_Internal_Sym.
5425 (m68hc11_elf_relax_delete_bytes): Likewise.
5426
5dc97655
KK
54272002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5428
5429 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5430 sh_elf_object_p, dtpoff_base): New functions.
5431 (sh_elf_howto_table): Add TLS relocs.
5432 (sh_reloc_map): Likewise.
5433 (sh_elf_info_to_howto): Support TLS relocs.
5434 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5435 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5436 New macros.
5437 (sh_elf_obj_tdata): New.
5438 (elf_sh_link_hash_table): Add tls_ldm_got.
5439 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5440 (allocate_dynrelocs): Support TLS relocs.
5441 (sh_elf_size_dynamic_sections): Likewise.
5442 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5443 .rela.got section when found already. Return false after printing
5444 error about unresolvable relocation.
5445 (sh_elf_gc_sweep_hook): Support TLS relocs.
5446 (sh_elf_check_relocs): Likewise.
5447 (sh_elf_finish_dynamic_symbol): Likewise.
5448 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5449 * reloc.c: Add SH TLS relocs.
5450 * bfd-in2.h, libbfd.h: Regenerate.
5451
6a0735ef
AM
54522002-10-11 Daniel Jacobowitz <drow@mvista.com>
5453
5454 * Makefile.in: Regenerated.
5455
af39267e
DJ
54562002-10-11 Daniel Jacobowitz <drow@mvista.com>
5457
5458 * Makefile.am: Run dep-am.
6a0735ef 5459 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5460 (BFD32_LIBS): Add simple.lo.
5461 (BFD32_LIBS_CFILES): Add simple.c.
5462 * Makefile.in: Regenerated.
5463 * bfd-in2.h: Regenerated.
5464 * simple.c: New file.
5465
0be617ce
AM
54662002-10-11 Alan Modra <amodra@bigpond.net.au>
5467
14a793b2
AM
5468 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5469 (record_thumb_to_arm_glue): Likewise.
5470 * ecoff.c (ecoff_link_add_externals): Likewise.
5471 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5472 (record_thumb_to_arm_glue): Likewise.
5473 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5474 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5475 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5476 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5477 * elf64-ppc.c (func_desc_adjust): Likewise.
5478 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5479 (sh64_elf64_create_dynamic_sections): Likewise.
5480 * elflink.c (_bfd_elf_create_got_section): Likewise.
5481 (_bfd_elf_create_dynamic_sections): Likewise.
5482 (_bfd_elf_create_linker_section): Likewise.
5483 * elflink.h (elf_add_default_symbol): Likewise.
5484 (elf_link_create_dynamic_sections): Likewise.
5485 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5486 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5487 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5488 (_bfd_mips_elf_add_symbol_hook): Likewise.
5489 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5490 * linker.c (generic_link_add_symbol_list): Likewise.
5491 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5492
5493 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5494
0be617ce 5495 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5496 completely removed. Correct local sym adjustment.
0be617ce 5497
0a4ef3f4
SC
54982002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5499
5500 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5501 Correct mistake in calculation of address of .got.
5502 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5503 elf_sh64_pic_plt_entry_le): Likewise.
5504
efacd36e
SC
55052002-10-09 Richard Shann <richard.shann@superh.com>
5506 Stephen Clarke <stephen.clarke@superh.com>
5507
5508 * Makefile.am: Add entries for elf32-sh64-lin.c and
5509 elf64-sh64-lin.c. Regenerate.
5510 * Makefile.in: Regenerate.
9b5ecbd0 5511 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5512 to use sh64 vectors rather than sh vectors.
5513 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5514 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5515 * configure: Regenerate.
5516 * elf32-sh64-lin.c: New file.
5517 * elf64-sh64-lin.c: New file.
5518 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5519 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5520
299bf759
L
55212002-10-08 H.J. Lu <hjl@gnu.org>
5522
5523 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5524 IE->LE transition for R_386_TLS_IE.
5525
51020317
AM
55262002-10-08 Alan Modra <amodra@bigpond.net.au>
5527
5528 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5529
a8fcf378
NC
55302002-10-07 Mark Elbrecht <snowball3@softhome.net>
5531
51020317
AM
5532 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5533 sections.
a8fcf378 5534
a16d5acb
AM
55352002-10-07 Alan Modra <amodra@bigpond.net.au>
5536
a6b511bd
AM
5537 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5538 code.
5539
a16d5acb
AM
5540 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5541
7c4a37eb
AM
55422002-10-06 Alan Modra <amodra@bigpond.net.au>
5543
5544 * opncls.c: Formatting.
5545 (_bfd_new_bfd): Use a smaller section hash table.
5546
7c4ca42d
AO
55472002-10-05 Alexandre Oliva <aoliva@redhat.com>
5548
5549 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5550 of the other two relocations packed with a REL32 to NONE.
5551
4989d792
SC
55522002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5553
5554 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5555 (sh_elf_link_hash_newfunc): Initialize it.
5556 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5557 to got.refcount for symbols that are forced local or when
5558 we have direct got refs.
5559 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5560 to correctly adjust got.refcount and plt.refcount.
5561 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5562 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5563
7c445aa3
JJ
55642002-10-01 Jakub Jelinek <jakub@redhat.com>
5565
5566 * elf32-i386.c (elf_i386_relocate_section): Fix
5567 movl foo@indntpoff, %eax IE->LE transition.
5568
abcf1d52
JJ
55692002-10-01 Jakub Jelinek <jakub@redhat.com>
5570
5571 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5572 sequence and its transitions.
5573
a45bb67d
JJ
55742002-10-01 Jakub Jelinek <jakub@redhat.com>
5575
5576 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5577 to st_value + addend in non-code sections.
5578 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5579 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5580
00707a0e 55812002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5582 Ken Raeburn <raeburn@cygnus.com>
5583 Aldy Hernandez <aldyh@redhat.com>
5584 Eric Christopher <echristo@redhat.com>
5585 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5586
5587 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5588 (bfd_mach_mips5500): New.
5589 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5590 (arch_info_struct): Add corresponding entries here.
5591 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5592 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5593 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5594 bfd_mach_mips5400 and bfd_mach_mips5500.
5595 (_bfd_mips_elf_mach_extends_p): New function.
5596 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5597 the EF_MIPS_MACH flags.
5598 * bfd-in2.h: Regenerate.
5599
624f0b25
JT
56002002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5601
5602 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5603 .got sections.
5604
b89fe0ee
AM
56052002-09-28 Alan Modra <amodra@bigpond.net.au>
5606
5607 * elf.c (map_sections_to_segments): Correct test for start of
5608 writable section in the same page as end of read-only section.
5609
b29635ba
JT
56102002-09-27 Matt Thomas <matt@3am-software.com>
5611
5612 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5613 local_got_refcounts usage. Remove allocation of got slot.
5614 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5615 Remove de-allocation of got slot.
5616 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5617 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5618 sections to be GC'ed.
5619 (elf_vax_instantiate_got_entries): New function.
5620 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5621 tests that are now handled by elf_vax_instantiate_got_entries.
5622 Assert GOT entry falls within .got section size. Remove redundant
5623 comparisions. Fix comments.
5624
bffbf940
JJ
56252002-09-27 Jakub Jelinek <jakub@redhat.com>
5626
5627 * reloc.c: Add x86-64 TLS relocs.
5628 * bfd-in2.h, libbfd.h: Rebuilt.
5629 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5630 relocs. Add TLS relocs.
5631 (x86_64_reloc_map): Add TLS relocs.
5632 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5633 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5634 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5635 (elf64_x86_64_hash_entry): Define.
5636 (struct elf64_x86_64_obj_tdata): New.
5637 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5638 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5639 (link_hash_newfunc): Initialize tls_type.
5640 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5641 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5642 (elf64_x86_64_mkobject): New.
5643 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5644 (elf64_x86_64_tls_transition): New.
5645 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5646 Handle TLS relocs.
5647 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5648 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5649 (elf64_x86_64_size_dynamic_sections): Likewise.
5650 (dtpoff_base, tpoff): New.
5651 (elf64_x86_64_relocate_section): Handle TLS relocs.
5652 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5653 entries.
5654 (bfd_elf64_mkobject): Define.
5655
5656 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5657 DF_STATIC_TLS if shared.
5658
14366460
TS
56592002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5660
5661 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5662 empty relocation sections.
5663
9f951329
AM
56642002-09-26 Alan Modra <amodra@bigpond.net.au>
5665
5666 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5667 (ppc64_elf_build_stubs): Build them here instead.
5668
6b3ac709
JJ
56692002-09-24 Jakub Jelinek <jakub@redhat.com>
5670
5671 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5672 addend into r_addend, not *r_offset.
5673 (elf32_sparc_finish_dynamic_symbol): Likewise.
5674 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5675 R_SPARC_RELATIVE's r_offset.
5676
e2f6d277
NC
56772002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5678
5679 * dwarf2.c (decode_line_info): Update to correctly decode
5680 the (non-standard DWARF2) out-of-order address sequences
5681 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5682
f3961b2b
DD
56832002-09-23 Mark Elbrecht <snowball3@softhome.net>
5684
5685 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5686
ad34bc37
AM
56872002-09-23 Alan Modra <amodra@bigpond.net.au>
5688
5689 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5690 for discarded FDEs. Remove redundant assignment.
5691 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5692
82988bff
L
56932002-09-22 H.J. Lu <hjl@gnu.org>
5694
5695 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5696 the relocation count between different .reloc sections.
5697
5ad8645c
AM
56982002-09-21 Alan Modra <amodra@bigpond.net.au>
5699
5f819128
AM
5700 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5701 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5702 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5703 R_PPC_EMB_RELSDA.
5704
5ad8645c
AM
5705 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5706 unsigned. Move "symcount" assignment out of loop.
5707 * Makefile.am: Run "make dep-am".
5708 * Makefile.in: Regenerate.
5709 * configure: Regenerate.
5710 * po/SRC-POTFILES.in: Regnerate.
5711
75936555
NC
57122002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5713
5714 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5715 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5716 (e.g. IRIX64).
5717
2243deae
L
57182002-09-19 Jakub Jelinek <jakub@redhat.com>
5719
5720 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5721 even if generating R_PPC_RELATIVE reloc.
5722 (ppc_elf_relocate_section): Make sure relocation is performed
5723 if skip == -2. Clear memory at r_offset when creating dynamic
5724 relocation.
5725
37e55690
JJ
57262002-09-19 Jakub Jelinek <jakub@redhat.com>
5727
5728 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5729 BFD_RELOC_386_TLS_GOTIE): Add.
5730 * bfd-in2.h, libbfd.h: Rebuilt.
5731 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5732 and R_386_TLS_GOTIE.
5733 (elf_i386_reloc_type_lookup): Handle it.
5734 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5735 char instead of enum, change GOT_* into defines.
5736 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5737 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5738 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5739 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5740 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5741 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5742 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5743 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5744 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5745 tls_type is GOT_TLS_IE_BOTH.
5746 (elf_i386_size_dynamic_sections): Likewise.
5747 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5748 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5749 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5750 all 4 GOT_TLS_* TLS types.
5751
8e67855b
NC
57522002-09-19 Nick Clifton <nickc@redhat.com>
5753
5754 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5755 follow indirect links.
5756
1c59ba3f
NC
57572002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5758
5759 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5760 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5761 on 64 bit machines.
5762 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5763 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5764 ECOFF information: 'ioptMax' refers to the actual *size*
5765 of the optimization symtab, not the number of entries.
1c59ba3f 5766
9d7404b7
NC
57672002-09-19 Daniel Jacobowitz <drow@mvista.com>
5768
5769 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5770 ELF_LINK_HASH_NEEDS_PLT logic.
5771
05a487dc
DJ
57722002-09-18 Daniel Jacobowitz <drow@mvista.com>
5773
5774 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5775 correct relocation count.
5776
1f70368c
DJ
57772002-09-17 Daniel Jacobowitz <drow@mvista.com>
5778
5779 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5780 * bfd.c (struct _bfd): Add dynsymcount.
5781 * bfd-in2.h: Regenerated.
5782 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5783 abfd->dynsymcount.
5784 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5785 for overflow.
5786
51020317 57872002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5788
5789 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5790 (mips_elf64_final_gp): Don't make up gp value.
5791 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5792 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5793 .MIPS.options/.options section.
5794
290062cc
DB
57952002-09-17 David O'Brien <obrien@FreeBSD.org>
5796
5797 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5798 It is benign for FreeBSD < 4.1. Minor reformatting.
5799 * elf64-alpha-fbsd.c: Likewise.
5800
c5c1f40c
JJ
58012002-09-17 Jakub Jelinek <jakub@redhat.com>
5802
ca1eb0ba
JJ
5803 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5804 addend.
c5c1f40c 5805
562ace6b
AM
58062002-09-17 Alan Modra <amodra@bigpond.net.au>
5807
5808 * elf64-alpha.c (alpha_elf_size_info): Make static.
5809
5af6ead6
AM
58102002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5811
5812 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5813 * cpu-tic4x.c: Ditto.
5814
cb9512fc
TS
58152002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5816
5817 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5818 duplicate define.
5819
4ada7262
DB
58202002-09-16 Bruno Haible <bruno@clisp.org>
5821
5822 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5823 by a target variant implementation.
5824 * elf64-alpha.c: Likewise.
5825 * elf32-i386-fbsd.c: New file.
5826 * elf64-alpha-fbsd.c: New file.
5827 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5828 bfd_elf64_alpha_freebsd_vec.
5829 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5830 bfd_elf64_alpha_freebsd_vec.
5831 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5832 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5833 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5834 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5835 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5836 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5837 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5838
6a30718d
JJ
58392002-09-12 Jakub Jelinek <jakub@redhat.com>
5840
5841 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5842 NULL.
5843 (elf_i386_relocate_section): Return false after printing error about
5844 unresolvable relocation.
5845
6cf9e9fe
NC
58462002-09-12 Nick Clifton <nickc@redhat.com>
5847
5848 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5849 R_ARM_THM_PC11.
5850
10f469bf
DJ
58512002-09-11 Jeffrey Law <law@redhat.com>
5852
5853 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5854
dc43ada5
NC
58552002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5856
5857 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5858 line_ptr before deciding we've found a symbol.
5859
e09f4395
NC
58602002-09-11 Nick Clifton <nickc@redhat.com>
5861
5862 * po/da.po: New Danish translation file.
5863 * configure.in (LINGUAS): Add 'da'.
5864 * configure: Regenerate.
5865
b3018b5f
NC
58662002-09-10 Michael Snyder <msnyder@redhat.com>
5867
5868 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5869 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5870 do_sections64, depending on corefile (32-bit or 64-bit).
5871
2f21f25e
RH
58722002-09-09 Richard Henderson <rth@redhat.com>
5873
5874 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5875 and PCREL21F like PCREL21B.
5876
28b94e7c
KB
58772002-09-04 Kevin Buettner <kevinb@redhat.com>
5878
51020317
AM
5879 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5880 vector.
28b94e7c 5881
5cec6941
NC
58822002-09-02 Nick Clifton <nickc@redhat.com>
5883
5884 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5885 names instead of cryptically overloaded bfd_reloc error
5886 codes.
5887 (v850_elf_relocate_section): Likewise.
5888 (v850_elf_relax_section): Replace caching of external symbols
5889 with caching of internal symbols obtained from calling
5890 bfd_elf_get_elf_syms().
51020317 5891 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5892
3b77b1d5
AM
58932002-09-02 Alan Modra <amodra@bigpond.net.au>
5894
638524b5
AM
5895 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5896 (bfd_pj_arch): Use bfd_default_scan.
5897 * cpu-v850.c (scan): Remove.
5898 (N): Use bfd_default_scan.
5899 * cpu-z8k.c (scan_mach): Remove.
5900 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5901 first. Use bfd_default_scan.
5902
250d94fd
AM
5903 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5904 bfd_mach constants.
5905 (ecoff_get_magic): Likewise.
5906 * elf32-v850.c (v850_elf_object_p): Likewise.
5907 (v850_elf_final_write_processing): Likewise.
5908 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5909 (MY(write_object_contents)): Likewise.
5910 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5911 * coffcode.h (coff_write_object_contents): Likewise.
5912 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5913 Remove unnecessary "machine" assignments.
5914 (coff_write_relocs): Test for the absolute section sym by testing
5915 section and flags.
5916
3b77b1d5
AM
5917 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5918 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5919 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5920
e5b45b83
DA
59212002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5922
5923 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5924 * bfd-in2.h (align_power): Likewise.
5925
37f45cf8
AM
59262002-08-30 Alan Modra <amodra@bigpond.net.au>
5927
5928 * Makefile.am: Run "make dep-am".
5929 * Makefile.in: Regenerate.
5930
5931 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5932 * cpu-powerpc.c (powerpc_compatible): Likewise.
5933 * cpu-rs6000.c (rs6000_compatible): Likewise.
5934
86aba9db
NC
59352002-08-28 Catherine Moore <clm@redhat.com>
5936
9b5ecbd0 5937 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5938 (v850-elf-reloc): Don't resolve pc relative relocs.
5939 (v850_elf_ignore_reloc): New routine.
5940 (v850_elf_final_link_relocate): Handle new relocs.
5941 (v850_elf_relax_delete_bytes ): New routine.
5942 (v850_elf_relax_section): New routine.
5943 (bfd_elf32_bfd_relax_section): Define.
5944 (HOWTO): New entries for new relocs.
5945 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5946 (BFD_RELOC_V850_LONGJUMP): New reloc.
5947 (BFD_RELOC_V850_ALIGN): New reloc.
5948 * archures.c: Remove redundant v850ea architecture.
5949 * cpu-v850.c: Remove redundant v850ea support.
5950 * libbfd.h: Regenerate.
5951 * bfd-in2.h: Regenerated.
5952
026df7c5
NC
59532002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5954
5955 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5956 * configure.in: Add tic4x_coff vector files.
5957 * configure: Regenerate.
5958 * Makefile.am: Add tic4x target.
5959 * Makefile.in: Regenerate.
5960
59612002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5962
5963 * archures.c: Add the BFD arch type tic4x.
5964 * bfd-in.h: Add BFD_IN_MEMORY flag.
5965 * coff-tic4x.c: New file.
5966 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5967 * cpu-tic4x.c: New file.
5968 * targets.c: Added tic4x- in list of xvecs.
5969 * ticoff.h: New file.
5970 * bfd-in2.h: Regenerate.
5971
88f7bcd5
NC
59722002-08-27 Adam Nemet <anemet@lnxw.com>
5973
5974 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5975 bit of DT_INIT and DT_FINI for Thumb functions.
5976
c8e48751
AM
59772002-08-26 Alan Modra <amodra@bigpond.net.au>
5978
5979 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5980
2846975a
AM
59812002-08-26 Alan Modra <amodra@bigpond.net.au>
5982
5983 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5984
067653c5
AM
59852002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5986
5987 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5988 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5989 Likewise.
5990 (struct elf_sh_pcrel_relocs_copied): Removed.
5991 (struct elf_sh_dyn_relocs): New.
5992 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5993 field with dyn_relocs.
5994 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5995 sections and sym_sec.
5996 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5997 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5998 (sh_elf_create_dynamic_sections): Use create_got_section instead
5999 of _bfd_elf_create_got_section.
6000 (sh_elf_check_relocs): Likewise.
6001 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6002 sections.
6003 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6004 sh_elf_relocate_section, sh_elf_check_relocs,
6005 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6006 Likewise.
6007 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6008 dynamic relocations and avoiding the copy relocation when we
6009 didn't find any dynamic relocations in the section which has
6010 contents or is read-only.
6011 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6012 (sh_elf_size_dynamic_sections): Don't reset the size of
6013 .rela.got section even if dynamic_sections_created flag is off.
6014 Don't use sh_elf_discard_copies. Scan all input bfd and use
6015 allocate_dynrelocs. Call readonly_dynrelocs to determine
6016 whether we need DT_TEXTREL.
6017 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6018 whether the symbol was never referred to.
6019 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6020 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6021 (sh_elf_check_relocs): Call create_got_section if the short-cut
6022 to .got is null. Increment reference counters only instead of
6023 allocating space on dynamic sections here. Don't conditionalize
6024 uninitialized got.offset value when marking the symbol as a
6025 global offset table entry. Keep relocations for symbols satisfied
6026 by a dynamic library to avoid copy relocations for the symbol.
6027 Set dynobj field of an elf hash table if needed.
6028 (sh_elf_finish_dynamic_sections): Handle null section pointer
6029 correctly.
6030 (elf_backend_copy_indirect_symbol): Defined.
6031 (elf_backend_can_refcount): Defined.
6032
7e326afc
NC
60332002-08-23 Nick Clifton <nickc@redhat.com>
6034
6035 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6036 previous change. Add comment explaining why.
6037
c8614e8e
AM
60382002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6039
6040 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6041 contents of .got.plt[2] to tr0, not address of .got.plt.
6042 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6043 patching absolute plt entry. For shmedia plt entry, set bottom bit
6044 of branch to plt0 as this is a branch to an shmedia instruction.
6045 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6046 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6047 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6048 branch to plt0.
6049 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6050 patching absolute plt entry. For shmedia plt entry, branch to
6051 plt0 is now ptrel, so use relative offset. Set bottom bit of
6052 branch target as it is a branch to an shmedia instruction.
6053
3b587c71
AM
60542002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6055 Richard Shann <richard.shann@superh.com>
6056
6057 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6058 value if .init is an SHmedia function. Similarly for DT_FINI.
6059 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 6060
957dcaa8
AM
60612002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6062
3b587c71 6063 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 6064 dynamic section.
3b587c71 6065 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 6066
a4263c47
NC
60672002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6068
6069 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 6070 byte read when reading the return address register column.
a4263c47 6071
db4ed121
NC
60722002-08-22 Nick Clifton <nickc@redhat.com>
6073
6074 * config.bfd: Add powepc64-*-*bsd* target.
6075
ed71e111
NC
60762002-08-22 Graeme Peterson <gp@qnx.com>
6077
6078 * Makefile.am: Add entries for elf32-shqnx.c
6079 * Makefile.in: Regenerate.
6080 * config.bfd: Add support sh-*-nto* target.
6081 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6082 * configure: Regenerate.
6083 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6084 * elf32-sh.c: Do not include elf32-target.h if
6085 ELF32_SH_C_INCLUDED is defined.
6086 * elf32-shqnx.c: New file: Support for QNX.
6087 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6088
0ab72ee2
NC
60892002-08-22 Nick Clifton <nickc@redhat.com>
6090
75c83283
NC
6091 * po/tr.po: Updated Turkish translation.
6092
0ab72ee2
NC
6093 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6094 symbols are not read.
6095
56780f18
AM
60962002-08-22 Alan Modra <amodra@bigpond.net.au>
6097
6098 * elf32-m68hc11.c: Formatting fixes.
6099 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6100 * elf32-m68hc12.c: Formatting fixes.
6101 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6102
b48fa14c
AM
61032002-08-22 Alan Modra <amodra@bigpond.net.au>
6104
a7c71b0c
AM
6105 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6106 SEC_DATA.
6107 (pmac_xcoff_vec): Likewise.
6108 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6109 (aix5coff64_vec): Likewise.
6110
56780f18
AM
61112002-08-22 Alan Modra <amodra@bigpond.net.au>
6112
b48fa14c
AM
6113 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6114 param to elf_backend_copy_indirect_symbol.
6115 (_bfd_elf_link_hash_copy_indirect): Likewise.
6116 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6117 calls to copy_indirect_symbol.
6118 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6119 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6120 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6121 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6122 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6123 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6124 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6125 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6126 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6127 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6128 test refcounts for "used" values.
6129
8c2ab17d
AM
61302002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6131
6132 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6133 argument declaration.
6134
d62b1198 61352002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
6136
6137 * archures.c (bfd_mach_ppc_e500): Added.
6138 * bfd-in2.h: Rebuilt.
d62b1198
EZ
6139 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6140
9f88ba09
AM
61412002-08-19 Alan Modra <amodra@bigpond.net.au>
6142
6143 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6144
df622259
AC
61452002-08-17 Andrew Cagney <ac131313@redhat.com>
6146
6147 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6148 `bfd_byte'.
df622259 6149
44c410de
SC
61502002-08-17 Stan Cox <scox@redhat.com>
6151
6152 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6153 IRIX 6 segment layout for NEWABI.
6154
4972a8e9
SC
61552002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6156
1049f94e 6157 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6158 symbols when looking for section referred to by a relocation.
1049f94e 6159 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6160
c5cd6d62
AM
61612002-08-15 Alan Modra <amodra@bigpond.net.au>
6162
6163 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6164
0741c7be
HPN
61652002-08-15 Hans-Peter Nilsson <hp@axis.com>
6166
6167 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6168 missing check for whether the symbol is referenced by DSO before
6169 unexporting it as an unneeded dynamic symbol.
6170
e8d5d179
L
61712002-08-14 H.J. Lu <hjl@gnu.org>
6172
6173 * libbfd.h: Regenerate.
6174
e9229007
L
61752002-08-14 H.J. Lu <hjl@gnu.org>
6176
6177 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6178
1fd03b5a
SC
61792002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6180
6181 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6182 instructions.
6183 (m68hc11_direct_relax): New to define table of relaxable instructions.
6184 (find_relaxable_insn): New, find a relaxable insn.
6185 (compare_reloc): New to compare two relocs.
6186 (m68hc11_elf_relax_section): New, relax text sections.
6187 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6188 (elf32_m68hc11_check_relocs): New function for GC support.
6189 (elf32_m68hc11_relocate_section): New function for GC support.
6190 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6191 (elf_backend_check_relocs): Likewise.
6192 (elf_backend_relocate_section): Likewise.
6193
c828c771
L
61942002-08-13 H.J. Lu <hjl@gnu.org>
6195
6196 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6197 definitions in shared objects when checking symbol with
6198 undefined version.
6199
9b701e44
SC
62002002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6201
6202 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6203 (elf32_m68hc11_gc_sweep_hook): Likewise.
6204 (elf_backend_gc_mark_hook): Define for GC section support.
6205 (elf_backend_gc_sweep_hook): Likewise.
6206 (elf_backend_can_gc_sections): Likewise.
6207
6208 * elf32-m68hc12.c: Likewise.
6209
96405e3c
SC
62102002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6211
6212 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6213 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6214 (_bfd_m68hc11_elf_set_private_flags): New function.
6215 Use them to set/check/print ELF flags specific to 68HC11.
6216
6217 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6218 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6219 (_bfd_m68hc12_elf_set_private_flags): New function.
6220 Use them to set/check/print ELF flags specific to 68HC12.
6221
dae78fb0
SC
62222002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6223
6224 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6225 fix masks for PC-rel relocs.
6226 (m68hc11_elf_ignore_reloc): New function.
6227
6228 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6229 68HC12 banked addressing relocs.
6230 (m68hc12_phys_addr): New to compute physical address of banked memory.
6231 (m68hc12_phys_page): Likewise for page.
6232 (m68hc12_addr_is_banked): New to see if address is in banked area.
6233 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6234
3dbfec86
SC
62352002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6236
6237 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6238 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6239 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6240 * bfd-in2.h: Regenerate.
6241
871da94f
L
62422002-08-12 H.J. Lu <hjl@gnu.org>
6243
6244 * elflink.h (elf_add_default_symbol): Preserve section across
6245 elf_merge_symbol.
6246
59bc061d
NC
62472002-08-09 Graeme Peterson <gp@qnx.com>
6248
51020317 6249 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6250 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6251 * Makefile.in: Regenerate.
6252 * config.bfd: Add support for powerpc{le}-*-nto targets.
6253 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6254 * configure: Regenerate.
6255 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6256 common file "elf32-qnx.h", and now include that file.
6257 * elf32-qnx.h: New file: QNX specific common elf backend.
6258 * elf32-ppc.c: Do not include elf32-target.h if
6259 ELF32_PPC_C_INCLUDED is defined.
6260 * elf32-ppcqnx.c: New file: Support for QNX.
6261 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6262 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6263
2b692c59
NC
62642002-08-09 Nick Clifton <nickc@redhat.com>
6265
6266 * po/sv.po: Updated Swedish translation.
6267
d0c7ff07
TS
62682002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6269
6270 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6271 g->global_gotsym is NULL.
6272
d8bbe778
L
62732002-08-08 H.J. Lu <hjl@gnu.org>
6274
c5cd6d62 6275 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6276 overrides an indirect versioned symbol.
6277
c366c25e
JJ
62782002-08-08 Jakub Jelinek <jakub@redhat.com>
6279
6280 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6281 for R_386_TLS_TPOFF32 relocs against symndx 0.
6282
31941635
L
62832002-08-07 H.J. Lu <hjl@gnu.org>
6284
6285 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6286 with undefined version if needed.
6287 (elf_link_assign_sym_version): Match a default symbol with a
6288 version without definition. No need to hide the default
6289 definition separately.
6290
0f3bd64f
AM
62912002-08-08 Alan Modra <amodra@bigpond.net.au>
6292
7330fb86
AM
6293 * elflink.h (elf_link_output_extsym): Don't output symbols from
6294 SEC_EXCLUDE sections.
6295
0f3bd64f
AM
6296 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6297
a4aa0fb7
AM
62982002-08-07 Alan Modra <amodra@bigpond.net.au>
6299
6300 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6301 entries.
6302
34ea4a36
TS
63032002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6304
6305 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6306 mismatch.
6307
141ff970
TS
63082002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6309
6310 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6311
28458e7e
TS
63122002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6313
6314 * elf32-mips.c (mips_reloc_map): Fix typo.
6315
0121a3da
AM
63162002-08-06 Alan Modra <amodra@bigpond.net.au>
6317
6318 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6319
d006db6c
AM
63202002-08-06 Alan Modra <amodra@bigpond.net.au>
6321
6322 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6323
8ea80f08
AM
63242002-08-06 Alan Modra <amodra@bigpond.net.au>
6325
2a52da53
AM
6326 * libxcoff.h: Use PARAMS on function declarations.
6327 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6328 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6329
8ea80f08
AM
6330 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6331 addend.
6332 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6333
cf9ab45b
AM
63342002-08-06 Alan Modra <amodra@bigpond.net.au>
6335
6336 * coff-rs6000.c: Formatting fixes.
6337 (xcoff_calculate_relocation): Use PARAMS in declaration.
6338 (xcoff_complain_overflow): Likewise.
6339 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6340 (bfd_xcoff_backend_data): Remove useless comments.
6341 (rs6000coff_vec): Likewise.
6342 (bfd_pmac_xcoff_backend_data): Likewise.
6343 (pmac_xcoff_vec): Likewise.
8ea80f08 6344
cf9ab45b
AM
6345 * coff64-rs6000.c: Formatting fixes.
6346 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6347 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6348 (bfd_xcoff_backend_data): Remove useless comments.
6349 (rs6000coff64_vec): Likewise.
6350 (bfd_xcoff_aix5_backend_data): Likewise.
6351 (aix5coff64_vec): Likewise.
6352
48bfecdd
AM
63532002-08-06 Alan Modra <amodra@bigpond.net.au>
6354
a78eab4e
AM
6355 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6356 mask entries. Use complain_overflow_dont for R_REF.
6357 (xcoff_reloc_type_ba): Revert last change.
6358 (xcoff_reloc_type_br): Likewise.
6359 (xcoff_reloc_type_crel): Likewise.
6360 (xcoff_ppc_relocate_section): Likewise.
6361 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6362 (xcoff64_ppc_relocate_section): Likewise.
6363 (xcoff64_howto_table): Revert some of last change to mask entries.
6364 Use complain_overflow_dont for R_REF.
6365
48bfecdd
AM
6366 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6367 relocs with bitsize == 16 have size = 1.
6368 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6369 (xcoff_reloc_type_br): Likewise.
6370 (xcoff_reloc_type_crel): Likewise.
6371 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6372 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6373 dst_mask adjustment.
6374 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6375 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6376 bitsize == 16 have size = 1.
6377
fd13ed0c
DC
63782002-08-01 Denis Chertykov <denisc@overta.ru>
6379
6380 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6381 (struct misc): New field isymbuf. All free_* fields removed.
6382 (symbol_value): Pass in internal syms. No need to swap syms in.
6383 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6384 possibly cached info.
6385 (tidyup_after_error): Removed.
6386 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6387 misc. Use new field.
6388 (adjust_all_relocations): Use internal syms. No need to swap syms
6389 in and out.
6390 (add_page_insn): Don't use removed fields of struct misc.
6391
24a1ba0f
NC
63922002-08-01 Nick Clifton <nickc@redhat.com>
6393
6394 * elf32-arm.h: Revert previous delta.
6395
a6903459
NC
63962002-08-01 Nick Clifton <nickc@redhat.com>
6397
6398 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6399 * configure: Regenerate.
6400
39a2a3eb
L
64012002-07-31 H.J. Lu <hjl@gnu.org>
6402
6403 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6404 selected.
6405
a0dfa6a8
L
64062002-07-31 H.J. Lu <hjl@gnu.org>
6407
6408 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6409 is selected.
6410
cd67d266
JJ
64112002-07-31 Jakub Jelinek <jakub@redhat.com>
6412
6413 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6414 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6415
4eb6b71c
NC
64162002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6417
6418 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6419 There is no 8 byte relocation type for this architecture.
6420 (do_ns32k_reloc): Use bfd_vma instead of native types.
6421 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6422 returns void.
6423 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6424 rely on generic code to do that.
6425 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6426 to all table entries.
6427 (_bfd_ns32k_relocate_contents): put_data returns void.
6428 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6429 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6430 return void.
6431
f7c33884
NC
64322002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6433
6434 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6435 archive object is target dependant.
6436
8f64befb
NC
64372002-07-31 Adam Nemet <anemet@lnxw.com>
6438
6439 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6440 (THUMB_PLT_ENTRY_SIZE): New macro.
6441 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6442 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6443 ARM_PLT_ENTRY_SIZE.
6444 (elf32_arm_plt_entry): Likewise.
6445 (elf_backend_plt_header_size): Likewise.
6446 (elf32_thumb_plt0_entry): New global.
6447 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6448 into .plt.thumb.
6449 (elf32_thumb_plt_entry): New global.
6450 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6451 Thumb entries. Set the bottom bit of the corresponding GOT entry
6452 for a Thumb PLT entry.
6453 (struct elf32_arm_plt_entry_info): New structure.
6454 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6455 type.
6456 (elf32_arm_link_hash_newfunc): Initialize new member.
6457 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6458 relocations against the PLT.
6459 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6460 first_rel_type if this is the first time we encounter the symbol.
6461 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6462 Determine if relocation needs a PLT entry. Set first_rel_type if
6463 this is the first time we encounter the symbol
6464 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6465 functions as well.
6466 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6467 (elf32_arm_create_dynamic_sections): New function. Create the
6468 .plt.thumb section.
6469 (elf_backend_create_dynamic_sections): Call it.
6470
47badb7b
NC
64712002-07-31 Nick Clifton <nickc@redhat.com>
6472
6473 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6474 'alternative' in order to avoid shadowing global symbol of the
6475 same name.
6476 * bfd-in2.h: Regenerate.
6477 * libbfd.h: Regenerate.
6478 * libcoff.h: Regenerate.
6479
8a397dad
TS
64802002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6481
6482 * Makefile.am: Add n32 ABI support.
6483 * Makefile.in: Regenerate.
6484 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6485 bit vectors for mips*-*-linux targets as optional.
6486 * configure.in: Add n32 ABI vectors.
6487 * configure: Regenerate.
6488 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6489 * elfn32-mips.c: New file, n32 ABI support.
6490 * targets.c: Add n32 ABI vectors.
6491
7e392df6 64922002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6493
7e392df6
NC
6494 * elfarmqnx-nabi.c: New file: Support for QNX.
6495 * config.bfd: Add support for arm-*-nto target.
6496 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6497 * configure: Regenerate.
6498 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6499 * Makefile.in: Regenerate.
6500 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6501 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6502 * elfarm-nabi.c: Do not include elf32-arm.h if
6503 ELFARM_NABI_C_INCLUDED is defined.
6504 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6505
7e392df6 65062002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6507
83e1617e
NC
6508 * po/sv.po: Updated Swedish translation.
6509
704afa60
JJ
65102002-07-30 Jakub Jelinek <jakub@redhat.com>
6511
6512 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6513
487e54f2
AM
65142002-07-30 Alan Modra <amodra@bigpond.net.au>
6515
6516 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6517 * archive.c (bfd_generic_archive_p): Likewise.
6518 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6519 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6520 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6521 (xcoff64_archive_p): Likewise.
6522 (xcoff64_openr_next_archived_file): Likewise.
6523 (xcoff64_archive_p): Clean up tdata properly on error.
6524 * coffgen.c (coff_real_object_p): Likewise.
6525 (coff_object_p): Release filehdr and opthdr.
6526 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6527 * ieee.c (ieee_archive_p): Likewise.
6528 * ihex.c (ihex_object_p): Likewise.
6529 (ihex_mkobject): Always allocate tdata.
6530 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6531 * srec.c (srec_mkobject): Always allocate tdata.
6532 (srec_object_p): Clean up tdata properly on error.
6533 (symbolsrec_object_p): Likewise.
6534 * versados.c (versados_object_p): Likewise.
6535 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6536 and bfd_realloc instead of realloc.
6537 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6538 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6539 place of bfd_malloc, simplifying error freeing. Free hash table too.
6540 (vms_object_p): Clean up tdata on error.
6541 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6542 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6543
9d46020e
AM
65442002-07-30 Alan Modra <amodra@bigpond.net.au>
6545
6546 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6547
fb39dac1
RS
65482002-07-26 Chris Demetriou <cgd@broadcom.com>
6549
6550 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6551 flags into resulting BFD.
6552
7a624474
AM
65532002-07-26 Alan Modra <amodra@bigpond.net.au>
6554
6555 From John Reiser <jreiser@BitWagon.com>
6556 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6557 tls_ldm_got.refcount.
6558
a4382ec6
TS
65592002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6560
6561 * elf64-mips.c: Update TODO comment.
6562 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6563 mips_elf64_gprel16_reloca): Remove prototypes.
6564 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6565 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6566 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6567 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6568 R_MIPS_HIGHEST.
6569 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6570 R_MIPS_GOT16. Remove wrong comments.
6571 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6572 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6573 from elf32-mips.c.
6574 (mips_elf64_hi16_reloc): Fix formatting.
6575 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6576 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6577 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6578 (mips_elf64_gprel16_reloc): Make static. Add check for
6579 partial_inplace.
6580 (mips_elf64_gprel16_reloca): Remove.
6581 (mips_elf64_literal_reloc): New function.
6582 (mips_elf64_gprel32_reloc): Fix formatting.
6583 (mips_elf64_shift6_reloc): Fix comment. Make static.
6584 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6585 elf32-mips.c.
6586 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6587 elf32-mips.c
6588 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6589 specific relocations.
6590 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6591 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6592 (ELF_MAXPAGESIZE): Add comment.
6593
219576a4
NC
65942002-07-25 Nick Clifton <nickc@redhat.com>
6595
6596 * po/sv.po: Updated Swedish translation.
6597 * po/es.po: Updated Spanish translation.
6598 * po/fr.po: Updated French translation.
6599
8c58d23b
AM
66002002-07-25 Alan Modra <amodra@bigpond.net.au>
6601
6602 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6603 as elf_link_record_local_dynamic_symbol.
6604 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6605 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6606 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6607 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6608 attempt is made to record a symbol in a discarded section, and
6609 return `2' in that case.
6610
ff3063f5
NC
66112002-07-24 Nick Clifton <nickc@redhat.com>
6612
6613 * po/sv.po: Updated Swedish translation.
6614 * po/es.po: Updated Spanish translation.
6615
f0fe0e16
AM
66162002-07-23 Alan Modra <amodra@bigpond.net.au>
6617
c1fb5f8a
AM
6618 * po/SRC-POTFILES.in: Regenerate.
6619
f0fe0e16
AM
6620 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6621 immediately. Remove code handling relocatable linking.
6622 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6623 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6624 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6625 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6626 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6627 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6628 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6629 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6630 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6631 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6632 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6633 * elf32-avr.c (elf_backend_rela_normal): Define.
6634 * elf32-cris.c: Likewise.
6635 * elf32-fr30.c: Likewise.
de2d743e 6636 * elf32-frv.c: Likewise.
f0fe0e16
AM
6637 * elf32-h8300.c: Likewise.
6638 * elf32-hppa.c: Likewise.
6639 * elf32-ip2k.c: Likewise.
6640 * elf32-sparc.c: Likewise.
6641 * elf32-v850.c: Likewise.
6642 * elf32-vax.c: Likewise.
6643 * elf64-hppa.c: Likewise.
6644 * elf64-sparc.c: Likewise.
6645 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6646 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6647 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6648 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6649 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6650 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6651 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6652 * elf-m10200.c (USE_RELA): Don't define.
6653 * elf-m10300.c: Likewise.
de2d743e 6654 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6655 * elf32-i370.c: Likewise.
6656 * elf32-ip2k.c: Likewise.
6657 * elf32-m68k.c: Likewise.
6658 * elf32-mcore.c: Likewise.
6659 * elf32-ppc.c: Likewise.
6660 * elf32-s390.c: Likewise.
6661 * elf32-vax.c: Likewise.
6662 * elf64-ppc.c: Likewise.
6663 * elf64-s390.c: Likewise.
6664 * elf64-x86-64.c: Likewise.
6665 * elfxx-ia64.c: Likewise.
6666 * elf32-avr.c (USE_REL): Don't undef.
6667 * elf32-ip2k.c: Likewise.
6668
5e8d7549
NC
66692002-07-23 Nick Clifton <nickc@redhat.com>
6670
6671 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6672 'want_p_paddr_set_to_zero'.
6673 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6674 to false;
6675 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6676 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6677
9e12c7db
NC
66782002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6679
6680 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6681 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6682 show the Copyright string.
6683 Minor formatting tidy ups.
6684
0461a601
NC
66852002-07-23 Nick Clifton <nickc@redhat.com>
6686
ff3063f5
NC
6687 * po/fr.po: Updated French translation.
6688 * po/sv.po: Updated Swedish translation.
0461a601 6689
fad2542d
AM
66902002-07-23 Alan Modra <amodra@bigpond.net.au>
6691
6692 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6693 when outputting relocs.
6694
c0647bfc
JT
66952002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6696
6697 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6698 DT_PLTGOT into the dynamic section if there is a PLT.
6699
d01414a5
TS
67002002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6701
6702 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6703 elf32-mips.c.
6704 (_bfd_mips_elf_write_section): Likewise.
6705 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6706 (_bfd_mips_elf_write_section): Likewise.
6707 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6708 (elf32_mips_write_section): Likewise.
6709 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6710 (_bfd_mips_elf_write_section): Likewise.
6711
40c97fc6
AM
67122002-07-19 Alan Modra <amodra@bigpond.net.au>
6713
6714 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6715 PT_IA_64_UNWIND segments for a given section.
6716
58378160
L
67172002-07-17 H.J. Lu <hjl@gnu.org>
6718
6719 * Makefile.am: Fix a typo.
6720 * Makefile.in: Regenerate.
6721
cf88bb9f
NC
67222002-07-15 Denis Chertykov <denisc@overta.ru>
6723 Frank Ch. Eigler <fche@redhat.com>
6724 Ben Elliston <bje@redhat.com>
6725 Alan Lehotsky <alehotsky@cygnus.com>
6726 John Healy <jhealy@redhat.com>
6727 Graham Stott <grahams@redhat.com>
6728 Jeff Johnston <jjohnstn@redhat.com>
6729
6730 * Makefile.am: Add support for ip2k.
6731 * Makefile.in: Regenerate.
6732 * doc/Makefile.in: Regenerate.
6733 * archures.c: Add support for ip2k.
6734 * config.bfd: Add support for ip2k.
6735 * configure.in: Add support for ip2k.
6736 * configure: Regenerate.
6737 * reloc.c: Add support for ip2k.
6738 * targets.c: Add support for ip2k.
6739 * bfd-in2.h: Regenerate.
6740 * libbfd.h: Regenerate.
6741 * cpu-ip2k.c: New file.
6742 * elf32-ip2k.c: New file.
6743
0dafd5f6
RE
67442002-07-17 Ian Rickards <irickard@arm.com>
6745
40c97fc6 6746 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6747 just return the filename.
6748
36b08f12
AM
67492002-07-16 Moritz Jodeit <moritz@jodeit.org>
6750
6751 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6752
58821868
AM
67532002-07-16 Alan Modra <amodra@bigpond.net.au>
6754
6755 * elflink.h: Formatting fixes, tidy prototypes.
6756 (elf_link_assign_sym_version): Move common code out of loop.
6757
c89583f8
AM
67582002-07-16 Alan Modra <amodra@bigpond.net.au>
6759
6760 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6761 reloc section size is zero. Correct reloc output location.
6762
ba94744e
AM
67632002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6764
6765 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6766 the final type for the e_fsel selector when generating PA2.0W code.
6767 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6768 relocations.
6769
96a94295
L
67702002-07-14 H.J. Lu <hjl@gnu.org>
6771
6772 * elflink.h (elf_link_assign_sym_version): Hide the default
6773 definition if there is a hidden versioned definition.
6774
6849c52f
HPN
67752002-07-12 Hans-Peter Nilsson <hp@axis.com>
6776
6777 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6778 dynamic reference test in assertion when initializing GOT with
6779 static contents. Just assert that there are either no dynamic
6780 sections, the symbol is defined in the regular objects or that the
6781 symbol is undef weak. Tweak comment.
6782 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6783 only if the symbol isn't defined in the program and isn't undef
6784 weak.
6785 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6786 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6787 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6788 (elf_cris_discard_excess_program_dynamics): Don't consider
6789 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6790
239e1f3a
AM
67912002-07-11 Alan Modra <amodra@bigpond.net.au>
6792
6793 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6794 unresolved debugging relocs in dynamic applications.
6795 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6796 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6797 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6798 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6799 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6800 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6801
2f6d9989
AM
68022002-07-10 Alan Modra <amodra@bigpond.net.au>
6803
f5e87a1d
AM
6804 * elf64-ppc.c (ONES): Define.
6805 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6806 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6807 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6808
2f6d9989
AM
6809 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6810 (ppc64_elf_set_private_flags): Delete.
6811 (ppc64_elf_section_from_shdr): Delete.
6812 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6813 (ppc64_elf_fake_sections): Delete.
6814 (bfd_elf64_bfd_set_private_flags): Don't define.
6815 (bfd_elf64_get_symbol_info): Likewise.
6816 (elf_backend_section_from_shdr): Likewise.
6817 (elf_backend_fake_sections): Likewise.
6818
0594c12d
AM
68192002-07-10 Marco Walther <Marco.Walther@sun.com>
6820
6821 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6822 when not already set.
6823 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6824 (elf_backend_fake_sections): Define.
6825
699cb9b8
AM
68262002-07-10 Alan Modra <amodra@bigpond.net.au>
6827
6828 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6829 Formatting.
6830 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6831
0a4787a0
HPN
68322002-07-09 Hans-Peter Nilsson <hp@axis.com>
6833
6834 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6835 NULL sym_hashes to just before use.
6836 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6837 symbol with non-default visibility.
6838 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6839 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6840 Ditto.
6841 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6842 symbol with non-default visibility.
6843 (cris_elf_check_relocs): At tests for local symbol before
6844 increasing h->plt.refcount, also check for non-default
6845 visibility. Ditto when checking for local symbol to eliminate
6846 pc-relative runtime relocs.
6847
aecc8f8a
AM
68482002-07-08 Alan Modra <amodra@bigpond.net.au>
6849
6850 * elf.c: Formatting.
6851 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6852 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6853 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6854 segments.
6855
e9168c1e
MM
68562002-07-07 Mark Mitchell <mark@codesourcery.com>
6857 Alan Modra <amodra@bigpond.net.au>
6858
6859 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6860 account the impact of relocation count overflow when computing
6861 section offsets.
6862 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6863 or not to apply the PE COFF reloc overflow handling. Fix a
6864 fencepost error in deciding whether or not to use that technique.
6865
6cdc0ccc
AM
68662002-07-07 Alan Modra <amodra@bigpond.net.au>
6867
6868 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6869 change type of locsyms.
6870 (bfd_elf_get_elf_syms): Declare.
6871 * elf.c (bfd_elf_get_elf_syms): New function.
6872 (group_signature): Use bfd_elf_get_elf_syms.
6873 (bfd_section_from_r_symndx): Likewise.
6874 * elfcode.h (elf_slurp_symbol_table): Likewise.
6875 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6876 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6877 locality of various data structures. Properly free internal relocs.
6878 (elf_bfd_final_link): Properly free internal relocs.
6879 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6880 (elf_link_input_bfd): Likewise.
6881 (elf_gc_mark): Likewise. Properly free internal relocs.
6882 (elf_gc_sweep): Properly free internal relocs.
6883 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6884 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6885 internal relocs.
6886 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6887 Properly free possibly cached info.
6888 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6889 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6890 symbol swapping code.
6891 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6892 Properly free possibly cached info.
6893 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6894 (mn10300_elf_relax_delete_bytes): Likewise.
6895 (mn10300_elf_symbol_address_p): Likewise.
6896 (mn10300_elf_get_relocated_section_contents): Likewise.
6897 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6898 (elf32_h8_relax_delete_bytes): Likewise.
6899 (elf32_h8_symbol_address_p): Likewise.
6900 (elf32_h8_get_relocated_section_contents): Likewise.
6901 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6902 (m32r_elf_relax_delete_bytes): Likewise.
6903 (m32r_elf_get_relocated_section_contents): Likewise.
6904 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6905 elf_section_data to determine whether cached.
6906 (sh_elf_relax_section): As above for elf-m10200.c.
6907 (sh_elf_relax_delete_bytes): Likewise.
6908 (sh_elf_get_relocated_section_contents): Likewise.
6909 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6910 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6911 reading of local syms.
6912 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6913 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6914 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6915 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6916 relocs.
6917 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6918 free internal relocs and section contents. Don't read symbols.
6919 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6920 (elf32_hppa_size_stubs): Don't free local syms.
6921 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6922 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6923 possibly cached info.
6924 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6925 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6926 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6927 all_local_syms.
6928 (get_local_syms): Delete function.
6929 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6930 on exit.
6931 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6932
b3212001
JW
69332002-07-05 Jim Wilson <wilson@redhat.com>
6934
6935 * syms.c (decode_section_type): New.
6936 (bfd_decode_symclass): Call decode_section_type.
6937
894bb1ee
JJ
69382002-07-04 Jakub Jelinek <jakub@redhat.com>
6939
6940 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6941 section content start.
6942 Reported by Michael Schumacher <mike@hightec-rt.com>.
6943
bc0ba537
AM
69442002-07-04 Alan Modra <amodra@bigpond.net.au>
6945
9b5ecbd0 6946 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
6947 link order code. Don't actually remove the output section here;
6948 Just set a flag for the linker to do so.
6949 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6950 sections when setting up output section dynsyms.
6951
797fc050
AM
69522002-07-04 Alan Modra <amodra@bigpond.net.au>
6953
6954 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6955 fudge.
6956 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6957 libs here instead.
6958
99881371
MS
69592002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6960
6961 * elf64-s390.c (create_got_section): Set .got section alignment to
6962 8 bytes.
6963 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6964
47d9a591
AM
69652002-07-02 Alan Modra <amodra@bigpond.net.au>
6966
6967 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6968
179d3252
JT
69692002-07-01 Matt Thomas <matt@3am-software.com>
6970
6971 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6972 to EF_VAX_*.
6973
4a14403c
TS
69742002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6975
6976 * elfxx-mips.c (ABI_64_P): Fix comment.
6977 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6978 new section names for N64 ABI.
6979 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6980 (mips_elf_calculate_relocation): Code formatting.
6981 (mips_elf_create_dynamic_relocation): Likewise.
6982 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6983 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6984 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6985 in any NewABI.
6986 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6987 for NewABI.
6988 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6989 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6990 here, too.
6991
607c0e09
AS
69922002-07-01 Andreas Schwab <schwab@suse.de>
6993
6994 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6995 R_X86_64_64 to R_X86_64_RELATIVE.
6996
ba26fd96
AM
69972002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6998
6999 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7000 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7001 Run "make dep-am".
7002 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7003 host_aout_vec.
7004 * configure.in (vaxbsd_vec): Add.
7005 * targets.c (vaxbsd_vec): Add.
7006 * Makefile.in: Rebuild.
7007 * configure: Rebuild.
7008 * po/SRC-POTFILES.in: Rebuild.
7009
1e2f5b6e
AM
70102002-07-01 Alan Modra <amodra@bigpond.net.au>
7011
7012 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7013 examining to gc_mark_hook, rather than the bfd.
7014 (elf_gc_sections): Adjust.
7015 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7016 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7017 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7018 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7019 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7020 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7021 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7022 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7023 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7024 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7025 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7026 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7027 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7028 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7029 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7030 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7031 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7032 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7033 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7034 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7035 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7036 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7037 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7038 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7039 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7040 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7041 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7042 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7043 redundant local sym tests.
7044 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7045 (link_hash_newfunc): Init is_entry.
7046 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7047 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7048 (create_linkage_sections): Use bfd_make_section_anyway rather than
7049 bfd_make_section.
7050 (ppc64_elf_mark_entry_syms): New function.
7051 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7052 up opd entry to function section map.
7053 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7054 relocs that reference the opd section.
7055 (edit_opd): New function.
7056 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7057 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7058 (get_local_syms): Do so here. Exit if we already have local syms.
7059 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7060 read local syms on non-ELF input.
7061 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7062 than duplicating it's function here. Adjust free of internal
7063 relocs to suit.
7064 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7065 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7066 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7067 _bfd_elf32_link_read_relocs rather than duplicating it's function
7068 here. Adjust free of internal relocs to suit.
7069
1b71fb54
AJ
70702002-07-01 Andreas Jaeger <aj@suse.de>
7071
7072 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7073 are not allowed in shared libs code, enforce -fPIC.
7074
8d28f606
HPN
70752002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7076
7077 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7078 trailing zero-sequences when there's previous left-over data.
7079
5ac81c74
JL
70802002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7081
7082 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7083 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7084 and opd_rel_sec in order for starting rela section. Check _raw_size.
7085 (elf_backend_reloc_type_class): Define.
7086
91a4d569
AM
70872002-06-27 Kevin Buettner <kevinb@redhat.com>
7088
7089 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7090 DWARF2 formats.
7091
feee612b
AM
70922002-06-27 Alan Modra <amodra@bigpond.net.au>
7093
7094 * cpu-powerpc.c: Comment on ordering of arch_info.
7095 * elf32-ppc.c (ppc_elf_object_p): New function.
7096 (elf_backend_object_p): Define.
7097 * elf64-ppc.c (ppc64_elf_object_p): New function.
7098 (elf_backend_object_p): Define.
7099
a4e6cefc
JT
71002002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7101
7102 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7103 * configure: Regenerate.
7104
dae2dd0d
NC
71052002-06-25 Jason Eckhardt <jle@rice.edu>
7106
7107 * dwarf2.c (decode_line_info): Check unit->addr_size
7108 to read in the proper number of prologue bytes.
7109
680f9d5c
NC
71102002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7111
7112 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7113 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
7114 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7115 been enabled.
dae2dd0d 7116
680f9d5c
NC
7117 * targets.c (_bfd_target_vector[]): Only include
7118 aix5coff64_vec if 64-bit bfd support has been enabled.
7119
d4c88bbb
AM
71202002-06-25 Alan Modra <amodra@bigpond.net.au>
7121
7122 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7123 * elf32-hppa.c (hppa_add_stub): Likewise.
7124 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7125 * elflink.h (elf_add_default_symbol): Fix comment typo.
7126 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7127 (elf_link_add_object_symbols): Likewise.
7128 (elf_link_assign_sym_version): Likewise.
7129 * hash.c (bfd_hash_lookup): Likewise.
7130 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7131 * section.c (bfd_get_unique_section_name): Likewise.
7132 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7133 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7134 (assign_section_numbers): Likewise.
7135 (_bfd_elfcore_make_pseudosection): Likewise.
7136 (elfcore_grok_lwpstatus): Likewise.
7137 (elfcore_grok_win32pstatus): Likewise.
7138 (elfcore_write_note): Constify input params. Use PTR instead of
7139 void *. Include terminating NUL in namesz. Correct padding.
7140 Support NULL "name" param. Use memcpy instead of strcpy.
7141 (elfcore_write_prpsinfo): Constify input params.
7142 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7143 (elfcore_write_lwpstatus): Likewise.
7144 (elfcore_write_pstatus): Likewise.
7145 (elfcore_write_prfpreg): Likewise.
7146 (elfcore_write_prxfpreg): Likewise.
7147 * elf-bfd.h (elfcore_write_note): Update declaration.
7148 (elfcore_write_prpsinfo): Likewise.
7149 (elfcore_write_prstatus): Likewise.
7150 (elfcore_write_pstatus): Likewise.
7151 (elfcore_write_prfpreg): Likewise.
7152 (elfcore_write_prxfpreg): Likewise.
7153 (elfcore_write_lwpstatus): Likewise.
7154
b0ac09d2
NC
71552002-06-25 Jason Eckhardt <jle@rice.edu>
7156
7157 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7158 symbols of type stProc and stStaticProc.
7159
71602002-06-25 Nick Clifton <nickc@redhat.com>
7161
7162 * ecoff.c: VArious formatting fixes.
7163
021d6096
AM
71642002-06-25 Alan Modra <amodra@bigpond.net.au>
7165
7166 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7167
82e51918
AM
71682002-06-25 Alan Modra <amodra@bigpond.net.au>
7169
7170 * aout-adobe.c: Don't compare against "true" or "false.
7171 * aout-target.h: Likewise.
7172 * aoutx.h: Likewise.
7173 * archive.c: Likewise.
7174 * bout.c: Likewise.
7175 * cache.c: Likewise.
7176 * coff-a29k.c: Likewise.
7177 * coff-alpha.c: Likewise.
7178 * coff-i386.c: Likewise.
7179 * coff-mips.c: Likewise.
7180 * coff-or32.c: Likewise.
7181 * coff64-rs6000.c: Likewise.
7182 * coffcode.h: Likewise.
7183 * coffgen.c: Likewise.
7184 * cpu-ns32k.c: Likewise.
7185 * ecoff.c: Likewise.
7186 * ecofflink.c: Likewise.
7187 * elf.c: Likewise.
7188 * elf32-arm.h: Likewise.
7189 * elf32-cris.c: Likewise.
7190 * elf32-d30v.c: Likewise.
7191 * elf32-i386.c: Likewise.
7192 * elf32-mcore.c: Likewise.
7193 * elf32-ppc.c: Likewise.
7194 * elf32-sh.c: Likewise.
7195 * elf32-sh64.c: Likewise.
7196 * elf32-v850.c: Likewise.
7197 * elf64-alpha.c: Likewise.
7198 * elf64-sh64.c: Likewise.
7199 * elfcode.h: Likewise.
7200 * elfcore.h: Likewise.
7201 * elflink.h: Likewise.
7202 * elfxx-mips.c: Likewise.
7203 * i386os9k.c: Likewise.
7204 * ieee.c: Likewise.
7205 * libbfd.c: Likewise.
7206 * linker.c: Likewise.
7207 * mmo.c: Likewise.
7208 * nlm32-alpha.c: Likewise.
7209 * nlm32-i386.c: Likewise.
7210 * nlm32-ppc.c: Likewise.
7211 * nlm32-sparc.c: Likewise.
7212 * nlmcode.h: Likewise.
7213 * oasys.c: Likewise.
7214 * pdp11.c: Likewise.
7215 * peicode.h: Likewise.
7216 * reloc.c: Likewise.
7217 * som.c: Likewise.
7218 * srec.c: Likewise.
7219 * tekhex.c: Likewise.
7220 * vms.c: Likewise.
7221 * xcofflink.c: Likewise.
7222 * elf64-sparc.c: Edit comment to not use "== false".
7223
7224 * aoutf1.h: Don't use "? true : false".
7225 * ecoff.c: Likewise.
7226 * format.c: Likewise.
7227 * ieee.c: Likewise.
7228 * linker.c: Likewise.
7229 * mmo.c: Likewise.
7230 * oasys.c: Likewise.
7231
48fc70a2
AM
72322002-06-23 H.J. Lu <hjl@gnu.org>
7233
7234 * elflink.h (elf_link_add_archive_symbols): For the default
7235 version, check references with only one `@' first.
7236
47b7c2db
AM
72372002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7238
7239 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7240 function.
9b5ecbd0 7241 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7242 symbol table.
7243 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7244 (elf64_hppa_size_dynamic_sections): Revise to use
7245 elf64_hppa_mark_milli_and_exported_functions.
7246 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7247 symbols out of dynamic symbol table.
7248
f5d44ba0
AM
72492002-06-23 Alan Modra <amodra@bigpond.net.au>
7250
bb3fff1e
AM
7251 * Makefile.in: Regenerate.
7252 * libbfd.h: Regenerate.
7253 * bfd-in2.h: Regenerate.
7254 * configure: Regenerate.
7255 * po/SRC-POTFILES.in: Regenerate.
7256
f5d44ba0
AM
7257 * elflink.h: Comment typo fixes.
7258
72592002-06-23 H.J. Lu <hjl@gnu.org>
7260
7261 * elf-bfd.h (elf_link_loaded_list): New structure.
7262 (elf_link_hash_table): Add "loaded".
7263 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7264 * elflink.h (elf_link_check_versioned_symbol): New function.
7265 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7266
cc36acdf
NC
72672002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7268
7269 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7270 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7271 nothing needed to be done, rather than false, indicating that the
7272 section's size could not be computed.
7273
4e5ba5b7
DB
72742002-06-18 Dave Brolley <brolley@redhat.com>
7275
7276 From Catherine Moore, Michael Meissner, Dave Brolley:
7277 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7278 * targets.c: Support bfd_elf32_frv_vec.
7279 * reloc.c: Add FRV relocs.
7280 * configure.in: Add support for bfd-elf32-frv-vec.
7281 * config.bfd (targ_cpu): Add support for frv-*-elf.
7282 * archures.c: Add frv arch and machines.
7283 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7284 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7285 (BFD32_BACKENDS): Add elf32-frv.lo.
7286 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7287 (cpu-frv.lo): New target.
7288 (elf32-frv.lo): New target.
7289 * cpu-frv.c: New file.
7290 * elf32-frv.c: New file.
7291
7ece0d85
JJ
72922002-06-18 Jakub Jelinek <jakub@redhat.com>
7293
7294 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7295 e_shnum == 0.
7296 Only read the first section header if e_shoff is non-zero.
7297 Don't consider e_shstrndx if there are no sections.
7298
57fb03ac
TR
72992002-06-17 Tom Rix <trix@redhat.com>
7300
7301 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7302 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7303 complain_overflow_bitfield.
7304
341ca622
AM
73052002-06-17 Alan Modra <amodra@bigpond.net.au>
7306
767e34d1
AM
7307 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7308 (bfd_fdopenr): Likewise.
7309 (bfd_openstreamr): Likewise.
7310 (bfd_openw): Likewise.
7311
341ca622
AM
7312 * targets.c: Sort target vecs.
7313 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7314 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7315 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7316 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7317 * configure.in: Sort target vecs. Add m88kmach3_vec.
7318 * configure: Regenerate.
7319
dfbbae4c
HPN
73202002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7321
7322 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7323 bpo_reloc_no to break sort order ties, not address of items.
7324
d663e1cd
JL
73252002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7326
7327 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7328 Skip excluded sections in determing __gp value.
7329 (elf_hppa_final_link_relocate): Use the symbol's address in
7330 R_PARISC_FPTR64 relocations that don't need an opd entry.
7331 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7332 (elf64_hppa_finalize_dynreloc): Likewise.
7333 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7334 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7335
a8295218
NC
73362002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7337
7338 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7339 alignment for .bss, .data and .text sections so that sse and sse2
7340 code will work.
7341 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7342
73432002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7344
7345 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7346 sh[1234]*-elf*.
7347
3db4b612
JL
73482002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7349
2cb69dd3
JL
7350 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7351 dynamic sections.
7352
3db4b612
JL
7353 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7354 for a symbol that has no output section.
7355 (allocate_dynrel_entries): Correct comment.
7356 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7357 unless we want one.
7358 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7359 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7360 with no section. Remove unnecessary parentheses.
7361
f3813499
TR
73622002-06-11 Tom Rix <trix@redhat.com>
7363
7364 * coffcode.h (coff_compute_section_file_positions): Add data
7365 section to AIX loader alignment check.
7366
f5d44ba0 7367 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7368 alignment to 4 bytes.
7369 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7370 power accessor macro.
7371 (do_shared_object_padding): Remove invalid assertion.
7372
0ebaf185
RS
73732002-06-10 Richard Sandiford <rsandifo@redhat.com>
7374
7375 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7376 for removed output sections.
7377
ebe3e2d1
NC
73782002-06-10 Geoffrey Keating <geoffk@redhat.com>
7379
7380 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7381 htab_alloc.
7382 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7383
0b14c2aa
L
73842002-06-08 H.J. Lu <hjl@gnu.org>
7385
7386 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7387 work around a long long bug in gcc 2.96 on mips.
7388
3c2bfad6
JT
73892002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7390
7391 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7392 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7393 Regenerate dependency lists.
7394 * Makefile.in: Regenerate.
7395 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7396 vax1knetbsd_vec to targ_selvecs.
7397 * configure.in: Add vax1knetbsd_vec.
7398 * configure: Regenerate.
7399 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7400 * vax1knetbsd.c: New file.
7401 * vaxnetbsd.c: Update copyright years.
7402 (TARGET_PAGE_SIZE): Set to 0x1000.
7403 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7404
91149be3
JT
74052002-06-08 Matt Thomas <matt@3am-software.com>
7406
7407 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7408
21e15248
AM
74092002-06-08 Alan Modra <amodra@bigpond.net.au>
7410
7411 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7412
986b7daa
AM
74132002-06-08 Alan Modra <amodra@bigpond.net.au>
7414
e90b95f6
AM
7415 * Makefile.am: Run "make dep-am".
7416 * Makefile.in: Regenerate.
7417
3f9c735e
AM
7418 * armnetbsd.c: Replace CONST with const.
7419 * corefile.c: Likewise.
7420 * elf32-dlx.c: Likewise.
7421 * elf64-mips.c: Likewise.
7422 * mmo.c: Likewise.
7423 * ns32knetbsd.c: Likewise.
7424
986b7daa
AM
7425 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7426 table is elf64-sparc.
7427
5a659663
TS
74282002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7429
7430 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7431 Fix RELA addends to get not shifted in the result. Don't do special
7432 handling of R_MIPS_64 for NewABI.
7433
9bab7074
AM
74342002-06-07 Alan Modra <amodra@bigpond.net.au>
7435
7436 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7437 (NAME(aout,slurp_reloc_table)): Likewise.
7438 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7439 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7440 (xcoff_write_archive_contents_big): Likewise.
7441 (xcoff_generate_rtinit): Likewise.
7442 (xcoff_generate_rtinit): Likewise, and check error return.
7443 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7444 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7445 (coff_get_normalized_symtab): Likewise.
7446 (coff_make_empty_symbol): Likewise.
7447 (bfd_coff_set_symbol_class): Likewise.
7448 * cofflink.c (coff_link_add_symbols): Likewise.
7449 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7450 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7451 (bfd_ecoff_write_accumulated_debug): Likewise.
7452 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7453 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7454 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7455 * ieee.c (do_with_relocs): Use bfd_zalloc.
7456 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7457 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7458 (NAME(aout,slurp_reloc_table)): Likewise.
7459 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7460 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7461 * som.c (som_build_and_write_symbol_table): Likewise.
7462 (som_slurp_string_table): Likewise.
7463 (som_slurp_symbol_table): Likewise.
7464 (som_bfd_ar_write_symbol_stuff): Likewise.
7465 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7466 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7467 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7468 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7469 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7470
1126897b
AM
74712002-06-07 Alan Modra <amodra@bigpond.net.au>
7472
7473 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7474 "group" union.
7475 (elf_group_name): Update.
7476 (elf_group_id): Define.
7477 (bfd_elf_set_group_contents): Declare.
7478 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7479 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7480 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7481 that sym for the signature.
7482 (_bfd_elf_compute_section_file_positions): Don't call
7483 set_group_contents for "ld -r" case.
7484 (swap_out_syms): Use bfd_zalloc.
7485 * elflink.h (elf_link_add_archive_symbols): Likewise.
7486 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7487 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7488
3fad3c7c
AM
74892002-06-07 Alan Modra <amodra@bigpond.net.au>
7490
7491 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7492 relocs in opd for non-shared too.
7493
10f469bf 74942002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7495
7496 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7497 relocations.
7498
7217313c
NC
74992002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7500
7501 * merge.c: Include libiberty.h.
7502 * elf-strtab.c: Include libiberty.h.
7503
6cb22815
AM
75042002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7505
7506 * peXXigen.c (pe_print_idata): Remove unused variable.
7507
1ed89aa9
NC
75082002-06-06 David Heine <dlheine@tensilica.com>
7509
7510 * elf.c (assign_file_positions_for_segments): Remove unallocated
7511 sections from the section to segment mapping for PT_LOAD segments.
7512 Update comment about empty loadable segments.
7513
644c4c80
RS
75142002-06-06 Richard Sandiford <rsandifo@redhat.com>
7515
7516 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7517 is within the .stabstr section.
7518
f8ecb12b
AM
75192002-06-06 Alan Modra <amodra@bigpond.net.au>
7520
7521 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7522 are "const PTR", not "const PTR *".
7523 (bfd_elf32_swap_symbol_in): Likewise.
7524 (bfd_elf64_swap_symbol_in): Likewise.
7525 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7526 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7527 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7528 (elf_link_add_object_symbols): Likewise.
7529 (elf_link_record_local_dynamic_symbol): Likewise.
7530 (elf_link_input_bfd): Likewise.
7531 (elf_gc_mark): Likewise.
7532 (elf_reloc_symbol_deleted_p): Likewise.
7533 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7534 (mn10200_elf_relax_delete_bytes): Likewise.
7535 (mn10200_elf_symbol_address_p): Likewise.
7536 (mn10200_elf_get_relocated_section_contents): Likewise.
7537 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7538 (mn10300_elf_relax_section): Likewise.
7539 (mn10300_elf_relax_delete_bytes): Likewise.
7540 (mn10300_elf_symbol_address_p): Likewise.
7541 (mn10300_elf_get_relocated_section_contents): Likewise.
7542 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7543 (elf32_h8_relax_delete_bytes): Likewise.
7544 (elf32_h8_symbol_address_p): Likewise.
7545 (elf32_h8_get_relocated_section_contents): Likewise.
7546 * elf32-hppa.c (get_local_syms): Likewise.
7547 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7548 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7549 * elf32-sh.c (sh_elf_relax_section): Likewise.
7550 (sh_elf_relax_delete_bytes): Likewise.
7551 (sh_elf_get_relocated_section_contents): Likewise.
7552 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7553 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7554 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7555 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7556 * elf64-ppc.c (get_local_syms): Likewise.
7557 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7558 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7559
1ed89aa9 75602002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7561
7562 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7563
73ff0d56
AM
75642002-06-05 Alan Modra <amodra@bigpond.net.au>
7565
9dce4196
AM
7566 * elf.c (group_signature): Swap in the whole symbol, and handle
7567 extracting section symbol names.
7568 (setup_group): Add comment.
7569 (set_group_contents): When called from objcopy or ld, arrange for
7570 section contents to be written. Write group member output section
7571 indices to allow objcopy to reorganize sections.
7572 (_bfd_elf_copy_private_section_data): Copy group info.
7573
73ff0d56
AM
7574 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7575 (bfd_elf32_swap_symbol_in): Update prototype.
7576 (bfd_elf64_swap_symbol_in): Likewise.
7577 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7578 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7579 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7580 (elf_link_add_object_symbols): Likewise.
7581 (elf_link_record_local_dynamic_symbol): Likewise.
7582 (elf_link_input_bfd): Likewise.
7583 (elf_gc_mark): Likewise.
7584 (elf_reloc_symbol_deleted_p): Likewise.
7585 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7586 (mn10200_elf_relax_delete_bytes): Likewise.
7587 (mn10200_elf_symbol_address_p): Likewise.
7588 (mn10200_elf_get_relocated_section_contents): Likewise.
7589 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7590 (mn10300_elf_relax_section): Likewise.
7591 (mn10300_elf_relax_delete_bytes): Likewise.
7592 (mn10300_elf_symbol_address_p): Likewise.
7593 (mn10300_elf_get_relocated_section_contents): Likewise.
7594 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7595 (elf32_h8_relax_delete_bytes): Likewise.
7596 (elf32_h8_symbol_address_p): Likewise.
7597 (elf32_h8_get_relocated_section_contents): Likewise.
7598 * elf32-hppa.c (get_local_syms): Likewise.
7599 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7600 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7601 * elf32-sh.c (sh_elf_relax_section): Likewise.
7602 (sh_elf_relax_delete_bytes): Likewise.
7603 (sh_elf_get_relocated_section_contents): Likewise.
7604 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7605 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7606 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7607 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7608 * elf64-ppc.c (get_local_syms): Likewise.
7609 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7610 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7611 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7612 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7613 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7614 * elf64-mips.c (mips_elf64_size_info): Likewise.
7615 * elf64-s390.c (s390_elf64_size_info): Likewise.
7616 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7617
53bfd6b4
MR
76182002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7619
7620 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7621 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7622 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7623 _bfd_mips_elf_ignore_discarded_relocs.
7624 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7625
d4df96e6
L
76262002-06-05 H.J. Lu <hjl@gnu.org>
7627
7628 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7629 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7630 the SEC_MERGE section.
7631
e61463e1
AM
76322002-06-05 Alan Modra <amodra@bigpond.net.au>
7633
3cac74d0
AM
7634 * coff-alpha.c: Update copyright date.
7635 * coff-mips.c: Likewise.
7636 * xcoff-target.h: Likewise.
7637
e61463e1
AM
7638 * bfd-in.h: Remove "taken from the source" comment.
7639 * libbfd-in.h: Likewise.
7640 * libcoff-in.h: Likewise.
7641 * bfd-in2.h: Regenerate.
7642 * libbfd.h: Regenerate.
7643 * libcoff.h: Regenerate.
7644
7645 * elf.c (bfd_elf_discard_group): Return true.
7646 * elf-bfd.h (bfd_elf_discard_group): Declare.
7647 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7648 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7649 * bfd.c (bfd_discard_group): Define.
7650 * targets.c (struct bfd_target): Add _bfd_discard_group.
7651 (BFD_JUMP_TABLE_LINK): Here too.
7652 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7653 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7654 * aout-target.h (MY_bfd_discard_group): Define.
7655 * aout-tic30.c (MY_bfd_discard_group): Define.
7656 * binary.c (binary_bfd_discard_group): Define.
7657 * bout.c (b_out_bfd_discard_group): Define.
7658 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7659 * coffcode.h (coff_bfd_discard_group): Define.
7660 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7661 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7662 * i386msdos.c (msdos_bfd_discard_group): Define.
7663 * i386os9k.c (os9k_bfd_discard_group): Define.
7664 * ieee.c (ieee_bfd_discard_group): Define.
7665 * ihex.c (ihex_bfd_discard_group): Define.
7666 * mmo.c (mmo_bfd_discard_group): Define.
7667 * nlm-target.h (nlm_bfd_discard_group): Define.
7668 * oasys.c (oasys_bfd_discard_group): Define.
7669 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7670 * som.c (som_bfd_discard_group): Define.
7671 * srec.c (srec_bfd_discard_group): Define.
7672 * tekhex.c (tekhex_bfd_discard_group): Define.
7673 * versados.c (versados_bfd_discard_group): Define.
7674 * vms.c (vms_bfd_discard_group): Define.
7675 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7676 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7677 (aix5coff64_vec): Likewise.
7678 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7679
9cba27b2
JT
76802002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7681
7682 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7683 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7684 (elf32-sh64-com.lo): New dependency list.
7685 * Makefile.in: Regenerate.
7686 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7687 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7688 elf32-sh64-com.lo.
7689 * configure: Regenerate.
7690 * elf32-sh64.c (sh64_address_in_cranges)
7691 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7692 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7693 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7694 * elf32-sh64-com.c: ...here. New file.
7695
8d2c33be
AM
76962002-06-04 Alan Modra <amodra@bigpond.net.au>
7697
7698 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7699 ATTRIBUTE_UNUSED on used params.
7700 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7701 before calling bfd_section_from_elf_index on local syms.
7702 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7703
5b0e55b6
JT
77042002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7705
7706 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7707 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7708 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7709 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7710 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7711 * Makefile.in: Regenerate.
7712 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7713 (sh64-*-netbsd*): New targets.
7714 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7715 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7716 * configure: Regenerate.
7717 * elf32-sh64-nbsd.c: New file.
7718 * elf64-sh64-nbsd.c: New file.
7719 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7720 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7721 bfd_elf64_sh64lnbsd_vec.
7722
b885599b
AM
77232002-06-04 Alan Modra <amodra@bigpond.net.au>
7724
7725 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7726 (bfd_section_from_shdr): Likewise. Set section name of group
7727 sections from signature.
7728 (group_signature): Split out from setup_group. Ensure symbol table
7729 is available.
7730 (bfd_elf_discard_group): New function.
7731 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7732 .gnu.linkonce* sections if they are members of a group.
7733 (set_group_contents): Set GRP_COMDAT flag.
7734 * section.c (bfd_discard_group): New function.
7735 * bfd-in.h (bfd_elf_discard_group): Declare.
7736 * bfd-in2.h: Regenerate.
7737 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7738 (elf_linkonce_p): Define.
7739
90937f86
AM
77402002-06-04 Alan Modra <amodra@bigpond.net.au>
7741
7742 * elf.c (bfd_section_from_shdr): Make "name" const.
7743 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7744 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7745 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7746 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7747 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7748 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7749 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7750 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7751 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7752 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7753 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7754
cf6fb9ce
MR
77552002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7756
7757 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7758 ABI.
7759
cedb70c5
KH
77602002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7761
7762 * elf32-arc.c: Fix formatting.
7763 * elf32-arm.h: Likewise.
7764 * elf32-cris.c: Likewise.
7765 * elf32-dlx.c: Likewise.
7766 * elf32-hppa.c: Likewise.
7767 * elf32-i386.c: Likewise.
7768 * elf32-i386qnx.c: Likewise.
7769 * elf32-or32.c: Likewise.
7770 * elf32-s390.c: Likewise.
7771 * elf32-sh64.c: Likewise.
7772 * elf32-vax.c: Likewise.
7773 * elf32-xstormy16.c: Likewise.
7774 * elf64-alpha.c: Likewise.
7775 * elf64-mmix.c: Likewise.
7776 * elf64-ppc.c: Likewise.
7777 * elf64-s390.c: Likewise.
7778 * elf64-sh64.c: Likewise.
7779 * elf64-x86-64.c: Likewise.
7780
048d873d
RH
77812002-06-02 Richard Henderson <rth@redhat.com>
7782
7783 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7784 null when there are no got entries for a symbol.
7785 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7786 uninitialized variable warning.
7787
4a67a098
RH
77882002-06-01 Richard Henderson <rth@redhat.com>
7789
7790 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7791 undefined symbols here.
7792 (elf64_alpha_relax_section): Do it here. Also test for not
7793 defined in the current module.
7794 (elf64_alpha_relocate_section_r): Split out of ...
7795 (elf64_alpha_relocate_section): ... here. Don't dereference
7796 NULL when looking up local got entries.
7797
f44f99a5
RH
77982002-06-01 Richard Henderson <rth@redhat.com>
7799
7800 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7801 symbols from JSR relaxation.
7802 (elf64_alpha_size_plt_section_1): New.
7803 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7804 (elf64_alpha_size_rela_got_1): ... here.
7805 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7806 (elf64_alpha_size_rela_got_section): ... here.
7807 (elf64_alpha_size_plt_section): New.
7808 (elf64_alpha_relax_section): Call them.
7809 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7810 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7811
9e756d64
RH
78122002-06-01 Richard Henderson <rth@redhat.com>
7813
7814 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7815 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7816 in shared libraries. Fix DTPRELHI and TPRELHI value.
7817 (INSN_ADDQ, INSN_RDUNIQ): New.
7818 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7819 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7820 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7821 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7822 Handle GOTDTPREL and GOTTPREL relocations.
7823 (elf64_alpha_relax_gprelhilo): New.
7824 (elf64_alpha_relax_tls_get_addr): New.
7825 (elf64_alpha_relax_find_tls_segment): New.
7826 (elf64_alpha_relax_section): Handle TLS relocations.
7827 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7828 (elf64_alpha_check_relocs): Set it.
7829
c853d7f6
RH
78302002-06-01 Richard Henderson <rth@redhat.com>
7831
b646261c
RH
7832 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7833
c853d7f6
RH
7834 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7835 check; don't suppress dynamic relocs for non-allocated sections.
7836
d7e41a96
RH
7837 * elf64-alpha.c: Remove dead code.
7838
5f333394
AM
78392002-05-31 Alan Modra <amodra@bigpond.net.au>
7840
08e0ee05
AM
7841 * bfd-in2.h: Regenerate.
7842 * libbfd.h: Regenerate.
7843 * po/SRC-POTFILES.in: Regenerate.
7844
5f333394
AM
7845 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7846 space for bss .plt.
7847
caf47ea6
AM
78482002-05-31 Graeme Peterson <gp@qnx.com>
7849
7850 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7851 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7852 Run "make dep-am".
7853 * Makefile.in: Regenerate.
7854 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7855 * configure.in: Add bfd_elf32_i386qnx_vec support.
7856 * configure: Regenerate.
7857 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7858 is_contained_by_filepos, and copy_private_bfd_data_p.
7859 * elf.c (assign_file_positions_for_segments): Call backend
7860 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7861 (IS_CONTAINED_BY_FILEPOS): Define.
7862 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7863 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7864 Fix non-K&R call to _bfd_error_handler.
7865 (_bfd_elf_copy_private_section_data): Use backend
7866 copy_private_bfd_data_p.
7867 * elf32-i386.c: Don't include elfxx-target.h when
7868 ELF32_I386_C_INCLUDED is defined.
7869 * elf32-i386qnx.c: New QNX elf backend file.
7870 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7871 elf_backend_is_contained_by_filepos, and
7872 elf_backend_do_copy_private_bfd_data.
7873 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7874
5bc56484
AM
78752002-05-31 Alan Modra <amodra@bigpond.net.au>
7876
7877 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7878 Move other similar defines to start of file.
7879
1b164155
TR
78802002-05-30 Tom Rix <trix@redhat.com>
7881
7882 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7883 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7884
3765b1be
RH
78852002-05-30 Richard Henderson <rth@redhat.com>
7886
7887 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7888 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7889 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7890 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7891 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7892 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7893 n_local_got_entries to total_got_size and local_got_size.
7894 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7895 (alpha_got_entry_size): New.
7896 (elf64_alpha_relax_with_lituse): Use it.
7897 (elf64_alpha_relax_without_lituse): Likewise.
7898 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7899 (get_got_entry): New.
7900 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7901 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7902 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7903 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7904 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7905 (elf64_alpha_calc_got_offsets): Likewise.
7906 (alpha_dynamic_entries_for_reloc): New.
7907 (elf64_alpha_calc_dynrel_sizes): Use it.
7908 (elf64_alpha_size_dynamic_sections): Likewise.
7909 (elf64_alpha_relocate_section): Handle TLS relocations.
7910 * reloc.c: Add Alpha TLS relocations.
7911 * bfd-in2.h, libbfd.h: Rebuild.
7912
5e226794
NC
79132002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7914
7915 * peXXigen.c (pe_print_idata): Remove double printed
7916 import table lines; add Bound-To comment.
7917
90ace9e9
JT
79182002-05-29 Matt Thomas <matt@3am-software.com>
7919
7920 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7921 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7922 (elf32-vax.lo): New rule.
7923 * Makefile.in: Regenerate.
7924 * configure.in (bfd_elf32_vax_vec)
7925 (vaxnetbsd_vec): New vectors.
7926 * configure: Regenerate.
7927 * config.bfd (vax-*-netbsdelf*)
7928 (vax-*-netbsdaout*)
7929 (vax-*-netbsd*): New targets.
7930 * elf32-vax.c: New file.
7931 * reloc.c: Add VAX relocations.
7932 * bfd-in2.h: Regenerate.
7933 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7934
4a253e81
JT
79352002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7936
7937 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7938 and bfd_elf32_bigarm_vec to targ_selvecs.
7939
6e7c73dd
CF
79402002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7941
7942 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7943 with auto-imported symbols.
7944
8afb0e02
NC
79452002-05-29 Adam Nemet <anemet@lnxw.com>
7946
7947 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7948 sections only record bfd.
9bab7074 7949 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7950 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7951 * bfd-in2.h: Regenerate.
8afb0e02 7952
a95653f5
NC
79532002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7954
7955 * syms.c (_bfd_stab_section_find_nearest_line): Move
7956 declaration and initialisation of saw_line and saw_func out of
7957 for loop.
7958
7cdc5bba
AM
79592002-05-29 Alan Modra <amodra@bigpond.net.au>
7960
7961 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7962 (bfd_elf64_get_symbol_info): Define.
7963 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7964
4c7aad1c
AM
79652002-05-29 Andrey Volkov <avolkov@transas.com>
7966
7967 * cpu-h8300.c: Make default h8300 machine first in machine list.
7968
d172d4ba
NC
79692002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7970
7971 * config.bfd: Added DLX configuraton.
7972 * Makefile.am: Added DLX configuraton.
7973 * configure.in: Added DLX configuraton.
7974 * archures.c: Add DLX architecure.
7975 * reloc.c: Add DLX relocs.
7976 * targets.c: Added DLX target vector.
7977 * configure: Regenerate.
7978 * Makefile.in: Regenreate.
7979 * bfd-in2.h: Regenreate.
7980 * elf32-dlx.c: New file: Support DLX target.
7981 * cpu-dlx.c: New file: Support DLX target.
7982
d1329ca3
AM
79832002-05-25 Alan Modra <amodra@bigpond.net.au>
7984
428d0de3
AM
7985 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7986
d1329ca3
AM
7987 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7988 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7989 strings to point inside function code sym string.
7990 (func_desc_adjust): Likewise.
7991 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7992
3bab7989
ML
79932002-05-24 Michal Ludvig <mludvig@suse.cz>
7994
7995 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7996 (elf64_x86_64_grok_psinfo): Added.
7997
436e8db0
NC
79982002-05-24 TAMURA Kent <kent@netbsd.org>
7999
8000 * config.bfd: Add a target for i386-netbsdpe.
8001
ea1e4b0d
AM
80022002-05-24 Alan Modra <amodra@bigpond.net.au>
8003
8004 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8005 and is_func_descriptor.
8006 (func_desc_adjust): Hide function code sym in shared libs unless
8007 there is a matching exported function descriptor sym.
8008
13ae64f3
JJ
80092002-05-23 Jakub Jelinek <jakub@redhat.com>
8010
8011 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8012 for symbols from SHF_TLS section.
8013 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8014 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8015 (map_sections_to_segments): Build PT_TLS segment if necessary.
8016 (assign_file_positions_for_segments): Likewise.
8017 (get_program_header_size): Account for PT_TLS segment.
8018 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8019 SEC_THREAD_LOCAL sections to STT_TLS.
8020 * reloc.c: Add 386 and IA-64 TLS relocs.
8021 * section.c (SEC_THREAD_LOCAL): Define.
8022 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8023 Remove.
8024 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8025 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8026 unconditionally.
8027 (struct elf_final_link_info): Add first_tls_sec.
8028 (elf_bfd_final_link): Set first_tls_sec.
8029 Compute elf_hash_table (info)->tls_segment.
8030 (elf_link_output_extsym): Handle STT_TLS symbols.
8031 (elf_link_input_bfd): Likewise.
8032 * syms.c (BSF_THREAD_LOCAL): Define.
8033 * bfd-in2.h: Rebuilt.
8034 * libbfd.h: Rebuilt.
8035 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8036 elf_i386_mkobject, elf_i386_object_p): New functions.
8037 (elf_howto_table): Add TLS relocs.
8038 (elf_i386_reloc_type_lookup): Support TLS relocs.
8039 (elf_i386_info_to_howto_rel): Likewise.
8040 (struct elf_i386_link_hash_entry): Add tls_type.
8041 (struct elf_i386_obj_tdata): New.
8042 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8043 New macros.
8044 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8045 (link_hash_newfunc): Clear tls_type.
8046 (elf_i386_check_relocs): Support TLS relocs.
8047 (elf_i386_gc_sweep_hook): Likewise.
8048 (allocate_dynrelocs): Likewise.
8049 (elf_i386_size_dynamic_sections): Likewise.
8050 (elf_i386_relocate_section): Likewise.
8051 (elf_i386_finish_dynamic_symbol): Likewise.
8052 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8053 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8054 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8055 want_tprel, want_dtpmod, want_dtprel.
8056 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8057 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8058 R_IA64_LTOFF_TPREL22.
8059 (elf_code_to_howto_index): Add TLS relocs.
8060 (elfNN_ia64_check_relocs): Support TLS relocs.
8061 (allocate_global_data_got): Account for TLS .got data.
8062 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8063 (elfNN_ia64_install_value): Supprt TLS relocs.
8064 (set_got_entry): Support TLS relocs.
8065 (elfNN_ia64_relocate_section): Likewise.
8066
c62e1cc3
NC
80672002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8068
8069 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8070 BLX reloc round the relocation up rather than down.
8071 * coff-arm.c (coff_arm_relocate_section): Likewise.
8072
c5a43a5d
L
80732002-05-21 H.J. Lu (hjl@gnu.org)
8074
8075 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8076 definition.
8077
afbe61cf
AM
80782002-05-22 Alan Modra <amodra@bigpond.net.au>
8079
8080 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8081 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8082
9c07fe7c
AM
80832002-05-22 Alan Modra <amodra@bigpond.net.au>
8084
8085 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8086 unresolved relocs.
8087 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8088
21611032
TS
80892002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8090
c5cd6d62 8091 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
8092 non-ELF targets.
8093
41241523
TS
80942002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8095
8096 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8097 an error value.
8098 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8099 return with false on error.
8100 (elf_link_input_bfd): Check reloc_emitter return value.
8101
658f2588
JT
81022002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8103
8104 * config.bfd (armeb-*-netbsdelf*): New target.
8105
c862ae31
AM
81062002-05-20 Alan Modra <amodra@bigpond.net.au>
8107
8108 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8109 at the plt call stub.
8110
6dd14845
TS
81112002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8112
8113 * cpu-mips.c (mips_compatible): Don't try to check machine
8114 compatibility.
8115
a58d9c34
TR
81162002-05-18 Tom Rix <trix@redhat.com>
8117
9b5ecbd0 8118 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 8119
ef60b7ff
AM
81202002-05-17 Alan Modra <amodra@bigpond.net.au>
8121
8122 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8123 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8124 we've already warned about an undefined symbol. Report more
8125 detail on reloc errors.
8126
a703a6ea
AM
81272002-05-17 Alan Modra <amodra@bigpond.net.au>
8128
8129 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8130 * configure.in: Invoke AM_INSTALL_LIBBFD.
8131 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8132 (install_libbfd): .. New target.
8133 (uninstall_libbfd): Likewise.
8134 (install-bfdlibLTLIBRARIES): Likewise.
8135 (uninstall-bfdlibLTLIBRARIES): Likewise.
8136 (bfdlibdir): New.
8137 (bfdincludedir): New.
8138 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8139 * aclocal.m4: Regenerate.
8140 * configure: Regenerate.
8141 * Makefile.in: Regenerate.
8142
2c13d98b
NC
81432002-05-17 Stuart Balfour <sbalfour@cisco.com>
8144
8145 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8146 hash loop.
8147
629936c5
NC
81482002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8149
8150 * config.bfd: Add targets for sh64-linux (little endian and
8151 big endian).
8152
e4cf60a8
NC
81532002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8154
8155 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8156 is located in the same section as the import table. Instead
8157 check, and if necessary load the section containing the thunk.
8158
d1e66cd4
NC
81592002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8160
8161 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8162 bfd_bread.
8163 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8164 with bfd_bread.
d1e66cd4 8165
2d653fc7
AM
81662002-05-15 Alan Modra <amodra@bigpond.net.au>
8167
8168 * aix5ppc-core.c: Warning fixes.
8169 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8170 * aout-target.h (MY_bfd_link_just_syms): Define.
8171 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8172 * bfd.c (bfd_link_just_syms): Define.
8173 * binary.c (binary_bfd_link_just_syms): Define.
8174 * bout.c (b_out_bfd_link_just_syms): Define.
8175 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8176 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8177 * coffcode.h (coff_bfd_link_just_syms): Define.
8178 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8179 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8180 (_bfd_elf_link_just_syms): Declare.
8181 * elf.c (_bfd_elf_link_just_syms): New function.
8182 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8183 sections haven't already been discarded by the linker.
8184 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8185 sections and SEC_MERGE sections.
8186 (elf_bfd_discard_info): Similarly here.
8187 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8188 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8189 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8190 * ieee.c (ieee_bfd_link_just_syms): Define.
8191 * ihex.c (ihex_bfd_link_just_syms): Define.
8192 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8193 (_bfd_generic_link_just_syms): Declare.
8194 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8195 * linker.c (_bfd_generic_link_just_syms): New function.
8196 * mmo.c (mmo_bfd_link_just_syms): Define.
8197 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8198 * oasys.c (oasys_bfd_link_just_syms): Define.
8199 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8200 * som.c (som_bfd_link_just_syms): Define.
8201 * srec.c (srec_bfd_link_just_syms): Define.
8202 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8203 (BFD_JUMP_TABLE_LINK): And here.
8204 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8205 * versados.c (versados_bfd_link_just_syms): Define.
8206 * vms.c (vms_bfd_link_just_syms): Define.
8207 * libbfd.h: Regenerate.
8208 * bfd-in2.h: Regenerate.
8209
cb7394f2
TS
82102002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8211
8212 * elf32-mips.c: Remove superfluous definitions copied from
8213 elfxx-mips.c.
8214 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8215 SGIish vectors to check the special case.
8216 (mips_elf_hi16_reloc): Fix comment.
8217 (mips_elf_got16_reloc): Likewise.
8218 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8219 (elf_reloc_map): Code cleanup.
8220 (mips_reloc_map): Add comment.
8221 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8222 (mips_elf32_rtype_to_howto): Likewise.
8223 (mips_elf32_discard_info): Likewise.
8224 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8225 lead to IRIX compatibility now.
8226
8dc1a139
TS
82272002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8228
8229 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8230
2051e1b5
JT
82312002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8232
8233 * config.bfd (shle-*-netbsdelf*): Add target which includes
8234 sh64 support.
8235
83954261
AM
82362002-05-13 David Edelsohn <edelsohn@gnu.org>
8237
8238 * configure.in: Revert 2002-04-07. Instead, auto-configure
8239 HAVE_ST_C_IMPL.
8240 * configure: Regenerate.
8241 * config.in: Regenerate.
8242 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8243 or AIX_5_CORE.
8244
a9bf1154
NC
82452002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8246
8247 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8248 corefiles as well.2
8249 * configure: Regenerate.
8250
3129eb7a
AM
82512002-05-13 Alan Modra <amodra@bigpond.net.au>
8252
8253 * Makefile.am (install-data-local): Install headers to
8254 $(exec_prefix)/include.
8255 * Makefile.in: Regenerate.
8256
a9a32010
DJ
82572002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8258 Daniel Jacobowitz <drow@mvista.com>
8259
8260 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8261 map BFD_RELOC_RVA.
8262
82632002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8264
8265 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8266 hppa*-*-openbsd*): New targets.
8267 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8268 * configure: Regenerate.
8269
f1f0d9ab
TR
82702002-05-10 Tom Rix <trix@redhat.com>
8271
ea1e4b0d 8272 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8273 xcoff64_ppc_relocate_section.
8274 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8275 * libxcoff.h: Common xcoff_reloc_type function declaration.
8276
c432ba1a
AM
82772002-05-10 Alan Modra <amodra@bigpond.net.au>
8278
16a10388 8279 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8280 added in 2002-05-09 commit.
16a10388 8281
c432ba1a
AM
8282 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8283 don't look for stubs on all undefined syms.
8284
4a335f3d
AM
82852002-05-09 Alan Modra <amodra@bigpond.net.au>
8286
8fc39d5d
AM
8287 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8288 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8289 pcrel_offset.
8290
4a335f3d
AM
8291 * elf32-i386.c (elf_howto_table): Comments.
8292 (elf_i386_relocate_section): Handle more relocs for relocatable
8293 linking and against SEC_MERGE sections.
8294
41fcb14e
AM
82952002-05-08 Alan Modra <amodra@bigpond.net.au>
8296
8297 * elf32-ppc.c (ppc_elf_create_got): New function.
8298 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8299 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8300 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8301 _bfd_elf_create_got_section.
8302
b491616a
AM
83032002-05-07 Alan Modra <amodra@bigpond.net.au>
8304
8305 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8306 * elfxx-target.h (elf_backend_rela_normal): Define.
8307 (elfNN_bed): Init rela_normal.
8308 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8309 for section symbols here if rela_normal. Simplify abs section test.
8310 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8311 return immediately. Remove code handling relocatable linking.
8312 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8313 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8314 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8315 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8316 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8317 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8318 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8319 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8320 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8321 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8322 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8323 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8324 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8325 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8326 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8327 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8328 * elf-m10200.c (elf_backend_rela_normal): Define.
8329 * elf-m10300.c (elf_backend_rela_normal): Define.
8330 * elf32-fr30.c (elf_backend_rela_normal): Define.
8331 * elf32-i370.c (elf_backend_rela_normal): Define.
8332 * elf32-i860.c (elf_backend_rela_normal): Define.
8333 * elf32-m68k.c (elf_backend_rela_normal): Define.
8334 * elf32-mcore.c (elf_backend_rela_normal): Define.
8335 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8336 * elf32-ppc.c (elf_backend_rela_normal): Define.
8337 * elf32-s390.c (elf_backend_rela_normal): Define.
8338 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8339 * elf64-ppc.c (elf_backend_rela_normal): Define.
8340 * elf64-s390.c (elf_backend_rela_normal): Define.
8341 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8342 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8343 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8344 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8345
df212a7e
NC
83462002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8347
8348 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8349 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8350
3decf53c
AM
83512002-05-06 Alan Modra <amodra@bigpond.net.au>
8352
8353 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8354 when not relocatable. Fix reloc_emitter call for K&R.
8355
f46c2da6
AM
83562002-05-04 Alan Modra <amodra@bigpond.net.au>
8357
8358 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8359 reloading local sym addend mistakenly removed in 2002-05-01 change.
8360
8361 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8362 (read_abbrevs): Change "offset" param to bfd_vma.
8363 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8364 Change "abbrev_offset" to bfd_vma.
8365 (read_indirect_string): Use correct conversion chars in error
8366 message format string, cast bfd_vma's to unsigned long.
8367 (read_abbrevs): Likewise.
8368 (read_attribute_value): Likewise.
8369 (decode_line_info): Likewise.
8370 (scan_unit_for_functions): Likewise.
8371 (parse_comp_unit): Likewise.
8372
59862849
TR
83732002-05-04 Tom Rix <trix@redhat.com>
8374
8375 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8376 (coff_swap_reloc_out): Same.
8377 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8378 (xcoff_swap_reloc_out): Same.
8379 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8380 case some 16 bit relocs. Add reloc value to output.
8381 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8382 R_RBR. Improve names.
59862849
TR
8383 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8384 (bfd_xcoff_backend_data): Update with new reloc swap names.
8385 (bfd_pmac_xcoff_backend_data) : Same.
8386 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8387 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8388 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8389 R_POS. Add reloc value to output.
ea1e4b0d
AM
8390 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8391 bit R_RBR. Improve names, masks.
59862849
TR
8392 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8393 (bfd_xcoff_backend_data): Update with new reloc swap names.
8394 (bfd_xcoff_aix5_backend_data) : Same.
8395
b4655ea9
AM
83962002-05-04 Alan Modra <amodra@bigpond.net.au>
8397
8398 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8399 bfd_count top_index, input_list, all_local_syms.
8400 (elf32_hppa_setup_section_lists): New function, split from
8401 elf32_hppa_size_stubs.
8402 (elf32_hppa_next_input_section): Likewise.
8403 (group_sections): Likewise.
8404 (get_local_syms): Likewise.
8405 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8406 stubs on undefined syms too.
8407 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8408 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8409 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8410 (elf32_hppa_next_input_section): Declare.
8411
301e3139
AM
84122002-05-04 Bob Byrnes <byrnes@curl.com>
8413
8414 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8415 _bfd_new_bfd.
8416
7c5fcef7
L
84172002-05-03 H.J. Lu (hjl@gnu.org)
8418
8419 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8420 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8421 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8422 to hide a global symbol.
8423 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8424 forced_local to true.
7c5fcef7 8425
84de6048
RH
84262002-05-02 Richard Henderson <rth@redhat.com>
8427
8428 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8429 vs SHN_UNDEF to zero.
8430
805fc799
AM
84312002-05-02 Alan Modra <amodra@bigpond.net.au>
8432
c061c2d8
AM
8433 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8434 16 bit reloc.
8435 <R_PPC64_SECTOFF_DS>: Likewise.
8436 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8437 SECTOFF reloc.
8438 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8439 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8440 SECTOFF reloc.
8441
805fc799
AM
8442 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8443 (ppc64_elf_ha_reloc): New function.
8444 (ppc64_elf_brtaken_reloc): New function.
8445 (ppc64_elf_sectoff_reloc): New function.
8446 (ppc64_elf_sectoff_ha_reloc): New function.
8447 (ppc64_elf_toc_reloc): New function.
8448 (ppc64_elf_toc_ha_reloc): New function.
8449 (ppc64_elf_toc64_reloc): New function.
8450 (ppc64_elf_unhandled_reloc): New function.
8451 (ppc64_elf_howto_raw): Use the above.
8452 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8453 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8454 <R_PPC64_SECTOFF_DS>: Likewise.
8455 (IS_ABSOLUTE_RELOC): Update.
8456 (struct ppc_link_hash_table): Add have_undefweak.
8457 (ppc64_elf_link_hash_table_create): Init.
8458 (func_desc_adjust): Set have_undefweak.
8459 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8460 add the .sfpr blr when have_undefweak.
8461 (ppc64_elf_setup_section_lists): Check hash table flavour.
8462 (ppc64_elf_next_input_section): Move output_section->owner test to
8463 ppc64elf.em.
8464 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8465 and relocatable test. Return TOCstart and don't set elf_gp.
8466 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8467 offset calculation. Add assert on weak sym branch tweaks.
8468 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8469 (ppc64_elf_toc): Declare.
8470 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8471
818c39a3
AM
84722002-05-01 Alan Modra <amodra@bigpond.net.au>
8473
8474 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8475 file_name.
8476
721956f4
AM
84772002-05-01 Alan Modra <amodra@bigpond.net.au>
8478
8479 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8480 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8481 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8482 call branches. Correct undefined weak destination.
8483 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8484 .sfpr, and correct case where either only savef* or restf* is
8485 needed.
8486
8487 Long branch stubs, multiple stub sections.
8488 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8489 (ppc64_elf_next_input_section): Declare.
8490 * elf64-ppc.c: Move linker-only prototypes.
8491 (STUB_SUFFIX): Define.
8492 (enum ppc_stub_type): New.
8493 (struct ppc_stub_hash_entry): New.
8494 (struct ppc_branch_hash_entry): New.
8495 (struct ppc_link_hash_entry): Add stub_cache, oh.
8496 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8497 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8498 Rename plt_overflow to stub_error.
8499 (ppc_stub_hash_lookup): Define.
8500 (ppc_branch_hash_lookup): Define.
8501 (stub_hash_newfunc): New function.
8502 (branch_hash_newfunc): New function.
8503 (link_hash_newfunc): Init new fields.
8504 (ppc64_elf_link_hash_table_create): Likewise.
8505 (ppc64_elf_link_hash_table_free): New function.
8506 (ppc_stub_name): New function.
8507 (ppc_get_stub_entry): New function.
8508 (ppc_add_stub): New function.
8509 (create_linkage_sections): Use bfd_make_section_anyway. Create
8510 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8511 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8512 and set up for plt call stubs. Link func and func desc syms.
8513 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8514 (func_desc_adjust): Avoid hash lookup when func desc sym available
8515 via shortcut, and set links when processing.
8516 (ppc64_elf_hide_symbol): Likewise.
8517 (allocate_dynrelocs): Don't allocate stub section here.
8518 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8519 Remove sstub code.
8520 (ppc_type_of_stub): New function.
8521 (build_one_stub): Delete.
8522 (ppc_build_one_stub): New function.
8523 (ppc_size_one_stub): New function.
8524 (ppc64_elf_setup_section_lists): New function.
8525 (ppc64_elf_next_input_section): New function.
8526 (group_sections): New function.
8527 (get_local_syms): New function.
8528 (ppc64_elf_size_stubs): Rewrite.
8529 (ppc64_elf_build_stubs): Rewrite.
8530 (ppc64_elf_relocate_section): Look up stub entry for REL24
8531 relocs. Don't propagate REL14* to dynamic objects. Look for long
8532 branch stubs if REL14* or REL24 relocs won't reach.
8533 (bfd_elf64_bfd_link_hash_table_free): Define.
8534
09c2219b
MM
85352002-04-30 Mark Mitchell <mark@codesourcery.com>
8536
c5cd6d62 8537 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8538
07b678c0
TR
85392002-04-30 Tom Rix <trix@redhat.com>
8540
8541 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8542 symbol names into the hash table.
8543
dbe341c6
TR
85442002-04-28 Tom Rix <trix@redhat.com>
8545
8546 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8547 calulating relocations.
dbe341c6 8548 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8549 (xcoff_ppc_relocate_section): Use relocation and complain function
8550 tables.
8551 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8552 (xcoff_complain_overflow_signed_func): Same.
8553 (xcoff_complain_overflow_bitfield_func): Same.
8554 (xcoff_complain_overflow_dont_func): Same.
8555 (xcoff_reloc_type_crel): New recot function.
8556 (xcoff_reloc_type_br): Same.
8557 (xcoff_reloc_type_ba): Same.
8558 (xcoff_reloc_type_toc): Same.
8559 (xcoff_reloc_type_rel): Same.
8560 (xcoff_reloc_type_neg): Same.
8561 (xcoff_reloc_type_pos): Same.
8562 (xcoff_reloc_type_fail): Same.
8563 (xcoff_reloc_type_noop): Same.
8564 * libxcoff.h : Declare common parts for xcoff64.
8565 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8566 and complain function tables.
dbe341c6 8567
985142a4
AM
85682002-04-28 Alan Modra <amodra@bigpond.net.au>
8569
8570 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8571 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8572
eba91044
AM
85732002-04-26 Alan Modra <amodra@bigpond.net.au>
8574
e54fdaa5
AM
8575 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8576 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8577
a50c1845
AM
8578 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8579 same as the output before calling elf_link_input_bfd.
8580
eba91044
AM
8581 * coffcode.h (coff_compute_section_file_positions): Set
8582 section_tail after shuffling section list.
8583
3c25c5f6
NC
85842002-04-24 Christian Groessler <chris@groessler.org>
8585
8586 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8587 addresses are 23bit with a special layout, not plain 32bit
8588 values. Prevent relocation of immediate values.
8589
40d32fc6
CD
85902002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8591
8592 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8593 MIPS-16 ASE flags are set, print something to indicate that.
8594
067fa4a6
AM
85952002-04-23 Alan Modra <amodra@bigpond.net.au>
8596
8597 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8598 under which a plt call stub is used.
8599 (final_link_relocate): Similarly.
8600 (allocate_plt_static): Clear h-plabel except when plt entry is
8601 exclusively used for a plabel.
8602 (allocate_dynrelocs): Use the above to simplify plt sizing.
8603 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8604 (elf32_hppa_link_hash_table_create): Init.
8605 (BL22_RP): Define.
8606 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8607 (elf32_hppa_check_relocs): Set has_22bit_branch.
8608
8609 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8610 (final_link_relocate): Likewise.
8611
af40ce3c
JJ
86122002-04-22 Jakub Jelinek <jakub@redhat.com>
8613
8614 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8615 search table if some FDE is DW_EH_PE_aligned encoded either.
8616 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8617
09ae86c2
JJ
86182002-04-22 Richard Smith <richard@ex-parrot.com>
8619 Jakub Jelinek <jakub@redhat.com>
8620
8621 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8622 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8623 encoded personality.
8624 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8625 for CIE/FDE removal.
8626
deeb2cd7
TR
86272002-04-20 Tom Rix <trix@redhat.com>
8628
8629 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8630
99dc0092
AM
86312002-04-20 Alan Modra <amodra@bigpond.net.au>
8632
aa3d5824
AM
8633 * archures.c (bfd_lookup_arch): Move the list order comment..
8634 (struct bfd_arch_info): ..to where it belongs.
8635 * bfd-in2.h: Regenerate.
8636
99dc0092
AM
8637 * archures.c (bfd_lookup_arch): Add comment on list order.
8638 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8639 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8640 is always at head of list.
8641
7831a775
NC
86422002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8643
8644 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8645 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8646 definition of these functions for ARM_WINCE builds as they are
8647 not used.
ea1e4b0d 8648 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8649 for ARM_WINCE builds.
8650
86512002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8652
ea1e4b0d 8653 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8654
86552002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8656
8657 * cpu-sh.c (scan_mach): Delete.
8658 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8659 (bfd_sh_arch): Likewise.
8660
3d8dbe36
NC
86612002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8662
8663 * ihex.c (ihex_write_object_contents): Fix check for records
8664 crossing 64K boundaries.
8665
4ab82700
AM
86662002-04-16 Alan Modra <amodra@bigpond.net.au>
8667
8668 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8669 type rather than just assuming entries are ELF.
8670 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8671 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8672 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8673 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8674 rather than elf_link_hash_entry.
8675
036fe0fe
RH
86762002-04-15 Richard Henderson <rth@redhat.com>
8677
8678 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8679 n32 binaries.
8680
c4f3d130
NC
86812002-04-15 Michael Snyder <msnyder@redhat.com>
8682
8683 * opncls.c (bfd_close): Write contents if writeable.
8684 Minor formatting tidy-ups.
8685
4ab82700 86862002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8687
8688 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8689
0c04d169
MS
86902002-04-12 Michael Snyder <msnyder@redhat.com>
8691
8692 * bfd-in.h (bfd_get_section_lma): New access macro.
8693 Minor white-space fix-up.
8694
89d4966f
AM
86952002-04-12 Alan Modra <amodra@bigpond.net.au>
8696
8697 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8698 header pad.
8699
8d0da3c2
DD
87002002-04-09 DJ Delorie <dj@redhat.com>
8701
8702 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8703
05793179
NC
87042002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8705
8706 * coffcode.h (coff_read_word): New.
8707 (coff_compute_checksum): New.
8708 (coff_apply_checksum): New.
8709 (coff_write_object_contents): Call coff_apply_checksum () to
8710 apply checksum to PE image.
8711
46fe4e66
AM
87122002-04-08 Randolph Chung <tausq@debian.org>
8713
8714 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8715 (elf32_hppa_final_link): Split out sorting logic to..
8716 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8717 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8718
3b5b409c
AC
87192002-04-07 Andrew Cagney <ac131313@redhat.com>
8720
8721 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8722 pattern.
8723 * configure: Re-generate.
8724
ac7b6ceb
AC
87252002-04-07 Andrew Cagney <ac131313@redhat.com>
8726
8727 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8728 is greater or equal to 4.3.3.
8729 * configure: Regenerate.
8730 Fix PR gdb/344.
8731
44aa49bb
HPN
87322002-04-05 Hans-Peter Nilsson <hp@axis.com>
8733
8734 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8735 R_CRIS_32_PCREL>: Fix typo in name.
8736 (cris_elf_check_relocs): Always create .rela.got here when
8737 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8738 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8739 assume it's created.
8740
e2d34d7d
DJ
87412002-04-04 Daniel Jacobowitz <drow@mvista.com>
8742
8743 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8744 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8745 define.
8746 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8747 * bfd.c (bfd_link_hash_table_free): Define.
8748 * binary.c (binary_bfd_link_hash_table_free): Define.
8749 * bout.c (b_out_bfd_link_hash_table_free): Define.
8750 * coff-rs6000.c (rs6000coff_vec): Include
8751 _bfd_generic_link_hash_table_free.
8752 (pmac_xcoff_vec): Likewise.
8753 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8754 (aix5coff64_vec): Likewise.
8755 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8756 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8757 (bfd_elf32_bfd_link_hash_table_free): Define.
8758 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8759 (bfd_elf32_bfd_link_hash_table_free): Define.
8760 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8761 define.
8762 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8763 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8764 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8765 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8766 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8767 (_bfd_generic_link_hash_table_free): Add prototype.
8768 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8769 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8770 * linker.c (_bfd_generic_link_hash_table_free): New function.
8771 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8772 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8773 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8774 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8775 * som.c (som_bfd_link_hash_table_free): Define.
8776 * srec.c (srec_bfd_link_hash_table_free): Define.
8777 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8778 * versados.c (versados_bfd_link_hash_table_free): Define.
8779 * vms.c (vms_bfd_link_hash_table_free): New function.
8780 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8781
8782 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8783 instead of bfd_alloc.
8784 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8785 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8786 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8787 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8788 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8789 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8790 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8791 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8792 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8793 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8794 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8795 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8796 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8797 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8798 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8799 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8800 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8801 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8802 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8803 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8804 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8805 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8806 * m68klinux.c (linux_link_hash_table_create): Likewise.
8807 * sparclinux.c (linux_link_hash_table_create): Likewise.
8808 * sunos.c (sunos_link_hash_table_create): Likewise.
8809 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8810
8811 * targets.c: Add _bfd_link_hash_table_free to xvec.
8812
8813 * bfd-in2.h: Regenerate.
8814 * libbfd.h: Regenerate.
8815 * libcoff.h: Regenerate.
8816
830629ab
AM
88172002-04-04 Alan Modra <amodra@bigpond.net.au>
8818
8819 * dep-in.sed: Cope with absolute paths.
8820 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8821 Run "make dep-am".
8822 * Makefile.in: Regenerate.
8823 * coff-arm.c: Fix copyright date.
8824 * cpu-h8300.c: Likewise.
8825 * cpu-i370.c: Likewise.
8826 * cpu-s390.c: Likewise.
8827 * cpu-mips.c: Likewise.
8828 * po/SRC-POTFILES.in: Regenerate.
8829
c6e90b02
TS
88302002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8831
8832 * Makefile.am: Add elfxx-mips.c to the known backends.
8833 (elf32-mips.lo): remove dependency to coff/external.h.
8834 * Makefile.in: Regenerate.
8835 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8836 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8837 accordingly.
8838 * configure: Regenerate.
8839 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8840 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8841 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8842 MIPS specific backend functions.
8843 * elf32-mips.c: Moved most code to elfxx-mips.c.
8844 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8845 static.
8846 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8847 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8848 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8849 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8850 interface to allow selection of the right REL or RELA howto table.
8851 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8852 static. Let it refuse n32 objects.
8853 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8854 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8855 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8856 (elf32_mips_ignore_discarded_relocs): Rename from
8857 _bfd_elf32_mips_ignore_discarded_relocs.
8858 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8859 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8860 (elf_mips_howto_table_rela): Remove.
8861 * elf64-mips.c: Moved most code to elfxx-mips.c.
8862 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8863 (mips_elf64_rtype_to_howto): New function.
8864 (mips_elf64_object_p): Likewise.
8865 (elf64_mips_irix_compat): Likewise.
8866 * elfxx-mips.c: New file containing common code merged together from
8867 elf32-mips.c and elf64-mips.c.
8868 * elfxx-mips.h: New file containing MIPS specific prototypes from
8869 elf-bfd.h.
8870 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8871 elf_backend_mips_rtype_to_howto.
8872
d8dce692
AM
88732002-04-04 Alan Modra <amodra@bigpond.net.au>
8874
8875 * srec.c (MAXCHUNK, Chunk): Revise comments.
8876 (srec_write_record): Correct buffer size.
8877 (srec_write_header): Do without intermediate buffer.
8878 (srec_write_section): Validate Chunk.
8879 (srec_write_terminator): Pass NULL instead of dummy buffer.
8880 (srec_write_symbols): Pass file and symbol names directly to
8881 bfd_bwrite so sprintf won't overflow buffer.
8882
b88a866a
JJ
88832002-04-03 Jakub Jelinek <jakub@redhat.com>
8884
8885 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8886 PC relative relocs against hidden symbols.
8887 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8888
d7866f04
AM
88892002-04-03 Alan Modra <amodra@bigpond.net.au>
8890
8891 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8892 LMAs, loop over segments until p_vaddr and p_memsz specify an
8893 extent enclosing the section.
8894
9e81ee67
NC
88952002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8896
8897 * ihex.c (ihex_write_object_contents): Do not allow records to
8898 cross a 64K boundary - wrap if necessary.
8899
d2b64500
JT
89002002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8901
8902 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8903 which caused the returned LWP ID to always be 0.
8904
e36f7d53
RH
89052002-04-01 Richard Henderson <rth@redhat.com>
8906
8907 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8908 (elf32_sparc_relocate_section): Use it to figure out when to
8909 initialize .got entries.
8910 * elf64-sparc.c: Similarly.
8911
e92d460e
AM
89122002-03-28 Alan Modra <amodra@bigpond.net.au>
8913
8914 * linker.c (link_action): Ignore duplicate warning syms.
8915 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8916 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8917 (elf_adjust_dynamic_symbol): Likewise.
8918 (elf_export_symbol): Likewise.
8919 (elf_link_find_version_dependencies): Likewise.
8920 (elf_link_assign_sym_version): Likewise.
8921 (elf_link_sec_merge_syms): Likewise.
8922 (elf_link_output_extsym): Likewise.
8923 (elf_gc_sweep_symbol): Likewise.
8924 (elf_gc_propagate_vtable_entries_used): Likewise.
8925 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8926 (elf_gc_allocate_got_offsets): Likewise.
8927 (elf_collect_hash_codes): Likewise.
8928 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8929 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8930 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8931 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8932 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8933 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8934 (elf_cris_discard_excess_dso_dynamics): Likewise.
8935 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8936 (mark_PIC_calls): Likewise.
8937 (allocate_plt_static): Likewise.
8938 (allocate_dynrelocs): Likewise.
8939 (readonly_dynrelocs): Likewise.
8940 * elf32-i386.c (allocate_dynrelocs): Likewise.
8941 (readonly_dynrelocs): Likewise.
8942 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8943 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8944 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8945 (mips_elf_sort_hash_table_f): Likewise.
8946 (mips_elf_check_mips16_stubs): Likewise.
8947 * elf32-s390.c (allocate_dynrelocs): Likewise.
8948 (readonly_dynrelocs): Likewise.
8949 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8950 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8951 (xstormy16_relax_plt_realloc): Likewise.
8952 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8953 (elf64_alpha_output_extsym): Likewise.
8954 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8955 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8956 (mips_elf64_check_mips16_stubs): Likewise.
8957 (mips_elf64_output_extsym): Likewise.
8958 * elf64-ppc.c (func_desc_adjust): Likewise.
8959 (allocate_dynrelocs): Likewise.
8960 (readonly_dynrelocs): Likewise.
8961 * elf64-s390.c (allocate_dynrelocs): Likewise.
8962 (readonly_dynrelocs): Likewise.
8963 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8964 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8965 (readonly_dynrelocs): Likewise.
8966 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8967 * aoutx.h (aout_link_write_other_symbol): Likewise.
8968 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8969 (_bfd_coff_write_global_sym): Likewise.
8970 * i386linux.c (linux_tally_symbols): Likewise.
8971 * m68klinux.c (linux_tally_symbols): Likewise.
8972 * sparclinux.c (linux_tally_symbols): Likewise.
8973 * pdp11.c (aout_link_write_other_symbol): Likewise.
8974 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8975 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8976 (xcoff_write_global_symbol): Likewise.
8977
8978 * cofflink.c (_bfd_coff_final_link): Formatting.
8979 * cpu-mips.c (mips_compatible): Make static, prototype.
8980 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8981 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8982 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8983 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8984 (mips_elf64_final_link): Likewise.
8985 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8986 prototype.
8987
2106126f
NC
89882002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8989
8990 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8991 (SWAP_OUT_RELOC_OFFSET): Define.
8992
b99d1833
AM
89932002-03-27 Gregory Steuck <greg@nest.cx>
8994
8995 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8996 terminating NULL if empty symbol table.
8997 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8998
ad43ed4c
L
89992002-03-26 H.J. Lu (hjl@gnu.org)
9000
9001 * elflink.h (elf_link_input_bfd): Revert the last change since
9002 the gcc exception handling isn't fixed yet.
9003
3851fca4
L
90042002-03-26 H.J. Lu (hjl@gnu.org)
9005
9006 * elflink.h (elf_link_input_bfd): Complain about relocations
9007 against local symbols in discarded sections.
9008
b91afed7
AM
90092002-03-26 Alan Modra <amodra@bigpond.net.au>
9010
9011 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9012
dba143ef
AM
90132002-03-23 Alan Modra <amodra@bigpond.net.au>
9014
9015 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9016 section file offset for !SEC_LOAD sections.
9017
ee29b9fb
RE
90182002-03-21 Richard Earnshaw <rearnsha@arm.com>
9019
830629ab
AM
9020 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9021 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 9022
54327882
AM
90232002-03-21 Alan Modra <amodra@bigpond.net.au>
9024
9025 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9026 Whitespace changes.
9027 * archive.c: Update copyright date.
9028 * bfd-in2.h: Regenerate.
9029 * libbfd.h: Regenerate.
9030 * Makefile.am: Run "make dep-am"
9031 * Makefile.in: Regenerate.
9032 * po/SRC-POTFILES.in: Regenerate.
9033
1ee24f27
DJ
90342002-03-20 Daniel Jacobowitz <drow@mvista.com>
9035
9036 * dwarf2.c (struct funcinfo): Move up.
9037 (lookup_address_in_function_table): New argument function_ptr.
9038 Set it.
9039 (lookup_address_in_line_table): New argument function. If function
9040 is non-NULL, use it to handle ``addr'' before the first line note of
9041 the function.
9042 (comp_unit_find_nearest_line): Update and swap calls to
9043 lookup_address_in_function_table and lookup_address_in_line_table.
9044 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9045 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9046
51b9608c
TR
90472002-03-20 Tom Rix <trix@redhat.com>
9048
ea1e4b0d 9049 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 9050 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 9051 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 9052
789c90aa
TR
90532002-03-19 Tom Rix <trix@redhat.com>
9054
ea1e4b0d 9055 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
9056 dynamic objects in archives.
9057
1da54d81
HPN
90582002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9059
9060 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9061 STT_NOTYPE symbols to STT_OBJECT.
9062
7831a775 90632002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
9064
9065 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9066
eb1e0e80
NC
90672002-03-18 Tom Rix <trix@redhat.com>
9068
9069 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9070 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9071 * coff-rs6000 (do_pad) : New function for archive padding.
9072 (do_copy) : New function for object file copying in archives.
9073 (do_shared_object_padding) : New function for padding shared
9074 objects to their text section alignment in archives.
9075 (bfd_xcoff_ar_achive_set_magic) : Stub.
9076 (xcoff_write_armap_big) : Use do_copy and do_pad.
9077 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9078 do_copy and do_pad.
9079 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 9080 bfd_xcoff_magic_number.
eb1e0e80
NC
9081 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9082 fop.
9083 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9084 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9085 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9086 * rs6000-core.c : Update copyright date.
ea1e4b0d 9087 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
9088 csectpp.
9089 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9090 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9091 (coff_set_flags) : Use bfd_xcoff_magic_number.
9092 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9093 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9094 * Makefile.am : Same.
9095 * config.bfd : Same.
9096 * targets.c : Same.
9097 * configure : Regnerate.
9098 * Makefile.in : Same.
9099 * bfd-in2.h : Same.
9100
a1c259a1
NC
91012002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9102
9103 * po/fr.po: Updated version.
9104
4dae1ae7
AM
91052002-03-18 Alan Modra <amodra@bigpond.net.au>
9106
9107 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9108 * libbfd.h: Regenerate.
9109 * archive.c (coff_write_armap): Pass on failures from
9110 bfd_write_bigendian_4byte_int.
9111
36b4f6e7
L
91122002-03-14 H.J. Lu <hjl@gnu.org>
9113
9114 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9115 error to bfd_error_nonrepresentable_section for reinit_array
9116 section in DSO.
9117
a1aefc76
NC
91182002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9119
a181be0a
NC
9120 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9121 OR it in rather than replacing previously selected flags.
9122
a1aefc76
NC
9123 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9124 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9125
c119f9b8
AM
91262002-03-14 Alan Modra <amodra@bigpond.net.au>
9127
9128 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9129 (N): Use the above.
9130 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9131 ensure reloc size matches before calling elf_link_input_bfd.
9132 Add an assert to check reloc size when counting output relocs.
9133
c295a511
NC
91342002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9135
9136 * mmo.c (mmo_get_loc): Return NULL rather than false.
9137
9ce88e60
NC
91382002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9139
9140 * po/fr.po: Updated version.
9141
4ddafab0
AM
91422002-03-13 Alan Modra <amodra@bigpond.net.au>
9143
b74fa2cd
AM
9144 * archures.c (bfd_default_compatible): Test bits_per_word.
9145 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9146 bfd_default_compatible.
9147 * cpu-i370.c (i370_compatible): Likewise.
9148 * cpu-sparc.c (sparc_compatible): Likewise.
9149 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9150
40b829d4
AM
9151 * elflink.h: Formatting fixes.
9152 (elf_link_output_extsym): Merge undefined and undef weak cases.
9153
4ddafab0
AM
9154 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9155 when word size of input matches output word size.
9156
dd53c801
AJ
91572002-03-12 Andreas Jaeger <aj@suse.de>
9158
9159 * cpu-i386.c (i386_compatible): New. Use it instead of
9160 bfd_default_compatible.
9161
aa066ac8
L
91622002-03-07 H.J. Lu (hjl@gnu.org)
9163
9164 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9165 as the type for bfd_reloc_val.
9166
1bf42538
JL
91672002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9168
9169 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9170 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9171 (elf_hppa_final_link_relocate): Correct relocations for indirect
9172 references to local data through the DLT. Fix .opd creation for
9173 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9174 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9175 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9176 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9177 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9178 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9179 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9180
86eaf01e
JJ
91812002-03-05 Jakub Jelinek <jakub@redhat.com>
9182
9183 * merge.c (_bfd_merge_sections): Don't segfault if there
9184 is nothing to merge due to GC.
9185
c44233aa
AM
91862002-03-05 Alan Modra <amodra@bigpond.net.au>
9187
039cc25f
AM
9188 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9189 symbols that have been forced local.
9190
c44233aa
AM
9191 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9192 to output forced local syms for non-shared link.
9193 (elf_link_output_extsym): Tweak condition for calling backend
9194 adjust_dynamic_symbol so that previous behaviour is kept.
9195 Whitespace changes throughout file.
9196
25e27870
L
91972002-03-04 H.J. Lu <hjl@gnu.org>
9198
9199 * elf.c (bfd_section_from_shdr): Handle special sections,
9200 .init_array, .fini_array and .preinit_array.
9201 (elf_fake_sections): Likewise.
9202
9203 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9204 DT entry only if the section is in output for .init_array,
9205 .fini_array and .preinit_array. Complain about .preinit_array
9206 section in DSO.
9207 (elf_bfd_final_link): Warn zero size for .init_array,
9208 .fini_array and .preinit_array sections.
9209
9210 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9211 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9212 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9213 .preinit_array.
9214
bb2a49f2
AM
92152002-03-04 Alan Modra <amodra@bigpond.net.au>
9216
9217 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9218 * configure: Regenerate.
9219
38487e5e
TR
92202002-03-02 Tom Rix <trix@redhat.com>
9221
c44233aa
AM
9222 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9223 symbolic equiv.
38487e5e
TR
9224 * coff-rs6000.c (xcoff_howto_table): Same.
9225
30831527
RH
92262002-03-01 David Mosberger <davidm@hpl.hp.com>
9227
9228 * elflink.h (size_dynamic_sections): If section named
9229 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9230 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9231 ".init_array" and ".fini_array".
9232 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9233 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9234 DT_FINI_ARRAY.
9235
c8e5ddc8
AM
92362002-02-26 Andrew Macleod <amacleod@cygnus.com>
9237
9238 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9239 dynsyms.
9240
96e0dda4
AM
92412002-02-25 Alan Modra <amodra@bigpond.net.au>
9242
1c5b6bf8
AM
9243 * elf64-hppa.h: Update copyright date.
9244
96e0dda4
AM
9245 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9246 (ppc64_elf_relocate_section): Don't generate power4 style branch
9247 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9248
0fb19cbc
JJ
92492002-02-22 Jakub Jelinek <jakub@redhat.com>
9250
9251 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9252 last patch.
9253 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9254
c434dee6
AJ
92552002-02-21 Andreas Jaeger <aj@suse.de>
9256
9257 * elf64-x86-64.c: Major rework that introduces all recent changes
9258 to the x86-64 backend. Get a closer match to elf32-i386.
9259 (struct elf64_x86_64_dyn_relocs): Rename from
9260 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9261 all users.
9262 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9263 sections.
9264 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9265 remove casts, initialize new hash members.
9266 (create_got_section): New.
9267 (elf64_x86_64_create_dynamic_sections): New.
9268 (elf64_x86_64_copy_indirect_symbol): New.
9269 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9270 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9271 Reference count possible .plt and .got entries. Don't test input
9272 section SEC_READONLY here to try to avoid copy relocs, and keep
9273 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9274 DF_TEXTREL here. Delay setting of variables until needed. Cache
9275 pointer to "sreloc" section in elf_section_data. Tweak condition
9276 under which .got created. Report files with bad relocation
9277 section names.
9278 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9279 Reference count possible .plt entries. Don't deallocate .got and
9280 .relgot space here.
9281 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9282 do copy reloc processing for weakdefs. Remove redundant casts and
9283 aborts. Delay setting of vars until needed. Move creation of
9284 dynamic symbols and allocation of .plt and .rela.plt to
9285 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9286 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9287 (allocate_dynrelocs): New.
9288 (readonly_dynrelocs): New.
9289 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9290 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9291 Zero out the dynamic allocated content space.
9292 (elf64_x86_64_discard_copies): Removed.
9293 (elf64_x86_64_relocate_section): Make use of dynamic section
9294 short-cuts. Localise vars, and delay setting. Better error
9295 reporting, replace BFD_ASSERT with abort. Check
9296 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9297 regular object file and tread the weak definition as the normal
9298 one. Don't discard relocs for undefweak or undefined symbols and
9299 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9300 relocs.
9301 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9302 symbols that have been forced local. Use same test to decide if
9303 we can use a relative reloc for got as relocate_section. Expand
9304 SHN_UNDEF comment. Move expressions out of function calls.
9305 Replace BFD_ASSERT with abort.
9306 (bfd_elf64_bfd_final_link): Removed.
9307 (elf_backend_copy_indirect_symbol): Define.
9308
ff3a6ee3
TR
93092002-02-20 Tom Rix <trix@redhat.com>
9310
9311 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9312 (_bfd_xcoff_reloc_type_lookup): Use it.
9313 * coff64-rs6000.c (xcoff64_howto_table): Same.
9314 (xcoff64_reloc_type_lookup): Same.
c434dee6 9315
a68d41fb
AM
93162002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9317
9b5ecbd0 9318 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9319 little endian.
9320
befc3abb
MS
93212002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9322
9323 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9324 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9325 * bfd-in2.h: Regenerate.
9326 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9327 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9328 with "s390:64-bit".
9329 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9330 (elf_s390_reloc_type_lookup): Likewise.
9331 (elf_s390_check_relocs): Likewise.
9332 (elf_s390_gc_sweep_hook): Likewise.
9333 (elf_s390_relocate_section): Likewise.
9334 (elf_s390_object_p): Use renamed architecture define.
9335 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9336
6eeeec9b
FCE
93372002-02-19 Frank Ch. Eigler <fche@redhat.com>
9338
9339 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9340
0bb2d96a
JJ
93412002-02-19 Jakub Jelinek <jakub@redhat.com>
9342
9343 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9344 absptr -> pcrel optimization for shared libs.
9345 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9346 library cannot be converted to pcrel.
9347 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9348 relative.
9349 * elf32-i386.c (elf_i386_relocate_section): If
9350 _bfd_elf_section_offset returned -2, skip, but make sure the
9351 relocation is installed.
9352 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9353 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9354 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9355 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9356 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9357 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9358 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9359 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9360 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9361 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9362 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9363 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9364 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9365 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9366 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9367 _bfd_elf_section_offset returning -2 the same way as -1.
9368 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9369 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9370 and BFD_ASSERT.
9371 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9372
69f284c7
TR
93732002-02-18 Tom Rix <trix@redhat.com>
9374
9375 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9376 (bfd_xcoff_size_dynamic_sections): Same.
9377 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9378 (bfd_xcoff_size_dynamic_sections): Same.
9379 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9380 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9381 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9382 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9383 * bfd-in2.h: Regenerate.
9384
82bd7b59
AM
93852002-02-18 Alan Modra <amodra@bigpond.net.au>
9386
9387 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9388 (struct ppc_link_hash_table): Add sfpr.
9389 (ppc64_elf_link_hash_table_create): Init it.
9390 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9391 .glink out to..
9392 (create_linkage_sections): ..here. Make .sfpr too.
9393 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9394 dynobj early.
9395 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9396 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9397 ._restf* functions, and create as needed.
9398 (func_desc_adjust): Only force_local for shared libs.
9399
ef1355e8
NC
94002002-02-18 David O'Brien <obrien@FreeBSD.org>
9401
9402 * configure.in: Bump version number post 2.12 branching.
9403 * configure: Regenerate.
9404
dfa36a69
HPN
94052002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9406
9407 * mmo.c: Correct and improve comments.
9408 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9409 zero-pad. Use input to fill up non-empty bfd buffer.
9410 (mmo_flush_chunk): New function.
9411 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9412 changed. Don't emit location specifier if VMA is same as
9413 *LAST_VMAP after omitting leading zero contents. Call
9414 mmo_flush_chunk before emitting location specifier.
9415 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9416 with mmo_write_loc_chunk calls.
9417 (mmo_internal_write_section): Call mmo_flush_chunk after
9418 mmo_write_chunk.
9419 (mmo_write_symbols_and_terminator): Move :Main to first position
9420 in symbol array. Add faked one if it does not exist if there are
9421 other symbols. Don't add it if there are no symbols at all. Move
9422 out test for value of :Main from symbol loop. Rename table
9423 fakemain to maintable and variable mainsym to fakemain.
9424
ccf00ab6
RH
94252002-02-15 Richard Henderson <rth@redhat.com>
9426
9427 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9428 section with no got matches any got. Simplify error generaion.
9429
88eaccc2
AM
94302002-02-15 Alan Modra <amodra@bigpond.net.au>
9431
fd96f80f
AM
9432 Support arbitrary length fill patterns.
9433 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9434 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9435 Call default_data_link_order.
9436 (default_fill_link_order): Delete.
9437 (default_data_link_order): New function.
9438 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9439 of bfd_fill_link_order with bfd_data_link_order.
9440 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9441 * elf64-mips.c (mips_elf64_final_link): Likewise.
9442
88eaccc2
AM
9443 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9444 Correct value returned in "end" for "0x<non-hex>".
9445
e2fd756b
NC
94462002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9447
9448 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9449 (scan): Test against 'mach' field in info structure.
9450
edd29cf9
AM
94512002-02-14 Alan Modra <amodra@bigpond.net.au>
9452
9453 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9454
1e30956e 94552002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9456
9457 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9458 EF_M68000.
9459
bf36db18
NC
94602002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9461
9462 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9463 non-zero physical addresses when adjusting the LMAs of new
9464 sections.
bf36db18 9465
189c6563
AM
94662002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9467
9468 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9469 from _bfd_elf_hppa_gen_reloc_type.
9470 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9471 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9472 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9473 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9474
e948afaf
AO
94752002-02-12 Alexandre Oliva <aoliva@redhat.com>
9476
9477 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9478 loading its contents if there's nothing to do in it.
9479
19397422
AM
94802002-02-12 Alan Modra <amodra@bigpond.net.au>
9481
0ad3a73b
AM
9482 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9483 64k boundary.
9484
19397422
AM
9485 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9486 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9487 (ppc64_elf_finish_dynamic_sections): Set values for them.
9488
51316059
MS
94892002-02-11 Michael Snyder <msnyder@redhat.com>
9490
9491 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9492 * elf.c (elfcore_grok_pstatus): Add prototype.
9493 (elfcore_grok_lwpstatus): Add prototype.
9494 (elfcore_write_lwpstatus): New function.
9495 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9496
518313c3
AO
94972002-02-11 Alexandre Oliva <aoliva@redhat.com>
9498
9499 * elf32-sh.c: Added missing prototypes.
9500 * elf32-sh64.c: Likewise.
9501 (sh_elf_align_loads): Mark unused args as such.
9502 * elf64-sh64.c: Added missing prototypes.
9503 (struct elf_sh64_link_hash_entry): Fix typo.
9504 (sh_elf64_relocate_section): Fix info argument passed to
9505 _bfd_elf_section_offset.
9506
2c73f9d8
AM
95072002-02-11 Alan Modra <amodra@bigpond.net.au>
9508
9509 * Makefile.am: "make dep-am".
9510 * Makefile.in: Regenerate.
9511 * aclocal.m4: Regenerate.
9512 * config.in: Regenerate.
9513 * configure: Regenerate.
9514
d426c6b0
DJ
95152002-02-10 Daniel Jacobowitz <drow@mvista.com>
9516
9517 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9518 variable warnings.
9519 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9520 comparison warning.
9521 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9522 cast warnings for the common case.
9523
e58ee0cd
HPN
95242002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9525
9526 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9527 vectors.
9528 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9529 vectors.
9530
7793f4d0
RH
95312002-02-09 Richard Henderson <rth@redhat.com>
9532
9533 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9534 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9535 (elf64_alpha_relocate_section): Likewise.
9536 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9537 * bfd-in2.h, libbfd.h: Rebuild.
9538
7e799044
HPN
95392002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9540
9541 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9542 that base-plus-offset reloc accounting is consistent.
9543 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9544 up to date for undefined symbols.
9545
027d73eb
EC
95462002-02-08 Eric Christopher <echristo@redhat.com>
9547
9548 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9549
9550 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9551 sections for the O32 ABI.
9552
517662d4
CD
95532002-02-08 Chris Demetriou <cgd@broadcom.com>
9554
9555 * elf32-arm.h: Fix formatting of _("...").
9556 * elf32-d10v.c: Likewise.
9557 * elf32-m68k.c: Likewise.
9558 * elf32-mips.c: Likewise.
9559
5e37cc46
NC
95602002-02-08 Ivan Guzvinec <ivang@opencores.org>
9561
9562 * coff-or32.c: Fix compile time warning messages.
9563
fbca6ad9
AO
95642002-02-08 Alexandre Oliva <aoliva@redhat.com>
9565
9566 Contribute sh64-elf.
9567 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9568 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9569 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9570 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9571 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9572 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9573 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9574 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9575 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9576 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9577 New relocs.
9578 * libbfd.h, bfd-in2.h: Rebuilt.
9579 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9580 (sh_reloc_map): Map them.
9581 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9582 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9583 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9584 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9585 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9586 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9587 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9588 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9589 datalabel_got_offset.
9590 (sh_elf_link_hash_newfunc): Initialize it.
9591 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9592 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9593 GOT and GOTOFF handling to new SHmedia relocation types. Support
9594 GOT_BIAS.
9595 (sh_elf_check_relocs): Likewise.
9596 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9597 PLT entries using movi_shori_putval. Support GOT_BIAS.
9598 (sh_elf_finish_dynamic_sections): Likewise.
9599 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9600 relocation, it's now done by the caller.
9601 (GOT_BIAS): New.
9602 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9603 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9604 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9605 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9606 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9607 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9608 sh64_elf64_hash_table): New.
9609 (sh_elf64_howto_table): Introduce new relocs.
9610 (sh_elf64_info_to_howto): Accept new PIC relocs.
9611 (sh_elf64_relocate_section): Augment the scope of
9612 seen_stt_datalabel. Support new PIC relocs.
9613 (sh_elf64_check_relocs): Support new PIC relocs.
9614 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9615 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9616 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9617 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9618 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9619 movi_shori_putval, movi_3shori_putval,
9620 sh64_elf64_create_dynamic_sections,
9621 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9622 sh64_elf64_size_dynamic_sections,
9623 sh64_elf64_finish_dynamic_symbol,
9624 sh64_elf64_finish_dynamic_sections): New.
9625 (elf_backend_create_dynamic-sections,
9626 bfd_elf64_bfd_link_hash_table_create,
9627 elf_backend_adjust_dynamic_symbol,
9628 elf_backend_size_dynamic_sections,
9629 elf_backend_finish_dynamic_symbol,
9630 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9631 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9632 elf_backend_got_header_size, elf_backend_plt_header_size):
9633 Define.
9634 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9635 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9636 match official numbers and names; moved unmaching ones to the
9637 range 0xf2-0xff.
9638 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9639 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9640 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9641 sections.
9b5ecbd0 9642 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9643 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9644 be aligned.
9645 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9646 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9647 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9648 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9649 .cranges section with SEC_SORT_ENTRIES set.
9650 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9651 incoming sorted .cranges section.
9652 (sh64_bfd_elf_copy_private_section_data): New.
9653 (sh64_elf_final_write_processing): Only sort .cranges and modify
9654 start address if called by linker.
9655 2001-01-08 Ben Elliston <bje@redhat.com>
9656 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9657 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9658 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9659 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9660 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9661 line. Add comments before all entries.
9662 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9663 comment.
9664 (sh_elf64_reloc): Correct head comment.
9665 (sh_elf64_relocate_section): Correct spacing.
9666 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9667 instead call reloc_dangerous callback.
9668 <case R_SH_SHMEDIA_CODE>: New case.
9669 (sh_elf64_gc_mark_hook): Correct spacing.
9670 (sh_elf64_check_relocs): Ditto.
9671 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9672 New case.
9673 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9674 functions.
9675 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9676 clarify describing comment. Add comments before all entries.
9677 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9678 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9679 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9680 Sort .cranges section in final link. Prepare to set bit 0 on
9681 entry address.
9682 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9683 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9684 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9685 .cranges section.
9686 (sh64_backend_section_from_shdr): New, to recognize
9687 SHT_SH5_CR_SORTED on incoming .cranges section.
9688 (elf_backend_section_from_shdr): Define.
9689 (sh64_elf_final_write_processing): Sort outgoing .cranges
9690 section. (New, temporarily disabled:) Set bit 0 on entry address
9691 according to ISA type.
9692 (sh64_find_section_for_address): New.
9693 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9694 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9695 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9696 bfd_malloc, not xmalloc.
9697 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9698 global.
9699 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9700 temporarily disabled) setting bit 0 on entry address.
9701 (elf_backend_final_write_processing): Define.
9b5ecbd0 9702 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9703 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9704 be a proper relocation for PTA and PTB rather than a marker.
9705 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9706 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9707 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9708 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9709 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9710 Zero src_mask.
9711 * elf64-sh64.c: Ditto.
9712 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9713 * elf32-sh64.c: Include opcodes/sh64-opc.h
9714 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9715 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9716 parameters. No unused parameters. Caller changed.
9717 <case R_SH_PT_16>: New case.
9718 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9719 * Makefile.in: Regenerate.
9b5ecbd0 9720 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9721 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9722 all code sections.
9723 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9724 (sh64_elf_merge_private_data): Ditto.
9725 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9726 to access stored section flags.
9727 (sh64_elf_final_write_processing): Return immediately unless
9728 called by linker. Use sh64_elf_section_data (cranges) to get size
9729 of linker-generated cranges entries.
9730 (sh64_elf_copy_private_data): Add missing "return true".
9731 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9732 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9733 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9734 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9735 elf64-sh64.c:sh64_elf_fake_sections.
9736 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9737 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9738 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9739 (sh64_elf_final_write_processing): New.
9740 (elf_backend_final_write_processing): Define.
9741 (sh64_elf_fake_sections): Get header flags from tdata field.
9742 (sh64_elf_copy_private_data): Do not call
9743 sh64_elf_copy_private_data_internal, just copy e_flags field.
9744 (sh64_elf_merge_private_data): Do not call
9745 sh64_elf_copy_private_data_internal.
9b5ecbd0 9746 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9747 Remove EF_SH64_ABI64, let ELF size make difference.
9748 Remove SH64-specific BFD section flag.
9749 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9750 containing SHmedia through elf_section_data (asect)->tdata
9751 non-zero, not using a BFD section flag.
9752 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9753 (sh64_elf_merge_private_data): Similar.
9754 (elf_backend_section_flags): Don't define.
9755 (sh64_elf_backend_section_flags): Delete.
9756 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9757 not EF_SH64_ABI64.
9758 (sh_elf64_merge_private_data): Similar.
9759 * section.c (Section flags definitions): Don't define
9760 SEC_SH_ISA_SHMEDIA.
9761 (bfd-in2.h): Regenerate.
9b5ecbd0 9762 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9763 Make DataLabel references work with partial linking.
9764 * elf32-sh64.c: Fix formatting.
9765 (sh64_elf_link_output_symbol_hook): New.
9766 (elf_backend_link_output_symbol_hook): Define to
9767 sh64_elf_link_output_symbol_hook.
9768 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9769 undefined if partial linking. Adjust sanity check.
9770 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9771 (elf_backend_link_output_symbol_hook): Define to
9772 sh64_elf64_link_output_symbol_hook.
9773 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9774 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9775 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9776 Implement semantics for inter-file DataLabel references.
9777 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9778 (sh64_elf64_add_symbol_hook): New.
9779 (sh_elf64_relocate_section): If passing an indirect symbol with
9780 st_type STT_DATALABEL on the way to a symbol with st_other
9781 STO_SH5_ISA32, do not bitor 1 to the relocation.
9782 (elf_backend_add_symbol_hook): Define to
9783 sh64_elf64_add_symbol_hook.
9784 * elf64-sh32.c: Tweak comments.
9785 (DATALABEL_SUFFIX): Define.
9786 (sh64_elf_add_symbol_hook): New.
9787 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9788 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9789 symbol with st_type STT_DATALABEL on the way to a symbol with
9790 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9791 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9792 Pass through STT_DATALABEL.
9793 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9794 (elf_backend_get_symbol_type): Define.
9795 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9796 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9797 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9798 * elf32-sh64.c: Tweak comments.
9799 (sh64_elf_copy_private_data_internal): Add prototype.
9800 (bfd_elf32_bfd_set_private_flags): Define.
9801 (sh64_elf_copy_private_data_internal): Compare machine name, not
9802 textual BFD target name, to check whether to copy section flag
9803 SHF_SH5_ISA32.
9804 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9805 Tweak section-contents-type-mismatch message.
9806 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9807 Validize reloc-types.
9808 * elf64-sh64.c: New file.
9809 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9810 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9811 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9812 Regenerate dependencies.
9813 * Makefile.in: Regenerate.
9814 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9815 bfd_elf64_sh64l_vec.
9816 * configure.in: Handle bfd_elf64_sh64_vec and
9817 bfd_elf64_sh64l_vec.
9818 * configure: Regenerate.
9819 * po/POTFILES.in: Regenerate.
9820 * po/bfd.pot: Regenerate.
9b5ecbd0 9821 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9822 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9823 anything else but EF_SH64 and EF_SH64_ABI64.
9824 (sh64_elf_merge_private_data): Emit error for anything else but
9825 EF_SH64 and EF_SH64_ABI64.
9826 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9827 from targ_selvecs.
9828 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9829 bfd_elf32_sh64l_vec as a temporary measure.
9830 * configure: Regenerate.
9b5ecbd0 9831 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9832 * cpu-sh.c (arch_info_struct): Include sh5 item
9833 unconditionalized.
9834 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9835 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9836 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9837 * elf32-sh64.c: Tweak comments.
9838 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9839 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9840 (sh64_elf_copy_private_data_internal): Wrap long line.
9841 (sh64_elf_merge_private_data): Rewrite to allow objects from
9842 SH64 subsets to be linked together.
9843 (INCLUDE_SHMEDIA): Define.
9844 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9845 Parenthesize plus-expression inside or-expression.
9846 <global symbol>: Ditto.
9847 (sh_elf_set_mach_from_flags): Remove code refusing
9848 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9849 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9850 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9851 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9852 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9853 (sh_elf_relocate_section) <local symbol>: Or 1 in
9854 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9855 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9856 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9857 relocation.
9b5ecbd0 9858 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9859 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9860 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9861 Regenerate dependencies.
9862 * Makefile.in: Regenerate.
9863 * archures.c: Add bfd_mach_sh5.
9864 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9865 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9866 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9867 * configure: Regenerate.
9868 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9869 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9870 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9871 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9872 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9873 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9874 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9875 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9876 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9877 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9878 in item for SH5.
9879 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9880 for SHmedia relocs.
9881 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9882 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9883 shmedia_prepare_reloc, goto final_link_relocate if it returns
9884 non-zero, else fail as before.
9885 (sh_elf_set_mach_from_flags): Provide function only if not defined
9886 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9887 (sh_elf_set_private_flags): Provide function only if not defined
9888 as a macro.
9889 (sh_elf_copy_private_data): Similar.
9890 (sh_elf_merge_private_data): Similar.
9891 * section.c (SEC_SH_ISA_SHMEDIA): New.
9892 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9893 * elf32-sh64.c: New file.
9894 * libbfd.h: Regenerate.
9895 * bfd-in2.h: Regenerate.
9896 * po/POTFILES.in: Regenerate.
9897 * po/bfd.pot: Regenerate.
9898 * bfd-in2.h: Regenerate.
9899 * libbfd.h: Regenerate.
9900
e108f470
DJ
99012002-02-07 Daniel Jacobowitz <drow@mvista.com>
9902
9903 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9904 been included, not drag it in.
9905 * bfd-in2.h: Regenerate.
9906
259d18a3
L
99072002-02-06 H.J. Lu (hjl@gnu.org)
9908
9909 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9910 the mach and ISA fields if necessary.
9911
f13b834e
NC
99122002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9913
9914 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9915 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9916 be sure exactly which architecture this represents.
9917
82f6addb
NC
99182002-02-05 Nick Clifton <nickc@redhat.com>
9919
9920 * po/tr.po: Updated translation.
9921
899f54f5
AM
99222002-02-05 Alan Modra <amodra@bigpond.net.au>
9923
9924 From Jimi X <jimix@watson.ibm.com>
9925 * archures (bfd_mach_ppc64): Define.
9926 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9927 (bfd_powerpc_arch): Define.
9928 * bfd-in2.h: Regenerate.
9929 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9930 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9931 (bfd_powerpc_archs): Add default powerpc64 arch.
9932
248866a8
AM
99332002-02-05 Alan Modra <amodra@bigpond.net.au>
9934
9935 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9936 against section syms in readonly sections. Don't do the global
9937 sym check if we find one.
9938 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9939 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9940 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
9941 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9942 (elf_s390_grok_prstatus): Add missing prototype.
9943
4fa5c2a8
HPN
99442002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9945
9946 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9947 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9948 Call bfd_get_section_by_name only once. Initialize
9949 bpodata->n_bpo_relocs_this_section.
9950 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9951 referring to DSOs.
9952 (bpo_reloc_request_sort_fn): Don't use difference of values as
9953 return-value.
9954
537c972e
DB
99552002-02-02 David O'Brien <obrien@FreeBSD>
9956
9957 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9958 version 4.5 and later the same as 5-CURRENT.
9959 * configure: Re-generate.
9960
006336b8
JT
99612002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9962
9963 * config.bfd (hppa*-*-netbsd*): New target.
9964
6c571f00
PT
99652002-01-31 Philipp Thomas <pthomas@suse.de>
9966
19397422
AM
9967 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9968 to front of message. Unify messages with elf32-arm.h. Use
9969 commas where neccessary.
9970 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9971 ERROR in messages. Unify messages with coff-arm.c. Correct
9972 VFP/FPA error message.
9973 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9974 APCS-32 for translation.
6c571f00 9975
930b4cb2
HPN
99762002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9977
9978 Perform on-demand global register allocation from
9979 R_MMIX_BASE_PLUS_OFFSET relocs.
9980 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9981 bpo_reloc_request, struct bpo_greg_section_info): New.
9982 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9983 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9984 _bfd_mmix_check_all_relocs,
9985 _bfd_mmix_prepare_linker_allocated_gregs,
9986 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9987 (elf_mmix_howto_table): Correct src_mask for most relocs.
9988 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9989 case.
9990 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9991 case. Fix typo in comment. New label do_mmix_reloc.
9992 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9993 store first object file with a base-plus-offset reloc. Call
9994 mmix_elf_check_common_relocs for the part common with mmo.
9995 (mmix_elf_final_link): Write out linker-allocated register
9996 contents section.
9997 (elf_backend_gc_sweep_hook): Define.
9998 (bfd_elf64_bfd_relax_section): Define.
9999
10000 * mmo.c: Don't include <ctype.h>
10001 (mmo_init): Correct init-once logic.
10002
3e36d993
TR
100032002-02-01 Tom Rix <trix@redhat.com>
10004
10005 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10006
ba323545
AM
100072002-02-01 Alan Modra <amodra@bigpond.net.au>
10008
10009 * Makefile.am: Run "make dep-am"
10010 * Makefile.in: Regenerate.
10011
012884d6
DB
100122002-01-31 David O'Brien <obrien@FreeBSD>
10013
10014 * configure.in: Recognize the differences in core files from FreeBSD
10015 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10016 5-CURRENT.
10017 * configure: Regenerate.
10018
3b16e843
NC
100192002-01-31 Ivan Guzvinec <ivang@opencores.org>
10020
10021 * coff-or32.c: New file.
10022 * cpu-or32.c: New file.
10023 * elf32-or32.c: New file.
10024 * archures.c: Add support for or32.
10025 * targets.c: Add support for or32.
10026 * bfd-in2.h: Regenerate.
7dc0ab31 10027 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
10028 coff_write_object_contents): Add support for or32.
10029 * config.bfd: Add target.
10030 * configure.in: Add support for or32.
10031 * configure: Regenerate.
10032 * Makefile.am: Add support for or32.
10033 * Makefile.in: Regenerate.
3b16e843
NC
10034 * po/SRC-POTFILES.in: Add or32 files.
10035 * po/bfd.pot: Regenerate.
7dc0ab31 10036
caf8ca8e
NC
100372002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10038 Don Lindsay <lindsayd@cisco.com>
10039
10040 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10041 false' with a return of a bfd_reloc_ error code.
10042
e5dfef09
HPN
100432002-01-31 Hans-Peter Nilsson <hp@axis.com>
10044
10045 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10046 unexport unreferenced symbols when --export-dynamic. Call
10047 _bfd_elf_strtab_delref when unexporting.
10048
4e4770d0
DJ
100492002-01-30 Daniel Jacobowitz <drow@mvista.com>
10050
10051 * bfd-in.h: Include <stdbool.h> if it is available.
10052 * bfd-in2.h: Regenerated.
10053
e1fa50e7
AM
100542002-01-31 Alan Modra <amodra@bigpond.net.au>
10055
10056 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10057 not go via the plt.
10058
b5f79c76
NC
100592002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10060
b5f79c76
NC
10061 * archures.c: Tidy up formatting of embedded comments.
10062 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 10063 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
10064 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10065 * section.c: Tidy up formatting of embedded comments.
10066 * syms.c: Tidy up formatting of embedded comments.
10067 * targets.c: Tidy up formatting of embedded comments.
10068
10069 * bfd-in2.h: Regenerate.
10070
ca09e32b
NC
100712002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10072
10073 * vms-tir.c (cmd_name): New function.
10074 (tir_cmd_name): New function.
10075 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10076 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10077 Fix formatting.
7dc0ab31 10078
ca09e32b
NC
10079 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10080 translation.
9b5ecbd0 10081 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
10082
10083 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10084 translation.
10085
10086 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10087
10088 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10089
10090 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10091 message to aid in translation.
10092
10093 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10094 to aid in translation.
10095
10096 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10097
7dc0ab31 100982002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
10099
10100 * coff-arm.c, elf32-elf.h: Unify messages.
10101
05f64ac6
NC
101022002-01-30 Nick Clifton <nickc@redhat.com>
10103
10104 * po/sv.po: Updated translation.
10105
f5a3e38a
NC
101062002-01-30 Philipp Thomas <pthomas@suse.de>
10107
10108 * dwarf2.c (read_abbrev): Use full section name in error message.
10109 (decode_line_info): Likewise.
661a3fd4
NC
10110
10111 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10112 message.
10113
d926e03d
AM
101142002-01-30 Alan Modra <amodra@bigpond.net.au>
10115
10116 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10117 descriptor symbols for undefined function code syms. Clear
10118 ELF_LINK_NON_ELF so that they can stay weak.
10119
030d18fb 101202002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 10121 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
10122
10123 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10124 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10125 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10126 generation.
10127 * bfd-in2.h: Regenerate.
10128
fcc76bea
CD
101292002-01-29 Chris Demetriou <cgd@broadcom.com>
10130
10131 * elf32-mips.c: Add additional comments about HI16 relocation
10132 processing.
10133 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10134 pc-relative relocations. (Reverts change made on 2001-10-31.)
10135 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10136 for pc-relative relocations.
10137 (mips_elf_calculate_relocation): Add a comment about a kludge
10138 in the R_MIPS_GNU_REL_HI16 handling.
10139 (_bfd_mips_elf_relocate_section): Implement that kludge;
10140 adjust pc-relative HI16 relocation for difference in HI16 and
10141 LO16 addresses, since it can't easily be done in
10142 mips_elf_calculate_relocation.
10143
f9cd9119
MS
101442002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10145
10146 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10147 relocations with PC32 relocations for undefined or weak symbols.
10148 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10149 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10150
702248bb
JT
101512002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10152
10153 * elfcore.h (elf_core_file_p): Improve comment for last change.
10154
4867be41
DJ
101552002-01-27 Daniel Jacobowitz <drow@mvista.com>
10156
10157 * configure: Regenerated.
10158
a94cef6a
JT
101592002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10160
10161 * elfcore.h (elf_core_file_p): Set the machine architecture
10162 before processing the program headers.
10163
7562a296
HPN
101642002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10165
966abd70
HPN
10166 * configure.in <64-bit configuration>: If using gcc, check and
10167 emit error for egcs-1.1.2.
10168 * configure: Regenerate.
10169
e8eab623
NC
101702002-01-26 Egor Duda <deo@logos-m.ru>
10171
10172 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10173 as possible to avoid stack corruption.
10174
73896efb
RH
101752002-01-26 Richard Henderson <rth@redhat.com>
10176
10177 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10178 for non-allocated sections.
10179
101802002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10181
10182 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10183 prstat.pr_reg even if it is a struct.
10184
73896efb 101852002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10186
c5cd6d62 10187 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10188
3d66c4f7
NC
101892002-01-25 Philipp Thomas <pthomas@suse.de>
10190
10191 * coffgen.c (coff_print_symbol): Don't mark info message
10192 for translation.
10193
9460ecda
NC
101942002-01-25 Nick Clifton <nickc@redhat.com>
10195
10196 * po/fr.po: Updated translation.
10197 * po/es.po: Updated translation.
10198
cc9ff76a
AM
101992002-01-25 Philipp Thomas <pthomas@suse.de>
10200
10201 * coff-alpha.c (alpha_relocate_section): Unify warning message
10202 for GP relative relocations without GP defined.
10203 * coff-mips.c (mips_relocate_section): Likewise.
10204
c68836a9
AM
102052002-01-25 Alan Modra <amodra@bigpond.net.au>
10206
10207 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10208 unsigned overflow when new_offset < old_offset.
10209
e8eab623 102102002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10211
10212 * bfd.c (_bfd_abort): Fix typo.
10213
8ba89f17
RH
102142002-01-23 Richard Henderson <rth@redhat.com>
10215
10216 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10217 plt entries for undefweak symbols.
10218
c6953948
NC
102192002-01-23 Steve Ellcey <sje@cup.hp.com>
10220
c5cd6d62 10221 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10222 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10223 (bfd_elf32_h8300_vec): Ditto.
10224
41bd81ab
AM
102252002-01-23 Alan Modra <amodra@bigpond.net.au>
10226
10227 * elf64-ppc.c: Remove stale part of ABI comment.
10228 (NO_OPD_RELOCS): Define.
10229 (ppc64_elf_check_relocs): Use it.
10230 (ppc64_elf_relocate_section): Here too.
10231 (build_one_stub): Don't point function syms at the stub. Instead,
10232 hijack plt.offset.
10233 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10234 really go to the stub. Make all dynamic relocs in opd against
10235 locals.
10236 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10237 plt.offset.
10238
f304919d
RH
102392002-01-22 Richard Henderson <rth@redhat.com>
10240
10241 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10242
c0ef99a7
AM
102432002-01-22 Alan Modra <amodra@bigpond.net.au>
10244
60ee0d4a
AM
10245 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10246 TOC_BASE_OFF adjustment.
10247
c0ef99a7
AM
10248 * Makefile.am: Run "make dep-am".
10249 * Makefile.in: Regenerate.
10250 * po/SRC-POTFILES.in: Regenerate.
10251
64328b46
AM
102522002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10253
10254 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10255 host defines.
10256
59953665 102572002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10258
10259 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10260 Check for and emit error if sgot is NULL at this point.
10261
9596feea
JT
102622002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10263
10264 * config.bfd (ia64*-*-netbsd*): New target.
10265
7b45c6e1
AM
102662002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10267
10268 * som.c (som_write_space_strings): Comment typo fix.
10269
e5094212
AM
102702002-01-21 Alan Modra <amodra@bigpond.net.au>
10271
e86ce104
AM
10272 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10273 is_func_descriptor fields.
10274 (link_hash_newfunc): Init them.
10275 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10276 dot are candidates for plt entries. When processing .opd relocs,
10277 set function descriptor strings to point inside function code
10278 string, and set new ppc_link_hash_entry fields.
10279 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10280 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10281 function descriptors. It's now done in..
10282 (func_desc_adjust): New.
10283 (ppc64_elf_func_desc_adjust): New.
10284 (define elf_backend_always_size_sections): Define.
10285 (ppc64_elf_hide_symbol): New.
10286 (define elf_backend_hide_symbol): Define.
10287 (allocate_dynrelocs): Remove code looking up function descriptors
10288 as that has been done earlier.
10289 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10290 table.
10291 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10292 up function descriptor.
10293 (build_one_stub): Look up the function code sym. Check for
10294 invalid plt offsets.
10295 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10296 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10297
e5094212
AM
10298 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10299 boolean param.
10300 (_bfd_elf_link_hash_hide_symbol): Likewise.
10301 * elflink.h (elf_link_add_object_symbols): Adjust call to
10302 elf_backend_hide_symbol.
10303 (elf_fix_symbol_flags): Likewise.
10304 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10305 than bfd_alloc.
10306 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10307 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10308 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10309 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10310 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10311 and adjust to suit.
10312 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10313 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10314 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10315
40b8271b
AM
103162002-01-18 Alan Modra <amodra@bigpond.net.au>
10317
10318 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10319 dynamic function descriptor symbol, not the associated function
10320 symbol.
10321
55baa95b
EC
103222002-01-17 Eric Christopher <echristo@redhat.com>
10323
10324 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10325
328577ad
NC
103262002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10327
10328 * po/bfd.pot: Regenerate.
10329 * po/fr.po: Regenerate.
10330
af746e92
AM
103312002-01-17 Alan Modra <amodra@bigpond.net.au>
10332
10333 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10334 Remove "Elf_Internal_Shdr *" param.
10335 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10336 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10337 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10338 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10339 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10340 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10341 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10342 function to override special sections. Remove hdr arg from
10343 backend call, and don't loop.
10344
175e9962
EC
103452002-01-16 Eric Christopher <echristo@redhat.com>
10346
10347 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10348 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10349 relocations requiring gp0 and gp.
10350
96a846ea
RE
103512002-01-16 Richard Earnshaw <rearnsha@arm.com>
10352
175e9962 10353 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10354 EF_ARM_VFP_FLOAT.
10355 (elf32_arm_print_private_bfd_data): Likewise.
10356
af3ae48d
NC
103572002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10358
10359 * po/tr.po: Import new version.
10360
10ed1bba
AM
103612002-01-16 Alan Modra <amodra@bigpond.net.au>
10362
10363 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10364 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10365 (ORI_R0_R0_0): Correct.
10366
5d1634d7
AM
103672002-01-16 Alan Modra <amodra@bigpond.net.au>
10368
10369 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10370 when plt_not_loaded.
10371 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10372 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10373 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10374 (ppc64_elf_glink_code): Delete.
10375 (PPC64_ELF_GLINK_SIZE): Delete.
10376 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10377 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10378 ORI_R0_R0_0): Define.
10379 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10380 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10381 (ppc64_elf_link_hash_table_create): Init them.
10382 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10383 Don't copy to shared lib.
10384 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10385 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10386 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10387 room for .stub and .glink code.
10388 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10389 DT_PPC64_GLINK.
10390 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10391 bfd_elf64_bfd_final_link.
10392 (bfd_elf64_bfd_final_link): Don't define.
10393 (ppc64_elf_size_stubs): New.
10394 (build_plt_stub): New.
10395 (build_one_stub): New.
10396 (ppc64_elf_build_stubs): New.
10397 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10398 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10399 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10400 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10401 case output sections not separate. Adjust DT_RELASZ to not
10402 include plt relocs. Set reserved got entry. Set got and plt
10403 entry size.
10404 (elf_backend_got_header_size): Set to 8.
10405 * elf64-ppc.h: New file.
10406
c601ffdb
AM
104072002-01-16 Alan Modra <amodra@bigpond.net.au>
10408
10409 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10410 sections, use bfd_section_list_remove.
10411 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10412 * elflink.h (elf_link_add_object_symbols): When removing all
10413 sections, use bfd_section_list_clear.
10414
8fb4cb7f
NC
104152002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10416
10417 * po/sv.po: New file: Swedish translation.
10418 * configure.in (ALL_LINGUAS): Add sv.
10419 * configure: Regenerate.
10420
d3c456e9
JJ
104212002-01-15 Jakub Jelinek <jakub@redhat.com>
10422
10423 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10424 * elf.c (merge_sections_remove_hook): New function.
10425 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10426 _bfd_merge_sections.
10427 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10428 * libbfd.h: Rebuilt.
10429 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10430 Call remove_hook if a SEC_EXCLUDE section is encountered.
10431
1f7fd478
NC
104322002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10433
10434 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10435 (xstormy16_reloc_map): Initialise new field with correct howto
10436 table.
10437 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10438 howto entry.
10439
b87011e9
MS
104402002-01-10 Michael Snyder <msnyder@redhat.com>
10441
10442 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10443 (elfcore_write_pstatus): Use long instead of pid_t;
10444 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10445
175e9962 104462002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10447
10448 * elf.c: Update copyright years.
10449 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10450 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10451
7c76fa91
MS
104522002-01-08 Michael Snyder <msnyder@redhat.com>
10453
10454 Add capability to write corefile note sections, for gdb.
10455 * elf.c (elfcore_write_note): New function.
10456 (elfcore_write_prpsinfo): New function.
10457 (elfcore_write_prstatus): New function.
10458 (elfcore_write_pstatus): New function.
10459 (elfcore_write_prfpreg): New function.
10460 (elfcore_write_prxfpreg): New function.
97996af6 10461 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10462
e1fddb6b
AO
104632002-01-08 Alexandre Oliva <aoliva@redhat.com>
10464
10465 * elf.c (elf_fake_sections): Propagate errors from
10466 elf_backend_fake_section.
10467
8d05742f
JT
104682002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10469
10470 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10471 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10472 (elf32-sh-nbsd.lo): New rule.
10473 * Makefile.in: Regenerate.
10474 * config.bfd (sh*le-*-netbsdelf*): New target.
10475 (sh*-*-netbsdelf*): New target.
10476 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10477 (bfd_elf32_shnbsd_vec): New vector.
10478 (bfd_elf32_shlnbsd_vec): New vector.
10479 * configure: Regenerate.
10480 * elf32-sh-nbsd.c: New file.
10481 * targets.c: Update copyright years.
175e9962 10482 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10483 bfd_elf32_shnbsd_vec.
10484
1dba4cb4
AH
104852002-01-07 Aldy Hernandez <aldyh@redhat.com>
10486
10487 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10488
47b22aef
GK
104892002-01-07 Geoffrey Keating <geoffk@redhat.com>
10490
10491 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10492 of a symbol in a section that will be deleted.
10493
be2d1673
NC
104942002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10495
10496 * po/es.po: New file: Spanish translation.
10497 * configure.in (ALL_LINGUAS): Add es.
10498 * configure: Regenerate.
10499
d9cf1b54
AM
105002002-01-06 Steve Ellcey <sje@cup.hp.com>
10501
10502 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10503 argument so we can handle HP-UX specially.
10504 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10505 (elfNN_hpux_backend_section_from_bfd_section): New for support
10506 of SHN_IA_64_ANSI_COMMON.
10507 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10508 (is_unwind_section_name): Add special HP-UX support.
10509 (elfNN_ia64_section_from_shdr): Add support for more sections.
10510 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10511 add support for more sections.
10512 (elfNN_ia64_additional_program_headers): Modify
10513 is_unwind_section_name call.
10514 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10515 only one unwind section in segment.
10516
3f3c5c34
AM
105172002-01-06 Alan Modra <amodra@bigpond.net.au>
10518
10519 * syms.c (_bfd_generic_make_empty_symbol): New function.
10520 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10521 _bfd_generic_make_empty_symbol.
10522 * libbfd.h: Regenerate.
10523 * bfd-in2.h: Regenerate.
10524 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10525 (hppabsd_core_get_symtab_upper_bound): Don't define.
10526 (hppabsd_core_get_symtab): Likewise.
10527 (hppabsd_core_print_symbol): Likewise.
10528 (hppabsd_core_get_symbol_info): Likewise.
10529 (hppabsd_core_bfd_is_local_label_name): Likewise.
10530 (hppabsd_core_get_lineno): Likewise.
10531 (hppabsd_core_find_nearest_line): Likewise.
10532 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10533 (hppabsd_core_read_minisymbols): Likewise.
10534 (hppabsd_core_minisymbol_to_symbol): Likewise.
10535 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10536 Formatting fixes.
10537 * hpux-core.c: Similarly.
10538 * irix-core.c: Similarly.
10539 * osf-core.c: Similarly.
10540 * sco5-core.c: Similarly.
10541 * binary.c (binary_make_empty_symbol): Remove function, define as
10542 _bfd_generic_make_empty_symbol.
10543 * ihex.c (ihex_make_empty_symbol): Likewise.
10544 * mmo.c (mmo_make_empty_symbol): Likewise.
10545 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10546 * srec.c (srec_make_empty_symbol): Likewise.
10547 * versados.c (versados_make_empty_symbol): Likewise.
10548 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10549 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10550 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10551 rather than _bfd_vms_make_empty_symbol.
10552 * vms-misc.c (new_symbol): Likewise.
10553
3f0a7f7f
AM
105542002-01-05 Alan Modra <amodra@bigpond.net.au>
10555
9e7b37b3
AM
10556 * section.c (bfd_section_init): Remove unnecessary initialisations.
10557 (bfd_section_list_clear): New function.
10558 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10559 (_bfd_strip_section_from_output): Use them.
10560 * coffcode.h (coff_set_alignment_hook): Likewise.
10561 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10562 * elf64-mips.c (mips_elf64_final_link): Likewise.
10563 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10564 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10565 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10566 * bfd-in2.h: Regenerate.
10567
10568 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10569 rather than doing our own section handling. Clean up after errors
10570 with bfd_release and bfd_section_list_clear. Handle unexpected
10571 flags.
10572 * aoutf1.h (sunos4_core_file_p): Likewise.
10573 * aix386-core.c (aix386_core_file_p): Likewise.
10574 * cisco-core.c (cisco_core_file_validate): Likewise.
10575 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10576 * trad-core.c (trad_unix_core_file_p): Likewise.
10577
9b5ecbd0 10578 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10579 with bfd_release and bfd_section_list_clear.
10580 * hpux-core.c (hpux_core_core_file_p): Likewise.
10581 * irix-core.c (irix_core_core_file_p): Likewise.
10582 * lynx-core.c (lynx_core_file_p): Likewise.
10583 * osf-core.c (osf_core_core_file_p): Likewise.
10584 * rs6000-core.c (rs6000coff_core_p): Likewise.
10585 * sco5-core.c (sco5_core_file_p): Likewise.
10586
3f0a7f7f
AM
10587 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10588 sign extension adjustments without conditionals.
10589
a3aa38ee
JJ
105902002-01-04 Jakub Jelinek <jakub@redhat.com>
10591
10592 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10593 CIE at .eh_frame start is removed due to no FDEs referencing it.
10594
8a8b2d4b
AJ
105952002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10596
10597 * config.bfd (x86_64-*-netbsd*): New target.
10598 * configure.in (x86_64-*-netbsd*): Set COREFILE
10599 to netbsd-core.lo.
10600 * configure: Regenerated.
10601
04b5af89
TR
106022002-01-03 Tom Rix <trix@redhat.com>
10603
10604 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10605 for recent bfd_make_section_anyway change.
10606
51c5503b
NC
106072002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10608
10609 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10610 R_ARM_THM_PC11 reloc.
10611
07f7c046
NC
106122002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10613
10614 * configure.in (LINGUAS): Add ja.
10615 * configure: Regenerate.
10616 * po/ja.po: Import from translation project's web site.
10617
5eefb65f
NC
106182002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10619
10620 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10621 messages to ease translation into other languages.
10622
39e90f10 10623For older changes see ChangeLog-0001
56882138
AM
10624\f
10625Local Variables:
10626mode: change-log
10627left-margin: 8
10628fill-column: 74
10629version-control: never
10630End:
This page took 0.663178 seconds and 4 git commands to generate.