Switch to ELF targeted VxWorks targets
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
257e20bc
NC
12003-10-30 Phil Edwards <phil@codesourcery.com>
2
3 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
4 other common ELF triples.
5 (i[3-7]86-*-vxworks): Change to ELF format.
6 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
7 (sh-*-vxworks): New stanza.
8
ddb2b442
AM
92003-10-30 Lars Knoll <lars@trolltech.com>
10 Michael Matz <matz@suse.de>
11 Jakub Jelinek <jakub@redhat.com>
12 Alan Modra <amodra@bigpond.net.au>
13
14 * merge.c (struct sec_merge_sec_info): Update comment.
15 (struct sec_merge_hash_entry): Remove entsize.
16 (sec_merge_hash_lookup): Only adjust alignment when creating.
17 (sec_merge_emit): Remove register keyword.
18 (cmplengthentry, last4_eq, last_eq): Delete.
19 (strrevcmp, strrevcmp_align, is_suffix): New.
20 (merge_strings): Use them to implement fast suffix merging.
21 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
22 Make "len" signed.
23 (_bfd_elf_strtab_add): Lose on >2G strings.
24 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
25 (cmplengthentry, last4_eq): Delete.
26 (strrevcmp, is_suffix): New.
27 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
28
5e681ec4
PB
292003-10-29 Daniel Jacobowitz <drow@mvista.com>
30
31 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
32 SEC_ALLOC.
33
342003-10-29 Philip Blundell <philb@gnu.org>
35
36 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
37 code sequence.
38 (PLT_HEADER_SIZE): New.
39 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
40 (struct elf32_arm_relocs_copied): ... this. Count both
41 pcrel and non-pcrel relocs. All uses updated.
42 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
43 sections and symbol/section mapping cache.
44 (create_got_section): New.
45 (elf32_arm_create_dynamic_sections): New.
46 (elf_backend_create_dynamic_sections): Use it.
47 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
48 (elf32_arm_check_relocs): Likewise.
49 (elf32_arm_adjust_dynamic_symbol): Likewise.
50 (elf32_arm_copy_indirect_symbol): New.
51 (elf32_arm_link_hash_table_create): Initialise new fields.
52 (elf32_arm_gc_sweep_hook): Implement.
53 (elf32_arm_discard_copies): Delete.
54 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
55 (elf32_arm_finish_dynamic_sections): Likewise.
56 (elf_backend_can_refcount): Define.
57 (elf_backend_copy_indirect_symbol): Likewise.
58 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
59
62f3bb11
AM
602003-10-29 Alan Modra <amodra@bigpond.net.au>
61
d37c89e5
AM
62 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
63 (elf_backend_grok_psinfo): Define.
64 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
65
62f3bb11
AM
66 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
67 sections with the same name.
68 (elfcore_grok_lwpstatus): Likewise.
69 (elfcore_grok_win32pstatus): Likewise.
70 (elfcore_grok_note): Likewise.
71 (elfcore_grok_nto_status): Likewise.
72 (elfcore_grok_nto_gregs): Likewise.
73
35a0f415
DJ
742003-10-27 Daniel Jacobowitz <drow@mvista.com>
75
76 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
77 objects.
78
e3d54347
RS
792003-10-14 Richard Sandiford <rsandifo@redhat.com>
80
81 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
82
5e35cbc2
L
832003-10-24 H.J. Lu <hongjiu.lu@intel.com>
84
85 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
86 hash table for real symbols.
87
9c3ed942
MS
882003-10-23 Michael Snyder <msnyder@redhat.com>
89
90 * section.c (asection): Fix typo in comment.
91
0d4792f7
AM
922003-10-23 Alan Modra <amodra@bigpond.net.au>
93
94 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
95 reloc symbol index to it. Don't allow gd syms in shared libs
96 to be optimized.
97 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
98 (ppc64_elf_size_stubs): Likewise.
99 (ppc64_elf_relocate_section): Check that tls relocs are only used
100 with tls syms, and similarly for non-tls. Correct symbol used
101 when optimizing toc tls code.
102
c9ac8978
NC
1032003-10-22 Nick Clifton <nickc@redhat.com>
104
105 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
106 processing an executable.
107
108ba305
JJ
1082003-10-22 Jakub Jelinek <jakub@redhat.com>
109
110 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
111 field changes.
112 (_bfd_elf_link_assign_sym_version): Likewise.
113 * elflink.h (size_dynamic_sections): Likewise.
114
af9ba621
CV
1152003-10-21 Alexandre Oliva <aoliva@redhat.com>,
116 Michael Snyder <msnyder@redhat.com>
117
118 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
119 bfd_mach_sh4a_nofpu): New machine types.
120 * bfd-in2.h: Rebuilt.
121 * cpu-sh.c (compatible): Remove unused function.
122 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
123 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
124 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
125
5a21e886
NC
1262003-10-21 Wouter van Heyst <wouter@vidicode.nl>
127
128 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
129 describing mismatched formats involving the Maverick FP type.
130
b749473b
NC
1312003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
132
133 * binary.c (binary_object_p): Pass machine flag along with
134 architecture.
135
3e602632
NC
1362003-10-21 Thorsten Brehm <brehm@gmx.net>
137
138 * archures.c (bfd_default_scan): Add support for mcf528x.
139 * ieee.c (ieee_write_processor): Likewise.
140
1412003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
62f3bb11 142 Bernardo Innocenti <bernie@develer.com>
3e602632
NC
143
144 * archures.c: Add MCF528x (MCFv4) support.
145 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
146 * bfd-in2.h: Regenerate.
147
198beae2
AC
1482003-10-20 Andrew Cagney <cagney@redhat.com>
149
150 * targets.c: Replace "struct sec" with "struct bfd_section"
151 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
152 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
153 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
154 * aout-tic30.c, aout-target.h:
155 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
62f3bb11 156
4e2147ff
HPN
1572003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
158
f60ebe14
HPN
159 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
160 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
161 (struct _mmix_elf_section_data): New member pjs.
162 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
163 functions.
164 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
165 (mmix_reloc_map): Ditto.
166 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
167 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
168 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
169 unused.
170 (mmix_elf_check_relocs): Move early return to after
171 mmix_elf_check_common_relocs call.
172 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
173 (_bfd_mmix_before_linker_allocation): Rename from
174 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
175 Arrange to set the initial relaxable size of sections.
176 (_bfd_mmix_after_linker_allocation): Rename from
177 _bfd_mmix_finalize_linker_allocated_gregs.
178 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
179 (bfd_elf64_get_section_contents): Define.
180 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
181 * libbfd.h, bfd-in2.h: Regenerate.
182
4e2147ff
HPN
183 * reloc.c (bfd_generic_relax_section): Default-set
184 section->_cooked_size here.
185 (bfd_generic_get_relocated_section_contents): Don't set it here.
186 Explain why.
187
4b71bec0
DA
1882003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
189
190 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
191 output section has been discarded.
192
d4e2de6b 1932003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
62f3bb11 194
d4e2de6b
NC
195 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
196 (h8300_reloc16_extra_cases): Likewise.
197 (h8300_bfd_link_add_symbols): Likewise.
198
1992003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
200
201 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
202 (h8300sn_info_struct): Likewise.
203 (h8300hn_info_struct): Likewise.
204
98a96df7
CF
2052003-10-16 Pavel Roskin <proski@gnu.org>
206
207 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
208 for sections which lack size info.
209
2cefff79
DS
2102003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
211
212 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
213 mingw32.
214
3e0e1ef1
L
2152003-10-16 H.J. Lu <hongjiu.lu@intel.com>
216
217 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
218 undefined patterns with '*'.
219
9da84788
L
2202003-10-16 H.J. Lu <hongjiu.lu@intel.com>
221
222 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
223 use the last CIE from a different section.
224 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
225 size of the output section.
226
ac393995
RM
2272003-10-07 Roland McGrath <roland@redhat.com>
228
229 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
230 new section from p_align header field.
231
7aaa0689
L
2322003-10-16 H.J. Lu <hongjiu.lu@intel.com>
233
234 * elf32-xtensa.c (xtensa_read_table_entries): The external size
235 of entry is 8 bytes.
236
6cee3f79
AC
2372003-10-15 Andrew Cagney <cagney@redhat.com>
238
239 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
240 with NAME##_canonicalize_symtab.
241 * libcoff-in.h (coff_canonicalize_symtab): Update.
242 * xsym.h (bfd_sym_canonicalize_symtab): Update.
243 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
244 * coffgen.c (coff_canonicalize_symtab): Update.
245 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
246 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
247 * ieee.c (ieee_vec): Update comment.
248 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
249 * mmo.c (mmo_canonicalize_symtab): Update.
250 * nlm-target.h (nlm_canonicalize_symtab): Update.
251 * nlmcode.h (nlm_canonicalize_symtab): Update.
252 * i386msdos.c (msdos_canonicalize_symtab): Update.
253 * hp300hpux.c (MY (canonicalize_symtab)): Update.
254 * oasys.c (oasys_canonicalize_symtab): Update.
255 * som.c (som_canonicalize_symtab): Update.
256 * pef.c (bfd_pef_canonicalize_symtab): Update.
257 * nlmcode.h (nlm_canonicalize_symtab): Update.
258 * xsym.c (bfd_sym_canonicalize_symtab): Update.
259 * vms.c (vms_canonicalize_symtab): Update.
260 * versados.c (versados_canonicalize_symtab): Update.
261 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
262 * ieee.c (ieee_canonicalize_symtab): Update.
263 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
264 * reloc.c: Update comment.
265 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
266 * coff64-rs6000.c (aix5coff64_vec): Update.
267 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
268 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
269 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
270 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
271 * hp300hpux.c (MY_canonicalize_symtab): Update.
272 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
273 * aout-tic30.c (MY_canonicalize_symtab): Update.
274 * aout-target.h (MY_canonicalize_symtab): Update.
275 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
276 * elf.c (_bfd_elf_canonicalize_symtab): Update.
277 * elfcode.h (elf_canonicalize_symtab): Update.
278 * ihex.c (ihex_canonicalize_symtab): Update.
279 * tekhex.c (tekhex_canonicalize_symtab): Update.
280 * binary.c (binary_canonicalize_symtab): Update.
281 * srec.c (srec_canonicalize_symtab): Update.
282
6288878d
KH
2832003-10-15 Kazu Hirata <kazu@cs.umass.edu>
284
285 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
286
46e993b9
KK
2872003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
288
289 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
290 relocations.
291 (sh_elf_check_relocs): Likewise.
292
293 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
294 (sh64_elf_merge_symbol_attribute): New.
295 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
296 (sh64_elf64_merge_symbol_attribute): New.
297
9bf7216d
KK
2982003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
299
300 * elf-bfd.h (struct elf_backend_data): New function pointer member
301 elf_backend_merge_symbol_attribute.
302 * elflink.h (elf_link_add_object_symbols): Adjust call to
303 elf_backend_merge_symbol_attribute if the backend defined it.
62f3bb11
AM
304 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
305 (elfNN_bed): Add that to the initializer.
9bf7216d 306
b614a702
BW
3072003-10-14 Bob Wilson <bob.wilson@acm.org>
308
309 * elf32-xtensa.c (get_is_linkonce_section): Delete.
310 (xtensa_is_property_section, xtensa_is_littable_section): Use
311 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
312 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
313 (xtensa_get_property_section_name): Check section name instead of
314 calling get_is_linkonce_section. Remove unused bfd parameter. Use
315 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
316 linkonce section names by appending ".xt.insn" or ".xt.lit".
317 (xtensa_read_table_entries): Remove bfd argument in call to
318 xtensa_get_property_section_name. Free section name when done.
319 (elf_xtensa_combine_prop_entries): Free leaking table.
320
98a8deaf
RS
3212003-10-13 Richard Sandiford <rsandifo@redht.com>
322
323 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
324 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
325 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
326 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
327 that were needed.
328 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
329 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
330
3f7deb8a
L
3312003-10-13 H.J. Lu <hongjiu.lu@intel.com>
332
333 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
334 (bfd_elf64_ia64_after_parse): Likewise.
335 * bfd-in2.h: Regenerated.
336
337 * elfxx-ia64.c (oor_ip): New.
338 (oor_branch_size): Likewise.
339 (bfd_elfNN_ia64_after_parse): Likewise.
340 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
341 equals sizeof (oor_ip).
342
0c72ffe0
KK
3432003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
344
345 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
346 renumbering of some relocation numbers.
347
8d6ad26e
AM
3482003-10-11 Alan Modra <amodra@bigpond.net.au>
349
350 * coff-sh.c: Move definition of MAP and guard more code with
351 COFF_IMAGE_WITH_PE.
a7f49d81
AM
352
353 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 354 * bfd-in2.h: Regenerate.
a7f49d81 355
ede6aaf3
L
3562003-10-10 H.J. Lu <hongjiu.lu@intel.com>
357
358 * Makefile.am: Run "make dep-am".
359 * Makefile.in: Regenerate.
360 * doc/Makefile.in: Likewise.
361
a3aa4448
L
3622003-10-09 H.J. Lu <hongjiu.lu@intel.com>
363
364 * cofflink.c: Include "safe-ctype.h".
365 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
366
9c8ee639
DB
3672003-10-08 Dave Brolley <brolley@redhat.com>
368 On behalf of Michael Snyder <msnyder@redhat.com>
369
370 * archures.c: Add FRV fr550 machine.
371 * cpu-frv.c: Ditto.
372 * elf32-frv.c: Ditto.
373 * bfd-in2.h: Regenerate.
374
6a691779
TS
3752003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
376
377 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
378 for non-SGI N64 ABI. Improve code consitency.
379
b15b52ef
AO
3802003-10-07 Alexandre Oliva <aoliva@redhat.com>
381
382 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
383 rightshift to 2.
384
cd339148
NS
3852003-10-07 Nathan Sidwell <nathan@codesourcery.com>
386
29ca8dc5
NS
387 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
388 parameter.
389 * cofflink.c (coff_link_add_symbols): Deal with split stab
390 sections.
391 * elflink.h (elf_link_add_object_symbols): Deal with split stab
392 sections.
393 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
394 * libbfd.h: Regenerated.
395
cd339148
NS
396 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
397 overflow, set reloc start position to after the count
398 reloc. Subtract one from num relocs. Give error on 0xffff relocs
399 and no overflow.
400 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
401 overflow.
402 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
403 0xffff.
404
10cf14ea
L
4052003-10-06 H.J. Lu <hongjiu.lu@intel.com>
406
407 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
408 last CIE/FDE if needed.
409
afa105f8
NC
4102003-10-06 Nick Clifton <nickc@redhat.com>
411
412 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
413 BFD64 is enabled.
414
85cf2a8a
NC
4152003-10-06 Matt Thomas <matt@3am-software.com>
416
8d6ad26e 417 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 418
4615568e
NC
4192003-10-06 Robert Millan <robertmh@gnu.org>
420
421 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
422 * config.bfd: Likewise.
423 * configure: Regenerate.
424
8b7cf393
CG
4252003-10-04 Christian Groessler <chris@groessler.org>
426
427 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
428 and R_CALLR.
429
0a6a3ebe
SC
4302003-10-04 Stephane Carrez <stcarrez@nerim.fr>
431
432 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
433 * elf32-m68hc11.c: Likewise.
434 * elf32-m68hc12.c: Likewise.
435 * elf32-m68hc1x.h: Likewise.
436
17e58af0
SC
4372003-10-04 Stephane Carrez <stcarrez@nerim.fr>
438
439 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
440 of flags between HC12 and HCS12.
441
27c630ba
NC
4422003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
443
444 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
445 which become empty after merging.
446
1fc0d173
JJ
4472003-09-30 Jakub Jelinek <jakub@redhat.com>
448
449 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
450 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
451
5f74bc13
CD
4522003-09-30 Chris Demetriou <cgd@broadcom.com>
453
454 * archures.c (bfd_mach_mipsisa64r2): New define.
455 * bfd-in2.h: Regenerate.
456 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
457 * cpu-mips.c (I_mipsisa64r2): New enum value.
458 (arch_info_struct): Add entry for I_mipsisa64r2.
459 * elfxx-mips.c (_bfd_elf_mips_mach)
460 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
461 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
462 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
463
b59dd4a5
L
4642003-09-29 H.J. Lu <hongjiu.lu@intel.com>
465
466 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
467 Handle SHN_IA_64_ANSI_COMMON.
468 (elf_backend_section_from_bfd_section): Defined.
469
243ef1e0
L
4702003-09-26 H.J. Lu <hongjiu.lu@intel.com>
471
472 * elflink.c (elf_link_read_relocs_from_section): Add an argument
473 of a pointer to section. Check bad symbol index.
474 (_bfd_elf_link_read_relocs): Modify calls to
475 elf_link_read_relocs_from_section.
476
d38eb334
DD
4772003-09-23 DJ Delorie <dj@redhat.com>
478
479 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
480 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
481 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
482 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
483 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
484 R_SH_PSHA, R_SH_PSHL added.
485 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
486 (sh_elf_relocate_section): Support new relocs.
487
f0578e28
BW
4882003-09-23 Bob Wilson <bob.wilson@acm.org>
489
490 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
491 dynamic relocation offsets.
492
62f3bb11 4932003-09-23 Alan Modra <amodra@bigpond.net.au>
010b84c1
AM
494
495 * simple.c (bfd_simple_get_relocated_section_contents): Free the
496 hash table using _bfd_generic_link_hash_table_free.
497
62f3bb11 4982003-09-23 Alan Modra <amodra@bigpond.net.au>
7dcb9820
AM
499
500 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
501 type of prefix_length and suffix_length to int. Rename "attributes"
502 to "attr". Comment.
503 (_bfd_elf_get_sec_type_attr): Update prototype.
504 * elf.c (get_special_section): Rewrite.
505 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
506 attr and type pointers.
507 (_bfd_elf_new_section_hook): Adjust for above.
508 (special_sections): Merge suffix with prefix. Set
509 prefix_length for all entries. Set suffix_length appropriately.
510 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
511 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
512 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
513 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
514 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
515 * elf32-v850.c (v850_elf_special_sections): Likewise.
516 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
517 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
518 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
519 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
520 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
521 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
522 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
523 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
524
61bcf373
DJ
5252003-09-21 Daniel Jacobowitz <drow@mvista.com>
526
527 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
528 ->got if the section already exists.
529
8bfd78b3
NS
5302003-09-19 Nathan Sidwell <nathan@codesourcery.com>
531
532 * dwarf2.c (decode_line_info): Cope with an initially empty
533 filename table.
534
6726e1ea
L
5352003-09-18 H.J. Lu <hongjiu.lu@intel.com>
536
537 * acinclude.m4: Include ../config/accross.m4.
538 * aclocal.m4: Regenerated.
539
540 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
541 or long long.
542 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
543 (host64): Remove if HOST_64BIT_TYPE is set to long.
544
545 * configure.in (HOST_64BIT_TYPE): Set according to the size of
546 long and long long.
547 (HOST_U_64BIT_TYPE): Likewise.
548 (host64): Likewise.
549 * configure: Regenerated.
550
5de3bf90
AM
5512003-09-19 Alan Modra <amodra@bigpond.net.au>
552
553 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
554 since some ABIs round up the size of the struct.
555
9e4d8df3
L
5562003-09-18 H.J. Lu <hongjiu.lu@intel.com>
557
558 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
559 the old symbol is undefined and the new symbol is defined.
560
228ce064
AS
5612003-09-18 Andreas Schwab <schwab@suse.de>
562
563 * simple.c (bfd_simple_get_relocated_section_contents): Use
564 _bfd_generic_link_hash_table_create instead of
565 bfd_link_hash_table_create.
566
fdbdabdd
L
5672003-09-10 H.J. Lu <hongjiu.lu@intel.com>
568
569 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
570 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
571
a252afa4
DA
5722003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
573 Randolph Chung <randolph@tausq.org>
574
575 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
576 hppa_link_hash_newfunc, hppa_build_one_stub,
577 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
578 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
579 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
580 for generating import stubs for calls to statically linked PIC
581 functions.
582 (hppa_type_of_stub): Don't generate an import stub for calls to
583 statically linked pic functions. Generate import stubs for calls
584 in a shared object, to functions not in a regular file, and to
585 defined weak functions. Add new argument INFO.
586 (hppa_build_one_stub): Don't undef ADDIL_DP.
587 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
588 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
589 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
590 non-shared link. Convert instructions that use the the linkage table
591 pointer, or a facsimile thereof, to use the global data pointer when
592 the reloc has been changed.
593
42acdc7c
JB
5942003-09-08 Joel Brobecker <brobecker@gnat.com>
595
596 * archures.c: Add new machine names for hppa.
597 * bfd-in2.h: Regenerate.
598 * cpu-hppa.c: Use the new machine names.
599
2a0e29b4
SC
6002003-09-06 Stephane Carrez <stcarrez@nerim.fr>
601
602 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
603 all_local_syms member.
604 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
605 to get the local symbols.
606
3f533aa9
SC
6072003-09-06 Stephane Carrez <stcarrez@nerim.fr>
608
609 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
610 (elf_backend_special_sections): Define.a
611
612 PR savannah/4950:
613 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
614 section is read-only.
615
8ad30312
NC
6162003-09-04 Nick Clifton <nickc@redhat.com>
617
618 * archures.c (bfd_mach_v850e1): Define.
619 * bfd-in2.h: Regenerate.
620 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
621 (arch_info_struct): Include an entry for bfd_mach_v850e1.
622 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
623 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
624 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
625 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
626 linked with v850e binaries. Mark the output as v850e.
5de3bf90 627
3922a8c1
NC
6282003-09-03 Nick Clifton <nickc@redhat.com>
629
5de3bf90 630 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
631 symbols that are used in relocs.
632
13dfd2d0
NC
6332003-08-30 Robert Millan <robertmh@gnu.org>
634
635 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
636 * config.bfd: Likewise.
637 * configure: Regenerate.
638
1c0881dd
CG
6392003-08-31 Christian Groessler <chris@groessler.org>
640
641 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
642 instead of returning bfd_reloc_continue.
643
ac0e732e
AJ
6442003-08-31 Andreas Jaeger <aj@suse.de>
645
646 * merge.c: Update to ISO C90.
647
ec317fb1
ILT
6482003-08-27 Ian Lance Taylor <ian@airs.com>
649
49c97a80
ILT
650 * configure.in: Check for strtoull.
651 * bfd.c (bfd_scan_vma): Use strtoull when available.
652 * configure, config.in: Regenerate.
653
ec317fb1
ILT
654 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
655 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
656 __GNUC__ when deciding whether to use long long for
657 BFD_HOST_64_BIT.
658 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
659
d539b3aa
CG
6602003-08-27 Christian Groessler <chris@groessler.org>
661
662 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
663 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
664 functions.
665 (elf32_i860_howto_table): Insert the new functions as
666 'special_function's in the proper reloc type entries.
667
73052b5e
RS
6682003-08-27 Richard Sandiford <rsandifo@redhat.com>
669
670 * elf32-frv.c (elf32_frv_relocate_section): Use
671 _bfd_elf_rela_local_sym.
672
2c848f79
MS
6732003-08-26 Michael Snyder <msnyder@redhat.com>
674
675 * cpu-frv.c: Remove unused enum.
676
980491e6
MR
6772003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
678
679 * reloc.c: Fix documentation for MIPS ELF relocations.
680 libbfd.h: Regenerate.
681 bfd-in2.h: Regenerate.
682
6d1227b8
JE
6832003-08-24 Jason Eckhardt <jle@rice.edu>
684
5de3bf90 685 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 686
f680ea79
JE
6872003-08-24 Jason Eckhardt <jle@rice.edu>
688
689 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
690 shift by 2 before storing the relocated value.
691
c28b1c28
JE
6922003-08-23 Jason Eckhardt <jle@rice.edu>
693
5de3bf90 694 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
695 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
696 LOWn, SPLITn, and BRADDR.
697 (RTYPE2HOWTO): Check that the r_type is within the howto_table
698 before trying to access the entry.
699 (coff_i860_rtype_to_howto): Likewise.
700 (coff_i860_reloc_type_lookup): New function.
701 (i860_reloc_processing): New function.
702 (coff_bfd_reloc_type_lookup): Define macro.
703 (RELOC_PROCESSING): Define macro.
704 Minor formatting adjustments.
705
40a0491a
AM
7062003-08-23 Alan Modra <amodra@bigpond.net.au>
707
708 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
709
69bbc4c0
L
7102003-08-22 H.J. Lu <hongjiu.lu@intel.com>
711
712 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
713 .got section at 8 bytes.
714
8b956130
NC
7152003-08-21 Nick Clifton <nickc@redhat.com>
716
85db1db4 717 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 718
6c21aa76
NC
7192003-08-21 Randolph Chung <tausq@debian.org>
720
721 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
722 can have OSABI=Linux or OSABI=SysV. Check for both.
723 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
724
3673a93e
NC
7252003-08-21 Nick Clifton <nickc@redhat.com>
726
727 * po/sv.po: Updated Swedish translation.
728
427b80f4
RS
7292003-08-20 Richard Sandiford <rsandifo@redhat.com>
730
731 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
732
560e09e9
NC
7332003-08-20 Nick Clifton <nickc@redhat.com>
734
735 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
736 replace some duplicated code in most elfxx-xxxx.c files. This
737 version uses the new fields in bfd_link_info.
738
40a0491a
AM
739 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
740 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
741 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
742 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
743 * elf32-i386.c (elf_i386_relocate_section): Likewise.
744 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
745 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
746 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
747 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
748 * elf32-s390.c (elf_s390_relocate_section): Likewise.
749 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
750 * elf32-vax.c (elf_vax_relocate_section): Likewise.
751 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
752 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
753 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
754 * elf64-s390.c (elf_s390_relocate_section): Likewise.
755 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
756 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
757 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
758
759 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
760 elf_hppa_remark_useless_dynamic_symbols,
761 elf_hppa_relocate_section): Use the new fields in
762 bfd_link_info structure.
763 * elf32-sh.c (sh_elf_relocate_section): Likewise.
764 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
765 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
766 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
767 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
768 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
769
770 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
771 undefined symbols in shared libraries. Remove redundant test
772 of shlib_undefined when reporting references to forced local
773 symbols.
560e09e9 774
4091ea4e
L
7752003-08-18 Andreas Schwab <schwab@suse.de>
776
777 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
778 executables.
779
b0cdc7bc
HPN
7802003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
781
782 * simple.c (bfd_simple_get_relocated_section_contents): Move
783 reloc_done hack to before first bfd_section_size call. Change all
784 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
785
c1993d04
AM
7862003-08-16 Alan Modra <amodra@bigpond.net.au>
787
788 * elf64-ppc.c: Don't include elf/ppc.h.
789
792b4a53
RS
7902003-08-14 Richard Sandiford <rsandifo@redhat.com>
791
792 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
793 code to work with 64-bit bfds.
794
fdc09da8
AM
7952003-08-14 Alan Modra <amodra@bigpond.net.au>
796
797 * dep-in.sed: Remove libintl.h.
798 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
799 (POTFILES.in): Remove target.
800 * Makefile.in: Regenerate.
801
ee87f2da
AM
8022003-08-12 Alan Modra <amodra@bigpond.net.au>
803
804 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
805 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
806 use the function sym from the previous reloc.
807
15f40dfc
JJ
8082003-08-11 Jakub Jelinek <jakub@redhat.com>
809
810 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
811 fatal if -pie.
812 * elf32-s390.c (elf_s390_relocate_section): Likewise.
813 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
814 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
815 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
816 * elf64-s390.c (elf_s390_relocate_section): Likewise.
817 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
818 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
819 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
820 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
821 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
822 on undefined symbols if -pie.
823 * elf32-sh.c (sh_elf_relocate_section): Likewise.
824
6ab189d5
AM
8252003-08-11 Alan Modra <amodra@bigpond.net.au>
826
827 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
828 branch to __libc_start_main.
829
3b260895
NC
8302003-08-08 Dmitry Diky <diwil@mail.ru>
831
6ab189d5
AM
832 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
833 gcc order.
3b260895
NC
834 * cpu-msp430.c: Likewise.
835 * elf32-msp430.c: Likewise.
836 * bfd-in2.h: Regenerate.
837
c39a58e6
AM
8382003-08-07 Alan Modra <amodra@bigpond.net.au>
839
9c5bfbb7
AM
840 * elfxx-target.h: Remove PTR cast.
841 * targets.c (bfd_target): Make backend_data const void *.
842 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
843 * elf-m10300.c: Likewise.
844 * elf.c: Likewise.
845 * elf32-hppa.c: Likewise.
846 * elf32-i386.c: Likewise.
847 * elf32-m68hc1x.c: Likewise.
848 * elf32-ppc.c: Likewise.
849 * elf32-s390.c: Likewise.
850 * elf32-sh.c: Likewise.
851 * elf32-sh64.c: Likewise.
852 * elf32-sparc.c: Likewise.
853 * elf32-xtensa.c: Likewise.
854 * elf64-mips.c: Likewise.
855 * elf64-ppc.c: Likewise.
856 * elf64-s390.c: Likewise.
857 * elf64-sh64.c: Likewise.
858 * elf64-sparc.c: Likewise.
859 * elf64-x86-64.c: Likewise.
860 * elfcode.h: Likewise.
861 * elfcore.h: Likewise.
862 * elflink.c: Likewise.
863 * elflink.h: Likewise.
864 * elfxx-ia64.c: Likewise.
865 * elfxx-mips.c: Likewise.
866 * elfxx-mips.h: Likewise.
867 * elf.c (prep_headers): Remove useless check for null backend_data.
868 * bfd-in2.h: Regenerate.
869
c39a58e6
AM
870 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
871 (NAME): Use ## rather than CONCAT4 macro.
872 * elfcode.h: Remove one remaining PARAMS macro.
873 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
874 * elf-strtab.c: Likewise.
875 * elf-hppa.h: Likewise.
876 * elf32-hppa.h: Likewise.
877 * elf32-hppa.c: Likewise.
878 (elf32_hppa_add_symbol_hook): Delete.
879 (elf_backend_add_symbol_hook): Don't define.
880 * libhppa.h: Convert to C90. Replace INLINE with inline.
881
97b639ba
AM
8822003-08-06 Alan Modra <amodra@bigpond.net.au>
883
884 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
885 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
886 function descriptors, but warn.
887 (ppc_build_one_stub): Remove a couple of vars. Move code creating
888 stub syms so that we can avoid a stub sym if we already have a
889 plt sym. Do not redefine an existing symbol.
890 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
891 glink.
892
9e7d479d
NC
8932003-08-06 Nick Clifton <nickc@redhat.com>
894
895 * po/fr.po: Updated French translation.
896
77f3d027
AM
8972003-08-06 Alan Modra <amodra@bigpond.net.au>
898
899 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
900 SEC_LINKER_CREATED.
901
50d6c878
DJ
9022003-08-05 Daniel Jacobowitz <drow@mvista.com>
903
904 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
905 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
906
14abcef9
NC
9072003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
908
4a21a492 909 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
910 message if the line number table could not be read.
911
8c675694
NC
9122003-08-04 Nick Clifton <nickc@redhat.com>
913
914 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
915 to messages produced for .gnu.warning.SYMBOL sections.
916
268b6b39
AM
9172003-08-04 Alan Modra <amodra@bigpond.net.au>
918
919 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
920 * elfcore.h: Likewise.
921 * elflink.c: Likewise.
922 * elflink.h: Likewise.
923 * elf.c (sym_is_global): Remove INLINE.
924 (align_file_position): Replace INLINE with inline.
925 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
926 (elf_file_p): Replace INLINE with inline.
927
866f48b7
KK
9282003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
929
930 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
931
8651fcf9
L
9322003-08-01 H.J. Lu <hongjiu.lu@intel.com>
933
934 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
935
37cd2629
L
9362003-08-01 H.J. Lu <hongjiu.lu@intel.com>
937
938 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
939 ElfNN_External_Rela instead of Elf64_External_Rela.
940
91fb2a9d
NC
9412003-08-01 Nick Clifton <nickc@redhat.com>
942
943 * config.bfd: Add code to catch obsolete configurations and warn
944 about them unless --enable-obsolete is used. Use this to mark
945 vax-vms port as obsolete.
946
e656e369
AM
9472003-07-30 Alan Modra <amodra@bigpond.net.au>
948
949 * elf32-ppc.c (ppc_elf_install_value): Tidy.
950 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
951 Formatting.
952 * elfxx-target.h: Remove PARAMS macro. Formatting.
953
50bc7936
AM
9542003-07-30 Alan Modra <amodra@bigpond.net.au>
955
956 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
957 * elf64-ppc.c (get_fdh): New function, split out from
958 ppc64_elf_edit_opd.
959 (ppc64_elf_check_relocs): Use get_fdh.
960 (func_desc_adjust): Likewise. Tidy.
961 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
962 exit. Use get_fdh. Account for superfluous dynamic relocs.
963 (ppc64_elf_relocate_section): Warning fix.
964
a62d170c
JE
9652003-07-30 Jason Eckhardt <jle@rice.edu>
966
967 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
968
7734b6e9
JE
9692003-07-30 Jason Eckhardt <jle@rice.edu>
970
971 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
972
37f4508b
AM
9732003-07-30 Randolph Chung <tausq@debian.org>
974
975 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
976 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
977
217aa764
AM
9782003-07-30 Alan Modra <amodra@bigpond.net.au>
979
980 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
981 Replace PTR with void *. Formatting.
982 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
983 (make_mapping): Likewise.
984
494dac0c
AM
9852003-07-29 Alan Modra <amodra@bigpond.net.au>
986
987 * elf64-ppc.c (func_desc_adjust): Give linker created function
988 descriptor symbols a size and type.
989 (ppc64_elf_relocate_section): Correct lq insn test.
990
deaaf2f3
EC
9912003-07-28 Eric Christopher <echristo@redhat.com>
992
993 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
994 (ppc_elf_install_value): New function.
995 (ppc_elf_sort_rela): Remove.
996 (ppc_elf_relax_section): Rewrite. Remove old relaxation
997 and replace with out of range branch stubs.
998 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
999
709e685d
AO
10002003-07-29 Alexandre Oliva <aoliva@redhat.com>
1001
1002 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1003 from input_bfd.
1004
36c506c5
AM
10052003-07-28 Alan Modra <amodra@bigpond.net.au>
1006
1007 * elf.c (special_sections): Set attributes for .got and .plt.
1008
5d35169e
AM
10092003-07-27 Alan Modra <amodra@bigpond.net.au>
1010
1011 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1012 on function descriptors.
1013 (ELIMINATE_COPY_RELOCS): Expand comment.
1014 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1015 Do include ".toc1".
1016
3cddba1e
L
10172003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1018
1019 * elf.c (_bfd_elf_new_section_hook): Set the default section
1020 type to SHT_NULL.
1021 (elf_fake_sections): Set the section type based on asect->flags
1022 if it is SHT_NULL. Don't abort on processor specific section
1023 types.
1024
d622ef4b
L
10252003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1026
1027 * bfd-in2.h: Regenerated.
1028
2f89ff8d
L
10292003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1030
1031 * elf-bfd.h (bfd_elf_special_section): New.
1032 (elf_backend_data): Add special_sections, a pointer to
1033 bfd_elf_special_section.
1034 (elf_section_type). New.
1035 (elf_section_flags): New.
1036 (_bfd_elf_get_sec_type_attr): New.
1037
1038 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1039 real section type/flags.
1040 (special_sections): New.
1041 (get_special_section): New.
1042 (_bfd_elf_get_sec_type_attr): New.
1043 (_bfd_elf_new_section_hook): Check special_section to set
1044 elf_section_type and elf_section_flags.
1045 (elf_fake_sections): Don't use section name to set ELF section
1046 data.
1047
1048 * elf32-m32r.c (m32r_elf_special_sections): New.
1049 (elf_backend_special_sections): Defined.
1050
1051 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1052 (elf_backend_special_sections): Defined.
1053
1054 * elf32-mcore.c (mcore_elf_special_sections): New.
1055 (elf_backend_special_sections): Defined.
1056
1057 * elf32-ppc.c (ppc_elf_special_sections): New.
1058 (elf_backend_special_sections): Defined.
1059
1060 * elf32-sh64.c (sh64_elf_special_sections): New.
1061 (elf_backend_special_sections): Defined.
1062
1063 * elf32-v850.c (v850_elf_special_sections): New.
1064 (elf_backend_special_sections): Defined.
1065
1066 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1067 (elf_backend_special_sections): Defined.
1068
1069 * elf64-alpha.c (elf64_alpha_special_sections): New.
1070 (elf_backend_special_sections): Defined.
1071
1072 * elf64-hppa.c (elf64_hppa_special_sections): New.
1073 (elf_backend_special_sections): Defined.
1074
1075 * elf64-ppc.c (ppc64_elf_special_sections): New.
1076 (elf_backend_special_sections): Defined.
1077
1078 * elf64-sh64.c (sh64_elf64_special_sections): New.
1079 (elf_backend_special_sections): Defined.
1080
1081 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1082 (elf_backend_special_sections): Defined.
1083
1084 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1085
1086 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1087 (elf_backend_special_sections): Defined.
1088
1089 * elfxx-target.h (elf_backend_special_sections): New. Default
1090 to NULL.
1091 (elfNN_bed): Initialize special_sections.
1092
1093 * section.c (bfd_abs_section): Remove const.
1094 (bfd_und_section): Likewise.
1095 (bfd_com_section): Likewise.
1096 (bfd_ind_section): Likewise.
1097
20650579
NC
10982003-07-24 Nick Clifton <nickc@redhat.com>
1099
1100 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1101 sections are assigned the LOAD attribute.
1102
deaaf2f3 11032003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
1104
1105 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1106 * elf32-sh64-com.c: Likewise.
1107 * elf32-sh64.c: Likewise.
1108 * elf32-sh64.h: Likewise.
1109 * elf64-sh64.c: Likewise.
1110
3d85aebe
KK
11112003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1112
1113 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1114 (allocate_dynrelocs): Likewise.
1115 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1116 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1117
834d807b
NC
11182003-07-24 Nick Clifton <nickc@redhat.com>
1119
1120 * po/fr.po: Updated French translation.
1121
571b5725
BW
11222003-07-23 Bob Wilson <bob.wilson@acm.org>
1123
1124 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1125 near the beginning of the file. Swap order of arguments. Call
1126 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1127 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1128 (elf_xtensa_relocate_section): Likewise.
1129 (shrink_dynamic_reloc_sections): Likewise.
1130
b536dc1e
BW
11312003-07-23 Bob Wilson <bob.wilson@acm.org>
1132
1133 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1134 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1135 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1136 first printing an error message.
1137 (elf_xtensa_finish_dynamic_sections): Likewise.
1138 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1139 discarding literal table entries.
1140 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1141 (elf_xtensa_do_asm_simplify): Likewise.
1142
7f888330
SC
11432003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1144
1145 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1146 we have a local symbol in common section.
1147
ecc27c31
L
11482003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1149
1150 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1151 weak symbols.
1152
f9f3cf65
NC
11532003-07-22 Nick Clifton <nickc@redhat.com>
1154
1155 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1156 expected RS6000 storage classes.
1157
bb32e54f
L
11582003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1159
1160 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1161 output_bfd unused to silence gcc.
1162
796f2a93
NC
11632003-07-21 Nick Clifton <nickc@redhat.com>
1164
1165 * po/sv.po: Updated Swedish translation.
1166
f6c52c13
AM
11672003-07-21 Alan Modra <amodra@bigpond.net.au>
1168
1169 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1170 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1171 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1172 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1173 now done in _bfd_elf_symbol_refs_local_p.
1174 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1175 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1176 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1177
aa37626c
L
11782003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1179
1180 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1181
1e364ec9
L
11822003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1183
1184 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1185 (SYMBOL_CALLS_LOCAL): Likewise.
1186
1187 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1188 immediately if symbol isn't defined locally.
1189
986a241f
RH
11902003-07-18 Richard Henderson <rth@redhat.com>
1191
1192 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1193 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1194 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1195 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1196 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1197 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1198 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1199 Update all callers to provide the relocation being resolved.
1200
ac4b3dd8
NC
12012003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1202
1203 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1204 targ_cflags.
1205
6c37ac4d
NC
12062003-07-17 Nick Clifton <nickc@redhat.com>
1207
1208 * po/es.po: New Spanish translation.
1209 * po/sv.po: New Swedish translation.
1210 * po/opcodes.pot: Regenerate.
1211
02e6ad56
RH
12122003-07-16 Richard Henderson <rth@redhat.com>
1213
1214 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1215 * elfxx-ia64.c, targets.c: Likewise.
1216
5686517c
RH
12172003-07-16 Richard Henderson <rth@redhat.com>
1218
1219 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1220 for symbols defined locally plus -Bsymbolic. Tidy logic.
1221
5a7ea749
RS
12222003-07-15 Richard Sandiford <rsandifo@redhat.com>
1223
1224 * archures.c (bfd_mach_mips7000): New.
1225 * bfd-in2.h: Regenerated.
1226 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1227 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1228 (mips_mach_extensions): Add an entry for it.
1229
76bff705
NC
12302003-07-14 Nick Clifton <nickc@redhat.com>
1231
1232 * po/tr.po: Update with latest version.
1233 * po/SRC-POTFILES.in: Regenerate.
1234 * po/bfd.pot: Regenerate.
1235 * Makfile.in: Regenerate.
1236 * configure: Regenerate.
1237
d0facd1b
NC
12382003-07-12 Jeff Baker <jbaker@qnx.com>
1239
1240 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1241 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1242 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1243 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1244
bcb9b88d
NC
12452003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1246
1247 * coffcode.h (coff_set_section_contents): Set the
1248 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1249
7a9823f1
RS
12502003-07-11 Richard Sandiford <rsandifo@redhat.com>
1251
1252 * bfd-in.h (bfd_h8300_pad_address): Declare.
1253 * bfd-in2.h: Regenerate.
1254 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1255 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1256 addresses before checking whether they can be relaxed.
1257 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1258 Don't complain about overflows in general 8-bit relocations.
1259 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1260 Fix handling of R_H8_DIR24A8.
1261
c6baf75e
RS
12622003-07-11 Richard Sandiford <rsandifo@redhat.com>
1263
1264 * elf32-h8300.c: Convert function prototypes and definitions
1265 to C90 syntax.
1266 * coff-h8300.c: Likewise.
1267 * cpu-h8300.c: Likewise.
1268
fce00800
AM
12692003-07-11 Alan Modra <amodra@bigpond.net.au>
1270
1271 * po/SRC-POTFILES.in: Regenerate.
1272 * po/bfd.pot: Likewise.
1273
e901de89
BW
12742003-07-10 Bob Wilson <bob.wilson@acm.org>
1275
1276 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1277 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1278 .xt.lit.plt section.
1279 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1280 and allocate memory for it.
1281 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1282 section to the .got.loc section.
1283 (elf_xtensa_finish_dynamic_sections): Fix up call to
1284 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1285 the address of .got.loc.
1286 (relax_property_section): Shrink .got.loc to match changes in any
1287 literal table section.
1288 (xtensa_is_property_section): Change to match
1289 xtensa_get_property_section_name.
1290 (xtensa_is_littable_section): New.
1291
eff26f78
L
12922003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1293
1294 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1295 -1LL.
1296
942e0f42
AM
12972003-07-10 Alan Modra <amodra@bigpond.net.au>
1298
1299 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1300 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1301 Run "make dep-am".
1302 * Makefile.in: Regenerate.
1303
73c3cd1c
AO
13042003-07-10 Alexandre Oliva <aoliva@redhat.com>
1305
1306 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1307 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1308 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1309 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1310 * elf32-am33lin.c: Rename global functions.
1311 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1312 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1313 * configure.in (bfd_elf32_am33lin_vec): Added.
1314 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1315 (elf32-am33lin.lo): List dependencies.
1316 * aclocal.m4, configure, Makefile.in: Rebuilt.
1317 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1318 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1319 ELF_ARCH was not defined before.
1320 (elf_symbol_leading_char): Define if not defined.
1321 * elf32-am33lin.c: Override the definitions above.
1322 * targets.c (bfd_elf32_am33lin_vec): New.
1323
03a12831
AO
13242003-07-09 Alexandre Oliva <aoliva@redhat.com>
1325
1326 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1327 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1328 pcrel_relocs_copied.
1329 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1330 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1331 ld-linux.so.2 to ld.so.1.
1332 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1333 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1334 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1335 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1336 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1337 .rela.* section contents with bfd_zalloc.
1338 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1339 * elf-m10300.c: Added declarations for functions missing them.
1340 Merge some shared-library changes from the i386 back-end. Use
1341 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1342 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1343 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1344 members of elf_link_hash_entry. Adjusted references.
1345 (mn10300_elf_final_link_relocate): dynobj was already loaded
1346 into a local variable, use it.
1347 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1348 * elf-m10300.c: Add missing function prototypes.
1349 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1350 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1351 relocation for dynamic relocations.
1352 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1353 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1354 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1355 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1356 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1357 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1358 adress is already known at the time we compute relaxations.
1359 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1360 and PLT32 to narrower relocations.
1361 * libbfd.h, bfd-in2.h: Rebuilt.
1362 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1363 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1364 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1365 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1366 BFD_RELOC_MN10300_RELATIVE): New relocs.
1367 * libbfd.h, bfd-in2.h: Rebuilt.
1368 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1369 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1370 fields.
1371 (elf_mn10300_howto): Defined new relocation types.
1372 (mn10300_reloc_map): Map them.
1373 (_bfd_mn10300_elf_create_got_section): New fn.
1374 (mn10300_elf_check_relocs): Handle PIC relocs.
1375 (mn10300_elf_final_link_relocate): Likewise.
1376 (mn10300_elf_relocate_section): Handle DSOs.
1377 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1378 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1379 elf_mn10300_pic_plt_entry): New.
1380 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1381 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1382 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1383 elf_mn10300_plt_reloc_offset: New macros.
1384 (ELF_DYNAMIC_INTERPRETER): Likewise.
1385 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1386 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1387 (_bfd_mn10300_elf_discard_copies): Likewise.
1388 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1389 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1390 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1391 (elf_backend_can_gc_sections,
1392 elf_backend_create_dynamic_sections,
1393 elf_backend_adjust_dynamic_sections,
1394 elf_backend_size_dynamic_sections,
1395 elf_backend_finish_dynamic_symbol,
1396 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1397 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1398 elf_backend_got_header_size, elf_backend_plt_header_size): New
1399 macros.
1400
b08fa4d3
AO
14012003-07-09 Alexandre Oliva <aoliva@redhat.com>
1402
1403 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1404 * elf-m10300.c (compute_function_info): Account for AM33
1405 registers in `movm' when computing stack space for `call' when
1406 linking for AM33/2.0 link.
1407 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1408 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1409 * bfd-in2.h: Rebuilt.
1410 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1411 * elf-m10300.c: Updated.
1412 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1413 * archures.c (bfd_mach_am332): Defined.
1414 * bfd-in2.h: Rebuilt.
1415 * cpu-m10300.c (bfd_am332_arch): Defined.
1416 (bfd_am33_arch): Chained with am33-2.
1417 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1418 (_bfd_mn10300_elf_final_write_processing): Likewise.
1419
201933ea
L
14202003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1421
1422 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1423
e717da7e
AM
14242003-07-10 Alan Modra <amodra@bigpond.net.au>
1425
1426 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1427 (struct ppc64_elf_obj_tdata): New.
1428 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1429 (ppc64_elf_mkobject): New function.
1430 (struct got_entry): Add "owner". Move "tls_type".
1431 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1432 (ppc64_elf_init_stub_bfd): New function.
1433 (create_got_section): Create header .got in dynobj. Create .got
1434 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1435 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1436 Look for dynobj .got, and test it.
1437 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1438 (update_local_sym_info): Likewise.
1439 (ppc64_elf_check_relocs): Likewise.
1440 (ppc64_elf_gc_sweep_hook): Likewise.
1441 (ppc64_elf_tls_optimize): Likewise.
1442 (allocate_dynrelocs): Likewise.
1443 (ppc64_elf_size_dynamic_sections): Likewise.
1444 (ppc64_elf_relocate_section): Likewise.
1445 (ppc64_elf_next_toc_section): Update comment.
1446 (toc_adjusting_stub_needed): Remove unneeded cast.
1447 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1448 testing section flags.
1449 (ppc64_elf_build_stubs): Likewise.
1450 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1451 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1452 (func_desc_adjust): Copy over dynamic info for undef weaks.
1453 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1454 (ppc64_elf_size_stubs): Update prototype.
1455 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1456 input sections rather than scanning dynobj.
1457
18ad015f
RS
14582003-07-09 Richard Sandiford <rsandifo@redhat.com>
1459
1460 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1461 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1462 (mips_elf_create_msym_section): Delete.
1463 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1464 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1465 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1466 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1467 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1468 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1469 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1470
e10609d3
RS
14712003-07-09 Richard Sandiford <rsandifo@redhat.com>
1472
1473 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1474 symbols protected.
1475
0d591ff7
RS
14762003-07-09 Richard Sandiford <rsandifo@redhat.com>
1477
1478 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1479 of relocations whose offset is -2.
1480
fdd07405
RS
14812003-07-09 Richard Sandiford <rsandifo@redhat.com>
1482
1483 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1484 forced-local symbols like other locals. Don't create relocations
1485 against STN_UNDEF in irix objects.
1486
d2fba50d
RS
14872003-07-09 Richard Sandiford <rsandifo@redhat.com>
1488
1489 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1490 compatible objects, add the values of defined external symbols
1491 to the addend.
1492
6eaa6adc
RS
14932003-07-09 Richard Sandiford <rsandifo@redhat.com>
1494
1495 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1496 initialize a GOT entry to the symbol's st_value.
1497
0c83546a
AM
14982003-07-08 Alan Modra <amodra@bigpond.net.au>
1499
43c40ab2
AM
1500 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1501 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1502 (ppc_elf_tdata): Define.
1503 (elf_local_ptr_offsets): Adjust.
1504 (ppc_elf_mkobject): New function.
1505 (bfd_elf32_mkobject): Define.
1506
0c83546a
AM
1507 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1508 * elfcore.h (elf_core_file_p): Likewise.
1509 * section.c (bfd_section_init): Remove prototype.
1510
58111eb7
AM
15112003-07-08 Alan Modra <amodra@bigpond.net.au>
1512
1513 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1514 field.
1515 (enum elf_linker_section_enum): Delete.
1516 (struct elf_linker_section): Delete.
1517 (struct elf_linker_section_pointers): Delete.
1518 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1519 Make linker_section_pointers a void**.
1520 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1521 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1522 of old item in elf-bfd.h.
1523 (struct elf_linker_section): Likewise.
1524 (struct elf_linker_section_pointers): Likewise.
1525 (elf_local_ptr_offsets): Define.
1526 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1527 (ppc_elf_link_hash_newfunc): Init it.
1528 (struct ppc_elf_link_hash_table): Add sbss.
1529 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1530 individual fields.
1531 (elf_create_linker_section): Fold into..
1532 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1533 Make rela section here if shared.
1534 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1535 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1536 clearing in a loop.
1537 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1538 section here.
1539 (ppc_elf_check_relocs): Adjust.
1540 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1541 creating .sbss by hand.
1542 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1543
15f8604d
JJ
15442003-07-04 Jakub Jelinek <jakub@redhat.com>
1545
1546 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1547 complain_overflow_bitfield.
1548 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1549 complain_overflow_bitfield.
1550
3368a7fb
JJ
15512003-07-04 Jakub Jelinek <jakub@redhat.com>
1552
1553 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1554 true even if -pie.
1555
9203ba99
JJ
15562003-07-04 Jakub Jelinek <jakub@redhat.com>
1557
1558 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1559 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1560 !info->executable.
1561 (get_fptr): For -pie create .opd as writable section and create
1562 .rela.opd as well.
1563 (elfNN_ia64_check_relocs): Change info->shared into
1564 !info->executable.
1565 (allocate_fptr): Likewise.
1566 (allocate_dynrel_entries): Account for a relative reloc for -pie
1567 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1568 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1569 section if -pie.
1570 (set_got_entry): Don't create a relative reloc if -pie
1571 want_ltoff_fptr for undefweak symbol.
1572 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1573 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1574 @fptr().
1575
1576 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1577 even if -pie.
1578 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1579 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1580 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1581 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1582 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1583 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1584 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1585 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1586 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1587
e0a868d1 15882003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1589
1590 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1591 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1592 <R_H8_DIR32A16>: Fix type of relocation.
1593
35cad4c4
KK
15942003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1595
1596 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1597 sections were created already. Remove unnecessary tests of
1598 the previous change.
1599
03151a5a
KK
16002003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1601
1602 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1603 bfd_make_section for existing sections.
1604
003d627e
AM
16052003-07-04 Alan Modra <amodra@bigpond.net.au>
1606
2293c499
AM
1607 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1608 create_got_section if we already have done so.
1609 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1610 (sh_elf_check_relocs): Likewise.
1611 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1612 htab->root.dynobj instead.
1613 (sh_elf_check_relocs): Likewise.
1614 (sh_elf_finish_dynamic_sections): Likewise.
1615
003d627e
AM
1616 * section.c (bfd_make_section): Return NULL for existing section.
1617
fa681e5d
AM
16182003-07-04 Alan Modra <amodra@bigpond.net.au>
1619
1620 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1621 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1622
1623 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1624 (_bfd_elf_find_pointer_linker_section): Likewise.
1625 (bfd_elf32_create_pointer_linker_section): Likewise.
1626 (bfd_elf32_finish_pointer_linker_section): Likewise.
1627 (bfd_elf64_create_pointer_linker_section): Likewise.
1628 (bfd_elf64_finish_pointer_linker_section): Likewise.
1629 (_bfd_elf_make_linker_section_rela): Likewise.
1630 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1631 (elf_finish_pointer_linker_section): Likewise.
1632 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1633 (_bfd_elf_create_linker_section): Move this function..
1634 (_bfd_elf_find_pointer_linker_section): ..and this..
1635 * elflink.h (elf_create_pointer_linker_section): ..and this..
1636 (elf_finish_pointer_linker_section): ..and this..
1637 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1638 calls.
1639 (elf_create_linker_section): Convert to C90, tidy.
1640 (elf_find_pointer_linker_section): Likewise.
1641 (elf_create_pointer_linker_section): Likewise.
1642 (elf_finish_pointer_linker_section): Likewise.
1643 * elf32-i370.c: Delete #if 0 code.
1644
772119ce
AM
16452003-07-02 Alan Modra <amodra@bigpond.net.au>
1646
1647 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1648 _restf* to be satisfied by shared libs, and always force them local.
1649 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1650 Correct test for "bl".
1651 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1652 primary opcode 31.
1653
bd1ea41b
MS
16542003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1655
1656 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1657 (s390_tls_reloc): New function.
1658 (elf_howto_table): Add long displacement relocations R_390_20,
1659 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1660 (elf_s390_reloc_type_lookup): Likewise.
1661 (elf_s390_check_relocs): Likewise.
1662 (elf_s390_gc_sweep_hook): Likewise.
1663 (elf_s390_relocate_section): Likewise.
1664 * elf64-s390.c: Same changes as for elf32-s390.c.
1665 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1666 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1667 BFD_RELOC_390_TLS_GOTIE20.
1668 * bfd-in2.h: Regenerate.
1669 * libbfd.h: Likewise.
1670
113202d6
AM
16712003-06-30 Alan Modra <amodra@bigpond.net.au>
1672
1673 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1674 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1675
c58b9523
AM
16762003-06-29 Alan Modra <amodra@bigpond.net.au>
1677
1678 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1679 Replace PTR with void *. Formatting.
1680 * archive64.c: Likewise.
1681 * archures.c: Likewise.
1682 * bfd-in.h: Likewise.
1683 * bfd.c: Likewise.
1684 * bfdio.c: Likewise.
1685 * bfdwin.c: Likewise.
1686 * cache.c: Likewise.
1687 * corefile.c: Likewise.
1688 * format.c: Likewise.
1689 * init.c: Likewise.
1690 * libbfd-in.h: Likewise.
1691 * libbfd.c: Likewise.
1692 * linker.c: Likewise.
1693 * opncls.c: Likewise.
1694 * reloc.c: Likewise.
1695 * section.c: Likewise.
1696 * simple.c: Likewise.
1697 * syms.c: Likewise.
1698 * targets.c: Likewise.
1699 * bfd-in2.h: Regenerate.
1700 * libbfd.h: Regenerate.
1701
1702 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
1703 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
1704 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
1705 (bfd_getb64): Rewrite without parens.
1706 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
1707 * cache.c (insert, snip): Remove INLINE.
1708 * linker.c (bfd_link_add_undef): Likewise.
1709
27482721
AJ
17102003-06-29 Andreas Jaeger <aj@suse.de>
1711
1712 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
1713 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
1714 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
1715 trim plt entries. Move undefweak non-default visibility test ...
1716 (allocate_dynrelocs): ... from here.
1717 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1718 Change all callers.
1719 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
1720 SYMBOL_REFERENCES_LOCAL for dynreloc check.
1721 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
1722 dynreloc and .got relocs.
1723 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
1724 for .got relocs.
27482721 1725
2b86c02e
TS
17262003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1727
1728 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
1729
e7c81c25
NC
17302003-06-27 Nick Clifton <nickc@redhat.com>
1731
1732 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
1733 bfd_add_gnu_debuglink_section and only create the section, do not
1734 fill in its contents.
1735 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
1736 contents of a .gnu-debuglink section.
1737 * bfd-in2.h: Regenerate.
1738
72b4917c
TS
17392003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1740
1741 * elfxx-mips.c: Revert .got alignment to 2**4.
1742
91709090
TS
17432003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1744
1745 * elf32-mips.c: Fix addend for _gp_disp special symbol.
1746
7a79a000
TS
17472003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1748
1749 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
1750 relocation header setup.
1751
e47cd125
AM
17522003-06-25 Alan Modra <amodra@bigpond.net.au>
1753
1754 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
1755 (ppc_elf_reloc_type_lookup): Modify comment.
1756 (ppc_elf_info_to_howto): Ditto.
1757 (ppc_elf_relocate_section): Ditto.
1758 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
1759
1049f94e
AM
17602003-06-25 Alan Modra <amodra@bigpond.net.au>
1761
1762 * aout-ns32k.c: Correct spelling of "relocatable".
1763 * aoutx.h: Likewise.
1764 * bfd-in.h: Likewise.
1765 * bfd.c: Likewise.
1766 * bout.c: Likewise.
1767 * coff-a29k.c: Likewise.
1768 * coff-alpha.c: Likewise.
1769 * coff-arm.c: Likewise.
1770 * coff-i386.c: Likewise.
1771 * coff-i860.c: Likewise.
1772 * coff-i960.c: Likewise.
1773 * coff-m68k.c: Likewise.
1774 * coff-m88k.c: Likewise.
1775 * coff-mcore.c: Likewise.
1776 * coff-mips.c: Likewise.
1777 * coff-or32.c: Likewise.
1778 * coff-ppc.c: Likewise.
1779 * coff-rs6000.c: Likewise.
1780 * coff-sh.c: Likewise.
1781 * coff-tic80.c: Likewise.
1782 * coff64-rs6000.c: Likewise.
1783 * cofflink.c: Likewise.
1784 * cpu-ns32k.c: Likewise.
1785 * ecoff.c: Likewise.
1786 * ecofflink.c: Likewise.
1787 * elf-bfd.h: Likewise.
1788 * elf-eh-frame.c: Likewise.
1789 * elf-hppa.h: Likewise.
1790 * elf-m10200.c: Likewise.
1791 * elf-m10300.c: Likewise.
1792 * elf.c: Likewise.
1793 * elf32-arm.h: Likewise.
1794 * elf32-avr.c: Likewise.
1795 * elf32-cris.c: Likewise.
1796 * elf32-d10v.c: Likewise.
1797 * elf32-dlx.c: Likewise.
1798 * elf32-fr30.c: Likewise.
1799 * elf32-frv.c: Likewise.
1800 * elf32-h8300.c: Likewise.
1801 * elf32-hppa.c: Likewise.
1802 * elf32-i370.c: Likewise.
1803 * elf32-i386.c: Likewise.
1804 * elf32-i860.c: Likewise.
1805 * elf32-i960.c: Likewise.
1806 * elf32-ip2k.c: Likewise.
1807 * elf32-iq2000.c: Likewise.
1808 * elf32-m32r.c: Likewise.
1809 * elf32-m68hc11.c: Likewise.
1810 * elf32-m68hc1x.c: Likewise.
1811 * elf32-m68k.c: Likewise.
1812 * elf32-mcore.c: Likewise.
1813 * elf32-mips.c: Likewise.
1814 * elf32-msp430.c: Likewise.
1815 * elf32-openrisc.c: Likewise.
1816 * elf32-ppc.c: Likewise.
1817 * elf32-s390.c: Likewise.
1818 * elf32-sh.c: Likewise.
1819 * elf32-sh64.c: Likewise.
1820 * elf32-sparc.c: Likewise.
1821 * elf32-v850.c: Likewise.
1822 * elf32-vax.c: Likewise.
1823 * elf32-xstormy16.c: Likewise.
1824 * elf32-xtensa.c: Likewise.
1825 * elf64-alpha.c: Likewise.
1826 * elf64-hppa.c: Likewise.
1827 * elf64-mips.c: Likewise.
1828 * elf64-mmix.c: Likewise.
1829 * elf64-ppc.c: Likewise.
1830 * elf64-s390.c: Likewise.
1831 * elf64-sh64.c: Likewise.
1832 * elf64-sparc.c: Likewise.
1833 * elf64-x86-64.c: Likewise.
1834 * elfcode.h: Likewise.
1835 * elflink.h: Likewise.
1836 * elfn32-mips.c: Likewise.
1837 * elfxx-ia64.c: Likewise.
1838 * elfxx-mips.c: Likewise.
1839 * i386linux.c: Likewise.
1840 * ieee.c: Likewise.
1841 * libcoff-in.h: Likewise.
1842 * linker.c: Likewise.
1843 * m68klinux.c: Likewise.
1844 * pdp11.c: Likewise.
1845 * pe-mips.c: Likewise.
1846 * peXXigen.c: Likewise.
1847 * reloc.c: Likewise.
1848 * reloc16.c: Likewise.
1849 * sparclinux.c: Likewise.
1850 * sunos.c: Likewise.
1851 * syms.c: Likewise.
1852 * versados.c: Likewise.
1853 * vms.c: Likewise.
1854 * xcofflink.c: Likewise.
1855 * bfd-in2.h: Regenerate.
1856 * libcoff.h: Regenerate.
1857 * libbfd.h: Regenerate.
1858
55fd94b0
AM
18592003-06-24 Alan Modra <amodra@bigpond.net.au>
1860
d85f2c7d
AM
1861 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1862 local sym errors.
1863
55fd94b0
AM
1864 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1865 prototypes and casts. Replace PTR with void *. Formatting.
1866 * elf32-ppc.c: Likewise. Break long strings too.
1867 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1868 (ppc_elf_unhandled_reloc): Internationalize error message.
1869 * elf32-ppc.h: Remove PARAMS.
1870
88810f8c
MM
18712003-06-23 Mark Mitchell <mark@codesourcery.com>
1872
1873 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1874 APUinfo slots.
1875 (ppc_elf_final_write_processing): Likewise.
1876
6e35c4da
L
18772003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1878
1879 * elflink.h (elf_link_input_bfd): Check raw size when using
1880 kept_section to preserve debug information discarded by
1881 linkonce.
1882
8f3bab57
AM
18832003-06-20 Alan Modra <amodra@bigpond.net.au>
1884
1885 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1886 (ppc64_elf_setup_section_lists): Set it.
1887 (ppc64_elf_relocate_section): Check sym section id against top_id.
1888 (ppc_build_one_stub): Comment on top_id.
1889
efbc813e
NC
18902003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1891
1892 * config.bfd: Add tic4x-*-rtems*.
1893
4ce794b7
AM
18942003-06-20 Alan Modra <amodra@bigpond.net.au>
1895
1896 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1897 prototypes and casts. Replace PTR with void *. Format copyright.
1898 Mention ABI links.
1899 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1900 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1901 (ppc_type_of_stub): Make r_type an enum.
1902 (ppc64_elf_size_stubs): Likewise.
1903 * elf64-ppc.h: Remove PARAMS macro.
1904
d2a300cf
AM
19052003-06-19 Alan Modra <amodra@bigpond.net.au>
1906
3254fd24
AM
1907 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1908 elf hash tab fields.
1909
d2a300cf
AM
1910 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1911 (ppc64_elf_info_to_howto): Likewise.
1912 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1913 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1914
83615de0
AM
19152003-06-19 Alan Modra <amodra@bigpond.net.au>
1916
1917 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1918 reloc overflow on discarded eh_frame entries.
1919
9b5ecbd0
AM
19202003-06-19 Alan Modra <amodra@bigpond.net.au>
1921
1922 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1923 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1924 Return error condition.
1925 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1926 that have has_gp_reloc set.
1927 (struct ppc_link_hash_table): Add stub_count.
1928 (ppc_build_one_stub): Increment it.
1929 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1930 individual fields.
1931 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1932
64c456e1
AM
19332003-06-18 Alan Modra <amodra@bigpond.net.au>
1934
1935 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1936 size calculation from addend. Round size up.
1937
3dab95d3
HPN
19382003-06-18 Hans-Peter Nilsson <hp@axis.com>
1939
1940 * elf32-cris.c (cris_elf_relocate_section) <case
1941 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1942 symbol from a normal object or an undefined weak symbol.
1943
0b13192e
AM
19442003-06-18 Alan Modra <amodra@bigpond.net.au>
1945
1946 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1947 R_PPC64_TOC relocs.
1948
f97b9cb8
L
19492003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1950
1951 * section.c (struct sec): Put back kept_section.
1952 (STD_SECTION): Put back kept_section initialization.
1953 * bfd-in2.h: Regenerate.
1954
1955 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1956 sections for relocateable output. Use kept_section to preserve
1957 debug information discarded by linkonce.
1958
9f1c3a0a
L
19592003-06-17 Roland McGrath <roland@redhat.com>
1960
1961 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1962 segment-relative relocation between different segments.
1963
734b6cf9
AM
19642003-06-17 Alan Modra <amodra@bigpond.net.au>
1965
1cf1f670
AM
1966 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1967 optimizations earlier.
1968
734b6cf9
AM
1969 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1970 Restore previous input_list type.
1971 (ppc64_elf_link_hash_table_create): Undo last change.
1972 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1973 per output section, but don't bother with bfd_abs_section marker.
1974 (ppc64_elf_next_input_section): Adjust for multiple input section
1975 lists.
1976 (group_sections): Likewise.
1977
23fbd6fa
JJ
19782003-06-17 Jakub Jelinek <jakub@redhat.com>
1979
1980 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1981 *r_offset == r_addend for RELATIVE relocs against .got.
1982
dad27d18
AM
19832003-06-17 Alan Modra <amodra@bigpond.net.au>
1984
1985 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1986
b613960a
NC
19872003-06-17 Nick Clifton <nickc@redhat.com>
1988
1989 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1990 in the vtable_entries_used array to allow for the accessing
1991 the largest element.
b613960a 1992
000732f7
AM
19932003-06-17 Alan Modra <amodra@bigpond.net.au>
1994
3d6f9012
AM
1995 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1996 input_list.
1997 (ppc64_elf_link_hash_table_create): Init input_list here.
1998 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1999 per output section. Set toc_off for abs and other standard sections.
2000 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2001 (ppc64_elf_next_input_section): Adjust for single input section list.
2002 Don't set toc_curr from input bfds that haven't set elf_gp.
2003 (group_sections): Adjust for single input section list.
2004
000732f7
AM
2005 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2006
81407a69
AM
20072003-06-16 Alan Modra <amodra@bigpond.net.au>
2008
2009 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2010 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2011 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2012 got section for RELATIVE relocs. Fix wrong comment. Change condition
2013 under which dynamic relocs update the section contents.
2014
a06a29f2
NC
20152003-06-13 Robert Millan <zeratul2@wanadoo.es>
2016
2017 * config.bfd: Add i386-netbsd-gnu target.
2018
7d1ebfb2
NC
20192003-06-12 Nick Clifton <nickc@redhat.com>
2020
2021 * opncls.c (calc_crc32): Rename to
2022 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 2023 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 2024 hard-coded ".gnu_debuglink" in the code.
81407a69 2025 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 2026 xmalloc with a call to malloc.
81407a69 2027 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 2028 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 2029 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
2030 section to a bfd.
2031 * bfd-in2.h: Regenerate.
2032
20332003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2034
7d1ebfb2
NC
2035 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2036 New target (was i[3-7]86-*-openbsd* before).
2037 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2038 (vax-*-openbsd*): New target.
2039
d80dcc6a
TS
20402003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2041
2042 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2043 for n32, too.
2044 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2045 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2046 (mips_elf_create_got_section): Likewise.
2047 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2048
a7ebbfdf
TS
20492003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2050
2051 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2052 (elf_mips_howto_table_rel): Use it.
2053 (gprel32_with_gp): Move prototype.
2054 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2055 Use mips_elf_generic_reloc.
2056 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2057 Code cleanup.
2058 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2059 zero addend.
2060 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2061 as in the other *_gprel*_reloc functions.
2062 (gprel32_with_gp): Handle partial_inplace properly.
2063 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2064 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2065 Do addend handling directly instead of calling
2066 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2067 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2068 of zero addend. Handle partial_inplace properly.
2069 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2070 addend.
2071 (mips_elf64_gprel16_reloc): Likewise.
2072 (mips_elf64_literal_reloc): Likewise.
2073 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2074 logic as in the other *_gprel*_reloc functions. Handle
2075 partial_inplace properly.
2076 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2077 addend. Handle partial_inplace properly.
2078 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2079 of calling _bfd_mips_elf_gprel16_with_gp.
2080 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2081 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2082 of zero addend.
2083 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2084 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2085 of calling _bfd_mips_elf_gprel16_with_gp.
2086 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2087 partial_inplace properly. Fix wrong addend handling. Fix overflow
2088 check.
2089 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2090 exported.
2091 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2092 (_bfd_mips_elf_relocate_section): Likewise.
2093 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2094 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2095 (_bfd_mips_elf_sign_extend): New prototype.
2096
49ba19a4 20972003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2098
49ba19a4
NC
2099 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2100 New target (was sparc-*-openbsd* before).
2101 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 2102
de6e5e1a
NC
2103 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2104 * configure: Regenerate.
2105
3b443373
L
21062003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2107
2108 * po/Make-in (DESTDIR): New.
2109 (install-data-yes): Support $(DESTDIR).
2110 (uninstall): Likewise.
2111
795bb480
AM
21122003-06-11 Alan Modra <amodra@bigpond.net.au>
2113
2114 * Makefile.am (config.status): Depend on version.h.
2115 Run "make dep-am".
2116 * Makefile.in: Regenerate.
2117 * po/SRC-POTFILES.in: Regenerate.
2118
adadcc0c
AM
21192003-06-10 Alan Modra <amodra@bigpond.net.au>
2120 Gary Hade <garyhade@us.ibm.com>
2121
2122 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2123
f4984206
RS
21242003-06-10 Richard Sandiford <rsandifo@redhat.com>
2125
2126 * archures.c (bfd_mach_h8300sxn): New architecture.
2127 * bfd-in2.h: Regenerate.
2128 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2129 (h8300sxn_info_struct): New.
2130 (h8300sx_info_struct): Link to it.
2131 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2132 (elf32_h8_final_write_processing): Likewise.
2133
ad8e1ba5
AM
21342003-06-08 Alan Modra <amodra@bigpond.net.au>
2135
2136 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2137 elfxx-target.h so that we can use elf_backend_got_header_size.
2138 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2139 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2140 associated macros.
2141 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2142 dst_mask.
2143 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2144 ppc_stub_plt_branch_r2off.
2145 (struct ppc_stub_hash_entry): Reorganize.
2146 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2147 toc_curr, toc_off and emit_stub_syms.
2148 (ppc64_elf_link_hash_table_create): Init them.
2149 (ppc_stub_name): Correct string size.
2150 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2151 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2152 used.
2153 (ppc_type_of_stub): Tweak root.type test.
2154 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2155 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2156 ppc_stub_plt_branch_r2off.
2157 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2158 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2159 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2160 Initialize elf_gp and toc_curr.
2161 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2162 (ppc64_elf_next_input_section): Set toc_off.
2163 (group_sections): Ensure groups have the same TOC.
2164 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2165 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2166 Build new glink stub.
2167 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2168 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2169 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2170 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2171 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2172 (STD_SECTION): Update.
2173 * ecoff.c (bfd_debug_section): Update comment.
2174 * bfd-in2.h: Regenerate.
2175
90fff0d4
DJ
21762003-06-05 Daniel Jacobowitz <drow@mvista.com>
2177
2178 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2179 NULL function pointers.
2180
c82b20e4
DJ
21812003-06-05 Daniel Jacobowitz <drow@mvista.com>
2182
2183 * simple.c (bfd_simple_get_relocated_section_contents): Call
2184 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2185
53d4437a
SS
21862003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2187
5a5b9651
SS
2188 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2189 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2190 swaptables.
2191 * coff-tic4x.c: Ditto
53d4437a
SS
2192 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2193 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
2194 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2195 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2196 swap tables.
53d4437a
SS
2197 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2198 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2199 * coff-apollo.c: Ditto
2200 * coff-arm.c: Ditto
2201 * coff-h8300.c: Ditto
2202 * coff-h8500.c: Ditto
2203 * coff-i960.c: Ditto
2204 * coff-m68k.c: Ditto
2205 * coff-m88k.c: Ditto
2206 * coff-mcore.c: Ditto
2207 * coff-sh.c: Ditto
2208 * coff-sparc.c: Ditto
2209 * coff-tic80.c: Ditto
2210 * coff-we32k.c: Ditto
2211 * coff-z8k.c: Ditto
2212 * coff-w65.c: Ditto
2213
736694c8
SS
22142003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2215
2216 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2217 initialization bug
2218
9ee5e499
JJ
22192003-06-03 Jakub Jelinek <jakub@redhat.com>
2220
2221 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2222 (bfd_section_from_phdr): Likewise.
2223 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2224 (get_program_header_size): Count with PT_GNU_STACK.
2225 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2226 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2227
6f6f27f8
L
22282003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2229
2230 * elflink.h (elf_link_input_bfd): Call linker error_handler
2231 for discarded definitions.
2232
a3b6428f
NC
22332003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2234
2235 * syms.c (decode_section_type): Return 'n' if section flags are
2236 SEC_HAS_CONTENTS && SEC_READONLY.
2237
e30ddb24
NC
22382003-06-03 Nick Clifton <nickc@redhat.com>
2239
2240 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2241 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2242 (v850_elf_reloc_map): Likewise.
2243 (v850_elf_check_relocs): Likewise.
2244 (v850_elf_perform_relocation): Likewise.
2245 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2246 to make R_V850_REl32 pc-relative.
adadcc0c 2247
2558b9a9
KK
22482003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2249
2250 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2251 and DT_DEBUG dynamic tag even for position independent executables.
2252 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2253
f15398ef
DJ
22542003-06-02 Daniel Jacobowitz <drow@mvista.com>
2255
2256 * config.bfd: Move obsolete entries out of the range of the
2257 targmatch sed script.
2258
cad28985
DJ
22592003-06-02 Daniel Jacobowitz <drow@mvista.com>
2260
2261 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2262
f2c822e3
JJ
22632003-05-31 Jakub Jelinek <jakub@redhat.com>
2264
2265 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2266 plt entries, not just 8191.
2267
c9c27aad
DJ
22682003-05-30 Daniel Jacobowitz <drow@mvista.com>
2269
2270 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2271 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2272
36af4a4e
JJ
22732003-05-30 Ulrich Drepper <drepper@redhat.com>
2274 Jakub Jelinek <jakub@redhat.com>
2275
2276 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2277 instead of info->shared where appropriate.
2278 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2279 * elflink.c (_bfd_elf_create_got_section): Likewise.
2280 (_bfd_elf_link_create_dynamic_sections): Likewise.
2281 (_bfd_elf_link_assign_sym_version): Likewise.
2282 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2283 and DT_DEBUG dynamic tag even for position independent executables.
2284 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2285 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2286 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2287 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2288 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2289 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2290 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2291 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2292 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2293
f8843e87
AM
22942003-05-30 Kris Warkentin <kewarken@qnx.com>
2295
2296 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2297 signalled thread.
2298 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2299
29e1a6e4
NC
23002003-05-29 Nick Clifton <nickc@redhat.com>
2301
2302 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2303 Tidy up formatting.
2304 * Makefile.am: Add dependency on safe-ctype.h.
2305 * Makefile.in: Regenerate.
2306
4b555070
TS
23072003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2308
2309 * elfxx-mips.c: Don't force symbols local unconditionally.
2310
0236e03e
L
23112003-05-28 Alan Modra <amodra@bigpond.net.au>
2312
2313 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2314 undefined_symbol call.
2315
9e4aeb93
RS
23162003-05-27 Richard Sandiford <rsandifo@redhat.com>
2317
2318 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2319 (mips_elf_link_hash_table): Likewise.
2320
d0c728db
TS
23212003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2322
2323 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2324 R_MIPS_GNU_REL16_S2 support.
2325 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2326 (mips_elf64_rtype_to_howto): Use it.
2327 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2328 R_MIPS_GNU_REL16_S2 support.
2329 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2330 (mips_elf_n32_rtype_to_howto): Use it.
2331
759ebd76
DA
23322003-05-21 Stuart F. Downing <sdowning@fame.com>
2333
2334 * som.h: Define PA_2_0 before including a.out.h
2335
143d77c5
EC
23362003-05-07 Eric Christopher <echristo@redhat.com>
2337 Alexandre Oliva <aoliva@redhat.com>
2338
2339 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2340 pic tests, change to warning.
2341 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2342
cea3d58d
NC
23432003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2344
2345 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2346 well as shle-...-netbsdelf. Remove duplicate entry.
2347
385a4c14
NC
23482003-05-21 Nick Clifton <nickc@redhat.com>
2349
60e42408
NC
2350 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2351 for X_STORMY16_REL_12 reloc.
2352
385a4c14 2353 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2354 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2355 (bfd_elf_get_runpath_list): Likewise.
2356
129b8c20
RM
23572003-05-19 Roland McGrath <roland@redhat.com>
2358
2359 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2360 * bfd-in.h: Declare it.
2361 * bfd-in2.h: Regenerated.
2362 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2363 * elf-bfd.h (struct elf_backend_data): New function pointer member
2364 elf_backend_bfd_from_remote_memory.
2365 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2366 Declare them.
2367 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2368 (elfNN_bed): Add that to the initializer.
2369
23702003-05-15 Roland McGrath <roland@redhat.com>
2371
2372 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2373
22d5e339
L
23742003-05-20 Jakub Jelinek <jakub@redhat.com>
2375
2376 * elflink.h (elf_link_output_extsym): Only issue error about !=
2377 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2378
23792003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2380
2381 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2382 when removing the old definition for symbols with non-default
2383 visibility.
2384
b645cb17
JE
23852003-05-18 Jason Eckhardt <jle@rice.edu>
2386
2387 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2388
d2ff124f
AS
23892003-05-17 Andreas Schwab <schwab@suse.de>
2390
2391 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2392 elf_section_data during processing of pc-relative and absolute
2393 relocations.
2394 (elf_m68k_relocate_section): Use the cached reloc section instead
2395 of computing it again. Fix handling of visibility. Don't modify
2396 addend when copying over a relocation into the output.
2397
9c7a29a3
AM
23982003-05-17 Alan Modra <amodra@bigpond.net.au>
2399
2400 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2401 to trim plt entries. Move undefweak non-default visibility test..
2402 (allocate_dynrelocs): ..from here.
2403 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2404 dynamic_sections_created here. Update comment. Move undefweak
2405 non-default visibility test..
2406 (allocate_dynrelocs): ..from here. Fix comment.
2407 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2408 to trim plt entries. Move undefweak non-default visibility test..
2409 (allocate_dynrelocs): ..from here. Fix comment.
2410 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2411 STV_DEFAULT rather than comparing with zero.
2412 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2413 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2414
9bcf4de0
TS
24152003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2416
2417 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2418 pointers.
2419 (_bfd_set_gp_value): Likewise.
2420
5d1db417
MS
24212003-05-16 Michael Snyder <msnyder@redhat.com>
2422 From Bernd Schmidt <bernds@redhat.com>
2423 * archures.c (bfd_mach_h8300sx): New.
2424 * bfd-in2.h: Regenerate.
2425 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2426 (h8300sx_info_struct): New.
2427 (h8300s_info_struct): Link to it.
2428 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2429 (elf32_h8_final_write_processing): Likewise.
2430 (elf32_h8_relax_section): Likewise.
2431
80c7c40a
NC
24322003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2433
2434 * config.bfd: Accept i[3-7]86 variants.
2435 * configure.host: Likewise.
2436 * configure.in: Likewise.
2437 * configure: Regenerate.
2438
c1be741f
L
24392003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2440
2441 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2442 symbol.
2443
a15d9d3a
L
24442003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2445
2446 * elflink.h (elf_link_check_versioned_symbol): Also allow
2447 the base version.
2448
09695f56
AM
24492003-05-15 Alan Modra <amodra@bigpond.net.au>
2450 H.J. Lu <hongjiu.lu@intel.com>
2451
2452 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2453 (elf_i386_relocate_section): Likewise.
2454 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2455 (ppc_elf_relocate_section): Likewise.
2456 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2457 (ppc64_elf_relocate_section): Likewise.
2458
40f62fa0
TS
24592003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2460
2461 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2462
47247ced
SC
24632003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2464
2465 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2466 processor capability, allow merge of HC12 and HCS12 in some cases.
2467 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2468 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2469 (bfd_m68hc12_arch): Link it.
2470 (scan_mach): New function.
2471
32dfa85d
AH
24722003-05-13 Andrew Haley <aph@redhat.com>
2473
2474 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2475
586119b3
AM
24762003-05-13 Alan Modra <amodra@bigpond.net.au>
2477 H.J. Lu <hongjiu.lu@intel.com>
2478
2479 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2480 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2481 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2482 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2483 (ppc_elf_relocate_section): Likewise.
2484 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2485 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2486 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2487 relocs need no other types.
2488 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2489 dynreloc check.
2490 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2491 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2492 .got relocs.
2493
04e534c3
KK
24942003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2495
2496 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2497 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2498 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2499 visibility, a) don't allocate plt entries, b) don't allocate
2500 .got relocs, c) discard dyn rel space
adadcc0c
AM
2501 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2502 don't generate dynamic relocs.
04e534c3
KK
2503 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2504 for weakdefs when symbol already adjusted.
2505
0afb2dc0
NC
25062003-05-12 Nick Clifton <nickc@redhat.com>
2507
2508 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2509 overflow detection for R_XSTORMY16_16 reloc.
2510
9d29900b
NC
25112003-05-12 Paul Clarke <paulc@senet.com.au>
2512
2513 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2514
a48c6a54
JE
25152003-05-11 Jason Eckhardt <jle@rice.edu>
2516
2517 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2518 adjust upper bits.
2519 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2520 proper place.
2521 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2522 proper place.
2523
44f745a6
AS
25242003-05-11 Andreas Schwab <schwab@suse.de>
2525
2526 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2527 complicated tests for unresolvable relocs with a simple direct
2528 scheme using "unresolved_reloc" var. Report some detail on
2529 bfd_reloc_outofrange and similar errors.
2530
4ec72bde
MS
25312003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2532
2533 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2534 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2535 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2536 * elf64-s390.c: Likewise.
2537
64285810
MS
25382003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2539
2540 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2541 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2542 ELF_LINK_NON_GOT_REF from weakdef.
2543 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2544 already been adjusted before treating it specially.
2545 * el64-s390.c: Likwise.
2546
82058a73
MS
25472003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2548
2549 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2550 non-default visibility, a) don't make them dynamic, b) discard
2551 space for dynamic relocs.
2552 (elf_s390_relocate_section): Initialize the GOT entries and skip
2553 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2554 symbols with non-default visibility.
2555 * elf64-s390.c: Likewise.
2556
60d8b524
AM
25572003-05-09 Alan Modra <amodra@bigpond.net.au>
2558
2559 * cpu-arm.c (arm_check_note): Warning fix.
2560 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2561 to keep relocs if edited.
2562 (iq2000_elf_print_private_bfd_data): Return TRUE.
2563 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2564 ELF64_R_SYM.
2565 (elfNN_ia64_relax_ldxmov): Warning fix.
2566 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2567 * xtensa-modules.c (get_num_opcodes): Warning fix.
2568
e57b5356
AM
25692003-05-09 Andrey Petrov <petrov@netbsd.org>
2570
2571 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2572
45d6a902
AM
25732003-05-09 Alan Modra <amodra@bigpond.net.au>
2574
2575 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2576 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2577 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2578 (bfd_elf_record_link_assignment): Move from elflink.h.
2579 (_bfd_elf_merge_symbol): Likewise.
2580 (_bfd_elf_add_default_symbol): Likewise.
2581 (_bfd_elf_export_symbol): Likewise.
2582 (_bfd_elf_link_find_version_dependencies): Likewise.
2583 (_bfd_elf_link_assign_sym_version): Likewise.
2584 (_bfd_elf_link_read_relocs): Likewise.
2585 (_bfd_elf_link_size_reloc_section): Likewise.
2586 (_bfd_elf_fix_symbol_flags): Likewise.
2587 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2588 (_bfd_elf_link_sec_merge_syms): Likewise.
2589 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2590 and bed->s->sizeof_rela.
2591 (_bfd_elf_link_output_relocs): Likewise.
2592 * elf-bfd.h (struct elf_size_info): Rename file_align to
2593 log_file_align.
2594 (struct elf_info_failed): Move from elflink.h.
2595 (struct elf_assign_sym_version_info): Likewise.
2596 (struct elf_find_verdep_info): Likewise.
2597 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2598 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2599 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2600 _bfd_elf_link_assign_sym_version,
2601 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2602 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2603 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2604 _bfd_elf_link_sec_merge_syms): Declare.
2605 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2606 (_bfd_elf32_link_read_relocs): Likewise.
2607 (bfd_elf64_link_create_dynamic_sections): Likewise.
2608 (_bfd_elf64_link_read_relocs): Likewise.
2609 * elflink.h: Move lots o' stuff elsewhere.
2610 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2611 (bfd_elf64_record_link_assignment): Likewise.
2612 (bfd_elf_record_link_assignment): Declare.
2613 * bfd-in2.h: Regenerate.
2614 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2615 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2616 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2617 (assign_file_positions_for_segments): Likewise.
2618 (assign_file_positions_except_relocs): Likewise.
2619 (swap_out_syms, elfcore_write_note): Likewise.
2620 * elf-m10200.c: Adjust for changed function names.
2621 * elf-m10300.c: Likewise.
2622 * elf32-arm.h: Likewise.
2623 * elf32-h8300.c: Likewise.
2624 * elf32-hppa.c: Likewise.
2625 * elf32-ip2k.c: Likewise.
2626 * elf32-m32r.c: Likewise.
2627 * elf32-m68hc11.c: Likewise.
2628 * elf32-m68hc1x.c: Likewise.
2629 * elf32-m68k.c: Likewise.
2630 * elf32-mips.c: Likewise.
2631 * elf32-ppc.c: Likewise.
2632 * elf32-sh.c: Likewise.
2633 * elf32-v850.c: Likewise.
2634 * elf32-xtensa.c: Likewise.
2635 * elf64-alpha.c: Likewise.
2636 * elf64-hppa.c: Likewise.
2637 * elf64-mmix.c: Likewise.
2638 * elf64-ppc.c: Likewise.
2639 * elf64-sh64.c: Likewise.
2640 * elfxx-ia64.c: Likewise.
2641 * elfxx-mips.c: Likewise.
2642 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2643 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2644 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2645 * elf64-mips.c (mips_elf64_size_info): Likewise.
2646 * elf64-s390.c (s390_elf64_size_info): Likewise.
2647 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2648
bf1e742e
L
26492003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2650
2651 * elflink.h (elf_add_default_symbol): After skipping the
2652 unversioned symbol, go to non-default one.
2653
6a32c710
L
26542003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2655
2656 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2657 want_plt field.
2658 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2659 for symbols with non-default visibility.
2660
71552942
L
26612003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2662
2663 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2664 case that a DSO references a hidden symbol which may be
2665 satisfied by a versioned symbol in another DSO.
2666 (elf_link_output_extsym): Check versioned definition for hidden
2667 symbol referenced by a DSO.
2668
208c2cd6
NC
26692003-05-07 Nick Clifton <nickc@redhat.com>
2670
2671 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2672 R_XSTORMY16_16 reloc to ignore overflows.
2673
aa701218
AO
26742003-05-06 Alexandre Oliva <aoliva@redhat.com>
2675
2676 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2677 error message for mixing different-endian files. Check for ABI
2678 compatibility of input files with the selected emulation.
2679
4e795f50
AM
26802003-05-05 Alan Modra <amodra@bigpond.net.au>
2681
2682 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
2683 non-default visibility, a) don't make them dynamic, b) discard
2684 space for dynamic relocs.
2685 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2686
2687 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
2688 non-default visibility, a) don't allocate plt entries, b) don't
2689 allocate .got relocs, c) discard dyn rel space,
2690 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
2691 don't generate dynamic relocs.
2692 * elf64-ppc.c (allocate_dynrelocs): As above.
2693 (ppc64_elf_relocate_section): As above.
2694
4bc6e03a
AJ
26952003-05-05 Andreas Jaeger <aj@suse.de>
2696
2697 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
2698 relocation entries for weak undefined symbols with non-default
2699 visibility.
2700 (elf64_x86_64_relocate_section): Initialize the GOT entries and
2701 skip R_386_32/R_386_PC32 for weak undefined symbols with
2702 non-default visibility.
2703
ef5aade5
L
27042003-05-04 H.J. Lu <hjl@gnu.org>
2705
2706 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
2707 relocation entries for weak undefined symbols with non-default
2708 visibility.
2709 (elf_i386_relocate_section): Initialize the GOT entries and
2710 skip R_386_32/R_386_PC32 for weak undefined symbols with
2711 non-default visibility.
129b8c20 2712
ef5aade5
L
2713 * elfxx-ia64.c (allocate_fptr): Don't allocate function
2714 descriptors for weak undefined symbols with non-default
2715 visibility.
2716 (allocate_dynrel_entries): Don't allocate relocation entries
2717 for symbols resolved to 0.
2718 (set_got_entry): Don't install dynamic relocation for weak
2719 undefined symbols with non-default visibility.
2720 (set_pltoff_entry): Likewise.
2721
2722 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
2723 with non-default visibility.
2724 (elf_link_output_extsym): Don't make weak undefined symbols
2725 with non-default visibility dynamic.
2726
c424e0e9
L
27272003-05-04 H.J. Lu <hjl@gnu.org>
2728
2729 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
2730
d31e3dfe
L
27312003-05-04 H.J. Lu <hjl@gnu.org>
2732
2733 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
2734 symbol dynamic. Check indirection when removing the old
2735 definition for symbols with non-default visibility.
2736 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
2737
4d2e1ff0
NC
27382003-05-02 Nick Clifton <nickc@redhat.com>
2739
2740 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
2741 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
2742 unsigned overflow.
2743
d40d037c
AJ
27442003-05-02 Andreas Jaeger <aj@suse.de>
2745
2746 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
2747 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2748 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2749 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
2750 ELF_LINK_NON_GOT_REF from weakdef.
2751
c5d1701e
NC
27522003-05-02 Charles Lepple <clepple@ghz.cc>
2753 Nick Clifton <nickc@redhat.com>
2754
2755 * acinclude.m4: Fix name of --enable-install-libbfd switch.
2756 * aclocal.m4: Regenerate.
2757 * configure: Regenerate.
2758 * Makefile.in: Regenerate.
2759
81848ca0
AM
27602003-05-01 Alan Modra <amodra@bigpond.net.au>
2761
2762 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
2763 weakdef sym has already been adjusted before treating it specially.
2764 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
2765 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
2766 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
2767 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 2768
c7996ad6
L
27692003-04-28 H.J. Lu <hjl@gnu.org>
2770
2771 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
2772 the relax finalize pass.
2773
2774 * section.c (struct sec): Add need_finalize_relax and remove
2775 flag11.
2776 (STD_SECTION): Update struct sec initializer.
2777 * bfd-in2.h: Regenerated.
2778
f006af20
L
27792003-04-28 H.J. Lu <hjl@gnu.org>
2780
2781 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
2782 to copy any information related to dynamic linking when we flip
2783 the indirection.
2784
1b1fe8fe
L
27852003-04-27 H.J. Lu <hjl@gnu.org>
2786
2787 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2788 (ELF_LINK_DYNAMIC_WEAK): New.
2789
2790 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2791 a symbol should be skipped. Ignore definitions in dynamic
2792 objects for symbols with non-default visibility.
2793 (elf_add_default_symbol): Adjusted.
2794 (elf_link_add_object_symbols): Check if a symbol should be
2795 skipped. Don't merge the visibility field with the one from
2796 a dynamic object.
2797 (elf_link_check_versioned_symbol): Use undef_bfd.
2798 (elf_link_output_extsym): Warn if a forced local symbol is
2799 referenced from dynamic objects. Make non-weak undefined symbol
2800 with non-default visibility a fatal error.
2801
052a450c
DJ
28022003-04-27 Daniel Jacobowitz <drow@mvista.com>
2803
2804 * configure.in: Bump version on HEAD to 2.14.90.
2805 * configure: Regenerated.
2806
d204f4c0
SC
28072003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2808
2809 PR savannah/3331:
2810 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2811 when we couldn't relax something.
2812
3c0a515d
L
28132003-04-25 Alan Modra <amodra@bigpond.net.au>
2814
2815 * elflink.h (elf_merge_symbol): When we find a regular definition
2816 for an indirect symbol, flip the indirection so that the old
2817 direct symbol now points to the new definition.
2818
d145330d
RM
28192003-04-24 Roland McGrath <roland@redhat.com>
2820
2821 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2822
fc0bffd6
AM
28232003-04-24 Alan Modra <amodra@bigpond.net.au>
2824
2825 * elf32-ppc.c: Formatting and comment fixes.
2826 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2827 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2828
28292003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2830
2831 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2832 * bfd-in2.h: Rebuilt.
2833 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2834 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2835 & H8300SNMAGIC.
2836 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2837 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2838 (h8300sn_info_struct, h8300hn_info_struct): New.
2839 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2840 (elf32_h8_final_write_processing): Likewise.
2841
267fb3c1
KK
28422003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2843
2844 * elf32-sh.c (tpoff): New.
2845 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2846 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2847 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2848 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2849 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2850 (dtpoff_base): Fix wrong indentation.
2851 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2852 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2853 R_SH_TLS_TPOFF32 relocations.
2854
ef230218
JR
28552003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2856
2857 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2858 * cpu-sh.c: Likewise.
2859 * elf32-sh.c: Likewise.
2860 * reloc.c (bfd_reloc_code_real): Likewise.
2861 * elf32-sh64-com.c: Change comment to refer to SuperH.
2862 * elf32-sh64.c: Likewise.
2863 * elf64-sh64.c: Likewise.
2864 * bfd-in2.h (enum bfd_architecture): Regenerate.
2865
8c29f035
AM
28662003-04-23 Alan Modra <amodra@bigpond.net.au>
2867
2868 From Julien LEMOINE <speedblue@debian.org>
2869 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2870 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2871
26597c86
NC
28722003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2873
2874 * archures.c: Replace references to Mitsubishi M32R with references
2875 to Renesas M32R.
2876 * relocs.c: Likewise.
2877 * bfd-in2.h: Regenerate.
2878
cc13e3ef
RH
28792003-04-21 Richard Henderson <rth@redhat.com>
2880
2881 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2882 executable when a symbol is defined both regular and dynamic.
2883
f5a6f915
SC
28842003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2885
2886 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2887 (elf32-m68hc1x.lo): Update dependencies
2888 * configure.in: Add elf32-m68hc1x.lo.
2889 * configure: Rebuild.
2890 * Makefile.in: Rebuild.
2891
3a65329d
SC
28922003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2893
2894 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2895 (m68hc11_elf_hash_table_create): New function.
2896 (elf32_m68hc11_link_hash_table_free): New function.
2897 (stub_hash_newfunc): New function.
2898 (m68hc11_add_stub): New function.
2899 (elf32_m68hc11_add_symbol_hook): New function.
2900 (elf32_m68hc11_setup_section_lists): New function.
2901 (elf32_m68hc11_next_input_section): New function.
2902 (elf32_m68hc11_size_stubs): New function.
2903 (elf32_m68hc11_build_stubs): New function.
2904 (m68hc11_get_relocation_value): New function.
2905 (elf32_m68hc11_relocate_section): Call the above to redirect
2906 some relocations to the trampoline code.
2907 (m68hc11_elf_export_one_stub): New function.
2908 (m68hc11_elf_set_symbol): New function.
2909 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2910 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2911 is not yet initialized.
2912
2913 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2914 (elf32_m68hc11_stub_hash_entry): New struct.
2915 (m68hc11_page_info): Add trampoline handler address.
2916 (m68hc11_elf_link_hash_table): Add stubs generation members.
2917 (elf32_m68hc11_add_symbol_hook): Declare.
2918 (elf32_m68hc11_setup_section_lists): Declare.
2919 (elf32_m68hc11_size_stubs): Declare.
2920 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2921
3a65329d
SC
2922 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2923 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2924 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2925 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2926 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2927 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2928 (bfd_elf32_bfd_link_hash_table_create): Define.
2929 (elf_backend_add_symbol_hook): Define.
2930 (m68hc11_elf_bfd_link_hash_table_create): New function.
2931 (m68hc11_elf_build_one_stub): New function.
2932 (m68hc11_elf_size_one_stub): New function.
2933 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2934 (bfd_elf32_bfd_link_hash_table_create): Define.
2935
2936 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2937 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2938 (m68hc12_phys_addr): Ditto.
2939 (m68hc12_phys_page): Ditto.
2940 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2941 (elf32_m68hc11_gc_mark_hook): Likewise.
2942 (elf32_m68hc11_gc_sweep_hook): Likewise.
2943 (elf32_m68hc11_check_relocs): Likewise.
2944 (elf32_m68hc11_relocate_section): Likewise.
2945 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2946 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2947 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2948 (m68hc12_elf_build_one_stub): New function.
2949 (m68hc12_elf_size_one_stub): New function.
2950 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2951 (elf_backend_add_symbol_hook): Define.
2952 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2953
4081944f
NC
29542003-04-18 Nick Clifton <nickc@redhat.com>
2955
2956 * format.c (bfd_check_format_matches): Only check associated
2957 vector if the matching_vector has been created.
2958
060dc71d
AO
29592003-04-15 Alexandre Oliva <aoliva@redhat.com>
2960
2961 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2962 2003-04-09's change.
2963
a3476bef
NC
29642003-04-15 Brian Ford <ford@vss.fsi.com>
2965
2966 * peicode.h (coff_swap_scnhdr_in): If a section holds
2967 uninitialized data and is from an object file or from an
2968 executable image that has not initialized the s_size field, or if
2969 the physical size is padded, use the virtual size (stored in
2970 s_paddr) instead.
2971
ca4fa240
NC
29722003-04-15 H.J. Lu <hjl@gnu.org>
2973
2974 * elflink.h (elf_link_add_object_symbols): Properly report
2975 filename for alignment reduction.
2976
c2dcd04e
NC
29772003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2978
2979 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2980 * reloc.c: Likewise.
2981 * coff-h8300.c: Likewise.
2982 * coff-h8500.c: Likewise.
2983 * coff-sh.c: Likewise.
2984 * cpu-h8300.c: Likewise.
2985 * cpu-sh.c: Likewise.
2986 * elf32-h8300.c: Likewise.
2987 * elf32-sh.c: Likewise.
2988 * elf32-sh64-com.c: Likewise.
2989 * elf32-sh64.c: Likewise.
2990 * elf64-sh64.c: Likewise.
2991 * bfd-in2.h: Regenerate.
2992
f7661995
NC
29932003-04-14 H.J. Lu <hjl@gnu.org>
2994
2995 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2996 alignment for common symbols. Warn reducing alignment for
2997 common symbols. Report old filename when symbol size changes.
2998
93a2b7ae
AO
29992003-04-12 Alexandre Oliva <aoliva@redhat.com>
3000
3001 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3002 occurrences of the same test changed in the previous patch.
3003 Optimize.
3004
0176c794
AO
30052003-04-11 Alexandre Oliva <aoliva@redhat.com>
3006
3007 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3008 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3009 GOT_DISP/addend only if the symbol got a global GOT entry.
3010
0fdc1bf1
AO
30112003-04-10 Alexandre Oliva <aoliva@redhat.com>
3012
3013 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3014 GOT_PAGE/GOT_OFST referencing overridable symbol to
3015 GOT_DISP/addend.
3016 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3017 global symbol as GOT_DISP.
3018
9b8c98a4
BW
30192003-04-10 Bob Wilson <bob.wilson@acm.org>
3020
3021 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3022 next relocation on an undefined symbol.
3023
ec1659c8
RH
30242003-04-09 Richard Henderson <rth@redhat.com>
3025
3026 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3027 Ignore relocations against r_symndx == 0.
3028
7dfb07f7
L
30292003-04-09 H.J. Lu <hjl@gnu.org>
3030
3031 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3032 FALSE for undefined symbols.
3033 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3034
a3805e4e
AO
30352003-04-09 Alexandre Oliva <aoliva@redhat.com>
3036
3037 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3038 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3039 addr_size.
3040
69931e60
AO
30412003-04-08 Alexandre Oliva <aoliva@redhat.com>
3042
3043 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3044 pointer size from ABI, not arch_bits_per_address.
3045
59a8c196
KB
30462003-04-07 Kevin Buettner <kevinb@redhat.com>
3047
3048 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3049 constants for n32 ABI.
3050
8e16317c
NC
30512003-04-06 Andrew Cagney <cagney@redhat.com>
3052
3053 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3054 free that leads to GDB vs BFD memory corruption.
3055
196486be
SC
30562003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3057
3058 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3059 symbols that mark the end of the section.
3060 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3061 converting to a relative branch so that the offset is computed after
3062 the relaxation; also relocate a jsr into a bsr if possible but don't
3063 relax them if they are to a far symbol as we need to call the
3064 trampoline code.
3065 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3066
be33c5dd
SS
30672003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3068
3069 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3070 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3071 * bfd-in2.h: Regenerate
3072 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3073 * cpu-tic4x.c: Ditto
3074
ff0c9faf
NC
30752003-04-03 Nick Clifton <nickc@redhat.com>
3076
3077 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3078 differently for object files and executables.
3079 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3080 for object files or for executables who have not already
3081 initialised the field.
3082 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3083 the PE format bfd is an executable.
3084
2b98e6c0
AM
30852003-04-03 Alan Modra <amodra@bigpond.net.au>
3086
3087 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3088 here as it's too early to reliably determine locality.
3089 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 3090 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 3091
92403579
BW
30922003-04-02 Bob Wilson <bob.wilson@acm.org>
3093
3094 * xtensa-modules.c: Remove comment indicating that this is a
3095 generated file.
3096
c45a316a
AM
30972003-04-02 Alan Modra <amodra@bigpond.net.au>
3098
3099 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3100
e0001a05
NC
31012003-04-01 Bob Wilson <bob.wilson@acm.org>
3102
8c29f035
AM
3103 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3104 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3105 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3106 xtensa-modules.lo.
3107 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3108 xtensa-modules.c.
3109 (cpu-xtensa.lo): New target.
3110 (elf32-xtensa.lo): Likewise.
3111 (xtensa-isa.lo): Likewise.
3112 (xtensa-modules.lo): Likewise.
3113 * Makefile.in: Regenerate.
3114 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3115 (bfd_archures_list): Add bfd_xtensa_arch.
3116 * config.bfd: Handle xtensa-*-*.
3117 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3118 * configure: Regenerate.
3119 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3120 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3121 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3122 (bfd_elf32_xtensa_le_vec): Likewise.
3123 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3124 * cpu-xtensa.c: New file.
3125 * elf32-xtensa.c: Likewise.
3126 * xtensa-isa.c: Likewise.
3127 * xtensa-modules.c: Likewise.
3128 * libbfd.h: Regenerate.
3129 * bfd-in2.h: Likewise.
e0001a05 3130
5a6c6817
NC
31312003-04-01 Nick Clifton <nickc@redhat.com>
3132
3133 * archures.c (bfd_mach_arm_unknown): Define.
3134 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3135 bfd_arm_get_mach_from_notes): Prototype.
3136 * bfd-in2.h: Regenerate.
3137 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3138 bfd_arm_merge_machines.
3139 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3140 * coffcode.h (coff_set_arch_mach_hook): Call
3141 bfd_arm_get_mach_from_notes.
3142 * coffgen.c (coff_real_object_p): Revert previous delta.
3143 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3144 .note section.
3145 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3146 binaries compiled for different architectures..
3147 (bfd_arm_update_notes): New function: Update an ARM note section.
3148 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3149 number from an ARM note section.
3150 * elf32-arm.h (elf32_arm_object_p): Use
3151 bfd_arm_get_mach_from_notes.
3152 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3153 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 3154
0cc1cf99
BE
31552003-04-01 Ben Elliston <bje@wasabisystems.com>
3156
3157 * dwarf2.c (read_attribute_value): Correct typo in comment.
3158
af3ef9fe
NC
31592003-04-01 Nick Clifton <nickc@redhat.com>
3160
3161 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3162 instead of concat().
3163 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
3164 (add_line_info): Make a copy of the filename when storing it into
3165 the info structure.
af3ef9fe 3166
6e84a906
DJ
31672003-03-31 Andreas Schwab <schwab@suse.de>
3168 Daniel Jacobowitz <drow@mvista.com>
3169
3170 * simple.c (bfd_simple_get_relocated_section_contents): Add
3171 parameter symbol_table. Optionally use it instead of the symbol
3172 table from the bfd. Save and restore output offsets and output
3173 sections around bfd_get_relocated_section_contents. Fix a memory
3174 leak.
3175 (simple_save_output_info, simple_restore_output_info): New
3176 functions.
3177 * bfd-in2.h: Regenerate.
3178 * dwarf2.c (read_abbrevs): Use
3179 bfd_simple_get_relocated_section_contents instead of
3180 bfd_get_section_contents.
3181 (decode_line_info): Likewise.
3182 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3183 find_rela_addend.
3184 (find_rela_addend): Remove.
3185 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3186 debugging sections.
3187 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3188 not bfd_zalloc.
3189
5ed6aba4
NC
31902003-03-31 David Heine <dlheine@suif.stanford.edu>
3191
3192 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3193 bfd_alloc.
3194 * dwarf2.c (concat_filename): Always allocate space for the
3195 returned filename.
3196 (decode_line_info): Free the allocated filename returned by
3197 concat_filename.
3198 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3199 * elf.c (copy_private_bfd_data): Likewise.
3200 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3201 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3202 * format.c (bfd_check_format_matches): Likewise.
3203 * linker.c (bfd_generic_final_link): Likewise.
3204 * opncls.c (find_separate_debug_info): Likewise.
3205 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3206
5941afc1
L
32072003-03-28 H.J. Lu <hjl@gnu.org>
3208
3209 * elflink.h (elf_link_add_object_symbols): Correctly combine
3210 visibilities.
3211
9d73f260
JJ
32122003-03-27 Jakub Jelinek <jakub@redhat.com>
3213
3214 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3215 to -1 before recomputing got offsets.
3216
a5ad465a
AS
32172003-03-26 Andreas Schwab <schwab@suse.de>
3218
3219 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3220 (elf_m68k_relocate_section): Use it to correctly handle symbols
3221 forced to be local.
3222 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3223 entries for symbols that are forced to be local.
3224
d0647110
AO
32252003-03-25 Alexandre Oliva <aoliva@redhat.com>
3226
3227 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3228 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3229 * elfn32-mips.c, elf64-mips.c: Use it.
3230
e16bb312
NC
32312003-03-25 Stan Cox <scox@redhat.com>
3232 Nick Clifton <nickc@redhat.com>
8c29f035 3233
9b5ecbd0 3234 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3235
3236 * archures.c: Add bfd_mach_arm_iWMMXt.
3237 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3238 * bfd-in2.h: Regenerate.
3239 * libbfd.h: Regenerate.
3240 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3241 object files to be linked with XScale ones.
3242 (coff_arm_final_link_postscript): Update note section.
3243 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3244 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3245 after identifying a coff binary.
3246 * cpu-arm.c (processors): Add iWMMXt.
3247 (arch_inf): Likewise.
3248 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3249 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3250 be linked with XScale ones.
3251 (elf32_arm_section_flags): New function: Set flags on note section.
3252 (elf32_arm_final_write_processing): Handle note section.
3253
25f14c34
DD
32542003-03-21 DJ Delorie <dj@redhat.com>
3255
3256 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3257 _bfd_elf_rela_local_sym.
3258
04b3329b
L
32592003-03-20 H.J. Lu <hjl@gnu.org>
3260
3261 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3262 non-ELF outputs.
3263
c25cfdf8
NC
32642003-03-20 Nick Clifton <nickc@redhat.com>
3265
3266 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3267 $idata5 in case bfd_coff_final_link is not called.
3268
3e1d7f19
JJ
32692003-03-19 Jakub Jelinek <jakub@redhat.com>
3270
3271 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3272 field.
3273 (canon_reloc_count): Define.
3274 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3275 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3276 reloc_count.
3277 (sparc64_elf_canonicalize_reloc): New routine.
3278 (bfd_elf64_canonicalize_reloc): Define.
3279
3fa1d917
JJ
32802003-03-18 Jakub Jelinek <jakub@redhat.com>
3281
3282 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3283 againt mergeable sections. Take r_addend into account when caching
3284 trampolines.
3285
f86b235a
RH
32862003-03-18 Richard Henderson <rth@redhat.com>
3287
8c29f035
AM
3288 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3289 local symbols that have no dyninfo.
f86b235a 3290
49ae03bf
NC
32912003-03-14 Gene Smith <gene.smith@siemens.com>
3292
3293 * ieee.c (ieee_write_expression): Handle the case where symbol is
3294 NULL.
3295 General formatting improvements.
3296
6a457e5c
NC
32972003-03-13 Nick Clifton <nickc@redhat.com>
3298
3299 * configure.in (LINGUAS): Add zh_CN.
3300 * configure: Regenerate.
3301 * po/zh_CN.po: New file.
3302
93516ec3
NC
33032003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3304
3305 * aout-cris.c (BYTES_IN_WORD): Don't define.
3306 aout-encap.c: Likewise.
3307 aout-ns32k.c: Likewise.
3308 aout-tic30.c: Likewise.
3309 hp300bsd.c: Likewise.
3310 i386aout.c: Likewise.
3311 i386dynix.c: Likewise.
3312 i386linux.c: Likewise.
3313 i386lynx.c: Likewise.
3314 i386mach3.c: Likewise.
3315 m68k4knetbsd.c: Likewise.
3316 m68klinux.c: Likewise.
3317 m68klynx.c: Likewise.
3318 m68knetbsd.c: Likewise.
3319 m88kmach3.c: Likewise.
3320 mipsbsd.c: Likewise.
3321 newsos3.c: Likewise.
3322 sparclinux.c: Likewise.
3323 sparclynx.c: Likewise.
3324 sparcnetbsd.c: Likewise.
3325 vaxbsd.c: Likewise. Fix comment formatting.
3326
fee24f1c
AO
33272003-03-12 Alexandre Oliva <aoliva@redhat.com>
3328
0b25d3e6
AO
3329 * Reverted 2003-03-02's patch.
3330
fee24f1c
AO
3331 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3332 overridable.
3333 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3334 mips_elf64_get_dynamic_reloc_upper_bound,
3335 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3336 (bfd_elf64_get_canonicalize_reloc,
3337 bfd_elf64_get_dynamic_reloc_upper_bound,
3338 bfd_elf64_canonicalize_dynamic_reloc): Define.
3339 (mips_elf64_slurp_reloc_table): Support dynamic.
3340 (mips_elf64_slurp_one_reloc_table): Adjust.
3341
64fb1839
NC
33422003-03-12 Nick Clifton <nickc@redhat.com>
3343
3344 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3345 'index' to 'offset' in test for zero value.
3346
908488f1
AO
33472003-03-11 Alexandre Oliva <aoliva@redhat.com>
3348
3349 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3350 dynamic relocations pointing to local or section symbols, use the
3351 NULL symbol instead. Document the choice to not emit an
3352 additional R_MIPS_64 relocation.
3353
e515b051
AM
33542003-03-11 Alan Modra <amodra@bigpond.net.au>
3355
3356 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3357 zero index dynamic tls relocs generated for the GOT. Tidy code.
3358 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3359 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3360
a23b6845
AM
33612003-03-07 Alan Modra <amodra@bigpond.net.au>
3362
87d243f1
AM
3363 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3364 a tls_get_addr call.
3365
a23b6845
AM
3366 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3367 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3368 ELF_LINK_NON_GOT_REF from weakdef.
3369 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3370 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3371 ELF_LINK_NON_GOT_REF from weakdef.
3372 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3373 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3374 ELF_LINK_NON_GOT_REF from weakdef.
3375
2d36fe5f
AH
33762003-03-06 Jakub Jelinek <jakub@redhat.com>
3377 Andrew Haley <aph@redhat.com>
3378
3379 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3380 output is relocateable.
3381
34f304a7
NC
33822003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3383
3384 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3385 R_COMMENT.
3386
7b609f53
AM
33872003-03-06 Alan Modra <amodra@bigpond.net.au>
3388
3389 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3390 error messages.
3391 (ELIMINATE_COPY_RELOCS): Define to zero.
3392 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3393 TLSLD relocs. Report reloc types on a number of errors. Optimize
3394 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3395 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3396 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3397 calculating TLSLD relocs. Report reloc types on a number of errors.
3398 Don't capitalize error messages.
3399
6a0fb186
L
34002003-03-03 H.J. Lu <hjl@gnu.org>
3401
3402 * elfxx-ia64.c (USE_BRL): Removed.
3403 (oor_ip): Removed.
3404
34f304a7 34052003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3406
3407 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3408 relocation (no special function), and make it non-partial_inplace.
3409 (sh_elf_relax_section): When creating a bsr, use a consistent value
3410 no matter if the symbol is extern or not; set addend to -4.
3411 Don't swap load / non-load instructions for SH4.
3412 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3413 rather than if the symbol is external to determine if adjusting the
3414 offset makes sense. Adjust the addend too if appropriate.
3415 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3416 relocation.
3417
a9d68a1e
NC
34182003-03-03 Nick Clifton <nickc@redhat.com>
3419
3420 * po/da.po: Installed latest translation.
3421
7c2be35c
TS
34222003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3423
3424 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3425 R_MIPS_PC16 to rightshift 2.
3426 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3427 (bfd_elf32_bfd_reloc_type_lookup): Support
3428 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3429 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3430 R_MIPS_PC16 to rightshift 2.
3431 (mips_elf64_howto_table_rela): Likewise.
3432 (mips_reloc_map): Map to rightshifted BFD reloc.
3433 * elfn32-mips.c: The same as in elf64-mips.c.
3434 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3435 (mips_elf_calculate_relocation): Handle rightshifted addends for
3436 R_MIPS_PC16.
3437 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3438 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3439 * libbfd.h: Regenerate.
3440 * bfd-in2.h: Regenerate.
3441
484a4f9c
RH
34422003-02-28 Richard Henderson <rth@redhat.com>
3443
3444 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3445 for ltoff22x relaxation.
3446
2ce40c65
AM
34472003-03-01 Alan Modra <amodra@bigpond.net.au>
3448
3449 * bfd-in.h (_bfd): Don't define.
3450 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3451 * syms.c: Likewise.
3452 * bfd-in2.h: Regenerate.
3453
2c4c2bc0
RH
34542003-02-27 Richard Henderson <rth@redhat.com>
3455
3456 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3457 (elfNN_ia64_check_relocs): Set it.
3458 (allocate_global_data_got): Check it.
3459 (allocate_local_got): Likewise.
3460 (allocate_dynrel_entries): Likewise.
3461 (elfNN_ia64_relax_ldxmov): New.
3462 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3463 (elfNN_ia64_choose_gp): Split out from ...
3464 (elfNN_ia64_final_link): ... here.
8c29f035 3465
c2852e88
AC
34662003-02-27 Andrew Cagney <cagney@redhat.com>
3467
3468 * bfd.c (struct bfd): Rename "struct _bfd".
3469 * bfd-in.h: Update copyright.
3470 (struct bfd): Rename "struct _bfd".
3471 (_bfd): Define for backward compatibility.
3472 * bfd-in2.h: Regenerate.
3473
3f87cb70
AM
34742003-02-25 Alan Modra <amodra@bigpond.net.au>
3475
3f9a32bd
AM
3476 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3477 and rel_hdr2 when initially counting input relocs rather than after
3478 creating output reloc sections.
4fabe71e
AM
3479 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3480 sizes.
3f9a32bd 3481
3f87cb70
AM
3482 * Makefile.am: Run "make dep-am".
3483 * Makefile.in: Regenerate.
3484
07c6e936
NC
34852003-02-24 Kris Warkentin <kewarken@qnx.com>
3486
3487 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3488 (elfcore_grog_nto_note): New function.
3489 (elfcore_grog_nto_gregs): New function.
3490 (elfcore_grog_nto_status): New function.
3491
aad5d350
AM
34922003-02-24 Alan Modra <amodra@bigpond.net.au>
3493
3494 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3495 section flags before concluding that we've already been called.
3496 Don't use register keyword.
3497 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3498 (_bfd_elf_create_linker_section): Formatting.
3499
2ab1486e
NC
35002003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3501
3502 * coff-h8300.c: Fix typo: intial -> initial.
3503 * coff-ppc.c: Likewise.
3504
70bccea4
AM
35052003-02-20 Alan Modra <amodra@bigpond.net.au>
3506
3507 * elf32-ppc.c: Formatting.
3508 (allocate_dynrelocs): LD and GD relocs against the same sym need
3509 separate GOT entries.
3510 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3511 entries per symbol.
3512
ee05f2fe
AM
35132003-02-19 Alan Modra <amodra@bigpond.net.au>
3514
26e41594
AM
3515 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3516 removal. Localize vars. Remove unnecessary dynobj test.
3517 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3518 of INFO.
3519 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3520 and optimize.
3521 (elf_i386_relocate_section): Likewise.
3522 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3523 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3524 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3525 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3526 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3527 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3528 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3529 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3530 Formatting.
3531
f4656909
AM
3532 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3533 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3534 test.
3535 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3536 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3537 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3538 and optimize. Use ELIMINATE_COPY_RELOCS.
3539 (ppc64_elf_relocate_section): Likewise.
3540
ee05f2fe
AM
3541 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3542 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3543 (ELIMINATE_COPY_RELOCS): Define.
3544 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3545 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3546 (MUST_BE_DYN_RELOC): Define.
3547 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3548 and optimize. Trim dyn_relocs.
3549 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3550 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3551 track of pc_rel dyn relocs.
3552 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3553 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3554 allocate_dynrelocs. Don't recalculate "sec".
3555
7619e7c7
AM
35562003-02-18 Alan Modra <amodra@bigpond.net.au>
3557
d881513a
AM
3558 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3559 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3560 on invalid LD relocs.
3561 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3562 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3563 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3564
7619e7c7
AM
3565 * elf32-ppc.h: New file.
3566 * elf32-ppc.c: Include elf32-ppc.h.
3567 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3568 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3569 Add "tls_mask" field.
3570 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3571 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3572 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3573 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3574 Make use of htab shortcuts throughout file.
3575 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3576 (ppc_elf_link_hash_table_create): Init new fields.
3577 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3578 (ppc_elf_howto_raw): Add tls relocs.
3579 (ppc_elf_reloc_type_lookup): Handle them.
3580 (ppc_elf_unhandled_reloc): New function.
3581 (ppc_elf_create_got): Stash got section pointer in hash table,
3582 return status. Make .rela.got too.
3583 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3584 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3585 NON_GOT_REF set. Don't allocate space in .plt here..
3586 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3587 not allocating plt entries unnecessarily. Allocate got entries here.
3588 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3589 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3590 "info" during allocate_dynrelocs hash traversal. Use htab section
3591 shortcuts rather than searching for named sections. Get rid of
3592 "plt" and "strip" booleans.
3593 (update_local_sym_info, bad_shared_reloc): New functions.
3594 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3595 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3596 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3597 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3598 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3599 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3600 relocs that might use a plt entry. Set NON_GOT_REF too.
3601 Enumerate all do-nothing relocs.
3602 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3603 tls relocs and all plt relocs.
3604 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3605 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3606 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3607 shortcuts.
3608 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3609 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3610 entries and got relocs here. Warn on non-zero got reloc addend.
3611 Split out branch taken/not taken reloc code into a separate switch
3612 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3613 Split out HA reloc adjustments to separate switch statement. Don't
3614 warn on reloc overflow if we've already warned about undefined.
3615 Don't rebuild sym name when reporting errors. Report all possible
3616 errors from _bfd_final_link_relocate.
3617 (bfd_elf32_bfd_final_link): Don't define.
3618
cd27b276
AM
36192003-02-18 Alan Modra <amodra@bigpond.net.au>
3620
3621 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3622 rebuild sym name when reporting errors.
3623
ae9a127f
NC
36242003-02-17 Nick Clifton <nickc@redhat.com>
3625
3f9a32bd 3626 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3627 allow_shlib_undefined for shared libraries.
3628 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3629 of allow_shlib_undefined.
3630 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3631 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3632 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3633 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3634 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3635 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3636 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3637 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3638 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3639 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3640 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3641 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3642 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3643 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3644 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3645 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3646
b5f852ea
NC
36472003-02-17 Nick Clifton <nickc@redhat.com>
3648
3649 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3650 address field to use in the comparison.
3f9a32bd 3651 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3652
3193e234
NC
36532003-02-14 Bob Wilson <bob.wilson@acm.org>
3654
3655 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3656 backends when checking if the generic ELF target should be used.
3657
21efdc8d
NC
3658 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3659 outside of functions, treat values as absolute addresses.
3660
ed781d5d
NC
3661 * bfd.c: Change embedded documentation to use consistent indentation
3662 and to split up long lines. Change informal style of description
3663 for functions lacking real documentation.
3664 * coffcode.h: Break up long lines in embedded documentation.
3665 * format.c: Likewise.
3666 * targets.c: Likewise.
3667 * libcoff.h: Regenerate.
3668 * bfd-in2.h: Regenerate.
3669
58ac9f71
AM
36702003-02-14 Alan Modra <amodra@bigpond.net.au>
3671
3672 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3673 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3674 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3675 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3676 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3677 (group_sections): Don't share a stub section if stubs are for a large
3678 section. Adjust comment.
3679 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3680 !stubs_always_before_branch.
3681 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
3682 treat undefined and undefweak specially when processing dyn relocs.
3683
9147e853
JJ
36842003-02-13 Jakub Jelinek <jakub@redhat.com>
3685
3686 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
3687
427bfd90
NC
36882003-02-13 Nick Clifton <nickc@redhat.com>
3689
3690 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
3691 in computation of offset to insert into BL instruction.
3692
42b5d0ea
NC
36932003-02-11 Uwe Stieber <uwe@wwws.de>
3694
3695 * config.bfd: Add support for kaOS as cross build target system.
3696
a48ebf4d
AM
36972003-02-11 Alan Modra <amodra@bigpond.net.au>
3698
3699 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
3700 .__tls_get_addr too.
3701 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
3702
c95b8a7a
KK
37032003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
3704
3705 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
3706 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
3707 (sh_elf_link_hash_newfunc): Remove the initialization of
3708 tls_tpoff32 field.
3709 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
3710 for which tls_tpoff32 flag is set.
3711 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
3712 of the symbol includes the entry matched with the input_section
3713 and having tls_tpoff32 flag on. When linking statically, set
3714 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
3715 is defined in this executable.
3716 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
3717
a779acda
JJ
37182003-02-10 Jakub Jelinek <jakub@redhat.com>
3719
3720 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
3721 even if there is just non-empty .rela.plt.
3722
fde78edd
NC
37232003-02-10 Nick Clifton <nickc@redhat.com>
3724
3725 * archures.c (bfd_mach_arm_ep9312): Define.
3726 * bfd-in2.h: Regenerate.
3727 * cpu-arm.c (processors[]): Add ep9312.
3728 (bfd_arm_arch): Add ep9312.
3729 * elf32-arm.h (elf32_arm_merge_private_data): Update error
3730 messages and add test for Maverick floating point support.
3731 (elf32_arm_print_private_bfd_data): Handle
3732 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
3733 (elf32_arm_object_p): New function.
3734 (elf_backend_object_p): Define.
fde78edd 3735
e7b938ca
AM
37362003-02-10 Alan Modra <amodra@bigpond.net.au>
3737
3738 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
3739 variables, structure fields or function params to tls_mask or
3740 similar to better reflect usage.
3741 (struct got_entry): Comment.
9b5ecbd0 3742 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
3743 (get_tls_mask): Rename from get_tls_type.
3744
951fd09b
AM
37452003-02-09 Alan Modra <amodra@bigpond.net.au>
3746
3747 * elf64-ppc.c (TLS_GD_LD): Don't define..
3748 (TLS_GD): ..define this instead and update all uses.
3749 (TLS_TPRELGD): Define.
3750 (ppc64_elf_link_hash_table_create): Tweak initialization of
3751 init_refcount and init_offset.
3752 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
3753 Mark second slot of GD or LD toc entries.
3754 (get_tls_type): Return an int. Distinguish toc GD and LD entries
3755 from other tls types.
3756 (ppc64_elf_tls_setup): New function, split out from..
3757 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
3758 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
3759 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
3760 return value to properly decide whether toc GD and LD entries can
3761 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
3762 to determine GD or LD rather than looking at TLS_LD flag. Don't
3763 attempt to adjust got entry tls_type here..
3764 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
3765 look for possible merges.
3766 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
3767 optimization.
3768 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
3769 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
3770 Make use of return value from get_tls_type to properly detect GD and
3771 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
3772 handle tls_get_addr removal when looking at REL24 relocs, do it when
3773 looking at the previous reloc. Check reloc after DTPMOD64 to determine
3774 GD or LD.
3775 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
3776
acc990f2
AM
37772003-02-08 Alan Modra <amodra@bigpond.net.au>
3778
00b28bb0
AM
3779 * elf32-hppa.c (group_sections): Don't share a stub section if
3780 stubs are for a large section.
3781
acc990f2
AM
3782 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
3783 stubs if !stubs_always_before_branch.
3784
589e6347
NC
37852003-02-07 Nick Clifton <nickc@redhat.com>
3786
3787 * elf.c (swap_out_syms): Generate an error message if an
3788 equivalent output section cannot be found for a symbol.
3789
c328dc3f
JJ
37902003-02-07 Jakub Jelinek <jakub@redhat.com>
3791
3792 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3793 local_got_entries is NULL.
3794
84f97cb6
AS
37952003-02-06 Andreas Schwab <schwab@suse.de>
3796
3797 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3798 (read_value): Add parameter is_signed, use signed extraction if
3799 the value is signed.
3800 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3801 encoding to read_value.
3802
6349e628
AM
38032003-02-06 Alan Modra <amodra@bigpond.net.au>
3804
3805 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3806 plt info when called to transfer weak sym info.
3807
411e1bfb
AM
38082003-02-05 Alan Modra <amodra@bigpond.net.au>
3809
3810 * reloc.c: Add PPC and PPC64 TLS relocs.
3811 * libbfd.h: Regenerate.
3812 * bfd-in2.h: Regenerate.
3813 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3814 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3815 against a 32 bit field.
3816 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3817 (_ppc64_elf_section_data): Add t_symndx and comments.
3818 (ppc64_elf_section_data): Use elf_section_data macro.
3819 (ppc64_elf_new_section_hook): American spelling.
3820 (struct got_entry, struct plt_entry): New.
3821 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3822 (struct ppc_stub_hash_entry): Add "addend" field.
3823 (struct ppc_link_hash_entry): Add "tls_type".
3824 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3825 TLS_EXPLICIT): Define.
3826 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3827 (link_hash_newfunc): Init new fields.
58ac9f71 3828 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3829 init_offset to NULL.
3830 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3831 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3832 there.
3833 (update_local_sym_info, update_plt_info): New functions.
3834 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3835 handling to use got.glist rather than got.refcount. Likewise for PLT.
3836 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3837 (func_desc_adjust): Adjust for new PLT list.
3838 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3839 (get_sym_h, get_tls_type): New functions.
3840 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3841 (ppc64_elf_tls_optimize): New function.
3842 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3843 TLS relocs.
3844 (ppc64_elf_size_dynamic_sections): Likewise.
3845 (ppc_type_of_stub): Adjust for new PLT list.
3846 (ppc_build_one_stub): Likewise.
3847 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3848 calls specially.
3849 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3850 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3851 init GOT entries that have a reloc. Generate GOT relocs here..
3852 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3853 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3854
0cca5f05
AS
38552003-02-04 Andreas Schwab <schwab@suse.de>
3856
3857 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3858 (elf_m68k_link_hash_traverse): Remove.
3859 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3860 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3861 reduce casting.
3862 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3863 casting.
3864 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3865 instead of elf_m68k_link_hash_traverse.
3866 (elf_m68k_discard_copies): Change first parameter to pointer to
3867 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3868 elf_m68k_link_hash_entry is needed.
3869
5cab59f6
AM
38702003-02-04 Alan Modra <amodra@bigpond.net.au>
3871
3872 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3873 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3874 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3875 "plt" field.
3876 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3877 Add "init_offset" field.
3878 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3879 (elf_local_got_ents): Declare.
3880 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3881 and "plt".
3882 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3883 (_bfd_elf_link_hash_table_init): Set "init_offset".
3884 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3885 from init_offset.
3886 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3887
3888 * elf.c (bfd_elf_local_sym_name): Split out from..
3889 (group_signature): ..here.
3890 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3891
68bfbfcc
AM
38922003-02-04 Alan Modra <amodra@bigpond.net.au>
3893
3894 * elf-bfd.h (enum elf_link_info_type): Remove.
3895 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3896 to struct sec. Remove linkonce_p field.
3897 (elf_linkonce_p): Delete.
3898 (elf_discarded_section): Update for sec_info_type change.
3899 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3900 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3901 (ELF_INFO_TYPE_NONE): Define.
3902 (ELF_INFO_TYPE_STABS): Define.
3903 (ELF_INFO_TYPE_MERGE): Define.
3904 (ELF_INFO_TYPE_EH_FRAME): Define.
3905 (ELF_INFO_TYPE_JUST_SYMS): Define.
3906 (STD_SECTION): Update struct sec initializer.
3907 * ecoff.c (bfd_debug_section): Likewise.
3908 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3909 * elflink.h: Likewise.
3910 * elf-eh-frame.c: Likewise.
3911 * elf64-alpha.c: Likewise.
3912 * elfxx-ia64.c: Likewise.
3913 * elfxx-mips.c: Likewise.
3914 * bfd-in2.h: Regenerate.
3915
3916 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3917 referring to used_by_bfd.
3918 * elf64-sparc.c (sec_do_relax): Likewise.
3919 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3920 * elfxx-mips.c (mips_elf_section_data): Likewise.
3921 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3922 (ieee_get_section_contents): Likewise.
3923 (ieee_new_section_hook): Formatting.
3924 (ieee_canonicalize_reloc): Remove commented out code.
3925 * mmo.c (mmo_section_data): Define. Use throughout file.
3926 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3927
31f7ba04
NC
39282003-01-31 Graydon Hoare <graydon@redhat.com>
3929
3930 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3931 * Makefile.in: Regenerate.
3932 * opncls.c (calc_crc32, get_debug_link_info,
3933 seperate_debug_file_exists, find_seperate_debug_file): New
3934 internal functions.
3935 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3936 contained inside a .gnu_debuglink section.
3937 * bfd-in2.h: Regenerate.
3938
38985a1c
AO
39392003-01-29 Alexandre Oliva <aoliva@redhat.com>
3940
3941 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3942 entry->abfd when it's NULL.
3943
4bb9a95f
AO
39442003-01-27 Alexandre Oliva <aoliva@redhat.com>
3945
3946 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3947 _bfd_elf_section_offset returning -2 the same way as -1.
3948
f4416af6
AO
3949 * elfxx-mips.c (mips_elf_multi_got): New function.
3950 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3951 addend into union along with address and link hash entry.
3952 (struct mips_got_info): Added bfd2got and next.
3953 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3954 (mips_elf_got_section, mips_elf_create_got_section): Use
3955 SEC_EXCLUDE bit to tell whether we really need the got
3956 section. Take boolean arguments to disregard an excluded
3957 section, or to create it as excluded. Adjust all callers.
3958 Use mips_elf_got_section all over.
3959 (mips_elf_local_got_index, mips_elf_got_page,
3960 mips_elf_got16_entry): Take input bfd as argument, and pass it
3961 on to mips_elf_create_local_got_entry.
3962 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3963 Take input bfd as argument, and manage entries in the
3964 appropriate GOT.
3965 (mips_elf_got_offset_from_index): Take input bfd as argument,
3966 and use it to adjust the GP offset of the bfd.
3967 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3968 unreferenced GOT entries of global symbols to the end.
3969 (mips_elf_record_global_got_symbol): Take input bfd as
3970 argument. Add entries to the master GOT hash table.
3971 (struct mips_elf_bfd2got_hash): New.
3972 (struct mips_elf_got_per_bfd_arg): New.
3973 (struct mips_elf_set_global_got_offset_arg): New.
3974 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3975 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3976 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3977 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3978 mips_elf_resolve_final_got_entry,
3979 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3980 mips_elf_got_for_ibfd): New functions.
3981 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3982 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3983 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3984 (mips_elf_got_entry_hash): Take new fields into account. Use
3985 mips_elf_hash_bfd_vma.
3986 (mips_elf_got_entry_eq): Take new fields into account.
3987 (mips_elf_create_got_section): Initialize new fields.
3988 (mips_elf_calculate_relocation): Pass input_bfd to functions
3989 that now take it. Adjust gp for the input_bfd.
3990 (mips_elf_allocate_dynamic_relocation,
3991 mips_elf_create_dynamic_relocation,
3992 _bfd_mips_elf_create_dynamic_sections): Use...
3993 (mips_elf_rel_dyn_section): New function. Borrow code from...
3994 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3995 now take it. Create the got section if needed, even if
3996 excluded, before recording a global got symbol. Move some
3997 code to...
3998 (mips_elf_record_local_got_symbol): New fn.
3999 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4000 Compute multi-got global entries offsets. Move GOT code to...
4001 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4002 if the GOT is too big.
4003 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4004 undefweak symbol to zero. Generate dynamic relocations for
4005 non-primary GOT entries for global symbols.
4006 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4007 case. Generate dynamic relocations for local got entries.
4008 Sort dynamic relocations on N64 too, using...
4009 (sort_dynamic_relocs_64): New fns.
4010 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4011 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4012
52b69c9e
AO
40132003-01-27 Alexandre Oliva <aoliva@redhat.com>
4014
4015 * bfd.c (struct _bfd): Added id field.
4016 * opncls.c (_bfd_id_counter): New static variable.
4017 (_bfd_new_bfd): Use it.
4018 * bfd-in2.h: Rebuilt.
4019
71e5db1c
AM
40202003-01-25 Alan Modra <amodra@bigpond.net.au>
4021
4022 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4023
b9734f35
JJ
40242003-01-25 Jakub Jelinek <jakub@redhat.com>
4025
4026 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4027 (elf32_sparc_rev32_howto): New variable.
4028 (sparc_reloc_map): Add TLS relocs.
4029 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4030 Handle REV32.
4031 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4032 New functions.
4033 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4034 struct elf32_sparc_link_hash_table):
4035 New structures.
4036 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4037 elf32_sparc_hash_table): Define.
4038 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4039 create_got_section, elf32_sparc_create_dynamic_sections,
4040 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4041 functions.
4042 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4043 reference counting.
4044 (elf32_sparc_gc_sweep_hook): Likewise.
4045 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4046 (elf32_sparc_size_dynamic_sections): Likewise.
4047 (elf32_sparc_relocate_section): Likewise.
4048 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4049 New functions.
4050 (elf32_sparc_object_p): Allocate backend private object data.
4051 (bfd_elf32_bfd_link_hash_table_create,
4052 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4053 elf_backend_can_refcount): Define.
4054 (elf_backend_create_dynamic_sections): Define to
4055 elf32_sparc_create_dynamic_sections.
4056 * reloc.c: Add SPARC TLS relocs.
4057 * bfd-in2.h, libbfd.h: Rebuilt.
4058 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4059 (sparc_reloc_map): Likewise.
4060
69fc87f1
MS
40612003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4062
4063 * bfd-in2.h: Regenerate.
4064 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4065 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4066 (elf_howto_table): Add TLS relocs.
4067 (elf_s390_reloc_type_lookup): Likewise.
4068 (elf_s390_link_hash_entry): Add tls_type.
4069 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4070 New macros.
4071 (elf_s390_link_hash_table): Add tls_ldm_got.
4072 (link_hash_newfunc): Initialize tls_type.
4073 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4074 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4075 (elf_s390_check_relocs): Support TLS relocs.
4076 (elf_s390_gc_sweep_hook): Likewise.
4077 (allocate_dynrelocs): Likewise.
4078 (elf_s390_size_dynamic_sections): Likewise.
4079 (elf_s390_relocate_section): Likewise.
4080 (elf_s390_finish_dynamic_symbol): Likewise.
4081 (bfd_elf32_mkobject): Define for TLS.
4082 * elf64-s390.c: Same changes as for elf32-s390.c.
4083 * libbfd.h: Regenerate.
4084 * reloc.c: Add s390 TLS relocations.
4085
c5d1701e 40862003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
4087
4088 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4089
5177500f
NC
40902003-01-23 Nick Clifton <nickc@redhat.com>
4091
4092 * Add sh2e support:
5177500f 4093 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
4094 * archures.c (bfd_mach_sh2e): Added.
4095 * bfd-in2.h: Rebuilt.
4096 * cpu-sh.c (arch_info_struct): Added SH2e.
4097 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 4098
f0abc2a1
AM
40992003-01-23 Alan Modra <amodra@bigpond.net.au>
4100
4101 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4102 dynindx to an int. Rearrange for better packing.
4103 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4104 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4105 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4106 (struct _sh64_elf_section_data): New struct.
4107 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4108 * elf32-sh64-com.c: Include elf32-sh64.h.
4109 * elf32-sh64.c: Likewise.
4110 (sh64_elf_new_section_hook): New function.
4111 (bfd_elf32_new_section_hook): Define.
4112 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4113 (sh64_bfd_elf_copy_private_section_data): Likewise.
4114 (sh64_elf_final_write_processing): Likewise.
4115 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4116 (elf32_sparc_new_section_hook): New function.
4117 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4118 (sec_do_relax): Define.
4119 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4120 (elf32_sparc_relocate_section): Likewise.
4121 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4122 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4123 (mmix_elf_section_data): Define. Use throughout file.
4124 (mmix_elf_new_section_hook): New function.
4125 (bfd_elf64_new_section_hook): Define.
4126 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4127 (ppc64_elf_section_data): Define. Use throughout.
4128 (ppc64_elf_new_section_hook): New function.
4129 (bfd_elf64_new_section_hook): Define.
4130 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4131 (sparc64_elf_new_section_hook): New function.
4132 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4133 (sec_do_relax): Define.
4134 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4135 (sparc64_elf_relocate_section): Likewise.
4136 (bfd_elf64_new_section_hook): Define.
4137 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4138 * elfxx-mips.c (struct _mips_elf_section_data): New.
4139 (mips_elf_section_data): Define. Use throughout.
4140 (_bfd_mips_elf_new_section_hook): New function.
4141 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4142 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4143 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4144 * Makefile.am: Run "make dep-am".
4145 * Makefile.in: Regenerate.
4146
cc03ec80
RH
41472003-01-21 Richard Henderson <rth@redhat.com>
4148
4149 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4150 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4151 (elf64_alpha_adjust_dynamic_symbol): Set them.
4152 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4153 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4154 symbol index when relaxing LDM to TPREL.
4155 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4156 relocs, even if the target isn't locally defined.
4157 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4158 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4159 relocs vs symndx 0 to the tp base.
4160
da896d3f
NC
41612003-01-21 Fabio Alemagna <falemagn@aros.org>
4162
4163 * config.bfd: Handle i[3456]86-*-aros*.
4164
7fce784e
AS
41652003-01-21 Andreas Schwab <schwab@suse.de>
4166
4167 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4168 (struct ppc_elf_link_hash_entry): Define.
4169 (ppc_elf_hash_entry): New function.
4170 (struct ppc_elf_link_hash_table): Define.
4171 (ppc_elf_hash_table): New function.
4172 (ppc_elf_link_hash_newfunc): New function.
4173 (ppc_elf_link_hash_table_create): New function.
4174 (ppc_elf_copy_indirect_symbol): New function.
4175 (allocate_dynrelocs): New function.
4176 (readonly_dynrelocs): New function.
4177 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4178 relocs and determine DT_TEXTREL.
4179 (ppc_elf_check_relocs): Don't do that here, just count the
4180 dynamic relocs.
4181 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4182 removed section.
4183 (bfd_elf32_bfd_link_hash_table_create): Define.
4184 (elf_backend_copy_indirect_symbol): Define.
4185
1bbc9cec
RH
41862003-01-21 Richard Henderson <rth@redhat.com>
4187
4188 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4189 TPREL also get a reloc if shared. Remove SREL support.
4190 (elf64_alpha_emit_dynrel): New.
acc990f2 4191 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
4192 and GOTTPREL relocs to local symbols against the tp base.
4193 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4194
4195 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4196 use count before clobbering r_type.
4197 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4198 ordering would mean dataflow inspection is necessary.
4199
0da35f8b
SS
42002003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4201
4202 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 4203
571fe01f
NC
42042003-01-20 Fabio Alemagna <falemagn@aros.org>
4205
4206 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4207 elfxx-target.h and #undef it before #define'ing it.
4208 * elf32-i386.c: Likewise.
acc990f2
AM
4209 * elf32-sh64.c: Likewise.
4210 * elf64-alpha.c: Likewise.
4211 * elf64-sh64.c: Likewise.
571fe01f 4212
5236c819
MS
42132003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4214
4215 * bfd-in2.h: Regenerate.
4216 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4217 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4218 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4219 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4220 R_390_PLTOFF32 and R_390_PLTOFF64.
4221 (elf_s390_reloc_type_lookup): Likewise.
4222 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4223 of GOTPLT references to a function.
4224 (link_hash_newfunc): Initialize gotplt_refcount.
4225 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4226 and creation of the got section out of the main switch. Add support
4227 for the gotoff, gotplt and pltoff relocations.
4228 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4229 and pltoff.
4230 (elf_s390_adjust_gotplt): New function.
4231 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4232 plt entries.
4233 (allocate_dynrelocs): Add comment.
4234 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4235 for gotoff, gotplt and pltoff relocations.
4236 * elf64-s390.c: Same changes as for elf32-s390.c.
4237 * libbfd.h: Regenerate.
4238 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4239 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4240 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4241 and BFD_RELOC_390_PLTOFF64.
4242
a823975a
JJ
42432003-01-18 Jakub Jelinek <jakub@redhat.com>
4244
4245 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4246 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4247
b3dfd7fe
JJ
42482003-01-16 Jakub Jelinek <jakub@redhat.com>
4249
4250 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4251 self_dtpmod_done and self_dtpmod_offset.
4252 (allocate_global_data_got): Only use one got entry for all
4253 dtpmod relocs against local symbols.
4254 (allocate_dynrel_entries): Only need .rela.got entry for
4255 dtpmod against global symbol.
4256 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4257 Reserve space in .rela.got for the local dtpmod entry.
4258 (set_got_entry): Initialize the common local dtpmod .got entry.
4259 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4260 and R_IA_64_DTPREL64MSB.
4261
04c9666a
AM
42622003-01-16 Alan Modra <amodra@bigpond.net.au>
4263
4264 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4265 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4266 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4267 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4268 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4269 relative relocs, not with absolute ones.
4270 * Makefile.am: Run "make dep-am".
4271 * Makefile.in: Regenerate.
4272 * po/SRC-POTFILES.in: Regenerate.
4273
c87f1ff7
AS
42742003-01-15 Andreas Schwab <schwab@suse.de>
4275
4276 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4277 relocation against a non-allocated readonly section.
4278
86bbe32f
AM
42792003-01-10 Alan Modra <amodra@bigpond.net.au>
4280
4281 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4282 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4283
32d95f29
KD
42842002-01-08 Klee Dienes <kdienes@apple.com>
4285
4286 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4287 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4288 * Makefile.in: Regenerate.
acc990f2 4289
ab7d0aa0
AO
42902003-01-08 Alexandre Oliva <aoliva@redhat.com>
4291
4292 * elfn32-mips.c (prev_reloc_section): New.
4293 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4294 (SET_RELOC_ADDEND): Parenthesize macro argument.
4295
95d0f04a
DA
42962003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4297
4298 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4299 adjust addil instructions if the symbol has no section.
4300
5c9e189c
DD
43012003-01-07 DJ Delorie <dj@redhat.com>
4302
4303 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4304 partial_inplace.
4305
3e829b4a
AS
43062003-01-07 Andreas Schwab <schwab@suse.de>
4307
4308 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4309 PC relative relocations.
4310 (elf_m68k_discard_copies): Set it here instead.
4311
a75473eb
SC
43122002-01-02 Ben Elliston <bje@redhat.com>
4313 Jeff Johnston <jjohnstn@redhat.com>
4314
4315 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4316 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4317 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4318 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4319 (cpu-iq2000.lo): New target.
4320 * Makefile.in: Regenerate.
4321 * config.bfd: Handle iq2000-*-elf.
4322 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4323 (bfd_archures_list): Add bfd_iq2000_arch.
4324 * configure.in: Handle bfd_elf32_iq2000_vec.
4325 * configure: Regenerate.
acc990f2 4326 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4327 and BFD_RELOC_IQ2000_UHI16.
4328 * targets.c (bfd_elf32_iq2000_vec): Declare.
4329 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4330 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4331 * cpu-iq2000.c: New file.
4332 * elf32-iq2000.c: Likewise.
4333 * libbfd.h: Regenerate.
4334 * bfd-in2.h: Likewise.
4335
64543e1a
RS
43362003-01-02 Richard Sandiford <rsandifo@redhat.com>
4337
4338 * elfxx-mips.c: Include libiberty.h.
4339 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4340 (mips_set_isa_flags): New function, split out from...
4341 (_bfd_mips_elf_final_write_processing): ...here. Only call
4342 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4343 (mips_mach_extensions): New array.
4344 (mips_32bit_flags_p): New function.
4345 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4346 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4347 other is 64-bit. When adopting IBFD's architecture, adopt the
4348 bfd_mach as well as the flags.
4349
4852a44e
NC
43502003-01-02 Nick Kelsey <nickk@ubicom.com>
4351
4352 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4353 fix internal errors, fix bad code generation, fix incorrect stabs
4354 information, and improve ability to eliminate redundant page
4355 instructions. Added code to ip2k_final_link_relocate to self-verify
4356 the linker relaxation. Fix formatting problems.
4357
af7ee8bf
CD
43582002-12-30 Chris Demetriou <cgd@broadcom.com>
4359
4360 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4361 * archures.c (bfd_mach_mipsisa32r2): New define.
4362 * bfd-in2.h: Regenerate.
4363 * cpu-mips.c (I_mipsisa32r2): New enum value.
4364 (arch_info_struct): Add entry for I_mipsisa32r2.
4365 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4366 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4367 (_bfd_mips_elf_final_write_processing): Add
4368 bfd_mach_mipsisa32r2 case.
4369 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4370 binaries marked as using MIPS32 Release 2.
4371
2469cfa2
NC
43722002-12-30 Dmitry Diky <diwil@mail.ru>
4373
4374 * Makefile.am: Add msp430 target.
4375 * configure.in: Likewise.
4376 * Makefile.in: Regenerate.
4377 * configure: Regenerate.
4378 * archures.c: Add msp430 architecture vector.
4379 * config.bfd: Likewise.
4380 * reloc.c: Add msp430 relocs.
4381 * targets.c: Add msp320 target.
4382 * cpu-msp430.c: New file: msp430 cpu detection.
4383 * elf32-msp430.c: New file: msp430 reloc processing.
4384 * bfd-in2.h: Regenerate.
4385 * libbfd.h: Regenerate.
4386
eecdbe52
JJ
43872002-12-28 Jakub Jelinek <jakub@redhat.com>
4388
4389 * elf.c (elf_sort_sections): Don't reorder .tbss.
4390 (assign_file_positions_for_segments): Only adjust off/voff
4391 for increased alignment in PT_LOAD or PT_NOTE segment,
4392 but adjust p_filesz for .tbss too. in PT_LOAD consider
4393 .tbss to have zero memory size.
4394 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4395 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4396 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4397 into PT_TLS segment. Never put SHF_TLS sections in
4398 segments other than PT_TLS or PT_LOAD.
4399
4400 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4401 sh_entsize.
4402
213e90f4
DD
44032002-12-23 DJ Delorie <dj@redhat.com>
4404
4405 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4406
75828352
AM
44072002-12-23 Alan Modra <amodra@bigpond.net.au>
4408
4409 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4410
312b768e
NC
44112002-12-23 Nick Clifton <nickc@redhat.com>
4412
4413 * archures.c (bfd_arch_get_compatible): Add third parameter
4414 'accept_unknowns'. Only accept unknown format BFDs if
4415 accept_unknowns is true, or if the format is "binary".
acc990f2 4416 * bfd-in2.h: Regenerate.
312b768e 4417
63222ec9
NC
44182002-12-21 Nick Clifton <nickc@redhat.com>
4419
4420 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4421 that subtracted 8 from pc relative relocations.
4422
19852a2a
KH
44232002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4424
4425 * coff-h8300.c: Fix comment typos.
4426 * coffcode.h: Likewise.
4427 * cpu-cris.c: Likewise.
4428 * elf32-vax.c: Likewise.
4429 * genlink.h: Likewise.
4430 * linker.c: Likewise.
4431 * som.c: Likewise.
4432 * tekhex.c: Likewise.
4433 * vms-misc.c: Likewise.
4434
5fd63999
DD
44352002-12-20 DJ Delorie <dj@redhat.com>
4436
4437 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4438 * libbfd.h: Regenerate.
4439 * bfd-in2.h: Regenerate.
4440 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4441 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4442
4ee79850
KH
44432002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4444
4445 * doc/bfdint.texi: Fix typos.
4446
66e25bab
AM
44472002-12-20 Paul Eggert <eggert@twinsun.com>
4448
4449 Port to POSIX 1003.1-2001.
4450 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4451 * configure.in (build-warnings): Likewise.
4452 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4453 * aclocal.m4: Regenerate.
4454 * config.in: Regenerate.
4455 * configure: Regenerate.
4456
7dc77aaa
AM
44572002-12-19 Alan Modra <amodra@bigpond.net.au>
4458
0171ee92
AM
4459 * coff-h8300.c: Include libiberty.h.
4460 (h8300_reloc16_extra_cases): Check the hash table creator before
4461 referencing h8300 specific fields. Stash the hash table pointer
4462 in a local var. Comment typo fixes.
4463 (h8300_bfd_link_add_symbols): Likewise.
4464
1049f94e 4465 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4466 dst_mask comments.
4467 * bfd-in2.h: Regenerate.
4468
47388f4c
AM
44692002-12-18 Alan Modra <amodra@bigpond.net.au>
4470
4471 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4472 code a little. Comment on dynamic relocs against section symbols.
4473
1b3e3744
AM
44742002-12-17 Roger Sayle <roger@eyesopen.com>
4475
4476 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4477 the HP compiler's "long long".
4478
46f2b541
DD
44792002-12-16 Andrew MacLeod <amacleod@redhat.com>
4480
4481 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4482 and R_XSTORMY16_HI16) howto entries.
4483 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4484 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4485 determine the start of the second reloc table.
4486
af738ea7
NC
44872002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4488
4489 * ecofflink.c: Fix the reading of the debugging information
4490 of Tru64/Alpha binaries that are produced by recent Compaq
4491 compilers.
4492 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4493 table.
4494 (lookup_line): Because of the strange information sometimes
4495 generated by Compaq's recent compilers, change how the FDR
4496 table is searched so that PDRs (procedure descriptors) are
4497 correctly found. Note that this change is really more of a hack;
4498 however, I have included extensive documentation as to why
4499 this is the best solution short of an extensive rewrite or
4500 another hack.
4501 (fdrtab_lookup): Add comments to explain the algorithm.
4502
5354b572
AO
45032002-12-12 Alexandre Oliva <aoliva@redhat.com>
4504
4505 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4506 initializers to match struct declaration.
4507
ab3acfbe
AM
45082002-12-12 Alan Modra <amodra@bigpond.net.au>
4509
4510 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4511 * elf.c (get_program_header_size): Likewise.
4512 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4513 (m32r_elf_generic_reloc): Likewise.
4514 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4515 * elflink.h (elf_bfd_discard_info): Likewise.
4516
6348e046
AM
45172002-12-12 Alan Modra <amodra@bigpond.net.au>
4518
4519 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4520 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4521 DT_RELSZ adjustment, not output section. Avoid writing tags when
4522 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4523 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4524 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4525 DT_RELASZ adjustment, not output section. Avoid writing tags when
4526 unchanged. Adjust DT_RELA.
4527 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4528 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4529
2e7a68a8
AO
45302002-12-12 Alexandre Oliva <aoliva@redhat.com>
4531
4532 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4533 addend by 4.
4534
b15e6682
AO
45352002-12-12 Alexandre Oliva <aoliva@redhat.com>
4536
4537 * elfxx-mips.c (struct mips_got_entry): New.
4538 (struct mips_got_info): Added got_entries field.
4539 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4540 (mips_elf_local_got_index, mips_elf_got_page,
4541 mips_elf_got16_entry): Re-implement in terms of new...
4542 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4543 Change return type.
4544 (mips_elf_highest): Warning clean-up.
4545 (mips_elf_create_got_section): Initialize got_entries.
4546 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4547 local got size.
4548 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4549 GOT_PAGE entries, since we now reuse GOT16 entries.
4550
e6af3a53
NC
45512002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4552
4553 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4554 read-only section that lies after .text and before .data to be
4555 written into the output file and included in a_text.
4556 (translate_to_native_sym_flags): If an otherwise unrepresentable
4557 section was merged with .text, convert its symbols to N_TEXT
4558 symbols.
4559 * libaout.h (aout_section_merge_with_text_p): New macro.
4560
cf3d882d
AM
45612002-12-08 Alan Modra <amodra@bigpond.net.au>
4562
4563 * bfd-in.h: Comment typo fix. Formatting.
4564 * bfd-in2.h: Regenerate.
4565 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4566 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4567 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4568
2f9bd3f6
RH
45692002-12-05 Richard Henderson <rth@redhat.com>
4570
4571 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4572 Only send PCREL21B though the plt. Fix installed reloc type.
4573 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4574 against PCREL22 or PCREL64I; clean up error messages for
4575 branch relocs.
4576
d0112f73
KB
45772002-12-04 Kevin Buettner <kevinb@redhat.com>
4578
4579 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4580 New functions.
4581 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4582
c10d9d8f
JW
45832002-12-04 David Mosberger <davidm@hpl.hp.com>
4584
4585 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4586
d48770d4
L
45872002-12-04 H.J. Lu <hjl@gnu.org>
4588
4589 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4590 BFD address when constructing local name.
4591
b6152c34
AS
45922002-12-04 Andreas Schwab <schwab@suse.de>
4593
4594 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4595 member.
4596 (elf_m68k_link_hash_table_create): Initialize it.
4597 (elf_m68k_check_relocs): Handle symbols that are forced to be
4598 local due to visibility changes.
4599 (elf_m68k_adjust_dynamic_symbol): Likewise.
4600 (elf_m68k_size_dynamic_sections): Likewise.
4601 (elf_m68k_discard_copies): Likewise.
4602 (elf_m68k_relocate_section): Likewise.
4603
73374ef1
AM
46042002-12-04 Alan Modra <amodra@bigpond.net.au>
4605
4606 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4607
c5c1944d
AM
46082002-12-04 Alan Modra <amodra@bigpond.net.au>
4609
4610 * srec.c (srec_write_symbols): Restore '$' prefix to address
4611 accidentally removed in 2002-04-04 change.
4612 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4613
e1a9cb8e
NC
46142002-12-03 Nick Clifton <nickc@redhat.com>
4615
4616 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4617 (apuinfo_list_add): New function: Add a value to the list.
4618 (apuinfo_list_length): New function: Return the number of
4619 values on the list.
4620 (apuinfo_list_element): New function: Return a value on the
4621 list.
4622 (apuinfo_list_finish): New function: Free the resources used
4623 by the list.
4624 (ppc_elf_begin_write_processing): New function. Scan the
4625 input bfds for apuinfo sections.
4626 (ppc_elf_write_section): New function: Delay the creation of
4627 the contents of an apuinfo section in an output bfd.
4628 (ppc_elf_final_write_processing): New function. Create the
4629 contents of an apuinfo section in an output bfd.
4630 (elf_backend_begin_write_processing): Define.
4631 (elf_backend_final_write_processing): Define.
4632 (elf_backend_write_section): Define.
e1a9cb8e 4633
a823923b
RH
46342002-12-03 Richard Henderson <rth@redhat.com>
4635
4636 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4637
30491647
SC
46382002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4639
4640 Fix PR savannah/1417:
4641 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4642 branch if it goes to the start of the deleted region.
4643
bc7c6a90
SC
46442002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4645
4646 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4647 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4648 bfd_mach_m6812s): Declare.
4649
4650 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4651 (_bfd_m68hc12_elf_set_private_flags): Call it.
4652 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4653 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4654 report microcontroller incompatibilities (HC12 vs HCS12).
4655 (elf_backend_object_p): Update.
4656
b34976b6
AM
46572002-11-30 Alan Modra <amodra@bigpond.net.au>
4658
4659 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4660 (enum bfd_boolean, boolean): Delete.
4661 (bfd_boolean): Typedef to an int.
4662 (FALSE, TRUE): Define.
4663 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4664 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4665 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4666 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4667 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4668 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4669 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4670 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4671 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4672 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4673 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4674 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4675 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4676 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4677 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4678 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4679 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4680 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4681 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
4682 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
4683 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
4684 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
4685 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
4686 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
4687 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
4688 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4689 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4690 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4691 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
4692 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
4693 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4694 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
4695 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
4696 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
4697 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
4698 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
4699 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
4700 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
4701 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
4702 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
4703 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
4704 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
4705 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
4706 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
4707 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
4708 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
4709 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
4710 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 4711 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
4712 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
4713 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
4714 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
4715 of bfd_boolean vars with TRUE/FALSE. Formatting.
4716 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
4717
947216bf
AM
47182002-11-28 Alan Modra <amodra@bigpond.net.au>
4719
4720 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
4721 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
4722 with Elf_Internal_Rela.
4723 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
4724 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
4725 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
4726 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
4727 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
4728 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
4729 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
4730 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
4731 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4732 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
4733 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
4734 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
4735 throughout instead.
4736 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
4737 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
4738 Remove INLINE keyword.
4739 (elf_swap_reloc_in): Likewise. Also clear r_addend.
4740 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
4741 as a bfd_byte *.
4742 (elf_write_relocs): Consolidate REL and RELA code.
4743 (elf_slurp_reloc_table_from_section): Simplify REL code.
4744 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
4745 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
4746 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
4747 RELA code.
4748 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
4749 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
4750 (elf_link_output_relocs): Likewise.
4751 (elf_reloc_link_order): Likewise.
4752 (elf_finish_pointer_linker_section): Likewise.
4753 (struct elf_link_sort_rela): Remove union.
4754 (elf_link_sort_cmp1): Update to suit.
4755 (elf_link_sort_cmp2): Here too.
4756 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
4757 over-allocation for int_rels_per_ext_rel != 1 case.
4758 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
4759 * elf32-i386.c: Likewise.
4760 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
4761 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
4762 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
4763 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
4764 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
4765 elf64-sparc.c, elf64-x86-64.c: Likewise.
4766 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
4767 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
4768 bfd_elf32_swap_reloc_in.
4769
4770 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
4771 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
4772 (mips_elf64_swap_reloc_in): Zero r_addend.
4773 (mips_elf64_be_swap_reloc_in): Likewise.
4774 (mips_elf64_slurp_one_reloc_table): Simplify.
4775
4776 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
4777 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
4778 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
4779
1448fa32
KK
47802002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4781
4782 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 4783 unresolved debugging relocs in dynamic applications.
1448fa32
KK
4784 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4785
73722af0
AM
47862002-11-26 Alan Modra <amodra@bigpond.net.au>
4787
4788 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4789 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4790 on a relocatable link. Comment typos.
4791 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4792 in the order they are declared. Clear elf_hash_value too.
4793 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4794 eh_info and tls_segment.
4795 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4796 sorted when discarding relocs by turning them into R_*_NONE.
4797
4798 * libbfd.c (warn_deprecated): Comment spelling.
4799 * po/SRC-POTFILES.in: Regenerate.
4800
7c25b72c
RH
48012002-11-21 Richard Henderson <rth@redhat.com>
4802
4803 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4804 arch's st_other bits when merging visibilities.
4805 (elf_link_output_extsym): Tidy clearing of visibility field.
4806
dc12c51f
AM
48072002-11-21 Alan Modra <amodra@bigpond.net.au>
4808
4809 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4810 (SWAP_OUT_RELOC_OFFSET): Define.
4811
963f13ec
AO
48122002-11-20 Alexandre Oliva <aoliva@redhat.com>
4813
4814 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4815 can_refcount is properly extended to the type of
4816 init_refcount.
4817
ee6423ed
AO
48182002-11-19 Alexandre Oliva <aoliva@redhat.com>
4819
4ffba85c
AO
4820 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4821 (_bfd_mips_elf_relocate_section): Use it.
4822
ee6423ed
AO
4823 * elfxx-mips.c (MNAME): New macro.
4824 (_bfd_mips_elf_check_relocs): Use it.
4825 (_bfd_mips_elf_discard_info): Likewise.
4826 (_bfd_mips_elf_final_link): Likewise.
4827
cdcf6e38
AM
48282002-11-19 Alan Modra <amodra@bigpond.net.au>
4829
4830 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4831 rel_hdr.sh_size too.
4832
93509525
KD
48332002-11-18 Klee Dienes <kdienes@apple.com>
4834
4835 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4836 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4837 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4838 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4839 Add dependencies for bfdwin.c, bfdio.c.
4840 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4841 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4842 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4843 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4844 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4845 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4846 bfd_get_size (moved from libbfd.c and bfd.c).
4847 * bfdwin.c New file. Contains _bfd_window_internal,
4848 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4849 libbfd.c and bfd.c).
4850 * po/SRC-POTFILES.in: Regenerate.
4851 * po/bfd.pot: Regenerate.
4852 * libbfd.h: Regenerate.
4853 * bfd-in2.h: Regenerate.
4854 * aclocal.m4: Regenerate.
4855 * Makefile.in: Regenerate.
4856 * configure: Regenerate.
4857
3ae41454
AM
48582002-11-18 Klee Dienes <kdienes@apple.com>
4859
4860 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4861
e514ac71
NC
48622002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4863
4864 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4865 jsr after a short jump.
4866 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4867
eddc4f81
KD
48682002-11-15 Klee Dienes <kdienes@apple.com>
4869
4870 * pef.c (bfd_pef_convert_architecture): Move declaration of
4871 ARCH_POWERPC and ARCH_M68K to the start of the function.
4872
51908eee
SS
48732002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4874
4875 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4876
3416d2e7
HPN
48772002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4878
4879 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4880 For bpo_gregs_section->contents, allocate _raw_size, not
4881 _cooked_size.
4882
b1c58715
AM
48832002-11-13 Klee Dienes <kdienes@apple.com>
4884
4885 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4886
077ca68b
L
48872002-11-13 H.J. Lu <hjl@gnu.org>
4888
4889 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4890
e84d6fca
AM
48912002-11-13 Klee Dienes <kdienes@apple.com>
4892 Alan Modra <amodra@bigpond.net.au>
4893
4894 * bfd.c (struct bfd_preserve): New.
4895 (bfd_preserve_save): New function.
4896 (bfd_preserve_restore): Ditto.
4897 (bfd_preserve_finish): Ditto.
4898 * bfd-in2.h: Regenerate.
4899 * mach-o.c: Formatting.
4900 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4901 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4902 (bfd_mach_o_core_p): Ditto.
4903 (bfd_mach_o_scan): Pass in mdata.
4904 * mach-o.h (bfd_mach_o_scan): Update prototype.
4905 * pef.c: Formatting.
4906 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4907 (bfd_pef_xlib_object_p): Ditto.
4908 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4909 * pef.h (bfd_pef_scan): Update prototype.
4910 * xsym.c: Formatting, K&R fixes.
4911 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4912 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4913 * xsym.h (bfd_sym_scan): Declare.
4914 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4915 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4916 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4917
cd24c222
NC
49182002-11-12 Nick Clifton <nickc@redhat.com>
4919
4920 * po/da.po: Updated Danish translation.
4921
99eb2ac8
AM
49222002-11-12 Alan Modra <amodra@bigpond.net.au>
4923
d6fe2dc1
AM
4924 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4925 relocatable link too.
4926 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4927 eh_frame and stab sections. Zap deleted relocs.
4928 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4929 (elf_bfd_discard_info): Run for relocatable link too.
4930 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4931 Handle ld -r case.
4932 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4933 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4934
126495ed
AM
4935 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4936 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4937 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4938 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4939 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4940 (struct elf_link_hash_table): Add eh_info.
4941 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4942 (_bfd_elf_discard_section_eh_frame): Update prototype.
4943 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4944 (_bfd_elf_write_section_eh_frame): Likewise.
4945 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4946 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4947 param. Get "hdr_info" from link hash table.
4948 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4949 header section from link hash table. Save header section to elf_tdata.
4950 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4951 header section from link hash table. Don't alloc hdr_info. Clear
4952 hdr_sec instead of setting "strip".
4953 (_bfd_elf_eh_frame_section_offset): Formatting.
4954 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4955 Get header section from link hash table.
4956 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4957 Get header section from link hash table.
4958 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4959 (get_program_header_size): Likewise.
4960 (_bfd_elf_section_offset): Formatting.
4961 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4962 section pointer in link hash table.
4963 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4964 and _bfd_elf_write_section_eh_frame calls. Update comment about
4965 eh_frame entries.
4966 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4967 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4968
4969 * po/SRC-POTFILES.in: Regenerate.
4970
99eb2ac8
AM
4971 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4972 relocs for discarded FDEs. Remove dead code.
4973 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4974 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4975 Tidy conditions under which stabs are edited. Formatting.
4976 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4977 from discarded relocs.
4978 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4979 section adjustments after testing magic values.
4980
7c319a27
AM
49812002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4982
4983 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4984 references to large plt symbols.
4985
a95a4550
AM
49862002-11-12 Klee Dienes <kdienes@apple.com>
4987
4988 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4989 looking for an unused section name.
4990
bc7eab72
KH
49912002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4992
4993 * coff-h8300.c: Fix formatting.
4994 * elf32-h8300.c: Likewise.
4995 * reloc16.c: Likewise.
4996
52585bb8
AM
49972002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4998
4999 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5000 section when dynamic section unused; _bfd_strip_section_from_output
5001 instead.
5002
9f632188
AM
50032002-11-08 Alan Modra <amodra@bigpond.net.au>
5004
207b304b
AM
5005 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5006 and sym_vec.
3b029f65 5007
9f632188
AM
5008 * dwarf2.c: Revert last change.
5009
ec4530b5
NC
50102002-11-07 Michal Ludvig <mludvig@suse.cz>
5011
9b5ecbd0 5012 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
5013 _bfd_dwarf2_find_nearest_line): Use
5014 bfd_simple_get_relocated_section_contents() instead of
5015 bfd_get_section_contents().
5016 * reloc.c (bfd_perform_relocation): Add sanity check.
5017 * simple.c (simple_get_relocated_section_contents): If the section
5018 does not have any relocs associated with it, just return the
5019 unadjusted contents.
5020
205cfeb0
HPN
50212002-11-07 Hans-Peter Nilsson <hp@axis.com>
5022
5023 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5024 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5025 contents, enabling for a non-DSO, for symbols defined in the
5026 program with --export-dynamic.
5027
87e226ce
AM
50282002-11-07 Alan Modra <amodra@bigpond.net.au>
5029
5030 * elf64-ppc.c: Comment typo fixes.
5031 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5032
235c4794
NC
50332002-11-07 Nick Clifton <nickc@redhat.com>
5034
5035 * po/da.po: Updated Danish translation.
5036
49179469
AO
50372002-11-06 Alexandre Oliva <aoliva@redhat.com>
5038
5039 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5040 exactly three internal relocs per external reloc. Set reloc_count
5041 to the external reloc count.
5042
246178f2
NC
50432002-11-06 Klee Dienes <kdienes@apple.com>
5044
3ae41454 5045 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
5046 Fix comment formatting.
5047
3af9a47b
NC
50482002-11-06 Klee Dienes <kdienes@apple.com>
5049
3ae41454 5050 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
5051 xsym.lo.
5052 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5053 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5054 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5055 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5056 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5057 sym.
3ae41454 5058 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
5059 * Makefile.in: Regenerate.
5060 * doc/Makefile.in: Regenerate.
3ae41454 5061 * bfd-in2.h: Regenerate.
3af9a47b
NC
5062 * xsym.c: New file. Contains support for the Apple/Metrowerks
5063 xSYM debugging format.
5064 * xsym.h: New file.
5065 * pef.c: New file. Contains support for the Apple Code Fragment
5066 Manager Preferred Executable Format
5067 * pef.h: New file.
5068 * pef-traceback.h: New file. Contains support for parsing PowerPC
5069 traceback tables as used by PEF executables (and perhaps other
5070 systems as well).
3ae41454 5071 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
5072 format.
5073 * mach-o.h: New file.
5074 * mach-o-target.c: New file. Declares the mach-o targets
5075 themselves. Included three times by mach-o.c; each time with a
5076 different set of macros set.
3ae41454 5077
b6821651 50782002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
5079
5080 * Makefile.am: Remove entries for elf32-qnx.[ch].
5081 * Makefile.in: Regenerate.
5082 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5083 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5084 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5085 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5086 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5087 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5088 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5089 * configure: Regenerate.
5090 * elf32-qnx.c: Remove.
5091 * elf32-qnx.h: Remove.
5092 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5093 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
5094 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5095 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
5096 * elf32-i386.c: Remove QNX extended bfd support.
5097 * elf32-ppc.c: Remove QNX extended bfd support.
5098 * elf32-sh.c: Remove QNX extended bfd support.
5099 * elfarm-nabi.c: Remove QNX extended bfd support.
5100 * targets.c: Remove qnx vectors.
5101 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5102 (elf_backend_is_contained_by_filepos): Remove.
5103 (elf_backend_copy_private_bfd_data_p): Remove.
5104 * po/SRC-POTFILES.in: Regenerate.
5105
b6821651
AM
51062002-11-06 David O'Brien <obrien@FreeBSD.org>
5107 Alan Modra <amodra@bigpond.net.au>
5108
5109 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5110 dynamic relocs against section symbols for the output section vma.
5111
51122002-11-05 Alan Modra <amodra@bigpond.net.au>
5113
5114 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5115 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5116
08f74004
AM
51172002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5118 Alan Modra <amodra@bigpond.net.au>
5119
5120 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5121 vectors in target_selvecs.
5122 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5123 in target_selvecs.
5124 (sh-*-netbsdelf*): Likewise.
5125 * configure.in (assocvecs): New variable. Handle assocvecs like
5126 selvecs.
5127 * configure: Regenerate.
5128 * format.c (bfd_check_format_matches): Store bfd_target pointers
5129 in matching_vector instead of target names. Select first target
5130 from bfd_associated_vector that matches a list of ambiguous targets.
5131 * targets.c (_bfd_associated_vector): New array.
5132 (bfd_associated_vector): New variable.
5133 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5134 * libbfd-in.h (bfd_associated_vector): Declare.
5135 * libbfd.h: Regenerate.
5136
89117aab
AM
51372002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5138
5139 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5140 non-NULL before dereferencing.
5141
5e9aae3e
KK
51422002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5143
5144 * vms.c (vms_object_p): Restore the start address when returning
5145 NULL.
5146
c97e73dd
AM
51472002-11-04 Alan Modra <amodra@bigpond.net.au>
5148 Hans-Peter Nilsson <hp@axis.com>
5149
5150 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5151 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5152 Set up a larger symshndxbuf, and write it out. Free it on
5153 exit rather than freeing symbuf twice. Correct section index
5154 on output section symbol loop.
5155 (elf_link_output_sym): Accumulate symbol extension section
5156 indices, reallocating symshndxbuf rather than writing it out.
5157 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5158 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5159 Use bfd_zalloc to clear i_shdrp[0] too.
5160
3463048e
SC
51612002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5162
5163 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5164 _raw_size of cranges section if _cooked_size not yet set.
5165
63a23799
HPN
51662002-11-03 Hans-Peter Nilsson <hp@axis.com>
5167
5168 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5169 for bfd_elf32_swap_symbol_out.
5170
e68cc12e
DB
51712002-10-31 David O'Brien <obrien@FreeBSD.org>
5172
5173 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5174 signed and unsigned in comparison.
5175
db4b6d01
DJ
51762002-10-30 Daniel Jacobowitz <drow@mvista.com>
5177
5178 * coffcode.h: Remove extraneous '\'.
5179
840f0243
L
51802002-10-28 H.J. Lu <hjl@gnu.org>
5181
5182 * Makefile.am (targets.lo): Depend on Makefile instead of
5183 config.status.
5184 (archures.lo): Likewise.
5185 * Makefile.in: Regenerated.
5186
05a7e2db
JT
51872002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5188
5189 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5190 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5191 targ_selvecs.
5192
a0087177
JW
51932002-10-25 Jim Wilson <wilson@redhat.com>
5194
5195 * elf64-sh64.c (sh_elf64_relocate_section): Call
5196 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5197 of SHF_MERGE section.
5198
8718ac9c
HPN
51992002-10-25 Hans-Peter Nilsson <hp@axis.com>
5200
5201 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5202
d45913a0
DA
52032002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5204
5205 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5206 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5207 unsigned int.
5208 (NAME(aout,final_link)): Cast enum used in assignment.
5209 (aout_link_write_symbols): Cast enums in comparisons, int values to
5210 boolean, enums in assignments to int.
5211 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5212 (aout_link_input_section_ext): Likewise. Cast enums used in
5213 comparisons with unsigned ints.
d45913a0
DA
5214 (aout_link_reloc_link_order): Cast enum to int in assignment.
5215 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5216 calls to char *.
5217 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5218 assignment.
5219 * bfd-in2.h (bfd_set_section_vma): Likewise.
5220 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5221 * binary.c (bfd_alloc): Cast enum to long.
5222 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5223 * dwarf2.c (read_abbrevs): Add casts to enum types.
5224 (read_attribute_value): Likewise.
5225 (arange_add): Cast result of bfd_zalloc call.
5226 (comp_unit_contains_address): Return true and false.
5227 (comp_unit_find_nearest_line): Cast return to boolean.
5228 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5229 * gen-aout.c: define macro '_' if not defined.
5230 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5231 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5232 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5233 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5234 (bfd_generic_is_local_label_name): Cast return to boolean.
5235 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5236 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5237 struct bfd_hash_entry *.
5238 (_bfd_generic_link_hash_newfunc): likewise.
5239 (_bfd_generic_final_link): Cast enum to unsigned int.
5240 * merge.c (sec_merge_emit): Cast return to boolean.
5241 (merge_strings): Add casts to const unsigned char *.
5242 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5243 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5244 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5245 to struct bfd_hash_entry *.
d45913a0
DA
5246 (bfd_set_section_content): Add cast to PTR in comparison.
5247 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5248 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5249 simple_dummy_unattached_reloc,
5250 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5251 function definitions.
5252 * srec.c (S3Forced): Initialize to false.
5253 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5254 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5255 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5256 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5257 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5258 comparisons.
5259
475c2a7e
JJ
52602002-10-23 Jakub Jelinek <jakub@redhat.com>
5261
5262 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5263 relocs into shared lib non-allocated reloc sections.
5264
e82ce529
AM
52652002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5266
5267 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5268 sorted even when given an out-of-order line sequence.
5269 (lookup_address_in_line_info_table): When an exact VMA match is
5270 not found, return line information with the closest VMA.
5271
f2482cb2
NC
52722002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5273
5274 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5275 HPUX 11.00 patch PHSS_26559.
5276
c1fd6598
AO
52772002-10-22 Alexandre Oliva <aoliva@redhat.com>
5278
5279 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5280 the options section into a separate section unless IRIX 6
5281 compatibility is enabled.
5282
033fd5f9
AO
52832002-10-22 Alexandre Oliva <aoliva@redhat.com>
5284
5285 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5286 into arrays.
5287 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5288 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5289 into account.
5290 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5291 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5292
ef485c01
AM
52932002-10-21 Graeme Peterson <gp@qnx.com>
5294
5295 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5296
b50afec9
AM
52972002-10-21 Alan Modra <amodra@bigpond.net.au>
5298
5299 * targets.c (bfd_target_list): Don't return the default target twice.
5300
5fe39cae
AM
53012002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5302
5303 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5304 perror with bfd_perror.
5305
5d603aa9
L
53062002-10-19 H.J. Lu <hjl@gnu.org>
5307
5308 * elflink.h (elf_link_add_object_symbols): Correctly handle
5309 DT_RPATH and DT_RUNPATH.
5310
e377ab71
MK
53112002-10-19 Mark Kettenis <kettenis@gnu.org>
5312
5313 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5314
0d09fec6
DC
53152002-10-17 Denis Chertykov <denisc@overta.ru>
5316
5317 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5318 for ip2k port.
5319
acf8aed4
AM
53202002-10-17 Alan Modra <amodra@bigpond.net.au>
5321
5322 * elfxx-target.h (USE_REL): Don't define as 1.
5323 * elf32-arm.h (USE_REL): Provide a default define of 0.
5324 Use #if rather than #ifdef when testing USE_REL.
5325 * elf32-m32r.c: Likewise.
5326
5327 * elf32-arc.c (USE_REL): Define as 1.
5328 * elf32-d10v.c (USE_REL): Likewise.
5329 * elf32-m32r.c (USE_REL): Likewise.
5330 * elf32-m68hc11.c (USE_REL): Likewise.
5331 * elf32-m68hc12.c (USE_REL): Likewise.
5332 * elf32-or32.c (USE_REL): Likewise.
5333 * elfarm-nabi.c (USE_REL): Likewise.
5334
f52d1d64
JJ
53352002-10-16 Jakub Jelinek <jakub@redhat.com>
5336
5337 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5338 (s390x-*-linux*): Add targ_selvecs.
5339
2bc3c89a
AM
53402002-10-16 Alan Modra <amodra@bigpond.net.au>
5341
5342 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5343 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5344 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5345 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5346 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5347 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5348 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5349 (SOURCE_HFILES): Add elf32-qnx.h.
5350 (BUILD_HFILES): Add bfdver.h.
5351 Run "make dep-am".
5352 * Makefile.in: Regenerate.
5353 * configure.in Update bfd vector dependencies.
5354 * configure: Regenerate.
5355 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5356 * elf32-i386qnx.c: Likewise.
5357 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5358 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5359 * elf32-sh-lin.c: Likewise.
5360 * elf32-shqnx.c: Likewise.
5361 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5362 * elf32-sh64-nbsd.c: Likewise.
5363 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5364 * elf64-sh64-nbsd.c: Likewise.
5365 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5366 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5367 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5368 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5369 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5370 (elf_backend_is_contained_by_filepos): Likewise.
5371 (elf_backend_copy_private_bfd_data_p): Likewise.
5372 Globalize and move functions to..
5373 * elf32-qnx.c: ..here. New file.
5374 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5375 emit target vectors when INCLUDE_SHMEDIA.
5376 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5377 end of file.
5378 * elf64-sh64.c: Remove ELF_ARCH test.
5379 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5380 * po/BLD-POTFILES.in: Regenerate.
5381 * po/SRC-POTFILES.in: Regenerate.
5382
90c9df85
AM
53832002-10-16 Alan Modra <amodra@bigpond.net.au>
5384
366f2964
AM
5385 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5386 loaded with --just-symbols.
5387
90c9df85
AM
5388 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5389 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5390 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5391 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5392
2238051f
RH
53932002-10-15 Richard Henderson <rth@redhat.com>
5394
5395 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5396 (BFD64_BACKENDS_CFILES): Likewise.
5397 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5398 * elf64-alpha-fbsd.c: Remove file, move code ...
5399 * elf64-alpha.c: ... here.
5400 * Makefile.in, configure: Rebuild.
5401
64e04ecd
RH
54022002-10-14 Richard Henderson <rth@redhat.com>
5403
5404 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5405 VALUE, not ADDEND.
5406
396a6083
SC
54072002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5408
5409 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5410 datalabel_got_offset with union of datalabel_got
5411 offset and refcount.
5412 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5413 (allocate_dynrelocs): Delete unnecessary code for
5414 STT_DATALABEL type. Create entry in got for
5415 datalabel version of symbol if datalabel_got.refcount > 0.
5416 (sh_elf_relocate_section): Use datalabel_got union.
5417 (sh_elf_gc_sweep_hook): Pull common code to initialize
5418 h and eh out of switch statement. Declare seen_stt_datalabel.
5419 Initialize it. Decrement datalabel_got.refcount for
5420 got relocs when seen_stt_datalabel is true.
5421 Decrement local_got_refcounts entry for datalabel got relocs
5422 of local symbols.
5423 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5424 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5425 Initialize it. When seen_stt_datalabel is true, increment
5426 datalabel_got refcount rather than got.refcount.
5427 (sh_elf_finish_dynamic_symbol): Create relocs to
5428 initialize got entry for datalabel version of symbol.
5429
6a0735ef
AM
54302002-10-14 Alan Modra <amodra@bigpond.net.au>
5431
5432 * Makefile.am: Run "make dep-am".
5433 (BFD_H_FILES): Remove version.h.
5434 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5435 * version.h: ..to here.
5436 * configure.in (bfd_version_date): Remove.
5437 (AC_OUTPUT): Make bfdver.h from version.h.
5438 * bfd.c: #include "bfdver.h".
5439 * vms-hdr.c: Likewise.
5440 * Makefile.in: Regenerate.
5441 * bfd-in2.h: Regenerate.
5442 * configure: Regenerate.
5443 * po/SRC-POTFILES.in: Regenerate.
5444
686e4055
AM
54452002-10-14 Alan Modra <amodra@bigpond.net.au>
5446
5447 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5448 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5449 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5450 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5451 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5452 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5453 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5454 bfd_mach_ip2022, bfd_mach_ip2022ext,
5455 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5456 * bfd-in2.h: Regenerate.
5457
019dca2b
KK
54582002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5459
5460 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5461 endian vector to targ_selvecs.
5462
bce03d3d
AO
54632002-10-13 Alexandre Oliva <aoliva@redhat.com>
5464
5465 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5466 save_addend argument. Don't apply the 32-bit mask to a
5467 GPREL32 value if it's to be used in another relocation. Don't
5468 use forced-check computation of local_p to decide whether to
5469 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5470 of the addend of a non-in-place GPREL16 relocation.
5471 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5472 mips_elf_calculate_relocation().
5473
9b691193
SC
54742002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5475
5476 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5477 with symbols in other sections if we relaxed something; the sections
5478 output offsets must be re-computed before.
5479
1f4c5b47
SC
54802002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5481
5482 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5483 handling to use Elf_Internal_Sym.
5484 (m68hc11_elf_relax_delete_bytes): Likewise.
5485
5dc97655
KK
54862002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5487
5488 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5489 sh_elf_object_p, dtpoff_base): New functions.
5490 (sh_elf_howto_table): Add TLS relocs.
5491 (sh_reloc_map): Likewise.
5492 (sh_elf_info_to_howto): Support TLS relocs.
5493 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5494 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5495 New macros.
5496 (sh_elf_obj_tdata): New.
5497 (elf_sh_link_hash_table): Add tls_ldm_got.
5498 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5499 (allocate_dynrelocs): Support TLS relocs.
5500 (sh_elf_size_dynamic_sections): Likewise.
5501 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5502 .rela.got section when found already. Return false after printing
5503 error about unresolvable relocation.
5504 (sh_elf_gc_sweep_hook): Support TLS relocs.
5505 (sh_elf_check_relocs): Likewise.
5506 (sh_elf_finish_dynamic_symbol): Likewise.
5507 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5508 * reloc.c: Add SH TLS relocs.
5509 * bfd-in2.h, libbfd.h: Regenerate.
5510
6a0735ef
AM
55112002-10-11 Daniel Jacobowitz <drow@mvista.com>
5512
5513 * Makefile.in: Regenerated.
5514
af39267e
DJ
55152002-10-11 Daniel Jacobowitz <drow@mvista.com>
5516
5517 * Makefile.am: Run dep-am.
6a0735ef 5518 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5519 (BFD32_LIBS): Add simple.lo.
5520 (BFD32_LIBS_CFILES): Add simple.c.
5521 * Makefile.in: Regenerated.
5522 * bfd-in2.h: Regenerated.
5523 * simple.c: New file.
5524
0be617ce
AM
55252002-10-11 Alan Modra <amodra@bigpond.net.au>
5526
14a793b2
AM
5527 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5528 (record_thumb_to_arm_glue): Likewise.
5529 * ecoff.c (ecoff_link_add_externals): Likewise.
5530 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5531 (record_thumb_to_arm_glue): Likewise.
5532 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5533 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5534 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5535 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5536 * elf64-ppc.c (func_desc_adjust): Likewise.
5537 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5538 (sh64_elf64_create_dynamic_sections): Likewise.
5539 * elflink.c (_bfd_elf_create_got_section): Likewise.
5540 (_bfd_elf_create_dynamic_sections): Likewise.
5541 (_bfd_elf_create_linker_section): Likewise.
5542 * elflink.h (elf_add_default_symbol): Likewise.
5543 (elf_link_create_dynamic_sections): Likewise.
5544 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5545 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5546 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5547 (_bfd_mips_elf_add_symbol_hook): Likewise.
5548 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5549 * linker.c (generic_link_add_symbol_list): Likewise.
5550 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5551
5552 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5553
0be617ce 5554 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5555 completely removed. Correct local sym adjustment.
0be617ce 5556
0a4ef3f4
SC
55572002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5558
5559 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5560 Correct mistake in calculation of address of .got.
5561 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5562 elf_sh64_pic_plt_entry_le): Likewise.
5563
efacd36e
SC
55642002-10-09 Richard Shann <richard.shann@superh.com>
5565 Stephen Clarke <stephen.clarke@superh.com>
5566
5567 * Makefile.am: Add entries for elf32-sh64-lin.c and
5568 elf64-sh64-lin.c. Regenerate.
5569 * Makefile.in: Regenerate.
9b5ecbd0 5570 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5571 to use sh64 vectors rather than sh vectors.
5572 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5573 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5574 * configure: Regenerate.
5575 * elf32-sh64-lin.c: New file.
5576 * elf64-sh64-lin.c: New file.
5577 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5578 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5579
299bf759
L
55802002-10-08 H.J. Lu <hjl@gnu.org>
5581
5582 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5583 IE->LE transition for R_386_TLS_IE.
5584
51020317
AM
55852002-10-08 Alan Modra <amodra@bigpond.net.au>
5586
5587 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5588
a8fcf378
NC
55892002-10-07 Mark Elbrecht <snowball3@softhome.net>
5590
51020317
AM
5591 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5592 sections.
a8fcf378 5593
a16d5acb
AM
55942002-10-07 Alan Modra <amodra@bigpond.net.au>
5595
a6b511bd
AM
5596 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5597 code.
5598
a16d5acb
AM
5599 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5600
7c4a37eb
AM
56012002-10-06 Alan Modra <amodra@bigpond.net.au>
5602
5603 * opncls.c: Formatting.
5604 (_bfd_new_bfd): Use a smaller section hash table.
5605
7c4ca42d
AO
56062002-10-05 Alexandre Oliva <aoliva@redhat.com>
5607
5608 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5609 of the other two relocations packed with a REL32 to NONE.
5610
4989d792
SC
56112002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5612
5613 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5614 (sh_elf_link_hash_newfunc): Initialize it.
5615 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5616 to got.refcount for symbols that are forced local or when
5617 we have direct got refs.
5618 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5619 to correctly adjust got.refcount and plt.refcount.
5620 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5621 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5622
7c445aa3
JJ
56232002-10-01 Jakub Jelinek <jakub@redhat.com>
5624
5625 * elf32-i386.c (elf_i386_relocate_section): Fix
5626 movl foo@indntpoff, %eax IE->LE transition.
5627
abcf1d52
JJ
56282002-10-01 Jakub Jelinek <jakub@redhat.com>
5629
5630 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5631 sequence and its transitions.
5632
a45bb67d
JJ
56332002-10-01 Jakub Jelinek <jakub@redhat.com>
5634
5635 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5636 to st_value + addend in non-code sections.
5637 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5638 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5639
00707a0e 56402002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5641 Ken Raeburn <raeburn@cygnus.com>
5642 Aldy Hernandez <aldyh@redhat.com>
5643 Eric Christopher <echristo@redhat.com>
5644 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5645
5646 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5647 (bfd_mach_mips5500): New.
5648 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5649 (arch_info_struct): Add corresponding entries here.
5650 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5651 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5652 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5653 bfd_mach_mips5400 and bfd_mach_mips5500.
5654 (_bfd_mips_elf_mach_extends_p): New function.
5655 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5656 the EF_MIPS_MACH flags.
5657 * bfd-in2.h: Regenerate.
5658
624f0b25
JT
56592002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5660
5661 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5662 .got sections.
5663
b89fe0ee
AM
56642002-09-28 Alan Modra <amodra@bigpond.net.au>
5665
5666 * elf.c (map_sections_to_segments): Correct test for start of
5667 writable section in the same page as end of read-only section.
5668
b29635ba
JT
56692002-09-27 Matt Thomas <matt@3am-software.com>
5670
5671 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5672 local_got_refcounts usage. Remove allocation of got slot.
5673 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5674 Remove de-allocation of got slot.
5675 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5676 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5677 sections to be GC'ed.
5678 (elf_vax_instantiate_got_entries): New function.
5679 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5680 tests that are now handled by elf_vax_instantiate_got_entries.
5681 Assert GOT entry falls within .got section size. Remove redundant
5682 comparisions. Fix comments.
5683
bffbf940
JJ
56842002-09-27 Jakub Jelinek <jakub@redhat.com>
5685
5686 * reloc.c: Add x86-64 TLS relocs.
5687 * bfd-in2.h, libbfd.h: Rebuilt.
5688 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
5689 relocs. Add TLS relocs.
5690 (x86_64_reloc_map): Add TLS relocs.
5691 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
5692 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
5693 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
5694 (elf64_x86_64_hash_entry): Define.
5695 (struct elf64_x86_64_obj_tdata): New.
5696 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
5697 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
5698 (link_hash_newfunc): Initialize tls_type.
5699 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
5700 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
5701 (elf64_x86_64_mkobject): New.
5702 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
5703 (elf64_x86_64_tls_transition): New.
5704 (elf64_x86_64_check_relocs): Add r_type variable and use it.
5705 Handle TLS relocs.
5706 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
5707 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
5708 (elf64_x86_64_size_dynamic_sections): Likewise.
5709 (dtpoff_base, tpoff): New.
5710 (elf64_x86_64_relocate_section): Handle TLS relocs.
5711 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
5712 entries.
5713 (bfd_elf64_mkobject): Define.
5714
5715 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
5716 DF_STATIC_TLS if shared.
5717
14366460
TS
57182002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5719
5720 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
5721 empty relocation sections.
5722
9f951329
AM
57232002-09-26 Alan Modra <amodra@bigpond.net.au>
5724
5725 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
5726 (ppc64_elf_build_stubs): Build them here instead.
5727
6b3ac709
JJ
57282002-09-24 Jakub Jelinek <jakub@redhat.com>
5729
5730 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
5731 addend into r_addend, not *r_offset.
5732 (elf32_sparc_finish_dynamic_symbol): Likewise.
5733 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
5734 R_SPARC_RELATIVE's r_offset.
5735
e2f6d277
NC
57362002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5737
5738 * dwarf2.c (decode_line_info): Update to correctly decode
5739 the (non-standard DWARF2) out-of-order address sequences
5740 generated by the Intel C++ 6.0 compiler for ia64-Linux.
5741
f3961b2b
DD
57422002-09-23 Mark Elbrecht <snowball3@softhome.net>
5743
5744 * config.bfd: For DJGPP targets, match with any cpu and any machine.
5745
ad34bc37
AM
57462002-09-23 Alan Modra <amodra@bigpond.net.au>
5747
5748 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
5749 for discarded FDEs. Remove redundant assignment.
5750 * elflink.h (elf_bfd_discard_info): Save edited relocs.
5751
82988bff
L
57522002-09-22 H.J. Lu <hjl@gnu.org>
5753
5754 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
5755 the relocation count between different .reloc sections.
5756
5ad8645c
AM
57572002-09-21 Alan Modra <amodra@bigpond.net.au>
5758
5f819128
AM
5759 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
5760 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
5761 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
5762 R_PPC_EMB_RELSDA.
5763
5ad8645c
AM
5764 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
5765 unsigned. Move "symcount" assignment out of loop.
5766 * Makefile.am: Run "make dep-am".
5767 * Makefile.in: Regenerate.
5768 * configure: Regenerate.
5769 * po/SRC-POTFILES.in: Regnerate.
5770
75936555
NC
57712002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5772
5773 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
5774 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
5775 (e.g. IRIX64).
5776
2243deae
L
57772002-09-19 Jakub Jelinek <jakub@redhat.com>
5778
5779 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
5780 even if generating R_PPC_RELATIVE reloc.
5781 (ppc_elf_relocate_section): Make sure relocation is performed
5782 if skip == -2. Clear memory at r_offset when creating dynamic
5783 relocation.
5784
37e55690
JJ
57852002-09-19 Jakub Jelinek <jakub@redhat.com>
5786
5787 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5788 BFD_RELOC_386_TLS_GOTIE): Add.
5789 * bfd-in2.h, libbfd.h: Rebuilt.
5790 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5791 and R_386_TLS_GOTIE.
5792 (elf_i386_reloc_type_lookup): Handle it.
5793 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5794 char instead of enum, change GOT_* into defines.
5795 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5796 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5797 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5798 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5799 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5800 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5801 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5802 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5803 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5804 tls_type is GOT_TLS_IE_BOTH.
5805 (elf_i386_size_dynamic_sections): Likewise.
5806 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5807 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5808 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5809 all 4 GOT_TLS_* TLS types.
5810
8e67855b
NC
58112002-09-19 Nick Clifton <nickc@redhat.com>
5812
5813 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5814 follow indirect links.
5815
1c59ba3f
NC
58162002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5817
5818 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5819 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5820 on 64 bit machines.
5821 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5822 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5823 ECOFF information: 'ioptMax' refers to the actual *size*
5824 of the optimization symtab, not the number of entries.
1c59ba3f 5825
9d7404b7
NC
58262002-09-19 Daniel Jacobowitz <drow@mvista.com>
5827
5828 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5829 ELF_LINK_HASH_NEEDS_PLT logic.
5830
05a487dc
DJ
58312002-09-18 Daniel Jacobowitz <drow@mvista.com>
5832
5833 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5834 correct relocation count.
5835
1f70368c
DJ
58362002-09-17 Daniel Jacobowitz <drow@mvista.com>
5837
5838 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5839 * bfd.c (struct _bfd): Add dynsymcount.
5840 * bfd-in2.h: Regenerated.
5841 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5842 abfd->dynsymcount.
5843 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5844 for overflow.
5845
51020317 58462002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5847
5848 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5849 (mips_elf64_final_gp): Don't make up gp value.
5850 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5851 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5852 .MIPS.options/.options section.
5853
290062cc
DB
58542002-09-17 David O'Brien <obrien@FreeBSD.org>
5855
5856 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5857 It is benign for FreeBSD < 4.1. Minor reformatting.
5858 * elf64-alpha-fbsd.c: Likewise.
5859
c5c1f40c
JJ
58602002-09-17 Jakub Jelinek <jakub@redhat.com>
5861
ca1eb0ba
JJ
5862 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5863 addend.
c5c1f40c 5864
562ace6b
AM
58652002-09-17 Alan Modra <amodra@bigpond.net.au>
5866
5867 * elf64-alpha.c (alpha_elf_size_info): Make static.
5868
5af6ead6
AM
58692002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5870
5871 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5872 * cpu-tic4x.c: Ditto.
5873
cb9512fc
TS
58742002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5875
5876 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5877 duplicate define.
5878
4ada7262
DB
58792002-09-16 Bruno Haible <bruno@clisp.org>
5880
5881 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5882 by a target variant implementation.
5883 * elf64-alpha.c: Likewise.
5884 * elf32-i386-fbsd.c: New file.
5885 * elf64-alpha-fbsd.c: New file.
5886 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5887 bfd_elf64_alpha_freebsd_vec.
5888 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5889 bfd_elf64_alpha_freebsd_vec.
5890 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5891 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5892 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5893 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5894 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5895 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5896 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5897
6a30718d
JJ
58982002-09-12 Jakub Jelinek <jakub@redhat.com>
5899
5900 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5901 NULL.
5902 (elf_i386_relocate_section): Return false after printing error about
5903 unresolvable relocation.
5904
6cf9e9fe
NC
59052002-09-12 Nick Clifton <nickc@redhat.com>
5906
5907 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5908 R_ARM_THM_PC11.
5909
10f469bf
DJ
59102002-09-11 Jeffrey Law <law@redhat.com>
5911
5912 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5913
dc43ada5
NC
59142002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5915
5916 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5917 line_ptr before deciding we've found a symbol.
5918
e09f4395
NC
59192002-09-11 Nick Clifton <nickc@redhat.com>
5920
5921 * po/da.po: New Danish translation file.
5922 * configure.in (LINGUAS): Add 'da'.
5923 * configure: Regenerate.
5924
b3018b5f
NC
59252002-09-10 Michael Snyder <msnyder@redhat.com>
5926
5927 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5928 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5929 do_sections64, depending on corefile (32-bit or 64-bit).
5930
2f21f25e
RH
59312002-09-09 Richard Henderson <rth@redhat.com>
5932
5933 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5934 and PCREL21F like PCREL21B.
5935
28b94e7c
KB
59362002-09-04 Kevin Buettner <kevinb@redhat.com>
5937
51020317
AM
5938 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5939 vector.
28b94e7c 5940
5cec6941
NC
59412002-09-02 Nick Clifton <nickc@redhat.com>
5942
5943 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5944 names instead of cryptically overloaded bfd_reloc error
5945 codes.
5946 (v850_elf_relocate_section): Likewise.
5947 (v850_elf_relax_section): Replace caching of external symbols
5948 with caching of internal symbols obtained from calling
5949 bfd_elf_get_elf_syms().
51020317 5950 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5951
3b77b1d5
AM
59522002-09-02 Alan Modra <amodra@bigpond.net.au>
5953
638524b5
AM
5954 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5955 (bfd_pj_arch): Use bfd_default_scan.
5956 * cpu-v850.c (scan): Remove.
5957 (N): Use bfd_default_scan.
5958 * cpu-z8k.c (scan_mach): Remove.
5959 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5960 first. Use bfd_default_scan.
5961
250d94fd
AM
5962 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5963 bfd_mach constants.
5964 (ecoff_get_magic): Likewise.
5965 * elf32-v850.c (v850_elf_object_p): Likewise.
5966 (v850_elf_final_write_processing): Likewise.
5967 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5968 (MY(write_object_contents)): Likewise.
5969 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5970 * coffcode.h (coff_write_object_contents): Likewise.
5971 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5972 Remove unnecessary "machine" assignments.
5973 (coff_write_relocs): Test for the absolute section sym by testing
5974 section and flags.
5975
3b77b1d5
AM
5976 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5977 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5978 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5979
e5b45b83
DA
59802002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5981
5982 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5983 * bfd-in2.h (align_power): Likewise.
5984
37f45cf8
AM
59852002-08-30 Alan Modra <amodra@bigpond.net.au>
5986
5987 * Makefile.am: Run "make dep-am".
5988 * Makefile.in: Regenerate.
5989
5990 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5991 * cpu-powerpc.c (powerpc_compatible): Likewise.
5992 * cpu-rs6000.c (rs6000_compatible): Likewise.
5993
86aba9db
NC
59942002-08-28 Catherine Moore <clm@redhat.com>
5995
9b5ecbd0 5996 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5997 (v850-elf-reloc): Don't resolve pc relative relocs.
5998 (v850_elf_ignore_reloc): New routine.
5999 (v850_elf_final_link_relocate): Handle new relocs.
6000 (v850_elf_relax_delete_bytes ): New routine.
6001 (v850_elf_relax_section): New routine.
6002 (bfd_elf32_bfd_relax_section): Define.
6003 (HOWTO): New entries for new relocs.
6004 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6005 (BFD_RELOC_V850_LONGJUMP): New reloc.
6006 (BFD_RELOC_V850_ALIGN): New reloc.
6007 * archures.c: Remove redundant v850ea architecture.
6008 * cpu-v850.c: Remove redundant v850ea support.
6009 * libbfd.h: Regenerate.
6010 * bfd-in2.h: Regenerated.
6011
026df7c5
NC
60122002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6013
6014 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6015 * configure.in: Add tic4x_coff vector files.
6016 * configure: Regenerate.
6017 * Makefile.am: Add tic4x target.
6018 * Makefile.in: Regenerate.
6019
60202002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6021
6022 * archures.c: Add the BFD arch type tic4x.
6023 * bfd-in.h: Add BFD_IN_MEMORY flag.
6024 * coff-tic4x.c: New file.
6025 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6026 * cpu-tic4x.c: New file.
6027 * targets.c: Added tic4x- in list of xvecs.
6028 * ticoff.h: New file.
6029 * bfd-in2.h: Regenerate.
6030
88f7bcd5
NC
60312002-08-27 Adam Nemet <anemet@lnxw.com>
6032
6033 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6034 bit of DT_INIT and DT_FINI for Thumb functions.
6035
c8e48751
AM
60362002-08-26 Alan Modra <amodra@bigpond.net.au>
6037
6038 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6039
2846975a
AM
60402002-08-26 Alan Modra <amodra@bigpond.net.au>
6041
6042 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6043
067653c5
AM
60442002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6045
6046 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6047 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6048 Likewise.
6049 (struct elf_sh_pcrel_relocs_copied): Removed.
6050 (struct elf_sh_dyn_relocs): New.
6051 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6052 field with dyn_relocs.
6053 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6054 sections and sym_sec.
6055 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6056 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6057 (sh_elf_create_dynamic_sections): Use create_got_section instead
6058 of _bfd_elf_create_got_section.
6059 (sh_elf_check_relocs): Likewise.
6060 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6061 sections.
6062 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6063 sh_elf_relocate_section, sh_elf_check_relocs,
6064 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6065 Likewise.
6066 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6067 dynamic relocations and avoiding the copy relocation when we
6068 didn't find any dynamic relocations in the section which has
6069 contents or is read-only.
6070 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6071 (sh_elf_size_dynamic_sections): Don't reset the size of
6072 .rela.got section even if dynamic_sections_created flag is off.
6073 Don't use sh_elf_discard_copies. Scan all input bfd and use
6074 allocate_dynrelocs. Call readonly_dynrelocs to determine
6075 whether we need DT_TEXTREL.
6076 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6077 whether the symbol was never referred to.
6078 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6079 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6080 (sh_elf_check_relocs): Call create_got_section if the short-cut
6081 to .got is null. Increment reference counters only instead of
6082 allocating space on dynamic sections here. Don't conditionalize
6083 uninitialized got.offset value when marking the symbol as a
6084 global offset table entry. Keep relocations for symbols satisfied
6085 by a dynamic library to avoid copy relocations for the symbol.
6086 Set dynobj field of an elf hash table if needed.
6087 (sh_elf_finish_dynamic_sections): Handle null section pointer
6088 correctly.
6089 (elf_backend_copy_indirect_symbol): Defined.
6090 (elf_backend_can_refcount): Defined.
6091
7e326afc
NC
60922002-08-23 Nick Clifton <nickc@redhat.com>
6093
6094 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6095 previous change. Add comment explaining why.
6096
c8614e8e
AM
60972002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6098
6099 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6100 contents of .got.plt[2] to tr0, not address of .got.plt.
6101 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6102 patching absolute plt entry. For shmedia plt entry, set bottom bit
6103 of branch to plt0 as this is a branch to an shmedia instruction.
6104 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6105 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6106 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6107 branch to plt0.
6108 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6109 patching absolute plt entry. For shmedia plt entry, branch to
6110 plt0 is now ptrel, so use relative offset. Set bottom bit of
6111 branch target as it is a branch to an shmedia instruction.
6112
3b587c71
AM
61132002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6114 Richard Shann <richard.shann@superh.com>
6115
6116 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6117 value if .init is an SHmedia function. Similarly for DT_FINI.
6118 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 6119
957dcaa8
AM
61202002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6121
3b587c71 6122 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 6123 dynamic section.
3b587c71 6124 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 6125
a4263c47
NC
61262002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6127
6128 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 6129 byte read when reading the return address register column.
a4263c47 6130
db4ed121
NC
61312002-08-22 Nick Clifton <nickc@redhat.com>
6132
6133 * config.bfd: Add powepc64-*-*bsd* target.
6134
ed71e111
NC
61352002-08-22 Graeme Peterson <gp@qnx.com>
6136
6137 * Makefile.am: Add entries for elf32-shqnx.c
6138 * Makefile.in: Regenerate.
6139 * config.bfd: Add support sh-*-nto* target.
6140 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6141 * configure: Regenerate.
6142 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6143 * elf32-sh.c: Do not include elf32-target.h if
6144 ELF32_SH_C_INCLUDED is defined.
6145 * elf32-shqnx.c: New file: Support for QNX.
6146 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6147
0ab72ee2
NC
61482002-08-22 Nick Clifton <nickc@redhat.com>
6149
75c83283
NC
6150 * po/tr.po: Updated Turkish translation.
6151
0ab72ee2
NC
6152 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6153 symbols are not read.
6154
56780f18
AM
61552002-08-22 Alan Modra <amodra@bigpond.net.au>
6156
6157 * elf32-m68hc11.c: Formatting fixes.
6158 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6159 * elf32-m68hc12.c: Formatting fixes.
6160 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6161
b48fa14c
AM
61622002-08-22 Alan Modra <amodra@bigpond.net.au>
6163
a7c71b0c
AM
6164 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6165 SEC_DATA.
6166 (pmac_xcoff_vec): Likewise.
6167 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6168 (aix5coff64_vec): Likewise.
6169
56780f18
AM
61702002-08-22 Alan Modra <amodra@bigpond.net.au>
6171
b48fa14c
AM
6172 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6173 param to elf_backend_copy_indirect_symbol.
6174 (_bfd_elf_link_hash_copy_indirect): Likewise.
6175 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6176 calls to copy_indirect_symbol.
6177 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6178 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6179 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6180 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6181 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6182 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6183 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6184 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6185 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6186 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6187 test refcounts for "used" values.
6188
8c2ab17d
AM
61892002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6190
6191 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6192 argument declaration.
6193
d62b1198 61942002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
6195
6196 * archures.c (bfd_mach_ppc_e500): Added.
6197 * bfd-in2.h: Rebuilt.
d62b1198
EZ
6198 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6199
9f88ba09
AM
62002002-08-19 Alan Modra <amodra@bigpond.net.au>
6201
6202 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6203
df622259
AC
62042002-08-17 Andrew Cagney <ac131313@redhat.com>
6205
6206 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6207 `bfd_byte'.
df622259 6208
44c410de
SC
62092002-08-17 Stan Cox <scox@redhat.com>
6210
6211 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6212 IRIX 6 segment layout for NEWABI.
6213
4972a8e9
SC
62142002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6215
1049f94e 6216 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6217 symbols when looking for section referred to by a relocation.
1049f94e 6218 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6219
c5cd6d62
AM
62202002-08-15 Alan Modra <amodra@bigpond.net.au>
6221
6222 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6223
0741c7be
HPN
62242002-08-15 Hans-Peter Nilsson <hp@axis.com>
6225
6226 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6227 missing check for whether the symbol is referenced by DSO before
6228 unexporting it as an unneeded dynamic symbol.
6229
e8d5d179
L
62302002-08-14 H.J. Lu <hjl@gnu.org>
6231
6232 * libbfd.h: Regenerate.
6233
e9229007
L
62342002-08-14 H.J. Lu <hjl@gnu.org>
6235
6236 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6237
1fd03b5a
SC
62382002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6239
6240 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6241 instructions.
6242 (m68hc11_direct_relax): New to define table of relaxable instructions.
6243 (find_relaxable_insn): New, find a relaxable insn.
6244 (compare_reloc): New to compare two relocs.
6245 (m68hc11_elf_relax_section): New, relax text sections.
6246 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6247 (elf32_m68hc11_check_relocs): New function for GC support.
6248 (elf32_m68hc11_relocate_section): New function for GC support.
6249 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6250 (elf_backend_check_relocs): Likewise.
6251 (elf_backend_relocate_section): Likewise.
6252
c828c771
L
62532002-08-13 H.J. Lu <hjl@gnu.org>
6254
6255 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6256 definitions in shared objects when checking symbol with
6257 undefined version.
6258
9b701e44
SC
62592002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6260
6261 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6262 (elf32_m68hc11_gc_sweep_hook): Likewise.
6263 (elf_backend_gc_mark_hook): Define for GC section support.
6264 (elf_backend_gc_sweep_hook): Likewise.
6265 (elf_backend_can_gc_sections): Likewise.
6266
6267 * elf32-m68hc12.c: Likewise.
6268
96405e3c
SC
62692002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6270
6271 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6272 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6273 (_bfd_m68hc11_elf_set_private_flags): New function.
6274 Use them to set/check/print ELF flags specific to 68HC11.
6275
6276 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6277 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6278 (_bfd_m68hc12_elf_set_private_flags): New function.
6279 Use them to set/check/print ELF flags specific to 68HC12.
6280
dae78fb0
SC
62812002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6282
6283 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6284 fix masks for PC-rel relocs.
6285 (m68hc11_elf_ignore_reloc): New function.
6286
6287 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6288 68HC12 banked addressing relocs.
6289 (m68hc12_phys_addr): New to compute physical address of banked memory.
6290 (m68hc12_phys_page): Likewise for page.
6291 (m68hc12_addr_is_banked): New to see if address is in banked area.
6292 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6293
3dbfec86
SC
62942002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6295
6296 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6297 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6298 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6299 * bfd-in2.h: Regenerate.
6300
871da94f
L
63012002-08-12 H.J. Lu <hjl@gnu.org>
6302
6303 * elflink.h (elf_add_default_symbol): Preserve section across
6304 elf_merge_symbol.
6305
59bc061d
NC
63062002-08-09 Graeme Peterson <gp@qnx.com>
6307
51020317 6308 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6309 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6310 * Makefile.in: Regenerate.
6311 * config.bfd: Add support for powerpc{le}-*-nto targets.
6312 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6313 * configure: Regenerate.
6314 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6315 common file "elf32-qnx.h", and now include that file.
6316 * elf32-qnx.h: New file: QNX specific common elf backend.
6317 * elf32-ppc.c: Do not include elf32-target.h if
6318 ELF32_PPC_C_INCLUDED is defined.
6319 * elf32-ppcqnx.c: New file: Support for QNX.
6320 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6321 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6322
2b692c59
NC
63232002-08-09 Nick Clifton <nickc@redhat.com>
6324
6325 * po/sv.po: Updated Swedish translation.
6326
d0c7ff07
TS
63272002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6328
6329 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6330 g->global_gotsym is NULL.
6331
d8bbe778
L
63322002-08-08 H.J. Lu <hjl@gnu.org>
6333
c5cd6d62 6334 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6335 overrides an indirect versioned symbol.
6336
c366c25e
JJ
63372002-08-08 Jakub Jelinek <jakub@redhat.com>
6338
6339 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6340 for R_386_TLS_TPOFF32 relocs against symndx 0.
6341
31941635
L
63422002-08-07 H.J. Lu <hjl@gnu.org>
6343
6344 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6345 with undefined version if needed.
6346 (elf_link_assign_sym_version): Match a default symbol with a
6347 version without definition. No need to hide the default
6348 definition separately.
6349
0f3bd64f
AM
63502002-08-08 Alan Modra <amodra@bigpond.net.au>
6351
7330fb86
AM
6352 * elflink.h (elf_link_output_extsym): Don't output symbols from
6353 SEC_EXCLUDE sections.
6354
0f3bd64f
AM
6355 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6356
a4aa0fb7
AM
63572002-08-07 Alan Modra <amodra@bigpond.net.au>
6358
6359 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6360 entries.
6361
34ea4a36
TS
63622002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6363
6364 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6365 mismatch.
6366
141ff970
TS
63672002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6368
6369 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6370
28458e7e
TS
63712002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6372
6373 * elf32-mips.c (mips_reloc_map): Fix typo.
6374
0121a3da
AM
63752002-08-06 Alan Modra <amodra@bigpond.net.au>
6376
6377 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6378
d006db6c
AM
63792002-08-06 Alan Modra <amodra@bigpond.net.au>
6380
6381 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6382
8ea80f08
AM
63832002-08-06 Alan Modra <amodra@bigpond.net.au>
6384
2a52da53
AM
6385 * libxcoff.h: Use PARAMS on function declarations.
6386 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6387 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6388
8ea80f08
AM
6389 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6390 addend.
6391 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6392
cf9ab45b
AM
63932002-08-06 Alan Modra <amodra@bigpond.net.au>
6394
6395 * coff-rs6000.c: Formatting fixes.
6396 (xcoff_calculate_relocation): Use PARAMS in declaration.
6397 (xcoff_complain_overflow): Likewise.
6398 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6399 (bfd_xcoff_backend_data): Remove useless comments.
6400 (rs6000coff_vec): Likewise.
6401 (bfd_pmac_xcoff_backend_data): Likewise.
6402 (pmac_xcoff_vec): Likewise.
8ea80f08 6403
cf9ab45b
AM
6404 * coff64-rs6000.c: Formatting fixes.
6405 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6406 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6407 (bfd_xcoff_backend_data): Remove useless comments.
6408 (rs6000coff64_vec): Likewise.
6409 (bfd_xcoff_aix5_backend_data): Likewise.
6410 (aix5coff64_vec): Likewise.
6411
48bfecdd
AM
64122002-08-06 Alan Modra <amodra@bigpond.net.au>
6413
a78eab4e
AM
6414 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6415 mask entries. Use complain_overflow_dont for R_REF.
6416 (xcoff_reloc_type_ba): Revert last change.
6417 (xcoff_reloc_type_br): Likewise.
6418 (xcoff_reloc_type_crel): Likewise.
6419 (xcoff_ppc_relocate_section): Likewise.
6420 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6421 (xcoff64_ppc_relocate_section): Likewise.
6422 (xcoff64_howto_table): Revert some of last change to mask entries.
6423 Use complain_overflow_dont for R_REF.
6424
48bfecdd
AM
6425 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6426 relocs with bitsize == 16 have size = 1.
6427 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6428 (xcoff_reloc_type_br): Likewise.
6429 (xcoff_reloc_type_crel): Likewise.
6430 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6431 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6432 dst_mask adjustment.
6433 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6434 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6435 bitsize == 16 have size = 1.
6436
fd13ed0c
DC
64372002-08-01 Denis Chertykov <denisc@overta.ru>
6438
6439 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6440 (struct misc): New field isymbuf. All free_* fields removed.
6441 (symbol_value): Pass in internal syms. No need to swap syms in.
6442 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6443 possibly cached info.
6444 (tidyup_after_error): Removed.
6445 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6446 misc. Use new field.
6447 (adjust_all_relocations): Use internal syms. No need to swap syms
6448 in and out.
6449 (add_page_insn): Don't use removed fields of struct misc.
6450
24a1ba0f
NC
64512002-08-01 Nick Clifton <nickc@redhat.com>
6452
6453 * elf32-arm.h: Revert previous delta.
6454
a6903459
NC
64552002-08-01 Nick Clifton <nickc@redhat.com>
6456
6457 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6458 * configure: Regenerate.
6459
39a2a3eb
L
64602002-07-31 H.J. Lu <hjl@gnu.org>
6461
6462 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6463 selected.
6464
a0dfa6a8
L
64652002-07-31 H.J. Lu <hjl@gnu.org>
6466
6467 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6468 is selected.
6469
cd67d266
JJ
64702002-07-31 Jakub Jelinek <jakub@redhat.com>
6471
6472 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6473 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6474
4eb6b71c
NC
64752002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6476
6477 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6478 There is no 8 byte relocation type for this architecture.
6479 (do_ns32k_reloc): Use bfd_vma instead of native types.
6480 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6481 returns void.
6482 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6483 rely on generic code to do that.
6484 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6485 to all table entries.
6486 (_bfd_ns32k_relocate_contents): put_data returns void.
6487 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6488 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6489 return void.
6490
f7c33884
NC
64912002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6492
6493 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6494 archive object is target dependant.
6495
8f64befb
NC
64962002-07-31 Adam Nemet <anemet@lnxw.com>
6497
6498 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6499 (THUMB_PLT_ENTRY_SIZE): New macro.
6500 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6501 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6502 ARM_PLT_ENTRY_SIZE.
6503 (elf32_arm_plt_entry): Likewise.
6504 (elf_backend_plt_header_size): Likewise.
6505 (elf32_thumb_plt0_entry): New global.
6506 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6507 into .plt.thumb.
6508 (elf32_thumb_plt_entry): New global.
6509 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6510 Thumb entries. Set the bottom bit of the corresponding GOT entry
6511 for a Thumb PLT entry.
6512 (struct elf32_arm_plt_entry_info): New structure.
6513 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6514 type.
6515 (elf32_arm_link_hash_newfunc): Initialize new member.
6516 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6517 relocations against the PLT.
6518 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6519 first_rel_type if this is the first time we encounter the symbol.
6520 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6521 Determine if relocation needs a PLT entry. Set first_rel_type if
6522 this is the first time we encounter the symbol
6523 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6524 functions as well.
6525 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6526 (elf32_arm_create_dynamic_sections): New function. Create the
6527 .plt.thumb section.
6528 (elf_backend_create_dynamic_sections): Call it.
6529
47badb7b
NC
65302002-07-31 Nick Clifton <nickc@redhat.com>
6531
6532 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6533 'alternative' in order to avoid shadowing global symbol of the
6534 same name.
6535 * bfd-in2.h: Regenerate.
6536 * libbfd.h: Regenerate.
6537 * libcoff.h: Regenerate.
6538
8a397dad
TS
65392002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6540
6541 * Makefile.am: Add n32 ABI support.
6542 * Makefile.in: Regenerate.
6543 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6544 bit vectors for mips*-*-linux targets as optional.
6545 * configure.in: Add n32 ABI vectors.
6546 * configure: Regenerate.
6547 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6548 * elfn32-mips.c: New file, n32 ABI support.
6549 * targets.c: Add n32 ABI vectors.
6550
7e392df6 65512002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6552
7e392df6
NC
6553 * elfarmqnx-nabi.c: New file: Support for QNX.
6554 * config.bfd: Add support for arm-*-nto target.
6555 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6556 * configure: Regenerate.
6557 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6558 * Makefile.in: Regenerate.
6559 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6560 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6561 * elfarm-nabi.c: Do not include elf32-arm.h if
6562 ELFARM_NABI_C_INCLUDED is defined.
6563 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6564
7e392df6 65652002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6566
83e1617e
NC
6567 * po/sv.po: Updated Swedish translation.
6568
704afa60
JJ
65692002-07-30 Jakub Jelinek <jakub@redhat.com>
6570
6571 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6572
487e54f2
AM
65732002-07-30 Alan Modra <amodra@bigpond.net.au>
6574
6575 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6576 * archive.c (bfd_generic_archive_p): Likewise.
6577 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6578 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6579 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6580 (xcoff64_archive_p): Likewise.
6581 (xcoff64_openr_next_archived_file): Likewise.
6582 (xcoff64_archive_p): Clean up tdata properly on error.
6583 * coffgen.c (coff_real_object_p): Likewise.
6584 (coff_object_p): Release filehdr and opthdr.
6585 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6586 * ieee.c (ieee_archive_p): Likewise.
6587 * ihex.c (ihex_object_p): Likewise.
6588 (ihex_mkobject): Always allocate tdata.
6589 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6590 * srec.c (srec_mkobject): Always allocate tdata.
6591 (srec_object_p): Clean up tdata properly on error.
6592 (symbolsrec_object_p): Likewise.
6593 * versados.c (versados_object_p): Likewise.
6594 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6595 and bfd_realloc instead of realloc.
6596 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6597 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6598 place of bfd_malloc, simplifying error freeing. Free hash table too.
6599 (vms_object_p): Clean up tdata on error.
6600 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6601 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6602
9d46020e
AM
66032002-07-30 Alan Modra <amodra@bigpond.net.au>
6604
6605 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6606
fb39dac1
RS
66072002-07-26 Chris Demetriou <cgd@broadcom.com>
6608
6609 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6610 flags into resulting BFD.
6611
7a624474
AM
66122002-07-26 Alan Modra <amodra@bigpond.net.au>
6613
6614 From John Reiser <jreiser@BitWagon.com>
6615 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6616 tls_ldm_got.refcount.
6617
a4382ec6
TS
66182002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6619
6620 * elf64-mips.c: Update TODO comment.
6621 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6622 mips_elf64_gprel16_reloca): Remove prototypes.
6623 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6624 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6625 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6626 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6627 R_MIPS_HIGHEST.
6628 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6629 R_MIPS_GOT16. Remove wrong comments.
6630 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6631 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6632 from elf32-mips.c.
6633 (mips_elf64_hi16_reloc): Fix formatting.
6634 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6635 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6636 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6637 (mips_elf64_gprel16_reloc): Make static. Add check for
6638 partial_inplace.
6639 (mips_elf64_gprel16_reloca): Remove.
6640 (mips_elf64_literal_reloc): New function.
6641 (mips_elf64_gprel32_reloc): Fix formatting.
6642 (mips_elf64_shift6_reloc): Fix comment. Make static.
6643 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6644 elf32-mips.c.
6645 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6646 elf32-mips.c
6647 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6648 specific relocations.
6649 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6650 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6651 (ELF_MAXPAGESIZE): Add comment.
6652
219576a4
NC
66532002-07-25 Nick Clifton <nickc@redhat.com>
6654
6655 * po/sv.po: Updated Swedish translation.
6656 * po/es.po: Updated Spanish translation.
6657 * po/fr.po: Updated French translation.
6658
8c58d23b
AM
66592002-07-25 Alan Modra <amodra@bigpond.net.au>
6660
6661 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6662 as elf_link_record_local_dynamic_symbol.
6663 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6664 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6665 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6666 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6667 attempt is made to record a symbol in a discarded section, and
6668 return `2' in that case.
6669
ff3063f5
NC
66702002-07-24 Nick Clifton <nickc@redhat.com>
6671
6672 * po/sv.po: Updated Swedish translation.
6673 * po/es.po: Updated Spanish translation.
6674
f0fe0e16
AM
66752002-07-23 Alan Modra <amodra@bigpond.net.au>
6676
c1fb5f8a
AM
6677 * po/SRC-POTFILES.in: Regenerate.
6678
f0fe0e16
AM
6679 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6680 immediately. Remove code handling relocatable linking.
6681 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
6682 * elf32-cris.c (cris_elf_relocate_section): Likewise.
6683 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 6684 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6685 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
6686 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
6687 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6688 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6689 * elf32-v850.c (v850_elf_relocate_section): Likewise.
6690 * elf32-vax.c (elf_vax_relocate_section): Likewise.
6691 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6692 * elf32-avr.c (elf_backend_rela_normal): Define.
6693 * elf32-cris.c: Likewise.
6694 * elf32-fr30.c: Likewise.
de2d743e 6695 * elf32-frv.c: Likewise.
f0fe0e16
AM
6696 * elf32-h8300.c: Likewise.
6697 * elf32-hppa.c: Likewise.
6698 * elf32-ip2k.c: Likewise.
6699 * elf32-sparc.c: Likewise.
6700 * elf32-v850.c: Likewise.
6701 * elf32-vax.c: Likewise.
6702 * elf64-hppa.c: Likewise.
6703 * elf64-sparc.c: Likewise.
6704 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 6705 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
6706 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6707 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
6708 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6709 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6710 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6711 * elf-m10200.c (USE_RELA): Don't define.
6712 * elf-m10300.c: Likewise.
de2d743e 6713 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
6714 * elf32-i370.c: Likewise.
6715 * elf32-ip2k.c: Likewise.
6716 * elf32-m68k.c: Likewise.
6717 * elf32-mcore.c: Likewise.
6718 * elf32-ppc.c: Likewise.
6719 * elf32-s390.c: Likewise.
6720 * elf32-vax.c: Likewise.
6721 * elf64-ppc.c: Likewise.
6722 * elf64-s390.c: Likewise.
6723 * elf64-x86-64.c: Likewise.
6724 * elfxx-ia64.c: Likewise.
6725 * elf32-avr.c (USE_REL): Don't undef.
6726 * elf32-ip2k.c: Likewise.
6727
5e8d7549
NC
67282002-07-23 Nick Clifton <nickc@redhat.com>
6729
6730 * elf-bfd.h (struct elf_backend_data): Add new bitfield
6731 'want_p_paddr_set_to_zero'.
6732 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
6733 to false;
6734 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
6735 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
6736
9e12c7db
NC
67372002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
6738
6739 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
6740 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
6741 show the Copyright string.
6742 Minor formatting tidy ups.
6743
0461a601
NC
67442002-07-23 Nick Clifton <nickc@redhat.com>
6745
ff3063f5
NC
6746 * po/fr.po: Updated French translation.
6747 * po/sv.po: Updated Swedish translation.
0461a601 6748
fad2542d
AM
67492002-07-23 Alan Modra <amodra@bigpond.net.au>
6750
6751 * elflink.h (elf_link_input_bfd): Don't change internal symbols
6752 when outputting relocs.
6753
c0647bfc
JT
67542002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
6755
6756 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
6757 DT_PLTGOT into the dynamic section if there is a PLT.
6758
d01414a5
TS
67592002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6760
6761 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
6762 elf32-mips.c.
6763 (_bfd_mips_elf_write_section): Likewise.
6764 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
6765 (_bfd_mips_elf_write_section): Likewise.
6766 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
6767 (elf32_mips_write_section): Likewise.
6768 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
6769 (_bfd_mips_elf_write_section): Likewise.
6770
40c97fc6
AM
67712002-07-19 Alan Modra <amodra@bigpond.net.au>
6772
6773 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
6774 PT_IA_64_UNWIND segments for a given section.
6775
58378160
L
67762002-07-17 H.J. Lu <hjl@gnu.org>
6777
6778 * Makefile.am: Fix a typo.
6779 * Makefile.in: Regenerate.
6780
cf88bb9f
NC
67812002-07-15 Denis Chertykov <denisc@overta.ru>
6782 Frank Ch. Eigler <fche@redhat.com>
6783 Ben Elliston <bje@redhat.com>
6784 Alan Lehotsky <alehotsky@cygnus.com>
6785 John Healy <jhealy@redhat.com>
6786 Graham Stott <grahams@redhat.com>
6787 Jeff Johnston <jjohnstn@redhat.com>
6788
6789 * Makefile.am: Add support for ip2k.
6790 * Makefile.in: Regenerate.
6791 * doc/Makefile.in: Regenerate.
6792 * archures.c: Add support for ip2k.
6793 * config.bfd: Add support for ip2k.
6794 * configure.in: Add support for ip2k.
6795 * configure: Regenerate.
6796 * reloc.c: Add support for ip2k.
6797 * targets.c: Add support for ip2k.
6798 * bfd-in2.h: Regenerate.
6799 * libbfd.h: Regenerate.
6800 * cpu-ip2k.c: New file.
6801 * elf32-ip2k.c: New file.
6802
0dafd5f6
RE
68032002-07-17 Ian Rickards <irickard@arm.com>
6804
40c97fc6 6805 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6806 just return the filename.
6807
36b08f12
AM
68082002-07-16 Moritz Jodeit <moritz@jodeit.org>
6809
6810 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6811
58821868
AM
68122002-07-16 Alan Modra <amodra@bigpond.net.au>
6813
6814 * elflink.h: Formatting fixes, tidy prototypes.
6815 (elf_link_assign_sym_version): Move common code out of loop.
6816
c89583f8
AM
68172002-07-16 Alan Modra <amodra@bigpond.net.au>
6818
6819 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6820 reloc section size is zero. Correct reloc output location.
6821
ba94744e
AM
68222002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6823
6824 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6825 the final type for the e_fsel selector when generating PA2.0W code.
6826 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6827 relocations.
6828
96a94295
L
68292002-07-14 H.J. Lu <hjl@gnu.org>
6830
6831 * elflink.h (elf_link_assign_sym_version): Hide the default
6832 definition if there is a hidden versioned definition.
6833
6849c52f
HPN
68342002-07-12 Hans-Peter Nilsson <hp@axis.com>
6835
6836 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6837 dynamic reference test in assertion when initializing GOT with
6838 static contents. Just assert that there are either no dynamic
6839 sections, the symbol is defined in the regular objects or that the
6840 symbol is undef weak. Tweak comment.
6841 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6842 only if the symbol isn't defined in the program and isn't undef
6843 weak.
6844 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6845 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6846 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6847 (elf_cris_discard_excess_program_dynamics): Don't consider
6848 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6849
239e1f3a
AM
68502002-07-11 Alan Modra <amodra@bigpond.net.au>
6851
6852 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6853 unresolved debugging relocs in dynamic applications.
6854 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6855 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6856 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6857 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6858 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6859 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6860
2f6d9989
AM
68612002-07-10 Alan Modra <amodra@bigpond.net.au>
6862
f5e87a1d
AM
6863 * elf64-ppc.c (ONES): Define.
6864 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6865 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6866 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6867
2f6d9989
AM
6868 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6869 (ppc64_elf_set_private_flags): Delete.
6870 (ppc64_elf_section_from_shdr): Delete.
6871 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6872 (ppc64_elf_fake_sections): Delete.
6873 (bfd_elf64_bfd_set_private_flags): Don't define.
6874 (bfd_elf64_get_symbol_info): Likewise.
6875 (elf_backend_section_from_shdr): Likewise.
6876 (elf_backend_fake_sections): Likewise.
6877
0594c12d
AM
68782002-07-10 Marco Walther <Marco.Walther@sun.com>
6879
6880 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6881 when not already set.
6882 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6883 (elf_backend_fake_sections): Define.
6884
699cb9b8
AM
68852002-07-10 Alan Modra <amodra@bigpond.net.au>
6886
6887 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6888 Formatting.
6889 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6890
0a4787a0
HPN
68912002-07-09 Hans-Peter Nilsson <hp@axis.com>
6892
6893 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6894 NULL sym_hashes to just before use.
6895 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6896 symbol with non-default visibility.
6897 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6898 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6899 Ditto.
6900 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6901 symbol with non-default visibility.
6902 (cris_elf_check_relocs): At tests for local symbol before
6903 increasing h->plt.refcount, also check for non-default
6904 visibility. Ditto when checking for local symbol to eliminate
6905 pc-relative runtime relocs.
6906
aecc8f8a
AM
69072002-07-08 Alan Modra <amodra@bigpond.net.au>
6908
6909 * elf.c: Formatting.
6910 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6911 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6912 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6913 segments.
6914
e9168c1e
MM
69152002-07-07 Mark Mitchell <mark@codesourcery.com>
6916 Alan Modra <amodra@bigpond.net.au>
6917
6918 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6919 account the impact of relocation count overflow when computing
6920 section offsets.
6921 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6922 or not to apply the PE COFF reloc overflow handling. Fix a
6923 fencepost error in deciding whether or not to use that technique.
6924
6cdc0ccc
AM
69252002-07-07 Alan Modra <amodra@bigpond.net.au>
6926
6927 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6928 change type of locsyms.
6929 (bfd_elf_get_elf_syms): Declare.
6930 * elf.c (bfd_elf_get_elf_syms): New function.
6931 (group_signature): Use bfd_elf_get_elf_syms.
6932 (bfd_section_from_r_symndx): Likewise.
6933 * elfcode.h (elf_slurp_symbol_table): Likewise.
6934 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6935 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6936 locality of various data structures. Properly free internal relocs.
6937 (elf_bfd_final_link): Properly free internal relocs.
6938 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6939 (elf_link_input_bfd): Likewise.
6940 (elf_gc_mark): Likewise. Properly free internal relocs.
6941 (elf_gc_sweep): Properly free internal relocs.
6942 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6943 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6944 internal relocs.
6945 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6946 Properly free possibly cached info.
6947 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6948 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6949 symbol swapping code.
6950 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6951 Properly free possibly cached info.
6952 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6953 (mn10300_elf_relax_delete_bytes): Likewise.
6954 (mn10300_elf_symbol_address_p): Likewise.
6955 (mn10300_elf_get_relocated_section_contents): Likewise.
6956 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6957 (elf32_h8_relax_delete_bytes): Likewise.
6958 (elf32_h8_symbol_address_p): Likewise.
6959 (elf32_h8_get_relocated_section_contents): Likewise.
6960 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6961 (m32r_elf_relax_delete_bytes): Likewise.
6962 (m32r_elf_get_relocated_section_contents): Likewise.
6963 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6964 elf_section_data to determine whether cached.
6965 (sh_elf_relax_section): As above for elf-m10200.c.
6966 (sh_elf_relax_delete_bytes): Likewise.
6967 (sh_elf_get_relocated_section_contents): Likewise.
6968 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6969 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6970 reading of local syms.
6971 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6972 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6973 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6974 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6975 relocs.
6976 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6977 free internal relocs and section contents. Don't read symbols.
6978 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6979 (elf32_hppa_size_stubs): Don't free local syms.
6980 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6981 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6982 possibly cached info.
6983 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6984 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6985 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6986 all_local_syms.
6987 (get_local_syms): Delete function.
6988 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6989 on exit.
6990 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6991
b3212001
JW
69922002-07-05 Jim Wilson <wilson@redhat.com>
6993
6994 * syms.c (decode_section_type): New.
6995 (bfd_decode_symclass): Call decode_section_type.
6996
894bb1ee
JJ
69972002-07-04 Jakub Jelinek <jakub@redhat.com>
6998
6999 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7000 section content start.
7001 Reported by Michael Schumacher <mike@hightec-rt.com>.
7002
bc0ba537
AM
70032002-07-04 Alan Modra <amodra@bigpond.net.au>
7004
9b5ecbd0 7005 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
7006 link order code. Don't actually remove the output section here;
7007 Just set a flag for the linker to do so.
7008 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7009 sections when setting up output section dynsyms.
7010
797fc050
AM
70112002-07-04 Alan Modra <amodra@bigpond.net.au>
7012
7013 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7014 fudge.
7015 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7016 libs here instead.
7017
99881371
MS
70182002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7019
7020 * elf64-s390.c (create_got_section): Set .got section alignment to
7021 8 bytes.
7022 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7023
47d9a591
AM
70242002-07-02 Alan Modra <amodra@bigpond.net.au>
7025
7026 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7027
179d3252
JT
70282002-07-01 Matt Thomas <matt@3am-software.com>
7029
7030 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7031 to EF_VAX_*.
7032
4a14403c
TS
70332002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7034
7035 * elfxx-mips.c (ABI_64_P): Fix comment.
7036 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7037 new section names for N64 ABI.
7038 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7039 (mips_elf_calculate_relocation): Code formatting.
7040 (mips_elf_create_dynamic_relocation): Likewise.
7041 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7042 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7043 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7044 in any NewABI.
7045 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7046 for NewABI.
7047 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7048 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7049 here, too.
7050
607c0e09
AS
70512002-07-01 Andreas Schwab <schwab@suse.de>
7052
7053 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7054 R_X86_64_64 to R_X86_64_RELATIVE.
7055
ba26fd96
AM
70562002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7057
7058 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7059 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7060 Run "make dep-am".
7061 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7062 host_aout_vec.
7063 * configure.in (vaxbsd_vec): Add.
7064 * targets.c (vaxbsd_vec): Add.
7065 * Makefile.in: Rebuild.
7066 * configure: Rebuild.
7067 * po/SRC-POTFILES.in: Rebuild.
7068
1e2f5b6e
AM
70692002-07-01 Alan Modra <amodra@bigpond.net.au>
7070
7071 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7072 examining to gc_mark_hook, rather than the bfd.
7073 (elf_gc_sections): Adjust.
7074 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7075 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7076 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7077 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7078 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7079 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7080 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7081 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7082 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7083 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7084 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7085 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7086 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7087 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7088 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7089 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7090 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7091 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7092 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7093 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7094 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7095 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7096 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7097 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7098 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7099 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7100 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7101 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7102 redundant local sym tests.
7103 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7104 (link_hash_newfunc): Init is_entry.
7105 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7106 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7107 (create_linkage_sections): Use bfd_make_section_anyway rather than
7108 bfd_make_section.
7109 (ppc64_elf_mark_entry_syms): New function.
7110 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7111 up opd entry to function section map.
7112 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7113 relocs that reference the opd section.
7114 (edit_opd): New function.
7115 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7116 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7117 (get_local_syms): Do so here. Exit if we already have local syms.
7118 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7119 read local syms on non-ELF input.
7120 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7121 than duplicating it's function here. Adjust free of internal
7122 relocs to suit.
7123 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7124 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7125 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7126 _bfd_elf32_link_read_relocs rather than duplicating it's function
7127 here. Adjust free of internal relocs to suit.
7128
1b71fb54
AJ
71292002-07-01 Andreas Jaeger <aj@suse.de>
7130
7131 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7132 are not allowed in shared libs code, enforce -fPIC.
7133
8d28f606
HPN
71342002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7135
7136 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7137 trailing zero-sequences when there's previous left-over data.
7138
5ac81c74
JL
71392002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7140
7141 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7142 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7143 and opd_rel_sec in order for starting rela section. Check _raw_size.
7144 (elf_backend_reloc_type_class): Define.
7145
91a4d569
AM
71462002-06-27 Kevin Buettner <kevinb@redhat.com>
7147
7148 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7149 DWARF2 formats.
7150
feee612b
AM
71512002-06-27 Alan Modra <amodra@bigpond.net.au>
7152
7153 * cpu-powerpc.c: Comment on ordering of arch_info.
7154 * elf32-ppc.c (ppc_elf_object_p): New function.
7155 (elf_backend_object_p): Define.
7156 * elf64-ppc.c (ppc64_elf_object_p): New function.
7157 (elf_backend_object_p): Define.
7158
a4e6cefc
JT
71592002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7160
7161 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7162 * configure: Regenerate.
7163
dae2dd0d
NC
71642002-06-25 Jason Eckhardt <jle@rice.edu>
7165
7166 * dwarf2.c (decode_line_info): Check unit->addr_size
7167 to read in the proper number of prologue bytes.
7168
680f9d5c
NC
71692002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7170
7171 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7172 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
7173 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7174 been enabled.
dae2dd0d 7175
680f9d5c
NC
7176 * targets.c (_bfd_target_vector[]): Only include
7177 aix5coff64_vec if 64-bit bfd support has been enabled.
7178
d4c88bbb
AM
71792002-06-25 Alan Modra <amodra@bigpond.net.au>
7180
7181 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7182 * elf32-hppa.c (hppa_add_stub): Likewise.
7183 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7184 * elflink.h (elf_add_default_symbol): Fix comment typo.
7185 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7186 (elf_link_add_object_symbols): Likewise.
7187 (elf_link_assign_sym_version): Likewise.
7188 * hash.c (bfd_hash_lookup): Likewise.
7189 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7190 * section.c (bfd_get_unique_section_name): Likewise.
7191 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7192 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7193 (assign_section_numbers): Likewise.
7194 (_bfd_elfcore_make_pseudosection): Likewise.
7195 (elfcore_grok_lwpstatus): Likewise.
7196 (elfcore_grok_win32pstatus): Likewise.
7197 (elfcore_write_note): Constify input params. Use PTR instead of
7198 void *. Include terminating NUL in namesz. Correct padding.
7199 Support NULL "name" param. Use memcpy instead of strcpy.
7200 (elfcore_write_prpsinfo): Constify input params.
7201 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7202 (elfcore_write_lwpstatus): Likewise.
7203 (elfcore_write_pstatus): Likewise.
7204 (elfcore_write_prfpreg): Likewise.
7205 (elfcore_write_prxfpreg): Likewise.
7206 * elf-bfd.h (elfcore_write_note): Update declaration.
7207 (elfcore_write_prpsinfo): Likewise.
7208 (elfcore_write_prstatus): Likewise.
7209 (elfcore_write_pstatus): Likewise.
7210 (elfcore_write_prfpreg): Likewise.
7211 (elfcore_write_prxfpreg): Likewise.
7212 (elfcore_write_lwpstatus): Likewise.
7213
b0ac09d2
NC
72142002-06-25 Jason Eckhardt <jle@rice.edu>
7215
7216 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7217 symbols of type stProc and stStaticProc.
7218
72192002-06-25 Nick Clifton <nickc@redhat.com>
7220
7221 * ecoff.c: VArious formatting fixes.
7222
021d6096
AM
72232002-06-25 Alan Modra <amodra@bigpond.net.au>
7224
7225 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7226
82e51918
AM
72272002-06-25 Alan Modra <amodra@bigpond.net.au>
7228
7229 * aout-adobe.c: Don't compare against "true" or "false.
7230 * aout-target.h: Likewise.
7231 * aoutx.h: Likewise.
7232 * archive.c: Likewise.
7233 * bout.c: Likewise.
7234 * cache.c: Likewise.
7235 * coff-a29k.c: Likewise.
7236 * coff-alpha.c: Likewise.
7237 * coff-i386.c: Likewise.
7238 * coff-mips.c: Likewise.
7239 * coff-or32.c: Likewise.
7240 * coff64-rs6000.c: Likewise.
7241 * coffcode.h: Likewise.
7242 * coffgen.c: Likewise.
7243 * cpu-ns32k.c: Likewise.
7244 * ecoff.c: Likewise.
7245 * ecofflink.c: Likewise.
7246 * elf.c: Likewise.
7247 * elf32-arm.h: Likewise.
7248 * elf32-cris.c: Likewise.
7249 * elf32-d30v.c: Likewise.
7250 * elf32-i386.c: Likewise.
7251 * elf32-mcore.c: Likewise.
7252 * elf32-ppc.c: Likewise.
7253 * elf32-sh.c: Likewise.
7254 * elf32-sh64.c: Likewise.
7255 * elf32-v850.c: Likewise.
7256 * elf64-alpha.c: Likewise.
7257 * elf64-sh64.c: Likewise.
7258 * elfcode.h: Likewise.
7259 * elfcore.h: Likewise.
7260 * elflink.h: Likewise.
7261 * elfxx-mips.c: Likewise.
7262 * i386os9k.c: Likewise.
7263 * ieee.c: Likewise.
7264 * libbfd.c: Likewise.
7265 * linker.c: Likewise.
7266 * mmo.c: Likewise.
7267 * nlm32-alpha.c: Likewise.
7268 * nlm32-i386.c: Likewise.
7269 * nlm32-ppc.c: Likewise.
7270 * nlm32-sparc.c: Likewise.
7271 * nlmcode.h: Likewise.
7272 * oasys.c: Likewise.
7273 * pdp11.c: Likewise.
7274 * peicode.h: Likewise.
7275 * reloc.c: Likewise.
7276 * som.c: Likewise.
7277 * srec.c: Likewise.
7278 * tekhex.c: Likewise.
7279 * vms.c: Likewise.
7280 * xcofflink.c: Likewise.
7281 * elf64-sparc.c: Edit comment to not use "== false".
7282
7283 * aoutf1.h: Don't use "? true : false".
7284 * ecoff.c: Likewise.
7285 * format.c: Likewise.
7286 * ieee.c: Likewise.
7287 * linker.c: Likewise.
7288 * mmo.c: Likewise.
7289 * oasys.c: Likewise.
7290
48fc70a2
AM
72912002-06-23 H.J. Lu <hjl@gnu.org>
7292
7293 * elflink.h (elf_link_add_archive_symbols): For the default
7294 version, check references with only one `@' first.
7295
47b7c2db
AM
72962002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7297
7298 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7299 function.
9b5ecbd0 7300 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7301 symbol table.
7302 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7303 (elf64_hppa_size_dynamic_sections): Revise to use
7304 elf64_hppa_mark_milli_and_exported_functions.
7305 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7306 symbols out of dynamic symbol table.
7307
f5d44ba0
AM
73082002-06-23 Alan Modra <amodra@bigpond.net.au>
7309
bb3fff1e
AM
7310 * Makefile.in: Regenerate.
7311 * libbfd.h: Regenerate.
7312 * bfd-in2.h: Regenerate.
7313 * configure: Regenerate.
7314 * po/SRC-POTFILES.in: Regenerate.
7315
f5d44ba0
AM
7316 * elflink.h: Comment typo fixes.
7317
73182002-06-23 H.J. Lu <hjl@gnu.org>
7319
7320 * elf-bfd.h (elf_link_loaded_list): New structure.
7321 (elf_link_hash_table): Add "loaded".
7322 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7323 * elflink.h (elf_link_check_versioned_symbol): New function.
7324 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7325
cc36acdf
NC
73262002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7327
7328 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7329 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7330 nothing needed to be done, rather than false, indicating that the
7331 section's size could not be computed.
7332
4e5ba5b7
DB
73332002-06-18 Dave Brolley <brolley@redhat.com>
7334
7335 From Catherine Moore, Michael Meissner, Dave Brolley:
7336 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7337 * targets.c: Support bfd_elf32_frv_vec.
7338 * reloc.c: Add FRV relocs.
7339 * configure.in: Add support for bfd-elf32-frv-vec.
7340 * config.bfd (targ_cpu): Add support for frv-*-elf.
7341 * archures.c: Add frv arch and machines.
7342 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7343 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7344 (BFD32_BACKENDS): Add elf32-frv.lo.
7345 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7346 (cpu-frv.lo): New target.
7347 (elf32-frv.lo): New target.
7348 * cpu-frv.c: New file.
7349 * elf32-frv.c: New file.
7350
7ece0d85
JJ
73512002-06-18 Jakub Jelinek <jakub@redhat.com>
7352
7353 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7354 e_shnum == 0.
7355 Only read the first section header if e_shoff is non-zero.
7356 Don't consider e_shstrndx if there are no sections.
7357
57fb03ac
TR
73582002-06-17 Tom Rix <trix@redhat.com>
7359
7360 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7361 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7362 complain_overflow_bitfield.
7363
341ca622
AM
73642002-06-17 Alan Modra <amodra@bigpond.net.au>
7365
767e34d1
AM
7366 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7367 (bfd_fdopenr): Likewise.
7368 (bfd_openstreamr): Likewise.
7369 (bfd_openw): Likewise.
7370
341ca622
AM
7371 * targets.c: Sort target vecs.
7372 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7373 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7374 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7375 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7376 * configure.in: Sort target vecs. Add m88kmach3_vec.
7377 * configure: Regenerate.
7378
dfbbae4c
HPN
73792002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7380
7381 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7382 bpo_reloc_no to break sort order ties, not address of items.
7383
d663e1cd
JL
73842002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7385
7386 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7387 Skip excluded sections in determing __gp value.
7388 (elf_hppa_final_link_relocate): Use the symbol's address in
7389 R_PARISC_FPTR64 relocations that don't need an opd entry.
7390 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7391 (elf64_hppa_finalize_dynreloc): Likewise.
7392 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7393 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7394
a8295218
NC
73952002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7396
7397 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7398 alignment for .bss, .data and .text sections so that sse and sse2
7399 code will work.
7400 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7401
74022002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7403
7404 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7405 sh[1234]*-elf*.
7406
3db4b612
JL
74072002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7408
2cb69dd3
JL
7409 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7410 dynamic sections.
7411
3db4b612
JL
7412 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7413 for a symbol that has no output section.
7414 (allocate_dynrel_entries): Correct comment.
7415 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7416 unless we want one.
7417 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7418 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7419 with no section. Remove unnecessary parentheses.
7420
f3813499
TR
74212002-06-11 Tom Rix <trix@redhat.com>
7422
7423 * coffcode.h (coff_compute_section_file_positions): Add data
7424 section to AIX loader alignment check.
7425
f5d44ba0 7426 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7427 alignment to 4 bytes.
7428 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7429 power accessor macro.
7430 (do_shared_object_padding): Remove invalid assertion.
7431
0ebaf185
RS
74322002-06-10 Richard Sandiford <rsandifo@redhat.com>
7433
7434 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7435 for removed output sections.
7436
ebe3e2d1
NC
74372002-06-10 Geoffrey Keating <geoffk@redhat.com>
7438
7439 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7440 htab_alloc.
7441 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7442
0b14c2aa
L
74432002-06-08 H.J. Lu <hjl@gnu.org>
7444
7445 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7446 work around a long long bug in gcc 2.96 on mips.
7447
3c2bfad6
JT
74482002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7449
7450 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7451 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7452 Regenerate dependency lists.
7453 * Makefile.in: Regenerate.
7454 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7455 vax1knetbsd_vec to targ_selvecs.
7456 * configure.in: Add vax1knetbsd_vec.
7457 * configure: Regenerate.
7458 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7459 * vax1knetbsd.c: New file.
7460 * vaxnetbsd.c: Update copyright years.
7461 (TARGET_PAGE_SIZE): Set to 0x1000.
7462 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7463
91149be3
JT
74642002-06-08 Matt Thomas <matt@3am-software.com>
7465
7466 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7467
21e15248
AM
74682002-06-08 Alan Modra <amodra@bigpond.net.au>
7469
7470 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7471
986b7daa
AM
74722002-06-08 Alan Modra <amodra@bigpond.net.au>
7473
e90b95f6
AM
7474 * Makefile.am: Run "make dep-am".
7475 * Makefile.in: Regenerate.
7476
3f9c735e
AM
7477 * armnetbsd.c: Replace CONST with const.
7478 * corefile.c: Likewise.
7479 * elf32-dlx.c: Likewise.
7480 * elf64-mips.c: Likewise.
7481 * mmo.c: Likewise.
7482 * ns32knetbsd.c: Likewise.
7483
986b7daa
AM
7484 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7485 table is elf64-sparc.
7486
5a659663
TS
74872002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7488
7489 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7490 Fix RELA addends to get not shifted in the result. Don't do special
7491 handling of R_MIPS_64 for NewABI.
7492
9bab7074
AM
74932002-06-07 Alan Modra <amodra@bigpond.net.au>
7494
7495 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7496 (NAME(aout,slurp_reloc_table)): Likewise.
7497 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7498 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7499 (xcoff_write_archive_contents_big): Likewise.
7500 (xcoff_generate_rtinit): Likewise.
7501 (xcoff_generate_rtinit): Likewise, and check error return.
7502 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7503 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7504 (coff_get_normalized_symtab): Likewise.
7505 (coff_make_empty_symbol): Likewise.
7506 (bfd_coff_set_symbol_class): Likewise.
7507 * cofflink.c (coff_link_add_symbols): Likewise.
7508 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7509 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7510 (bfd_ecoff_write_accumulated_debug): Likewise.
7511 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7512 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7513 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7514 * ieee.c (do_with_relocs): Use bfd_zalloc.
7515 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7516 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7517 (NAME(aout,slurp_reloc_table)): Likewise.
7518 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7519 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7520 * som.c (som_build_and_write_symbol_table): Likewise.
7521 (som_slurp_string_table): Likewise.
7522 (som_slurp_symbol_table): Likewise.
7523 (som_bfd_ar_write_symbol_stuff): Likewise.
7524 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7525 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7526 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7527 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7528 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7529
1126897b
AM
75302002-06-07 Alan Modra <amodra@bigpond.net.au>
7531
7532 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7533 "group" union.
7534 (elf_group_name): Update.
7535 (elf_group_id): Define.
7536 (bfd_elf_set_group_contents): Declare.
7537 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7538 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7539 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7540 that sym for the signature.
7541 (_bfd_elf_compute_section_file_positions): Don't call
7542 set_group_contents for "ld -r" case.
7543 (swap_out_syms): Use bfd_zalloc.
7544 * elflink.h (elf_link_add_archive_symbols): Likewise.
7545 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7546 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7547
3fad3c7c
AM
75482002-06-07 Alan Modra <amodra@bigpond.net.au>
7549
7550 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7551 relocs in opd for non-shared too.
7552
10f469bf 75532002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7554
7555 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7556 relocations.
7557
7217313c
NC
75582002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7559
7560 * merge.c: Include libiberty.h.
7561 * elf-strtab.c: Include libiberty.h.
7562
6cb22815
AM
75632002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7564
7565 * peXXigen.c (pe_print_idata): Remove unused variable.
7566
1ed89aa9
NC
75672002-06-06 David Heine <dlheine@tensilica.com>
7568
7569 * elf.c (assign_file_positions_for_segments): Remove unallocated
7570 sections from the section to segment mapping for PT_LOAD segments.
7571 Update comment about empty loadable segments.
7572
644c4c80
RS
75732002-06-06 Richard Sandiford <rsandifo@redhat.com>
7574
7575 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7576 is within the .stabstr section.
7577
f8ecb12b
AM
75782002-06-06 Alan Modra <amodra@bigpond.net.au>
7579
7580 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7581 are "const PTR", not "const PTR *".
7582 (bfd_elf32_swap_symbol_in): Likewise.
7583 (bfd_elf64_swap_symbol_in): Likewise.
7584 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7585 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7586 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7587 (elf_link_add_object_symbols): Likewise.
7588 (elf_link_record_local_dynamic_symbol): Likewise.
7589 (elf_link_input_bfd): Likewise.
7590 (elf_gc_mark): Likewise.
7591 (elf_reloc_symbol_deleted_p): Likewise.
7592 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7593 (mn10200_elf_relax_delete_bytes): Likewise.
7594 (mn10200_elf_symbol_address_p): Likewise.
7595 (mn10200_elf_get_relocated_section_contents): Likewise.
7596 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7597 (mn10300_elf_relax_section): Likewise.
7598 (mn10300_elf_relax_delete_bytes): Likewise.
7599 (mn10300_elf_symbol_address_p): Likewise.
7600 (mn10300_elf_get_relocated_section_contents): Likewise.
7601 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7602 (elf32_h8_relax_delete_bytes): Likewise.
7603 (elf32_h8_symbol_address_p): Likewise.
7604 (elf32_h8_get_relocated_section_contents): Likewise.
7605 * elf32-hppa.c (get_local_syms): Likewise.
7606 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7607 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7608 * elf32-sh.c (sh_elf_relax_section): Likewise.
7609 (sh_elf_relax_delete_bytes): Likewise.
7610 (sh_elf_get_relocated_section_contents): Likewise.
7611 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7612 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7613 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7614 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7615 * elf64-ppc.c (get_local_syms): Likewise.
7616 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7617 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7618
1ed89aa9 76192002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7620
7621 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7622
73ff0d56
AM
76232002-06-05 Alan Modra <amodra@bigpond.net.au>
7624
9dce4196
AM
7625 * elf.c (group_signature): Swap in the whole symbol, and handle
7626 extracting section symbol names.
7627 (setup_group): Add comment.
7628 (set_group_contents): When called from objcopy or ld, arrange for
7629 section contents to be written. Write group member output section
7630 indices to allow objcopy to reorganize sections.
7631 (_bfd_elf_copy_private_section_data): Copy group info.
7632
73ff0d56
AM
7633 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7634 (bfd_elf32_swap_symbol_in): Update prototype.
7635 (bfd_elf64_swap_symbol_in): Likewise.
7636 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7637 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7638 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7639 (elf_link_add_object_symbols): Likewise.
7640 (elf_link_record_local_dynamic_symbol): Likewise.
7641 (elf_link_input_bfd): Likewise.
7642 (elf_gc_mark): Likewise.
7643 (elf_reloc_symbol_deleted_p): Likewise.
7644 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7645 (mn10200_elf_relax_delete_bytes): Likewise.
7646 (mn10200_elf_symbol_address_p): Likewise.
7647 (mn10200_elf_get_relocated_section_contents): Likewise.
7648 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7649 (mn10300_elf_relax_section): Likewise.
7650 (mn10300_elf_relax_delete_bytes): Likewise.
7651 (mn10300_elf_symbol_address_p): Likewise.
7652 (mn10300_elf_get_relocated_section_contents): Likewise.
7653 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7654 (elf32_h8_relax_delete_bytes): Likewise.
7655 (elf32_h8_symbol_address_p): Likewise.
7656 (elf32_h8_get_relocated_section_contents): Likewise.
7657 * elf32-hppa.c (get_local_syms): Likewise.
7658 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7659 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7660 * elf32-sh.c (sh_elf_relax_section): Likewise.
7661 (sh_elf_relax_delete_bytes): Likewise.
7662 (sh_elf_get_relocated_section_contents): Likewise.
7663 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7664 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7665 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7666 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7667 * elf64-ppc.c (get_local_syms): Likewise.
7668 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7669 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7670 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7671 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7672 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7673 * elf64-mips.c (mips_elf64_size_info): Likewise.
7674 * elf64-s390.c (s390_elf64_size_info): Likewise.
7675 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7676
53bfd6b4
MR
76772002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7678
7679 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7680 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7681 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
7682 _bfd_mips_elf_ignore_discarded_relocs.
7683 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
7684
d4df96e6
L
76852002-06-05 H.J. Lu <hjl@gnu.org>
7686
7687 * elfxx-mips.c (mips_elf_calculate_relocation): Call
7688 _bfd_elf_rel_local_sym for STT_SECTION relocations against
7689 the SEC_MERGE section.
7690
e61463e1
AM
76912002-06-05 Alan Modra <amodra@bigpond.net.au>
7692
3cac74d0
AM
7693 * coff-alpha.c: Update copyright date.
7694 * coff-mips.c: Likewise.
7695 * xcoff-target.h: Likewise.
7696
e61463e1
AM
7697 * bfd-in.h: Remove "taken from the source" comment.
7698 * libbfd-in.h: Likewise.
7699 * libcoff-in.h: Likewise.
7700 * bfd-in2.h: Regenerate.
7701 * libbfd.h: Regenerate.
7702 * libcoff.h: Regenerate.
7703
7704 * elf.c (bfd_elf_discard_group): Return true.
7705 * elf-bfd.h (bfd_elf_discard_group): Declare.
7706 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
7707 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
7708 * bfd.c (bfd_discard_group): Define.
7709 * targets.c (struct bfd_target): Add _bfd_discard_group.
7710 (BFD_JUMP_TABLE_LINK): Here too.
7711 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
7712 * aout-adobe.c (aout_32_bfd_discard_group): Define.
7713 * aout-target.h (MY_bfd_discard_group): Define.
7714 * aout-tic30.c (MY_bfd_discard_group): Define.
7715 * binary.c (binary_bfd_discard_group): Define.
7716 * bout.c (b_out_bfd_discard_group): Define.
7717 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
7718 * coffcode.h (coff_bfd_discard_group): Define.
7719 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
7720 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
7721 * i386msdos.c (msdos_bfd_discard_group): Define.
7722 * i386os9k.c (os9k_bfd_discard_group): Define.
7723 * ieee.c (ieee_bfd_discard_group): Define.
7724 * ihex.c (ihex_bfd_discard_group): Define.
7725 * mmo.c (mmo_bfd_discard_group): Define.
7726 * nlm-target.h (nlm_bfd_discard_group): Define.
7727 * oasys.c (oasys_bfd_discard_group): Define.
7728 * ppcboot.c (ppcboot_bfd_discard_group): Define.
7729 * som.c (som_bfd_discard_group): Define.
7730 * srec.c (srec_bfd_discard_group): Define.
7731 * tekhex.c (tekhex_bfd_discard_group): Define.
7732 * versados.c (versados_bfd_discard_group): Define.
7733 * vms.c (vms_bfd_discard_group): Define.
7734 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
7735 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
7736 (aix5coff64_vec): Likewise.
7737 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
7738
9cba27b2
JT
77392002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7740
7741 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
7742 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
7743 (elf32-sh64-com.lo): New dependency list.
7744 * Makefile.in: Regenerate.
7745 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
7746 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
7747 elf32-sh64-com.lo.
7748 * configure: Regenerate.
7749 * elf32-sh64.c (sh64_address_in_cranges)
7750 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
7751 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
7752 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
7753 * elf32-sh64-com.c: ...here. New file.
7754
8d2c33be
AM
77552002-06-04 Alan Modra <amodra@bigpond.net.au>
7756
7757 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
7758 ATTRIBUTE_UNUSED on used params.
7759 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
7760 before calling bfd_section_from_elf_index on local syms.
7761 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7762
5b0e55b6
JT
77632002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
7764
7765 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
7766 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
7767 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
7768 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
7769 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
7770 * Makefile.in: Regenerate.
7771 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
7772 (sh64-*-netbsd*): New targets.
7773 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
7774 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
7775 * configure: Regenerate.
7776 * elf32-sh64-nbsd.c: New file.
7777 * elf64-sh64-nbsd.c: New file.
7778 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
7779 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
7780 bfd_elf64_sh64lnbsd_vec.
7781
b885599b
AM
77822002-06-04 Alan Modra <amodra@bigpond.net.au>
7783
7784 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7785 (bfd_section_from_shdr): Likewise. Set section name of group
7786 sections from signature.
7787 (group_signature): Split out from setup_group. Ensure symbol table
7788 is available.
7789 (bfd_elf_discard_group): New function.
7790 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7791 .gnu.linkonce* sections if they are members of a group.
7792 (set_group_contents): Set GRP_COMDAT flag.
7793 * section.c (bfd_discard_group): New function.
7794 * bfd-in.h (bfd_elf_discard_group): Declare.
7795 * bfd-in2.h: Regenerate.
7796 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7797 (elf_linkonce_p): Define.
7798
90937f86
AM
77992002-06-04 Alan Modra <amodra@bigpond.net.au>
7800
7801 * elf.c (bfd_section_from_shdr): Make "name" const.
7802 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7803 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7804 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7805 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7806 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7807 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7808 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7809 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7810 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7811 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7812 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7813
cf6fb9ce
MR
78142002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7815
7816 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7817 ABI.
7818
cedb70c5
KH
78192002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7820
7821 * elf32-arc.c: Fix formatting.
7822 * elf32-arm.h: Likewise.
7823 * elf32-cris.c: Likewise.
7824 * elf32-dlx.c: Likewise.
7825 * elf32-hppa.c: Likewise.
7826 * elf32-i386.c: Likewise.
7827 * elf32-i386qnx.c: Likewise.
7828 * elf32-or32.c: Likewise.
7829 * elf32-s390.c: Likewise.
7830 * elf32-sh64.c: Likewise.
7831 * elf32-vax.c: Likewise.
7832 * elf32-xstormy16.c: Likewise.
7833 * elf64-alpha.c: Likewise.
7834 * elf64-mmix.c: Likewise.
7835 * elf64-ppc.c: Likewise.
7836 * elf64-s390.c: Likewise.
7837 * elf64-sh64.c: Likewise.
7838 * elf64-x86-64.c: Likewise.
7839
048d873d
RH
78402002-06-02 Richard Henderson <rth@redhat.com>
7841
7842 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7843 null when there are no got entries for a symbol.
7844 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7845 uninitialized variable warning.
7846
4a67a098
RH
78472002-06-01 Richard Henderson <rth@redhat.com>
7848
7849 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7850 undefined symbols here.
7851 (elf64_alpha_relax_section): Do it here. Also test for not
7852 defined in the current module.
7853 (elf64_alpha_relocate_section_r): Split out of ...
7854 (elf64_alpha_relocate_section): ... here. Don't dereference
7855 NULL when looking up local got entries.
7856
f44f99a5
RH
78572002-06-01 Richard Henderson <rth@redhat.com>
7858
7859 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7860 symbols from JSR relaxation.
7861 (elf64_alpha_size_plt_section_1): New.
7862 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7863 (elf64_alpha_size_rela_got_1): ... here.
7864 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7865 (elf64_alpha_size_rela_got_section): ... here.
7866 (elf64_alpha_size_plt_section): New.
7867 (elf64_alpha_relax_section): Call them.
7868 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7869 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7870
9e756d64
RH
78712002-06-01 Richard Henderson <rth@redhat.com>
7872
7873 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7874 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7875 in shared libraries. Fix DTPRELHI and TPRELHI value.
7876 (INSN_ADDQ, INSN_RDUNIQ): New.
7877 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7878 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7879 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7880 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7881 Handle GOTDTPREL and GOTTPREL relocations.
7882 (elf64_alpha_relax_gprelhilo): New.
7883 (elf64_alpha_relax_tls_get_addr): New.
7884 (elf64_alpha_relax_find_tls_segment): New.
7885 (elf64_alpha_relax_section): Handle TLS relocations.
7886 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7887 (elf64_alpha_check_relocs): Set it.
7888
c853d7f6
RH
78892002-06-01 Richard Henderson <rth@redhat.com>
7890
b646261c
RH
7891 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7892
c853d7f6
RH
7893 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7894 check; don't suppress dynamic relocs for non-allocated sections.
7895
d7e41a96
RH
7896 * elf64-alpha.c: Remove dead code.
7897
5f333394
AM
78982002-05-31 Alan Modra <amodra@bigpond.net.au>
7899
08e0ee05
AM
7900 * bfd-in2.h: Regenerate.
7901 * libbfd.h: Regenerate.
7902 * po/SRC-POTFILES.in: Regenerate.
7903
5f333394
AM
7904 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7905 space for bss .plt.
7906
caf47ea6
AM
79072002-05-31 Graeme Peterson <gp@qnx.com>
7908
7909 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7910 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7911 Run "make dep-am".
7912 * Makefile.in: Regenerate.
7913 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7914 * configure.in: Add bfd_elf32_i386qnx_vec support.
7915 * configure: Regenerate.
7916 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7917 is_contained_by_filepos, and copy_private_bfd_data_p.
7918 * elf.c (assign_file_positions_for_segments): Call backend
7919 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7920 (IS_CONTAINED_BY_FILEPOS): Define.
7921 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7922 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7923 Fix non-K&R call to _bfd_error_handler.
7924 (_bfd_elf_copy_private_section_data): Use backend
7925 copy_private_bfd_data_p.
7926 * elf32-i386.c: Don't include elfxx-target.h when
7927 ELF32_I386_C_INCLUDED is defined.
7928 * elf32-i386qnx.c: New QNX elf backend file.
7929 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7930 elf_backend_is_contained_by_filepos, and
7931 elf_backend_do_copy_private_bfd_data.
7932 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7933
5bc56484
AM
79342002-05-31 Alan Modra <amodra@bigpond.net.au>
7935
7936 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7937 Move other similar defines to start of file.
7938
1b164155
TR
79392002-05-30 Tom Rix <trix@redhat.com>
7940
7941 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7942 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7943
3765b1be
RH
79442002-05-30 Richard Henderson <rth@redhat.com>
7945
7946 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7947 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7948 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7949 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7950 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7951 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7952 n_local_got_entries to total_got_size and local_got_size.
7953 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7954 (alpha_got_entry_size): New.
7955 (elf64_alpha_relax_with_lituse): Use it.
7956 (elf64_alpha_relax_without_lituse): Likewise.
7957 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7958 (get_got_entry): New.
7959 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7960 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7961 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7962 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7963 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7964 (elf64_alpha_calc_got_offsets): Likewise.
7965 (alpha_dynamic_entries_for_reloc): New.
7966 (elf64_alpha_calc_dynrel_sizes): Use it.
7967 (elf64_alpha_size_dynamic_sections): Likewise.
7968 (elf64_alpha_relocate_section): Handle TLS relocations.
7969 * reloc.c: Add Alpha TLS relocations.
7970 * bfd-in2.h, libbfd.h: Rebuild.
7971
5e226794
NC
79722002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7973
7974 * peXXigen.c (pe_print_idata): Remove double printed
7975 import table lines; add Bound-To comment.
7976
90ace9e9
JT
79772002-05-29 Matt Thomas <matt@3am-software.com>
7978
7979 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7980 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7981 (elf32-vax.lo): New rule.
7982 * Makefile.in: Regenerate.
7983 * configure.in (bfd_elf32_vax_vec)
7984 (vaxnetbsd_vec): New vectors.
7985 * configure: Regenerate.
7986 * config.bfd (vax-*-netbsdelf*)
7987 (vax-*-netbsdaout*)
7988 (vax-*-netbsd*): New targets.
7989 * elf32-vax.c: New file.
7990 * reloc.c: Add VAX relocations.
7991 * bfd-in2.h: Regenerate.
7992 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7993
4a253e81
JT
79942002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7995
7996 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7997 and bfd_elf32_bigarm_vec to targ_selvecs.
7998
6e7c73dd
CF
79992002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8000
8001 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8002 with auto-imported symbols.
8003
8afb0e02
NC
80042002-05-29 Adam Nemet <anemet@lnxw.com>
8005
8006 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8007 sections only record bfd.
9bab7074 8008 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 8009 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 8010 * bfd-in2.h: Regenerate.
8afb0e02 8011
a95653f5
NC
80122002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8013
8014 * syms.c (_bfd_stab_section_find_nearest_line): Move
8015 declaration and initialisation of saw_line and saw_func out of
8016 for loop.
8017
7cdc5bba
AM
80182002-05-29 Alan Modra <amodra@bigpond.net.au>
8019
8020 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8021 (bfd_elf64_get_symbol_info): Define.
8022 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8023
4c7aad1c
AM
80242002-05-29 Andrey Volkov <avolkov@transas.com>
8025
8026 * cpu-h8300.c: Make default h8300 machine first in machine list.
8027
d172d4ba
NC
80282002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8029
8030 * config.bfd: Added DLX configuraton.
8031 * Makefile.am: Added DLX configuraton.
8032 * configure.in: Added DLX configuraton.
8033 * archures.c: Add DLX architecure.
8034 * reloc.c: Add DLX relocs.
8035 * targets.c: Added DLX target vector.
8036 * configure: Regenerate.
8037 * Makefile.in: Regenreate.
8038 * bfd-in2.h: Regenreate.
8039 * elf32-dlx.c: New file: Support DLX target.
8040 * cpu-dlx.c: New file: Support DLX target.
8041
d1329ca3
AM
80422002-05-25 Alan Modra <amodra@bigpond.net.au>
8043
428d0de3
AM
8044 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8045
d1329ca3
AM
8046 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8047 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8048 strings to point inside function code sym string.
8049 (func_desc_adjust): Likewise.
8050 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8051
3bab7989
ML
80522002-05-24 Michal Ludvig <mludvig@suse.cz>
8053
8054 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8055 (elf64_x86_64_grok_psinfo): Added.
8056
436e8db0
NC
80572002-05-24 TAMURA Kent <kent@netbsd.org>
8058
8059 * config.bfd: Add a target for i386-netbsdpe.
8060
ea1e4b0d
AM
80612002-05-24 Alan Modra <amodra@bigpond.net.au>
8062
8063 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8064 and is_func_descriptor.
8065 (func_desc_adjust): Hide function code sym in shared libs unless
8066 there is a matching exported function descriptor sym.
8067
13ae64f3
JJ
80682002-05-23 Jakub Jelinek <jakub@redhat.com>
8069
8070 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8071 for symbols from SHF_TLS section.
8072 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8073 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8074 (map_sections_to_segments): Build PT_TLS segment if necessary.
8075 (assign_file_positions_for_segments): Likewise.
8076 (get_program_header_size): Account for PT_TLS segment.
8077 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8078 SEC_THREAD_LOCAL sections to STT_TLS.
8079 * reloc.c: Add 386 and IA-64 TLS relocs.
8080 * section.c (SEC_THREAD_LOCAL): Define.
8081 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8082 Remove.
8083 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8084 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8085 unconditionally.
8086 (struct elf_final_link_info): Add first_tls_sec.
8087 (elf_bfd_final_link): Set first_tls_sec.
8088 Compute elf_hash_table (info)->tls_segment.
8089 (elf_link_output_extsym): Handle STT_TLS symbols.
8090 (elf_link_input_bfd): Likewise.
8091 * syms.c (BSF_THREAD_LOCAL): Define.
8092 * bfd-in2.h: Rebuilt.
8093 * libbfd.h: Rebuilt.
8094 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8095 elf_i386_mkobject, elf_i386_object_p): New functions.
8096 (elf_howto_table): Add TLS relocs.
8097 (elf_i386_reloc_type_lookup): Support TLS relocs.
8098 (elf_i386_info_to_howto_rel): Likewise.
8099 (struct elf_i386_link_hash_entry): Add tls_type.
8100 (struct elf_i386_obj_tdata): New.
8101 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8102 New macros.
8103 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8104 (link_hash_newfunc): Clear tls_type.
8105 (elf_i386_check_relocs): Support TLS relocs.
8106 (elf_i386_gc_sweep_hook): Likewise.
8107 (allocate_dynrelocs): Likewise.
8108 (elf_i386_size_dynamic_sections): Likewise.
8109 (elf_i386_relocate_section): Likewise.
8110 (elf_i386_finish_dynamic_symbol): Likewise.
8111 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8112 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8113 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8114 want_tprel, want_dtpmod, want_dtprel.
8115 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8116 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8117 R_IA64_LTOFF_TPREL22.
8118 (elf_code_to_howto_index): Add TLS relocs.
8119 (elfNN_ia64_check_relocs): Support TLS relocs.
8120 (allocate_global_data_got): Account for TLS .got data.
8121 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8122 (elfNN_ia64_install_value): Supprt TLS relocs.
8123 (set_got_entry): Support TLS relocs.
8124 (elfNN_ia64_relocate_section): Likewise.
8125
c62e1cc3
NC
81262002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8127
8128 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8129 BLX reloc round the relocation up rather than down.
8130 * coff-arm.c (coff_arm_relocate_section): Likewise.
8131
c5a43a5d
L
81322002-05-21 H.J. Lu (hjl@gnu.org)
8133
8134 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8135 definition.
8136
afbe61cf
AM
81372002-05-22 Alan Modra <amodra@bigpond.net.au>
8138
8139 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8140 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8141
9c07fe7c
AM
81422002-05-22 Alan Modra <amodra@bigpond.net.au>
8143
8144 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8145 unresolved relocs.
8146 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8147
21611032
TS
81482002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8149
c5cd6d62 8150 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
8151 non-ELF targets.
8152
41241523
TS
81532002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8154
8155 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8156 an error value.
8157 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8158 return with false on error.
8159 (elf_link_input_bfd): Check reloc_emitter return value.
8160
658f2588
JT
81612002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8162
8163 * config.bfd (armeb-*-netbsdelf*): New target.
8164
c862ae31
AM
81652002-05-20 Alan Modra <amodra@bigpond.net.au>
8166
8167 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8168 at the plt call stub.
8169
6dd14845
TS
81702002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8171
8172 * cpu-mips.c (mips_compatible): Don't try to check machine
8173 compatibility.
8174
a58d9c34
TR
81752002-05-18 Tom Rix <trix@redhat.com>
8176
9b5ecbd0 8177 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 8178
ef60b7ff
AM
81792002-05-17 Alan Modra <amodra@bigpond.net.au>
8180
8181 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8182 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8183 we've already warned about an undefined symbol. Report more
8184 detail on reloc errors.
8185
a703a6ea
AM
81862002-05-17 Alan Modra <amodra@bigpond.net.au>
8187
8188 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8189 * configure.in: Invoke AM_INSTALL_LIBBFD.
8190 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8191 (install_libbfd): .. New target.
8192 (uninstall_libbfd): Likewise.
8193 (install-bfdlibLTLIBRARIES): Likewise.
8194 (uninstall-bfdlibLTLIBRARIES): Likewise.
8195 (bfdlibdir): New.
8196 (bfdincludedir): New.
8197 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8198 * aclocal.m4: Regenerate.
8199 * configure: Regenerate.
8200 * Makefile.in: Regenerate.
8201
2c13d98b
NC
82022002-05-17 Stuart Balfour <sbalfour@cisco.com>
8203
8204 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8205 hash loop.
8206
629936c5
NC
82072002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8208
8209 * config.bfd: Add targets for sh64-linux (little endian and
8210 big endian).
8211
e4cf60a8
NC
82122002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8213
8214 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8215 is located in the same section as the import table. Instead
8216 check, and if necessary load the section containing the thunk.
8217
d1e66cd4
NC
82182002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8219
8220 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8221 bfd_bread.
8222 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8223 with bfd_bread.
d1e66cd4 8224
2d653fc7
AM
82252002-05-15 Alan Modra <amodra@bigpond.net.au>
8226
8227 * aix5ppc-core.c: Warning fixes.
8228 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8229 * aout-target.h (MY_bfd_link_just_syms): Define.
8230 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8231 * bfd.c (bfd_link_just_syms): Define.
8232 * binary.c (binary_bfd_link_just_syms): Define.
8233 * bout.c (b_out_bfd_link_just_syms): Define.
8234 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8235 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8236 * coffcode.h (coff_bfd_link_just_syms): Define.
8237 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8238 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8239 (_bfd_elf_link_just_syms): Declare.
8240 * elf.c (_bfd_elf_link_just_syms): New function.
8241 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8242 sections haven't already been discarded by the linker.
8243 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8244 sections and SEC_MERGE sections.
8245 (elf_bfd_discard_info): Similarly here.
8246 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8247 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8248 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8249 * ieee.c (ieee_bfd_link_just_syms): Define.
8250 * ihex.c (ihex_bfd_link_just_syms): Define.
8251 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8252 (_bfd_generic_link_just_syms): Declare.
8253 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8254 * linker.c (_bfd_generic_link_just_syms): New function.
8255 * mmo.c (mmo_bfd_link_just_syms): Define.
8256 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8257 * oasys.c (oasys_bfd_link_just_syms): Define.
8258 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8259 * som.c (som_bfd_link_just_syms): Define.
8260 * srec.c (srec_bfd_link_just_syms): Define.
8261 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8262 (BFD_JUMP_TABLE_LINK): And here.
8263 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8264 * versados.c (versados_bfd_link_just_syms): Define.
8265 * vms.c (vms_bfd_link_just_syms): Define.
8266 * libbfd.h: Regenerate.
8267 * bfd-in2.h: Regenerate.
8268
cb7394f2
TS
82692002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8270
8271 * elf32-mips.c: Remove superfluous definitions copied from
8272 elfxx-mips.c.
8273 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8274 SGIish vectors to check the special case.
8275 (mips_elf_hi16_reloc): Fix comment.
8276 (mips_elf_got16_reloc): Likewise.
8277 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8278 (elf_reloc_map): Code cleanup.
8279 (mips_reloc_map): Add comment.
8280 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8281 (mips_elf32_rtype_to_howto): Likewise.
8282 (mips_elf32_discard_info): Likewise.
8283 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8284 lead to IRIX compatibility now.
8285
8dc1a139
TS
82862002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8287
8288 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8289
2051e1b5
JT
82902002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8291
8292 * config.bfd (shle-*-netbsdelf*): Add target which includes
8293 sh64 support.
8294
83954261
AM
82952002-05-13 David Edelsohn <edelsohn@gnu.org>
8296
8297 * configure.in: Revert 2002-04-07. Instead, auto-configure
8298 HAVE_ST_C_IMPL.
8299 * configure: Regenerate.
8300 * config.in: Regenerate.
8301 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8302 or AIX_5_CORE.
8303
a9bf1154
NC
83042002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8305
8306 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8307 corefiles as well.2
8308 * configure: Regenerate.
8309
3129eb7a
AM
83102002-05-13 Alan Modra <amodra@bigpond.net.au>
8311
8312 * Makefile.am (install-data-local): Install headers to
8313 $(exec_prefix)/include.
8314 * Makefile.in: Regenerate.
8315
a9a32010
DJ
83162002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8317 Daniel Jacobowitz <drow@mvista.com>
8318
8319 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8320 map BFD_RELOC_RVA.
8321
83222002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8323
8324 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8325 hppa*-*-openbsd*): New targets.
8326 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8327 * configure: Regenerate.
8328
f1f0d9ab
TR
83292002-05-10 Tom Rix <trix@redhat.com>
8330
ea1e4b0d 8331 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8332 xcoff64_ppc_relocate_section.
8333 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8334 * libxcoff.h: Common xcoff_reloc_type function declaration.
8335
c432ba1a
AM
83362002-05-10 Alan Modra <amodra@bigpond.net.au>
8337
16a10388 8338 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8339 added in 2002-05-09 commit.
16a10388 8340
c432ba1a
AM
8341 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8342 don't look for stubs on all undefined syms.
8343
4a335f3d
AM
83442002-05-09 Alan Modra <amodra@bigpond.net.au>
8345
8fc39d5d
AM
8346 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8347 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8348 pcrel_offset.
8349
4a335f3d
AM
8350 * elf32-i386.c (elf_howto_table): Comments.
8351 (elf_i386_relocate_section): Handle more relocs for relocatable
8352 linking and against SEC_MERGE sections.
8353
41fcb14e
AM
83542002-05-08 Alan Modra <amodra@bigpond.net.au>
8355
8356 * elf32-ppc.c (ppc_elf_create_got): New function.
8357 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8358 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8359 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8360 _bfd_elf_create_got_section.
8361
b491616a
AM
83622002-05-07 Alan Modra <amodra@bigpond.net.au>
8363
8364 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8365 * elfxx-target.h (elf_backend_rela_normal): Define.
8366 (elfNN_bed): Init rela_normal.
8367 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8368 for section symbols here if rela_normal. Simplify abs section test.
8369 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8370 return immediately. Remove code handling relocatable linking.
8371 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8372 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8373 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8374 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8375 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8376 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8377 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8378 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8379 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8380 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8381 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8382 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8383 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8384 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8385 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8386 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8387 * elf-m10200.c (elf_backend_rela_normal): Define.
8388 * elf-m10300.c (elf_backend_rela_normal): Define.
8389 * elf32-fr30.c (elf_backend_rela_normal): Define.
8390 * elf32-i370.c (elf_backend_rela_normal): Define.
8391 * elf32-i860.c (elf_backend_rela_normal): Define.
8392 * elf32-m68k.c (elf_backend_rela_normal): Define.
8393 * elf32-mcore.c (elf_backend_rela_normal): Define.
8394 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8395 * elf32-ppc.c (elf_backend_rela_normal): Define.
8396 * elf32-s390.c (elf_backend_rela_normal): Define.
8397 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8398 * elf64-ppc.c (elf_backend_rela_normal): Define.
8399 * elf64-s390.c (elf_backend_rela_normal): Define.
8400 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8401 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8402 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8403 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8404
df212a7e
NC
84052002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8406
8407 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8408 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8409
3decf53c
AM
84102002-05-06 Alan Modra <amodra@bigpond.net.au>
8411
8412 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8413 when not relocatable. Fix reloc_emitter call for K&R.
8414
f46c2da6
AM
84152002-05-04 Alan Modra <amodra@bigpond.net.au>
8416
8417 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8418 reloading local sym addend mistakenly removed in 2002-05-01 change.
8419
8420 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8421 (read_abbrevs): Change "offset" param to bfd_vma.
8422 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8423 Change "abbrev_offset" to bfd_vma.
8424 (read_indirect_string): Use correct conversion chars in error
8425 message format string, cast bfd_vma's to unsigned long.
8426 (read_abbrevs): Likewise.
8427 (read_attribute_value): Likewise.
8428 (decode_line_info): Likewise.
8429 (scan_unit_for_functions): Likewise.
8430 (parse_comp_unit): Likewise.
8431
59862849
TR
84322002-05-04 Tom Rix <trix@redhat.com>
8433
8434 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8435 (coff_swap_reloc_out): Same.
8436 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8437 (xcoff_swap_reloc_out): Same.
8438 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8439 case some 16 bit relocs. Add reloc value to output.
8440 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8441 R_RBR. Improve names.
59862849
TR
8442 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8443 (bfd_xcoff_backend_data): Update with new reloc swap names.
8444 (bfd_pmac_xcoff_backend_data) : Same.
8445 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8446 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8447 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8448 R_POS. Add reloc value to output.
ea1e4b0d
AM
8449 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8450 bit R_RBR. Improve names, masks.
59862849
TR
8451 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8452 (bfd_xcoff_backend_data): Update with new reloc swap names.
8453 (bfd_xcoff_aix5_backend_data) : Same.
8454
b4655ea9
AM
84552002-05-04 Alan Modra <amodra@bigpond.net.au>
8456
8457 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8458 bfd_count top_index, input_list, all_local_syms.
8459 (elf32_hppa_setup_section_lists): New function, split from
8460 elf32_hppa_size_stubs.
8461 (elf32_hppa_next_input_section): Likewise.
8462 (group_sections): Likewise.
8463 (get_local_syms): Likewise.
8464 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8465 stubs on undefined syms too.
8466 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8467 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8468 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8469 (elf32_hppa_next_input_section): Declare.
8470
301e3139
AM
84712002-05-04 Bob Byrnes <byrnes@curl.com>
8472
8473 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8474 _bfd_new_bfd.
8475
7c5fcef7
L
84762002-05-03 H.J. Lu (hjl@gnu.org)
8477
8478 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8479 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8480 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8481 to hide a global symbol.
8482 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8483 forced_local to true.
7c5fcef7 8484
84de6048
RH
84852002-05-02 Richard Henderson <rth@redhat.com>
8486
8487 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8488 vs SHN_UNDEF to zero.
8489
805fc799
AM
84902002-05-02 Alan Modra <amodra@bigpond.net.au>
8491
c061c2d8
AM
8492 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8493 16 bit reloc.
8494 <R_PPC64_SECTOFF_DS>: Likewise.
8495 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8496 SECTOFF reloc.
8497 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8498 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8499 SECTOFF reloc.
8500
805fc799
AM
8501 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8502 (ppc64_elf_ha_reloc): New function.
8503 (ppc64_elf_brtaken_reloc): New function.
8504 (ppc64_elf_sectoff_reloc): New function.
8505 (ppc64_elf_sectoff_ha_reloc): New function.
8506 (ppc64_elf_toc_reloc): New function.
8507 (ppc64_elf_toc_ha_reloc): New function.
8508 (ppc64_elf_toc64_reloc): New function.
8509 (ppc64_elf_unhandled_reloc): New function.
8510 (ppc64_elf_howto_raw): Use the above.
8511 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8512 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8513 <R_PPC64_SECTOFF_DS>: Likewise.
8514 (IS_ABSOLUTE_RELOC): Update.
8515 (struct ppc_link_hash_table): Add have_undefweak.
8516 (ppc64_elf_link_hash_table_create): Init.
8517 (func_desc_adjust): Set have_undefweak.
8518 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8519 add the .sfpr blr when have_undefweak.
8520 (ppc64_elf_setup_section_lists): Check hash table flavour.
8521 (ppc64_elf_next_input_section): Move output_section->owner test to
8522 ppc64elf.em.
8523 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8524 and relocatable test. Return TOCstart and don't set elf_gp.
8525 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8526 offset calculation. Add assert on weak sym branch tweaks.
8527 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8528 (ppc64_elf_toc): Declare.
8529 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8530
818c39a3
AM
85312002-05-01 Alan Modra <amodra@bigpond.net.au>
8532
8533 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8534 file_name.
8535
721956f4
AM
85362002-05-01 Alan Modra <amodra@bigpond.net.au>
8537
8538 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8539 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8540 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8541 call branches. Correct undefined weak destination.
8542 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8543 .sfpr, and correct case where either only savef* or restf* is
8544 needed.
8545
8546 Long branch stubs, multiple stub sections.
8547 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8548 (ppc64_elf_next_input_section): Declare.
8549 * elf64-ppc.c: Move linker-only prototypes.
8550 (STUB_SUFFIX): Define.
8551 (enum ppc_stub_type): New.
8552 (struct ppc_stub_hash_entry): New.
8553 (struct ppc_branch_hash_entry): New.
8554 (struct ppc_link_hash_entry): Add stub_cache, oh.
8555 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8556 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8557 Rename plt_overflow to stub_error.
8558 (ppc_stub_hash_lookup): Define.
8559 (ppc_branch_hash_lookup): Define.
8560 (stub_hash_newfunc): New function.
8561 (branch_hash_newfunc): New function.
8562 (link_hash_newfunc): Init new fields.
8563 (ppc64_elf_link_hash_table_create): Likewise.
8564 (ppc64_elf_link_hash_table_free): New function.
8565 (ppc_stub_name): New function.
8566 (ppc_get_stub_entry): New function.
8567 (ppc_add_stub): New function.
8568 (create_linkage_sections): Use bfd_make_section_anyway. Create
8569 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8570 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8571 and set up for plt call stubs. Link func and func desc syms.
8572 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8573 (func_desc_adjust): Avoid hash lookup when func desc sym available
8574 via shortcut, and set links when processing.
8575 (ppc64_elf_hide_symbol): Likewise.
8576 (allocate_dynrelocs): Don't allocate stub section here.
8577 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8578 Remove sstub code.
8579 (ppc_type_of_stub): New function.
8580 (build_one_stub): Delete.
8581 (ppc_build_one_stub): New function.
8582 (ppc_size_one_stub): New function.
8583 (ppc64_elf_setup_section_lists): New function.
8584 (ppc64_elf_next_input_section): New function.
8585 (group_sections): New function.
8586 (get_local_syms): New function.
8587 (ppc64_elf_size_stubs): Rewrite.
8588 (ppc64_elf_build_stubs): Rewrite.
8589 (ppc64_elf_relocate_section): Look up stub entry for REL24
8590 relocs. Don't propagate REL14* to dynamic objects. Look for long
8591 branch stubs if REL14* or REL24 relocs won't reach.
8592 (bfd_elf64_bfd_link_hash_table_free): Define.
8593
09c2219b
MM
85942002-04-30 Mark Mitchell <mark@codesourcery.com>
8595
c5cd6d62 8596 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8597
07b678c0
TR
85982002-04-30 Tom Rix <trix@redhat.com>
8599
8600 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8601 symbol names into the hash table.
8602
dbe341c6
TR
86032002-04-28 Tom Rix <trix@redhat.com>
8604
8605 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8606 calulating relocations.
dbe341c6 8607 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8608 (xcoff_ppc_relocate_section): Use relocation and complain function
8609 tables.
8610 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8611 (xcoff_complain_overflow_signed_func): Same.
8612 (xcoff_complain_overflow_bitfield_func): Same.
8613 (xcoff_complain_overflow_dont_func): Same.
8614 (xcoff_reloc_type_crel): New recot function.
8615 (xcoff_reloc_type_br): Same.
8616 (xcoff_reloc_type_ba): Same.
8617 (xcoff_reloc_type_toc): Same.
8618 (xcoff_reloc_type_rel): Same.
8619 (xcoff_reloc_type_neg): Same.
8620 (xcoff_reloc_type_pos): Same.
8621 (xcoff_reloc_type_fail): Same.
8622 (xcoff_reloc_type_noop): Same.
8623 * libxcoff.h : Declare common parts for xcoff64.
8624 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8625 and complain function tables.
dbe341c6 8626
985142a4
AM
86272002-04-28 Alan Modra <amodra@bigpond.net.au>
8628
8629 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8630 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8631
eba91044
AM
86322002-04-26 Alan Modra <amodra@bigpond.net.au>
8633
e54fdaa5
AM
8634 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8635 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8636
a50c1845
AM
8637 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8638 same as the output before calling elf_link_input_bfd.
8639
eba91044
AM
8640 * coffcode.h (coff_compute_section_file_positions): Set
8641 section_tail after shuffling section list.
8642
3c25c5f6
NC
86432002-04-24 Christian Groessler <chris@groessler.org>
8644
8645 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8646 addresses are 23bit with a special layout, not plain 32bit
8647 values. Prevent relocation of immediate values.
8648
40d32fc6
CD
86492002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8650
8651 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8652 MIPS-16 ASE flags are set, print something to indicate that.
8653
067fa4a6
AM
86542002-04-23 Alan Modra <amodra@bigpond.net.au>
8655
8656 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8657 under which a plt call stub is used.
8658 (final_link_relocate): Similarly.
8659 (allocate_plt_static): Clear h-plabel except when plt entry is
8660 exclusively used for a plabel.
8661 (allocate_dynrelocs): Use the above to simplify plt sizing.
8662 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8663 (elf32_hppa_link_hash_table_create): Init.
8664 (BL22_RP): Define.
8665 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8666 (elf32_hppa_check_relocs): Set has_22bit_branch.
8667
8668 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8669 (final_link_relocate): Likewise.
8670
af40ce3c
JJ
86712002-04-22 Jakub Jelinek <jakub@redhat.com>
8672
8673 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8674 search table if some FDE is DW_EH_PE_aligned encoded either.
8675 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8676
09ae86c2
JJ
86772002-04-22 Richard Smith <richard@ex-parrot.com>
8678 Jakub Jelinek <jakub@redhat.com>
8679
8680 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8681 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
8682 encoded personality.
8683 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
8684 for CIE/FDE removal.
8685
deeb2cd7
TR
86862002-04-20 Tom Rix <trix@redhat.com>
8687
8688 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
8689
99dc0092
AM
86902002-04-20 Alan Modra <amodra@bigpond.net.au>
8691
aa3d5824
AM
8692 * archures.c (bfd_lookup_arch): Move the list order comment..
8693 (struct bfd_arch_info): ..to where it belongs.
8694 * bfd-in2.h: Regenerate.
8695
99dc0092
AM
8696 * archures.c (bfd_lookup_arch): Add comment on list order.
8697 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
8698 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
8699 is always at head of list.
8700
7831a775
NC
87012002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8702
8703 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
8704 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
8705 definition of these functions for ARM_WINCE builds as they are
8706 not used.
ea1e4b0d 8707 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
8708 for ARM_WINCE builds.
8709
87102002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
8711
ea1e4b0d 8712 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
8713
87142002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
8715
8716 * cpu-sh.c (scan_mach): Delete.
8717 (arch_info_struct): Replace scan_mach with bfd_default_scan.
8718 (bfd_sh_arch): Likewise.
8719
3d8dbe36
NC
87202002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
8721
8722 * ihex.c (ihex_write_object_contents): Fix check for records
8723 crossing 64K boundaries.
8724
4ab82700
AM
87252002-04-16 Alan Modra <amodra@bigpond.net.au>
8726
8727 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
8728 type rather than just assuming entries are ELF.
8729 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
8730 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
8731 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
8732 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
8733 rather than elf_link_hash_entry.
8734
036fe0fe
RH
87352002-04-15 Richard Henderson <rth@redhat.com>
8736
8737 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
8738 n32 binaries.
8739
c4f3d130
NC
87402002-04-15 Michael Snyder <msnyder@redhat.com>
8741
8742 * opncls.c (bfd_close): Write contents if writeable.
8743 Minor formatting tidy-ups.
8744
4ab82700 87452002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
8746
8747 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
8748
0c04d169
MS
87492002-04-12 Michael Snyder <msnyder@redhat.com>
8750
8751 * bfd-in.h (bfd_get_section_lma): New access macro.
8752 Minor white-space fix-up.
8753
89d4966f
AM
87542002-04-12 Alan Modra <amodra@bigpond.net.au>
8755
8756 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
8757 header pad.
8758
8d0da3c2
DD
87592002-04-09 DJ Delorie <dj@redhat.com>
8760
8761 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
8762
05793179
NC
87632002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
8764
8765 * coffcode.h (coff_read_word): New.
8766 (coff_compute_checksum): New.
8767 (coff_apply_checksum): New.
8768 (coff_write_object_contents): Call coff_apply_checksum () to
8769 apply checksum to PE image.
8770
46fe4e66
AM
87712002-04-08 Randolph Chung <tausq@debian.org>
8772
8773 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
8774 (elf32_hppa_final_link): Split out sorting logic to..
8775 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
8776 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
8777
3b5b409c
AC
87782002-04-07 Andrew Cagney <ac131313@redhat.com>
8779
8780 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
8781 pattern.
8782 * configure: Re-generate.
8783
ac7b6ceb
AC
87842002-04-07 Andrew Cagney <ac131313@redhat.com>
8785
8786 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8787 is greater or equal to 4.3.3.
8788 * configure: Regenerate.
8789 Fix PR gdb/344.
8790
44aa49bb
HPN
87912002-04-05 Hans-Peter Nilsson <hp@axis.com>
8792
8793 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8794 R_CRIS_32_PCREL>: Fix typo in name.
8795 (cris_elf_check_relocs): Always create .rela.got here when
8796 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8797 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8798 assume it's created.
8799
e2d34d7d
DJ
88002002-04-04 Daniel Jacobowitz <drow@mvista.com>
8801
8802 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8803 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8804 define.
8805 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8806 * bfd.c (bfd_link_hash_table_free): Define.
8807 * binary.c (binary_bfd_link_hash_table_free): Define.
8808 * bout.c (b_out_bfd_link_hash_table_free): Define.
8809 * coff-rs6000.c (rs6000coff_vec): Include
8810 _bfd_generic_link_hash_table_free.
8811 (pmac_xcoff_vec): Likewise.
8812 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8813 (aix5coff64_vec): Likewise.
8814 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8815 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8816 (bfd_elf32_bfd_link_hash_table_free): Define.
8817 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8818 (bfd_elf32_bfd_link_hash_table_free): Define.
8819 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8820 define.
8821 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8822 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8823 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8824 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8825 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8826 (_bfd_generic_link_hash_table_free): Add prototype.
8827 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8828 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8829 * linker.c (_bfd_generic_link_hash_table_free): New function.
8830 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8831 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8832 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8833 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8834 * som.c (som_bfd_link_hash_table_free): Define.
8835 * srec.c (srec_bfd_link_hash_table_free): Define.
8836 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8837 * versados.c (versados_bfd_link_hash_table_free): Define.
8838 * vms.c (vms_bfd_link_hash_table_free): New function.
8839 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8840
8841 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8842 instead of bfd_alloc.
8843 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8844 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8845 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8846 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8847 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8848 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8849 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8850 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8851 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8852 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8853 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8854 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8855 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8856 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8857 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8858 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8859 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8860 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8861 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8862 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8863 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8864 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8865 * m68klinux.c (linux_link_hash_table_create): Likewise.
8866 * sparclinux.c (linux_link_hash_table_create): Likewise.
8867 * sunos.c (sunos_link_hash_table_create): Likewise.
8868 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8869
8870 * targets.c: Add _bfd_link_hash_table_free to xvec.
8871
8872 * bfd-in2.h: Regenerate.
8873 * libbfd.h: Regenerate.
8874 * libcoff.h: Regenerate.
8875
830629ab
AM
88762002-04-04 Alan Modra <amodra@bigpond.net.au>
8877
8878 * dep-in.sed: Cope with absolute paths.
8879 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8880 Run "make dep-am".
8881 * Makefile.in: Regenerate.
8882 * coff-arm.c: Fix copyright date.
8883 * cpu-h8300.c: Likewise.
8884 * cpu-i370.c: Likewise.
8885 * cpu-s390.c: Likewise.
8886 * cpu-mips.c: Likewise.
8887 * po/SRC-POTFILES.in: Regenerate.
8888
c6e90b02
TS
88892002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8890
8891 * Makefile.am: Add elfxx-mips.c to the known backends.
8892 (elf32-mips.lo): remove dependency to coff/external.h.
8893 * Makefile.in: Regenerate.
8894 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8895 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8896 accordingly.
8897 * configure: Regenerate.
8898 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8899 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8900 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8901 MIPS specific backend functions.
8902 * elf32-mips.c: Moved most code to elfxx-mips.c.
8903 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8904 static.
8905 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8906 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8907 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8908 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8909 interface to allow selection of the right REL or RELA howto table.
8910 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8911 static. Let it refuse n32 objects.
8912 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8913 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8914 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8915 (elf32_mips_ignore_discarded_relocs): Rename from
8916 _bfd_elf32_mips_ignore_discarded_relocs.
8917 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8918 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8919 (elf_mips_howto_table_rela): Remove.
8920 * elf64-mips.c: Moved most code to elfxx-mips.c.
8921 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8922 (mips_elf64_rtype_to_howto): New function.
8923 (mips_elf64_object_p): Likewise.
8924 (elf64_mips_irix_compat): Likewise.
8925 * elfxx-mips.c: New file containing common code merged together from
8926 elf32-mips.c and elf64-mips.c.
8927 * elfxx-mips.h: New file containing MIPS specific prototypes from
8928 elf-bfd.h.
8929 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8930 elf_backend_mips_rtype_to_howto.
8931
d8dce692
AM
89322002-04-04 Alan Modra <amodra@bigpond.net.au>
8933
8934 * srec.c (MAXCHUNK, Chunk): Revise comments.
8935 (srec_write_record): Correct buffer size.
8936 (srec_write_header): Do without intermediate buffer.
8937 (srec_write_section): Validate Chunk.
8938 (srec_write_terminator): Pass NULL instead of dummy buffer.
8939 (srec_write_symbols): Pass file and symbol names directly to
8940 bfd_bwrite so sprintf won't overflow buffer.
8941
b88a866a
JJ
89422002-04-03 Jakub Jelinek <jakub@redhat.com>
8943
8944 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8945 PC relative relocs against hidden symbols.
8946 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8947
d7866f04
AM
89482002-04-03 Alan Modra <amodra@bigpond.net.au>
8949
8950 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8951 LMAs, loop over segments until p_vaddr and p_memsz specify an
8952 extent enclosing the section.
8953
9e81ee67
NC
89542002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8955
8956 * ihex.c (ihex_write_object_contents): Do not allow records to
8957 cross a 64K boundary - wrap if necessary.
8958
d2b64500
JT
89592002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8960
8961 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8962 which caused the returned LWP ID to always be 0.
8963
e36f7d53
RH
89642002-04-01 Richard Henderson <rth@redhat.com>
8965
8966 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8967 (elf32_sparc_relocate_section): Use it to figure out when to
8968 initialize .got entries.
8969 * elf64-sparc.c: Similarly.
8970
e92d460e
AM
89712002-03-28 Alan Modra <amodra@bigpond.net.au>
8972
8973 * linker.c (link_action): Ignore duplicate warning syms.
8974 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8975 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8976 (elf_adjust_dynamic_symbol): Likewise.
8977 (elf_export_symbol): Likewise.
8978 (elf_link_find_version_dependencies): Likewise.
8979 (elf_link_assign_sym_version): Likewise.
8980 (elf_link_sec_merge_syms): Likewise.
8981 (elf_link_output_extsym): Likewise.
8982 (elf_gc_sweep_symbol): Likewise.
8983 (elf_gc_propagate_vtable_entries_used): Likewise.
8984 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8985 (elf_gc_allocate_got_offsets): Likewise.
8986 (elf_collect_hash_codes): Likewise.
8987 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8988 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8989 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8990 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8991 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8992 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8993 (elf_cris_discard_excess_dso_dynamics): Likewise.
8994 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8995 (mark_PIC_calls): Likewise.
8996 (allocate_plt_static): Likewise.
8997 (allocate_dynrelocs): Likewise.
8998 (readonly_dynrelocs): Likewise.
8999 * elf32-i386.c (allocate_dynrelocs): Likewise.
9000 (readonly_dynrelocs): Likewise.
9001 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9002 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9003 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9004 (mips_elf_sort_hash_table_f): Likewise.
9005 (mips_elf_check_mips16_stubs): Likewise.
9006 * elf32-s390.c (allocate_dynrelocs): Likewise.
9007 (readonly_dynrelocs): Likewise.
9008 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9009 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9010 (xstormy16_relax_plt_realloc): Likewise.
9011 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9012 (elf64_alpha_output_extsym): Likewise.
9013 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9014 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9015 (mips_elf64_check_mips16_stubs): Likewise.
9016 (mips_elf64_output_extsym): Likewise.
9017 * elf64-ppc.c (func_desc_adjust): Likewise.
9018 (allocate_dynrelocs): Likewise.
9019 (readonly_dynrelocs): Likewise.
9020 * elf64-s390.c (allocate_dynrelocs): Likewise.
9021 (readonly_dynrelocs): Likewise.
9022 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9023 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9024 (readonly_dynrelocs): Likewise.
9025 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9026 * aoutx.h (aout_link_write_other_symbol): Likewise.
9027 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9028 (_bfd_coff_write_global_sym): Likewise.
9029 * i386linux.c (linux_tally_symbols): Likewise.
9030 * m68klinux.c (linux_tally_symbols): Likewise.
9031 * sparclinux.c (linux_tally_symbols): Likewise.
9032 * pdp11.c (aout_link_write_other_symbol): Likewise.
9033 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9034 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9035 (xcoff_write_global_symbol): Likewise.
9036
9037 * cofflink.c (_bfd_coff_final_link): Formatting.
9038 * cpu-mips.c (mips_compatible): Make static, prototype.
9039 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9040 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9041 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9042 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9043 (mips_elf64_final_link): Likewise.
9044 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9045 prototype.
9046
2106126f
NC
90472002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9048
9049 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9050 (SWAP_OUT_RELOC_OFFSET): Define.
9051
b99d1833
AM
90522002-03-27 Gregory Steuck <greg@nest.cx>
9053
9054 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9055 terminating NULL if empty symbol table.
9056 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9057
ad43ed4c
L
90582002-03-26 H.J. Lu (hjl@gnu.org)
9059
9060 * elflink.h (elf_link_input_bfd): Revert the last change since
9061 the gcc exception handling isn't fixed yet.
9062
3851fca4
L
90632002-03-26 H.J. Lu (hjl@gnu.org)
9064
9065 * elflink.h (elf_link_input_bfd): Complain about relocations
9066 against local symbols in discarded sections.
9067
b91afed7
AM
90682002-03-26 Alan Modra <amodra@bigpond.net.au>
9069
9070 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9071
dba143ef
AM
90722002-03-23 Alan Modra <amodra@bigpond.net.au>
9073
9074 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9075 section file offset for !SEC_LOAD sections.
9076
ee29b9fb
RE
90772002-03-21 Richard Earnshaw <rearnsha@arm.com>
9078
830629ab
AM
9079 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9080 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 9081
54327882
AM
90822002-03-21 Alan Modra <amodra@bigpond.net.au>
9083
9084 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9085 Whitespace changes.
9086 * archive.c: Update copyright date.
9087 * bfd-in2.h: Regenerate.
9088 * libbfd.h: Regenerate.
9089 * Makefile.am: Run "make dep-am"
9090 * Makefile.in: Regenerate.
9091 * po/SRC-POTFILES.in: Regenerate.
9092
1ee24f27
DJ
90932002-03-20 Daniel Jacobowitz <drow@mvista.com>
9094
9095 * dwarf2.c (struct funcinfo): Move up.
9096 (lookup_address_in_function_table): New argument function_ptr.
9097 Set it.
9098 (lookup_address_in_line_table): New argument function. If function
9099 is non-NULL, use it to handle ``addr'' before the first line note of
9100 the function.
9101 (comp_unit_find_nearest_line): Update and swap calls to
9102 lookup_address_in_function_table and lookup_address_in_line_table.
9103 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9104 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9105
51b9608c
TR
91062002-03-20 Tom Rix <trix@redhat.com>
9107
ea1e4b0d 9108 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 9109 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 9110 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 9111
789c90aa
TR
91122002-03-19 Tom Rix <trix@redhat.com>
9113
ea1e4b0d 9114 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
9115 dynamic objects in archives.
9116
1da54d81
HPN
91172002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9118
9119 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9120 STT_NOTYPE symbols to STT_OBJECT.
9121
7831a775 91222002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
9123
9124 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9125
eb1e0e80
NC
91262002-03-18 Tom Rix <trix@redhat.com>
9127
9128 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9129 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9130 * coff-rs6000 (do_pad) : New function for archive padding.
9131 (do_copy) : New function for object file copying in archives.
9132 (do_shared_object_padding) : New function for padding shared
9133 objects to their text section alignment in archives.
9134 (bfd_xcoff_ar_achive_set_magic) : Stub.
9135 (xcoff_write_armap_big) : Use do_copy and do_pad.
9136 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9137 do_copy and do_pad.
9138 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 9139 bfd_xcoff_magic_number.
eb1e0e80
NC
9140 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9141 fop.
9142 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9143 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9144 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9145 * rs6000-core.c : Update copyright date.
ea1e4b0d 9146 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
9147 csectpp.
9148 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9149 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9150 (coff_set_flags) : Use bfd_xcoff_magic_number.
9151 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9152 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9153 * Makefile.am : Same.
9154 * config.bfd : Same.
9155 * targets.c : Same.
9156 * configure : Regnerate.
9157 * Makefile.in : Same.
9158 * bfd-in2.h : Same.
9159
a1c259a1
NC
91602002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9161
9162 * po/fr.po: Updated version.
9163
4dae1ae7
AM
91642002-03-18 Alan Modra <amodra@bigpond.net.au>
9165
9166 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9167 * libbfd.h: Regenerate.
9168 * archive.c (coff_write_armap): Pass on failures from
9169 bfd_write_bigendian_4byte_int.
9170
36b4f6e7
L
91712002-03-14 H.J. Lu <hjl@gnu.org>
9172
9173 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9174 error to bfd_error_nonrepresentable_section for reinit_array
9175 section in DSO.
9176
a1aefc76
NC
91772002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9178
a181be0a
NC
9179 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9180 OR it in rather than replacing previously selected flags.
9181
a1aefc76
NC
9182 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9183 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9184
c119f9b8
AM
91852002-03-14 Alan Modra <amodra@bigpond.net.au>
9186
9187 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9188 (N): Use the above.
9189 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9190 ensure reloc size matches before calling elf_link_input_bfd.
9191 Add an assert to check reloc size when counting output relocs.
9192
c295a511
NC
91932002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9194
9195 * mmo.c (mmo_get_loc): Return NULL rather than false.
9196
9ce88e60
NC
91972002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9198
9199 * po/fr.po: Updated version.
9200
4ddafab0
AM
92012002-03-13 Alan Modra <amodra@bigpond.net.au>
9202
b74fa2cd
AM
9203 * archures.c (bfd_default_compatible): Test bits_per_word.
9204 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9205 bfd_default_compatible.
9206 * cpu-i370.c (i370_compatible): Likewise.
9207 * cpu-sparc.c (sparc_compatible): Likewise.
9208 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9209
40b829d4
AM
9210 * elflink.h: Formatting fixes.
9211 (elf_link_output_extsym): Merge undefined and undef weak cases.
9212
4ddafab0
AM
9213 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9214 when word size of input matches output word size.
9215
dd53c801
AJ
92162002-03-12 Andreas Jaeger <aj@suse.de>
9217
9218 * cpu-i386.c (i386_compatible): New. Use it instead of
9219 bfd_default_compatible.
9220
aa066ac8
L
92212002-03-07 H.J. Lu (hjl@gnu.org)
9222
9223 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9224 as the type for bfd_reloc_val.
9225
1bf42538
JL
92262002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9227
9228 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9229 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9230 (elf_hppa_final_link_relocate): Correct relocations for indirect
9231 references to local data through the DLT. Fix .opd creation for
9232 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9233 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9234 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9235 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9236 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9237 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9238 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9239
86eaf01e
JJ
92402002-03-05 Jakub Jelinek <jakub@redhat.com>
9241
9242 * merge.c (_bfd_merge_sections): Don't segfault if there
9243 is nothing to merge due to GC.
9244
c44233aa
AM
92452002-03-05 Alan Modra <amodra@bigpond.net.au>
9246
039cc25f
AM
9247 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9248 symbols that have been forced local.
9249
c44233aa
AM
9250 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9251 to output forced local syms for non-shared link.
9252 (elf_link_output_extsym): Tweak condition for calling backend
9253 adjust_dynamic_symbol so that previous behaviour is kept.
9254 Whitespace changes throughout file.
9255
25e27870
L
92562002-03-04 H.J. Lu <hjl@gnu.org>
9257
9258 * elf.c (bfd_section_from_shdr): Handle special sections,
9259 .init_array, .fini_array and .preinit_array.
9260 (elf_fake_sections): Likewise.
9261
9262 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9263 DT entry only if the section is in output for .init_array,
9264 .fini_array and .preinit_array. Complain about .preinit_array
9265 section in DSO.
9266 (elf_bfd_final_link): Warn zero size for .init_array,
9267 .fini_array and .preinit_array sections.
9268
9269 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9270 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9271 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9272 .preinit_array.
9273
bb2a49f2
AM
92742002-03-04 Alan Modra <amodra@bigpond.net.au>
9275
9276 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9277 * configure: Regenerate.
9278
38487e5e
TR
92792002-03-02 Tom Rix <trix@redhat.com>
9280
c44233aa
AM
9281 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9282 symbolic equiv.
38487e5e
TR
9283 * coff-rs6000.c (xcoff_howto_table): Same.
9284
30831527
RH
92852002-03-01 David Mosberger <davidm@hpl.hp.com>
9286
9287 * elflink.h (size_dynamic_sections): If section named
9288 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9289 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9290 ".init_array" and ".fini_array".
9291 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9292 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9293 DT_FINI_ARRAY.
9294
c8e5ddc8
AM
92952002-02-26 Andrew Macleod <amacleod@cygnus.com>
9296
9297 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9298 dynsyms.
9299
96e0dda4
AM
93002002-02-25 Alan Modra <amodra@bigpond.net.au>
9301
1c5b6bf8
AM
9302 * elf64-hppa.h: Update copyright date.
9303
96e0dda4
AM
9304 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9305 (ppc64_elf_relocate_section): Don't generate power4 style branch
9306 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9307
0fb19cbc
JJ
93082002-02-22 Jakub Jelinek <jakub@redhat.com>
9309
9310 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9311 last patch.
9312 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9313
c434dee6
AJ
93142002-02-21 Andreas Jaeger <aj@suse.de>
9315
9316 * elf64-x86-64.c: Major rework that introduces all recent changes
9317 to the x86-64 backend. Get a closer match to elf32-i386.
9318 (struct elf64_x86_64_dyn_relocs): Rename from
9319 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9320 all users.
9321 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9322 sections.
9323 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9324 remove casts, initialize new hash members.
9325 (create_got_section): New.
9326 (elf64_x86_64_create_dynamic_sections): New.
9327 (elf64_x86_64_copy_indirect_symbol): New.
9328 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9329 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9330 Reference count possible .plt and .got entries. Don't test input
9331 section SEC_READONLY here to try to avoid copy relocs, and keep
9332 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9333 DF_TEXTREL here. Delay setting of variables until needed. Cache
9334 pointer to "sreloc" section in elf_section_data. Tweak condition
9335 under which .got created. Report files with bad relocation
9336 section names.
9337 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9338 Reference count possible .plt entries. Don't deallocate .got and
9339 .relgot space here.
9340 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9341 do copy reloc processing for weakdefs. Remove redundant casts and
9342 aborts. Delay setting of vars until needed. Move creation of
9343 dynamic symbols and allocation of .plt and .rela.plt to
9344 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9345 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9346 (allocate_dynrelocs): New.
9347 (readonly_dynrelocs): New.
9348 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9349 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9350 Zero out the dynamic allocated content space.
9351 (elf64_x86_64_discard_copies): Removed.
9352 (elf64_x86_64_relocate_section): Make use of dynamic section
9353 short-cuts. Localise vars, and delay setting. Better error
9354 reporting, replace BFD_ASSERT with abort. Check
9355 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9356 regular object file and tread the weak definition as the normal
9357 one. Don't discard relocs for undefweak or undefined symbols and
9358 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9359 relocs.
9360 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9361 symbols that have been forced local. Use same test to decide if
9362 we can use a relative reloc for got as relocate_section. Expand
9363 SHN_UNDEF comment. Move expressions out of function calls.
9364 Replace BFD_ASSERT with abort.
9365 (bfd_elf64_bfd_final_link): Removed.
9366 (elf_backend_copy_indirect_symbol): Define.
9367
ff3a6ee3
TR
93682002-02-20 Tom Rix <trix@redhat.com>
9369
9370 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9371 (_bfd_xcoff_reloc_type_lookup): Use it.
9372 * coff64-rs6000.c (xcoff64_howto_table): Same.
9373 (xcoff64_reloc_type_lookup): Same.
c434dee6 9374
a68d41fb
AM
93752002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9376
9b5ecbd0 9377 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9378 little endian.
9379
befc3abb
MS
93802002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9381
9382 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9383 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9384 * bfd-in2.h: Regenerate.
9385 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9386 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9387 with "s390:64-bit".
9388 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9389 (elf_s390_reloc_type_lookup): Likewise.
9390 (elf_s390_check_relocs): Likewise.
9391 (elf_s390_gc_sweep_hook): Likewise.
9392 (elf_s390_relocate_section): Likewise.
9393 (elf_s390_object_p): Use renamed architecture define.
9394 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9395
6eeeec9b
FCE
93962002-02-19 Frank Ch. Eigler <fche@redhat.com>
9397
9398 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9399
0bb2d96a
JJ
94002002-02-19 Jakub Jelinek <jakub@redhat.com>
9401
9402 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9403 absptr -> pcrel optimization for shared libs.
9404 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9405 library cannot be converted to pcrel.
9406 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9407 relative.
9408 * elf32-i386.c (elf_i386_relocate_section): If
9409 _bfd_elf_section_offset returned -2, skip, but make sure the
9410 relocation is installed.
9411 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9412 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9413 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9414 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9415 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9416 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9417 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9418 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9419 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9420 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9421 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9422 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9423 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9424 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9425 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9426 _bfd_elf_section_offset returning -2 the same way as -1.
9427 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9428 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9429 and BFD_ASSERT.
9430 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9431
69f284c7
TR
94322002-02-18 Tom Rix <trix@redhat.com>
9433
9434 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9435 (bfd_xcoff_size_dynamic_sections): Same.
9436 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9437 (bfd_xcoff_size_dynamic_sections): Same.
9438 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9439 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9440 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9441 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9442 * bfd-in2.h: Regenerate.
9443
82bd7b59
AM
94442002-02-18 Alan Modra <amodra@bigpond.net.au>
9445
9446 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9447 (struct ppc_link_hash_table): Add sfpr.
9448 (ppc64_elf_link_hash_table_create): Init it.
9449 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9450 .glink out to..
9451 (create_linkage_sections): ..here. Make .sfpr too.
9452 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9453 dynobj early.
9454 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9455 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9456 ._restf* functions, and create as needed.
9457 (func_desc_adjust): Only force_local for shared libs.
9458
ef1355e8
NC
94592002-02-18 David O'Brien <obrien@FreeBSD.org>
9460
9461 * configure.in: Bump version number post 2.12 branching.
9462 * configure: Regenerate.
9463
dfa36a69
HPN
94642002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9465
9466 * mmo.c: Correct and improve comments.
9467 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9468 zero-pad. Use input to fill up non-empty bfd buffer.
9469 (mmo_flush_chunk): New function.
9470 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9471 changed. Don't emit location specifier if VMA is same as
9472 *LAST_VMAP after omitting leading zero contents. Call
9473 mmo_flush_chunk before emitting location specifier.
9474 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9475 with mmo_write_loc_chunk calls.
9476 (mmo_internal_write_section): Call mmo_flush_chunk after
9477 mmo_write_chunk.
9478 (mmo_write_symbols_and_terminator): Move :Main to first position
9479 in symbol array. Add faked one if it does not exist if there are
9480 other symbols. Don't add it if there are no symbols at all. Move
9481 out test for value of :Main from symbol loop. Rename table
9482 fakemain to maintable and variable mainsym to fakemain.
9483
ccf00ab6
RH
94842002-02-15 Richard Henderson <rth@redhat.com>
9485
9486 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9487 section with no got matches any got. Simplify error generaion.
9488
88eaccc2
AM
94892002-02-15 Alan Modra <amodra@bigpond.net.au>
9490
fd96f80f
AM
9491 Support arbitrary length fill patterns.
9492 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9493 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9494 Call default_data_link_order.
9495 (default_fill_link_order): Delete.
9496 (default_data_link_order): New function.
9497 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9498 of bfd_fill_link_order with bfd_data_link_order.
9499 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9500 * elf64-mips.c (mips_elf64_final_link): Likewise.
9501
88eaccc2
AM
9502 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9503 Correct value returned in "end" for "0x<non-hex>".
9504
e2fd756b
NC
95052002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9506
9507 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9508 (scan): Test against 'mach' field in info structure.
9509
edd29cf9
AM
95102002-02-14 Alan Modra <amodra@bigpond.net.au>
9511
9512 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9513
1e30956e 95142002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9515
9516 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9517 EF_M68000.
9518
bf36db18
NC
95192002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9520
9521 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9522 non-zero physical addresses when adjusting the LMAs of new
9523 sections.
bf36db18 9524
189c6563
AM
95252002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9526
9527 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9528 from _bfd_elf_hppa_gen_reloc_type.
9529 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9530 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9531 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9532 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9533
e948afaf
AO
95342002-02-12 Alexandre Oliva <aoliva@redhat.com>
9535
9536 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9537 loading its contents if there's nothing to do in it.
9538
19397422
AM
95392002-02-12 Alan Modra <amodra@bigpond.net.au>
9540
0ad3a73b
AM
9541 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9542 64k boundary.
9543
19397422
AM
9544 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9545 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9546 (ppc64_elf_finish_dynamic_sections): Set values for them.
9547
51316059
MS
95482002-02-11 Michael Snyder <msnyder@redhat.com>
9549
9550 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9551 * elf.c (elfcore_grok_pstatus): Add prototype.
9552 (elfcore_grok_lwpstatus): Add prototype.
9553 (elfcore_write_lwpstatus): New function.
9554 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9555
518313c3
AO
95562002-02-11 Alexandre Oliva <aoliva@redhat.com>
9557
9558 * elf32-sh.c: Added missing prototypes.
9559 * elf32-sh64.c: Likewise.
9560 (sh_elf_align_loads): Mark unused args as such.
9561 * elf64-sh64.c: Added missing prototypes.
9562 (struct elf_sh64_link_hash_entry): Fix typo.
9563 (sh_elf64_relocate_section): Fix info argument passed to
9564 _bfd_elf_section_offset.
9565
2c73f9d8
AM
95662002-02-11 Alan Modra <amodra@bigpond.net.au>
9567
9568 * Makefile.am: "make dep-am".
9569 * Makefile.in: Regenerate.
9570 * aclocal.m4: Regenerate.
9571 * config.in: Regenerate.
9572 * configure: Regenerate.
9573
d426c6b0
DJ
95742002-02-10 Daniel Jacobowitz <drow@mvista.com>
9575
9576 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9577 variable warnings.
9578 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9579 comparison warning.
9580 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9581 cast warnings for the common case.
9582
e58ee0cd
HPN
95832002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9584
9585 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9586 vectors.
9587 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9588 vectors.
9589
7793f4d0
RH
95902002-02-09 Richard Henderson <rth@redhat.com>
9591
9592 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9593 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9594 (elf64_alpha_relocate_section): Likewise.
9595 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9596 * bfd-in2.h, libbfd.h: Rebuild.
9597
7e799044
HPN
95982002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9599
9600 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9601 that base-plus-offset reloc accounting is consistent.
9602 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9603 up to date for undefined symbols.
9604
027d73eb
EC
96052002-02-08 Eric Christopher <echristo@redhat.com>
9606
9607 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9608
9609 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9610 sections for the O32 ABI.
9611
517662d4
CD
96122002-02-08 Chris Demetriou <cgd@broadcom.com>
9613
9614 * elf32-arm.h: Fix formatting of _("...").
9615 * elf32-d10v.c: Likewise.
9616 * elf32-m68k.c: Likewise.
9617 * elf32-mips.c: Likewise.
9618
5e37cc46
NC
96192002-02-08 Ivan Guzvinec <ivang@opencores.org>
9620
9621 * coff-or32.c: Fix compile time warning messages.
9622
fbca6ad9
AO
96232002-02-08 Alexandre Oliva <aoliva@redhat.com>
9624
9625 Contribute sh64-elf.
9626 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9627 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9628 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9629 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9630 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9631 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9632 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9633 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9634 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9635 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9636 New relocs.
9637 * libbfd.h, bfd-in2.h: Rebuilt.
9638 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9639 (sh_reloc_map): Map them.
9640 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9641 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9642 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9643 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9644 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9645 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9646 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9647 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9648 datalabel_got_offset.
9649 (sh_elf_link_hash_newfunc): Initialize it.
9650 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9651 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9652 GOT and GOTOFF handling to new SHmedia relocation types. Support
9653 GOT_BIAS.
9654 (sh_elf_check_relocs): Likewise.
9655 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9656 PLT entries using movi_shori_putval. Support GOT_BIAS.
9657 (sh_elf_finish_dynamic_sections): Likewise.
9658 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9659 relocation, it's now done by the caller.
9660 (GOT_BIAS): New.
9661 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9662 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9663 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9664 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9665 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9666 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9667 sh64_elf64_hash_table): New.
9668 (sh_elf64_howto_table): Introduce new relocs.
9669 (sh_elf64_info_to_howto): Accept new PIC relocs.
9670 (sh_elf64_relocate_section): Augment the scope of
9671 seen_stt_datalabel. Support new PIC relocs.
9672 (sh_elf64_check_relocs): Support new PIC relocs.
9673 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9674 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9675 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9676 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9677 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9678 movi_shori_putval, movi_3shori_putval,
9679 sh64_elf64_create_dynamic_sections,
9680 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9681 sh64_elf64_size_dynamic_sections,
9682 sh64_elf64_finish_dynamic_symbol,
9683 sh64_elf64_finish_dynamic_sections): New.
9684 (elf_backend_create_dynamic-sections,
9685 bfd_elf64_bfd_link_hash_table_create,
9686 elf_backend_adjust_dynamic_symbol,
9687 elf_backend_size_dynamic_sections,
9688 elf_backend_finish_dynamic_symbol,
9689 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
9690 elf_backend_plt_readonly, elf_backend_want_plt_sym,
9691 elf_backend_got_header_size, elf_backend_plt_header_size):
9692 Define.
9693 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
9694 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
9695 match official numbers and names; moved unmaching ones to the
9696 range 0xf2-0xff.
9697 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 9698 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9699 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
9700 sections.
9b5ecbd0 9701 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
9702 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
9703 be aligned.
9704 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 9705 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9706 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
9707 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
9708 .cranges section with SEC_SORT_ENTRIES set.
9709 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
9710 incoming sorted .cranges section.
9711 (sh64_bfd_elf_copy_private_section_data): New.
9712 (sh64_elf_final_write_processing): Only sort .cranges and modify
9713 start address if called by linker.
9714 2001-01-08 Ben Elliston <bje@redhat.com>
9715 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 9716 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 9717 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 9718 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9719 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
9720 line. Add comments before all entries.
9721 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
9722 comment.
9723 (sh_elf64_reloc): Correct head comment.
9724 (sh_elf64_relocate_section): Correct spacing.
9725 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
9726 instead call reloc_dangerous callback.
9727 <case R_SH_SHMEDIA_CODE>: New case.
9728 (sh_elf64_gc_mark_hook): Correct spacing.
9729 (sh_elf64_check_relocs): Ditto.
9730 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
9731 New case.
9732 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
9733 functions.
9734 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
9735 clarify describing comment. Add comments before all entries.
9736 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
9737 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 9738 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9739 Sort .cranges section in final link. Prepare to set bit 0 on
9740 entry address.
9741 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
9742 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
9743 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
9744 .cranges section.
9745 (sh64_backend_section_from_shdr): New, to recognize
9746 SHT_SH5_CR_SORTED on incoming .cranges section.
9747 (elf_backend_section_from_shdr): Define.
9748 (sh64_elf_final_write_processing): Sort outgoing .cranges
9749 section. (New, temporarily disabled:) Set bit 0 on entry address
9750 according to ISA type.
9751 (sh64_find_section_for_address): New.
9752 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
9753 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
9754 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
9755 bfd_malloc, not xmalloc.
9756 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
9757 global.
9758 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
9759 temporarily disabled) setting bit 0 on entry address.
9760 (elf_backend_final_write_processing): Define.
9b5ecbd0 9761 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9762 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
9763 be a proper relocation for PTA and PTB rather than a marker.
9764 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
9765 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
9766 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
9767 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
9768 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
9769 Zero src_mask.
9770 * elf64-sh64.c: Ditto.
9771 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
9772 * elf32-sh64.c: Include opcodes/sh64-opc.h
9773 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
9774 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
9775 parameters. No unused parameters. Caller changed.
9776 <case R_SH_PT_16>: New case.
9777 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
9778 * Makefile.in: Regenerate.
9b5ecbd0 9779 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9780 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
9781 all code sections.
9782 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9783 (sh64_elf_merge_private_data): Ditto.
9784 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9785 to access stored section flags.
9786 (sh64_elf_final_write_processing): Return immediately unless
9787 called by linker. Use sh64_elf_section_data (cranges) to get size
9788 of linker-generated cranges entries.
9789 (sh64_elf_copy_private_data): Add missing "return true".
9790 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9791 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9792 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9793 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9794 elf64-sh64.c:sh64_elf_fake_sections.
9795 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9796 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9797 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9798 (sh64_elf_final_write_processing): New.
9799 (elf_backend_final_write_processing): Define.
9800 (sh64_elf_fake_sections): Get header flags from tdata field.
9801 (sh64_elf_copy_private_data): Do not call
9802 sh64_elf_copy_private_data_internal, just copy e_flags field.
9803 (sh64_elf_merge_private_data): Do not call
9804 sh64_elf_copy_private_data_internal.
9b5ecbd0 9805 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9806 Remove EF_SH64_ABI64, let ELF size make difference.
9807 Remove SH64-specific BFD section flag.
9808 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9809 containing SHmedia through elf_section_data (asect)->tdata
9810 non-zero, not using a BFD section flag.
9811 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9812 (sh64_elf_merge_private_data): Similar.
9813 (elf_backend_section_flags): Don't define.
9814 (sh64_elf_backend_section_flags): Delete.
9815 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9816 not EF_SH64_ABI64.
9817 (sh_elf64_merge_private_data): Similar.
9818 * section.c (Section flags definitions): Don't define
9819 SEC_SH_ISA_SHMEDIA.
9820 (bfd-in2.h): Regenerate.
9b5ecbd0 9821 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9822 Make DataLabel references work with partial linking.
9823 * elf32-sh64.c: Fix formatting.
9824 (sh64_elf_link_output_symbol_hook): New.
9825 (elf_backend_link_output_symbol_hook): Define to
9826 sh64_elf_link_output_symbol_hook.
9827 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9828 undefined if partial linking. Adjust sanity check.
9829 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9830 (elf_backend_link_output_symbol_hook): Define to
9831 sh64_elf64_link_output_symbol_hook.
9832 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9833 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9834 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9835 Implement semantics for inter-file DataLabel references.
9836 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9837 (sh64_elf64_add_symbol_hook): New.
9838 (sh_elf64_relocate_section): If passing an indirect symbol with
9839 st_type STT_DATALABEL on the way to a symbol with st_other
9840 STO_SH5_ISA32, do not bitor 1 to the relocation.
9841 (elf_backend_add_symbol_hook): Define to
9842 sh64_elf64_add_symbol_hook.
9843 * elf64-sh32.c: Tweak comments.
9844 (DATALABEL_SUFFIX): Define.
9845 (sh64_elf_add_symbol_hook): New.
9846 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9847 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9848 symbol with st_type STT_DATALABEL on the way to a symbol with
9849 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9850 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9851 Pass through STT_DATALABEL.
9852 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9853 (elf_backend_get_symbol_type): Define.
9854 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9855 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9856 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9857 * elf32-sh64.c: Tweak comments.
9858 (sh64_elf_copy_private_data_internal): Add prototype.
9859 (bfd_elf32_bfd_set_private_flags): Define.
9860 (sh64_elf_copy_private_data_internal): Compare machine name, not
9861 textual BFD target name, to check whether to copy section flag
9862 SHF_SH5_ISA32.
9863 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9864 Tweak section-contents-type-mismatch message.
9865 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9866 Validize reloc-types.
9867 * elf64-sh64.c: New file.
9868 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9869 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9870 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9871 Regenerate dependencies.
9872 * Makefile.in: Regenerate.
9873 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9874 bfd_elf64_sh64l_vec.
9875 * configure.in: Handle bfd_elf64_sh64_vec and
9876 bfd_elf64_sh64l_vec.
9877 * configure: Regenerate.
9878 * po/POTFILES.in: Regenerate.
9879 * po/bfd.pot: Regenerate.
9b5ecbd0 9880 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9881 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9882 anything else but EF_SH64 and EF_SH64_ABI64.
9883 (sh64_elf_merge_private_data): Emit error for anything else but
9884 EF_SH64 and EF_SH64_ABI64.
9885 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9886 from targ_selvecs.
9887 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9888 bfd_elf32_sh64l_vec as a temporary measure.
9889 * configure: Regenerate.
9b5ecbd0 9890 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9891 * cpu-sh.c (arch_info_struct): Include sh5 item
9892 unconditionalized.
9893 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9894 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9895 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9896 * elf32-sh64.c: Tweak comments.
9897 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9898 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9899 (sh64_elf_copy_private_data_internal): Wrap long line.
9900 (sh64_elf_merge_private_data): Rewrite to allow objects from
9901 SH64 subsets to be linked together.
9902 (INCLUDE_SHMEDIA): Define.
9903 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9904 Parenthesize plus-expression inside or-expression.
9905 <global symbol>: Ditto.
9906 (sh_elf_set_mach_from_flags): Remove code refusing
9907 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9908 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9909 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9910 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9911 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9912 (sh_elf_relocate_section) <local symbol>: Or 1 in
9913 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9914 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9915 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9916 relocation.
9b5ecbd0 9917 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9918 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9919 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9920 Regenerate dependencies.
9921 * Makefile.in: Regenerate.
9922 * archures.c: Add bfd_mach_sh5.
9923 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9924 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9925 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9926 * configure: Regenerate.
9927 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9928 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9929 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9930 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9931 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9932 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9933 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9934 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9935 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9936 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9937 in item for SH5.
9938 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9939 for SHmedia relocs.
9940 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9941 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9942 shmedia_prepare_reloc, goto final_link_relocate if it returns
9943 non-zero, else fail as before.
9944 (sh_elf_set_mach_from_flags): Provide function only if not defined
9945 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9946 (sh_elf_set_private_flags): Provide function only if not defined
9947 as a macro.
9948 (sh_elf_copy_private_data): Similar.
9949 (sh_elf_merge_private_data): Similar.
9950 * section.c (SEC_SH_ISA_SHMEDIA): New.
9951 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9952 * elf32-sh64.c: New file.
9953 * libbfd.h: Regenerate.
9954 * bfd-in2.h: Regenerate.
9955 * po/POTFILES.in: Regenerate.
9956 * po/bfd.pot: Regenerate.
9957 * bfd-in2.h: Regenerate.
9958 * libbfd.h: Regenerate.
9959
e108f470
DJ
99602002-02-07 Daniel Jacobowitz <drow@mvista.com>
9961
9962 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9963 been included, not drag it in.
9964 * bfd-in2.h: Regenerate.
9965
259d18a3
L
99662002-02-06 H.J. Lu (hjl@gnu.org)
9967
9968 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9969 the mach and ISA fields if necessary.
9970
f13b834e
NC
99712002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9972
9973 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9974 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9975 be sure exactly which architecture this represents.
9976
82f6addb
NC
99772002-02-05 Nick Clifton <nickc@redhat.com>
9978
9979 * po/tr.po: Updated translation.
9980
899f54f5
AM
99812002-02-05 Alan Modra <amodra@bigpond.net.au>
9982
9983 From Jimi X <jimix@watson.ibm.com>
9984 * archures (bfd_mach_ppc64): Define.
9985 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9986 (bfd_powerpc_arch): Define.
9987 * bfd-in2.h: Regenerate.
9988 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9989 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9990 (bfd_powerpc_archs): Add default powerpc64 arch.
9991
248866a8
AM
99922002-02-05 Alan Modra <amodra@bigpond.net.au>
9993
9994 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9995 against section syms in readonly sections. Don't do the global
9996 sym check if we find one.
9997 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9998 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9999 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
10000 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10001 (elf_s390_grok_prstatus): Add missing prototype.
10002
4fa5c2a8
HPN
100032002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10004
10005 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10006 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10007 Call bfd_get_section_by_name only once. Initialize
10008 bpodata->n_bpo_relocs_this_section.
10009 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10010 referring to DSOs.
10011 (bpo_reloc_request_sort_fn): Don't use difference of values as
10012 return-value.
10013
537c972e
DB
100142002-02-02 David O'Brien <obrien@FreeBSD>
10015
10016 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10017 version 4.5 and later the same as 5-CURRENT.
10018 * configure: Re-generate.
10019
006336b8
JT
100202002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10021
10022 * config.bfd (hppa*-*-netbsd*): New target.
10023
6c571f00
PT
100242002-01-31 Philipp Thomas <pthomas@suse.de>
10025
19397422
AM
10026 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10027 to front of message. Unify messages with elf32-arm.h. Use
10028 commas where neccessary.
10029 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10030 ERROR in messages. Unify messages with coff-arm.c. Correct
10031 VFP/FPA error message.
10032 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10033 APCS-32 for translation.
6c571f00 10034
930b4cb2
HPN
100352002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10036
10037 Perform on-demand global register allocation from
10038 R_MMIX_BASE_PLUS_OFFSET relocs.
10039 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10040 bpo_reloc_request, struct bpo_greg_section_info): New.
10041 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10042 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10043 _bfd_mmix_check_all_relocs,
10044 _bfd_mmix_prepare_linker_allocated_gregs,
10045 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10046 (elf_mmix_howto_table): Correct src_mask for most relocs.
10047 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10048 case.
10049 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10050 case. Fix typo in comment. New label do_mmix_reloc.
10051 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10052 store first object file with a base-plus-offset reloc. Call
10053 mmix_elf_check_common_relocs for the part common with mmo.
10054 (mmix_elf_final_link): Write out linker-allocated register
10055 contents section.
10056 (elf_backend_gc_sweep_hook): Define.
10057 (bfd_elf64_bfd_relax_section): Define.
10058
10059 * mmo.c: Don't include <ctype.h>
10060 (mmo_init): Correct init-once logic.
10061
3e36d993
TR
100622002-02-01 Tom Rix <trix@redhat.com>
10063
10064 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10065
ba323545
AM
100662002-02-01 Alan Modra <amodra@bigpond.net.au>
10067
10068 * Makefile.am: Run "make dep-am"
10069 * Makefile.in: Regenerate.
10070
012884d6
DB
100712002-01-31 David O'Brien <obrien@FreeBSD>
10072
10073 * configure.in: Recognize the differences in core files from FreeBSD
10074 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10075 5-CURRENT.
10076 * configure: Regenerate.
10077
3b16e843
NC
100782002-01-31 Ivan Guzvinec <ivang@opencores.org>
10079
10080 * coff-or32.c: New file.
10081 * cpu-or32.c: New file.
10082 * elf32-or32.c: New file.
10083 * archures.c: Add support for or32.
10084 * targets.c: Add support for or32.
10085 * bfd-in2.h: Regenerate.
7dc0ab31 10086 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
10087 coff_write_object_contents): Add support for or32.
10088 * config.bfd: Add target.
10089 * configure.in: Add support for or32.
10090 * configure: Regenerate.
10091 * Makefile.am: Add support for or32.
10092 * Makefile.in: Regenerate.
3b16e843
NC
10093 * po/SRC-POTFILES.in: Add or32 files.
10094 * po/bfd.pot: Regenerate.
7dc0ab31 10095
caf8ca8e
NC
100962002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10097 Don Lindsay <lindsayd@cisco.com>
10098
10099 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10100 false' with a return of a bfd_reloc_ error code.
10101
e5dfef09
HPN
101022002-01-31 Hans-Peter Nilsson <hp@axis.com>
10103
10104 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10105 unexport unreferenced symbols when --export-dynamic. Call
10106 _bfd_elf_strtab_delref when unexporting.
10107
4e4770d0
DJ
101082002-01-30 Daniel Jacobowitz <drow@mvista.com>
10109
10110 * bfd-in.h: Include <stdbool.h> if it is available.
10111 * bfd-in2.h: Regenerated.
10112
e1fa50e7
AM
101132002-01-31 Alan Modra <amodra@bigpond.net.au>
10114
10115 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10116 not go via the plt.
10117
b5f79c76
NC
101182002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10119
b5f79c76
NC
10120 * archures.c: Tidy up formatting of embedded comments.
10121 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 10122 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
10123 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10124 * section.c: Tidy up formatting of embedded comments.
10125 * syms.c: Tidy up formatting of embedded comments.
10126 * targets.c: Tidy up formatting of embedded comments.
10127
10128 * bfd-in2.h: Regenerate.
10129
ca09e32b
NC
101302002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10131
10132 * vms-tir.c (cmd_name): New function.
10133 (tir_cmd_name): New function.
10134 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10135 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10136 Fix formatting.
7dc0ab31 10137
ca09e32b
NC
10138 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10139 translation.
9b5ecbd0 10140 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
10141
10142 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10143 translation.
10144
10145 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10146
10147 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10148
10149 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10150 message to aid in translation.
10151
10152 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10153 to aid in translation.
10154
10155 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10156
7dc0ab31 101572002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
10158
10159 * coff-arm.c, elf32-elf.h: Unify messages.
10160
05f64ac6
NC
101612002-01-30 Nick Clifton <nickc@redhat.com>
10162
10163 * po/sv.po: Updated translation.
10164
f5a3e38a
NC
101652002-01-30 Philipp Thomas <pthomas@suse.de>
10166
10167 * dwarf2.c (read_abbrev): Use full section name in error message.
10168 (decode_line_info): Likewise.
661a3fd4
NC
10169
10170 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10171 message.
10172
d926e03d
AM
101732002-01-30 Alan Modra <amodra@bigpond.net.au>
10174
10175 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10176 descriptor symbols for undefined function code syms. Clear
10177 ELF_LINK_NON_ELF so that they can stay weak.
10178
030d18fb 101792002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 10180 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
10181
10182 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10183 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10184 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10185 generation.
10186 * bfd-in2.h: Regenerate.
10187
fcc76bea
CD
101882002-01-29 Chris Demetriou <cgd@broadcom.com>
10189
10190 * elf32-mips.c: Add additional comments about HI16 relocation
10191 processing.
10192 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10193 pc-relative relocations. (Reverts change made on 2001-10-31.)
10194 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10195 for pc-relative relocations.
10196 (mips_elf_calculate_relocation): Add a comment about a kludge
10197 in the R_MIPS_GNU_REL_HI16 handling.
10198 (_bfd_mips_elf_relocate_section): Implement that kludge;
10199 adjust pc-relative HI16 relocation for difference in HI16 and
10200 LO16 addresses, since it can't easily be done in
10201 mips_elf_calculate_relocation.
10202
f9cd9119
MS
102032002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10204
10205 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10206 relocations with PC32 relocations for undefined or weak symbols.
10207 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10208 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10209
702248bb
JT
102102002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10211
10212 * elfcore.h (elf_core_file_p): Improve comment for last change.
10213
4867be41
DJ
102142002-01-27 Daniel Jacobowitz <drow@mvista.com>
10215
10216 * configure: Regenerated.
10217
a94cef6a
JT
102182002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10219
10220 * elfcore.h (elf_core_file_p): Set the machine architecture
10221 before processing the program headers.
10222
7562a296
HPN
102232002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10224
966abd70
HPN
10225 * configure.in <64-bit configuration>: If using gcc, check and
10226 emit error for egcs-1.1.2.
10227 * configure: Regenerate.
10228
e8eab623
NC
102292002-01-26 Egor Duda <deo@logos-m.ru>
10230
10231 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10232 as possible to avoid stack corruption.
10233
73896efb
RH
102342002-01-26 Richard Henderson <rth@redhat.com>
10235
10236 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10237 for non-allocated sections.
10238
102392002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10240
10241 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10242 prstat.pr_reg even if it is a struct.
10243
73896efb 102442002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10245
c5cd6d62 10246 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10247
3d66c4f7
NC
102482002-01-25 Philipp Thomas <pthomas@suse.de>
10249
10250 * coffgen.c (coff_print_symbol): Don't mark info message
10251 for translation.
10252
9460ecda
NC
102532002-01-25 Nick Clifton <nickc@redhat.com>
10254
10255 * po/fr.po: Updated translation.
10256 * po/es.po: Updated translation.
10257
cc9ff76a
AM
102582002-01-25 Philipp Thomas <pthomas@suse.de>
10259
10260 * coff-alpha.c (alpha_relocate_section): Unify warning message
10261 for GP relative relocations without GP defined.
10262 * coff-mips.c (mips_relocate_section): Likewise.
10263
c68836a9
AM
102642002-01-25 Alan Modra <amodra@bigpond.net.au>
10265
10266 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10267 unsigned overflow when new_offset < old_offset.
10268
e8eab623 102692002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10270
10271 * bfd.c (_bfd_abort): Fix typo.
10272
8ba89f17
RH
102732002-01-23 Richard Henderson <rth@redhat.com>
10274
10275 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10276 plt entries for undefweak symbols.
10277
c6953948
NC
102782002-01-23 Steve Ellcey <sje@cup.hp.com>
10279
c5cd6d62 10280 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10281 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10282 (bfd_elf32_h8300_vec): Ditto.
10283
41bd81ab
AM
102842002-01-23 Alan Modra <amodra@bigpond.net.au>
10285
10286 * elf64-ppc.c: Remove stale part of ABI comment.
10287 (NO_OPD_RELOCS): Define.
10288 (ppc64_elf_check_relocs): Use it.
10289 (ppc64_elf_relocate_section): Here too.
10290 (build_one_stub): Don't point function syms at the stub. Instead,
10291 hijack plt.offset.
10292 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10293 really go to the stub. Make all dynamic relocs in opd against
10294 locals.
10295 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10296 plt.offset.
10297
f304919d
RH
102982002-01-22 Richard Henderson <rth@redhat.com>
10299
10300 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10301
c0ef99a7
AM
103022002-01-22 Alan Modra <amodra@bigpond.net.au>
10303
60ee0d4a
AM
10304 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10305 TOC_BASE_OFF adjustment.
10306
c0ef99a7
AM
10307 * Makefile.am: Run "make dep-am".
10308 * Makefile.in: Regenerate.
10309 * po/SRC-POTFILES.in: Regenerate.
10310
64328b46
AM
103112002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10312
10313 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10314 host defines.
10315
59953665 103162002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10317
10318 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10319 Check for and emit error if sgot is NULL at this point.
10320
9596feea
JT
103212002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10322
10323 * config.bfd (ia64*-*-netbsd*): New target.
10324
7b45c6e1
AM
103252002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10326
10327 * som.c (som_write_space_strings): Comment typo fix.
10328
e5094212
AM
103292002-01-21 Alan Modra <amodra@bigpond.net.au>
10330
e86ce104
AM
10331 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10332 is_func_descriptor fields.
10333 (link_hash_newfunc): Init them.
10334 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10335 dot are candidates for plt entries. When processing .opd relocs,
10336 set function descriptor strings to point inside function code
10337 string, and set new ppc_link_hash_entry fields.
10338 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10339 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10340 function descriptors. It's now done in..
10341 (func_desc_adjust): New.
10342 (ppc64_elf_func_desc_adjust): New.
10343 (define elf_backend_always_size_sections): Define.
10344 (ppc64_elf_hide_symbol): New.
10345 (define elf_backend_hide_symbol): Define.
10346 (allocate_dynrelocs): Remove code looking up function descriptors
10347 as that has been done earlier.
10348 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10349 table.
10350 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10351 up function descriptor.
10352 (build_one_stub): Look up the function code sym. Check for
10353 invalid plt offsets.
10354 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10355 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10356
e5094212
AM
10357 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10358 boolean param.
10359 (_bfd_elf_link_hash_hide_symbol): Likewise.
10360 * elflink.h (elf_link_add_object_symbols): Adjust call to
10361 elf_backend_hide_symbol.
10362 (elf_fix_symbol_flags): Likewise.
10363 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10364 than bfd_alloc.
10365 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10366 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10367 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10368 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10369 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10370 and adjust to suit.
10371 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10372 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10373 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10374
40b8271b
AM
103752002-01-18 Alan Modra <amodra@bigpond.net.au>
10376
10377 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10378 dynamic function descriptor symbol, not the associated function
10379 symbol.
10380
55baa95b
EC
103812002-01-17 Eric Christopher <echristo@redhat.com>
10382
10383 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10384
328577ad
NC
103852002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10386
10387 * po/bfd.pot: Regenerate.
10388 * po/fr.po: Regenerate.
10389
af746e92
AM
103902002-01-17 Alan Modra <amodra@bigpond.net.au>
10391
10392 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10393 Remove "Elf_Internal_Shdr *" param.
10394 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10395 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10396 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10397 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10398 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10399 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10400 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10401 function to override special sections. Remove hdr arg from
10402 backend call, and don't loop.
10403
175e9962
EC
104042002-01-16 Eric Christopher <echristo@redhat.com>
10405
10406 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10407 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10408 relocations requiring gp0 and gp.
10409
96a846ea
RE
104102002-01-16 Richard Earnshaw <rearnsha@arm.com>
10411
175e9962 10412 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10413 EF_ARM_VFP_FLOAT.
10414 (elf32_arm_print_private_bfd_data): Likewise.
10415
af3ae48d
NC
104162002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10417
10418 * po/tr.po: Import new version.
10419
10ed1bba
AM
104202002-01-16 Alan Modra <amodra@bigpond.net.au>
10421
10422 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10423 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10424 (ORI_R0_R0_0): Correct.
10425
5d1634d7
AM
104262002-01-16 Alan Modra <amodra@bigpond.net.au>
10427
10428 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10429 when plt_not_loaded.
10430 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10431 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10432 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10433 (ppc64_elf_glink_code): Delete.
10434 (PPC64_ELF_GLINK_SIZE): Delete.
10435 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10436 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10437 ORI_R0_R0_0): Define.
10438 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10439 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10440 (ppc64_elf_link_hash_table_create): Init them.
10441 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10442 Don't copy to shared lib.
10443 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10444 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10445 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10446 room for .stub and .glink code.
10447 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10448 DT_PPC64_GLINK.
10449 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10450 bfd_elf64_bfd_final_link.
10451 (bfd_elf64_bfd_final_link): Don't define.
10452 (ppc64_elf_size_stubs): New.
10453 (build_plt_stub): New.
10454 (build_one_stub): New.
10455 (ppc64_elf_build_stubs): New.
10456 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10457 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10458 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10459 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10460 case output sections not separate. Adjust DT_RELASZ to not
10461 include plt relocs. Set reserved got entry. Set got and plt
10462 entry size.
10463 (elf_backend_got_header_size): Set to 8.
10464 * elf64-ppc.h: New file.
10465
c601ffdb
AM
104662002-01-16 Alan Modra <amodra@bigpond.net.au>
10467
10468 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10469 sections, use bfd_section_list_remove.
10470 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10471 * elflink.h (elf_link_add_object_symbols): When removing all
10472 sections, use bfd_section_list_clear.
10473
8fb4cb7f
NC
104742002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10475
10476 * po/sv.po: New file: Swedish translation.
10477 * configure.in (ALL_LINGUAS): Add sv.
10478 * configure: Regenerate.
10479
d3c456e9
JJ
104802002-01-15 Jakub Jelinek <jakub@redhat.com>
10481
10482 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10483 * elf.c (merge_sections_remove_hook): New function.
10484 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10485 _bfd_merge_sections.
10486 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10487 * libbfd.h: Rebuilt.
10488 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10489 Call remove_hook if a SEC_EXCLUDE section is encountered.
10490
1f7fd478
NC
104912002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10492
10493 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10494 (xstormy16_reloc_map): Initialise new field with correct howto
10495 table.
10496 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10497 howto entry.
10498
b87011e9
MS
104992002-01-10 Michael Snyder <msnyder@redhat.com>
10500
10501 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10502 (elfcore_write_pstatus): Use long instead of pid_t;
10503 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10504
175e9962 105052002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10506
10507 * elf.c: Update copyright years.
10508 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10509 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10510
7c76fa91
MS
105112002-01-08 Michael Snyder <msnyder@redhat.com>
10512
10513 Add capability to write corefile note sections, for gdb.
10514 * elf.c (elfcore_write_note): New function.
10515 (elfcore_write_prpsinfo): New function.
10516 (elfcore_write_prstatus): New function.
10517 (elfcore_write_pstatus): New function.
10518 (elfcore_write_prfpreg): New function.
10519 (elfcore_write_prxfpreg): New function.
97996af6 10520 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10521
e1fddb6b
AO
105222002-01-08 Alexandre Oliva <aoliva@redhat.com>
10523
10524 * elf.c (elf_fake_sections): Propagate errors from
10525 elf_backend_fake_section.
10526
8d05742f
JT
105272002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10528
10529 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10530 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10531 (elf32-sh-nbsd.lo): New rule.
10532 * Makefile.in: Regenerate.
10533 * config.bfd (sh*le-*-netbsdelf*): New target.
10534 (sh*-*-netbsdelf*): New target.
10535 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10536 (bfd_elf32_shnbsd_vec): New vector.
10537 (bfd_elf32_shlnbsd_vec): New vector.
10538 * configure: Regenerate.
10539 * elf32-sh-nbsd.c: New file.
10540 * targets.c: Update copyright years.
175e9962 10541 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10542 bfd_elf32_shnbsd_vec.
10543
1dba4cb4
AH
105442002-01-07 Aldy Hernandez <aldyh@redhat.com>
10545
10546 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10547
47b22aef
GK
105482002-01-07 Geoffrey Keating <geoffk@redhat.com>
10549
10550 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10551 of a symbol in a section that will be deleted.
10552
be2d1673
NC
105532002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10554
10555 * po/es.po: New file: Spanish translation.
10556 * configure.in (ALL_LINGUAS): Add es.
10557 * configure: Regenerate.
10558
d9cf1b54
AM
105592002-01-06 Steve Ellcey <sje@cup.hp.com>
10560
10561 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10562 argument so we can handle HP-UX specially.
10563 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10564 (elfNN_hpux_backend_section_from_bfd_section): New for support
10565 of SHN_IA_64_ANSI_COMMON.
10566 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10567 (is_unwind_section_name): Add special HP-UX support.
10568 (elfNN_ia64_section_from_shdr): Add support for more sections.
10569 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10570 add support for more sections.
10571 (elfNN_ia64_additional_program_headers): Modify
10572 is_unwind_section_name call.
10573 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10574 only one unwind section in segment.
10575
3f3c5c34
AM
105762002-01-06 Alan Modra <amodra@bigpond.net.au>
10577
10578 * syms.c (_bfd_generic_make_empty_symbol): New function.
10579 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10580 _bfd_generic_make_empty_symbol.
10581 * libbfd.h: Regenerate.
10582 * bfd-in2.h: Regenerate.
10583 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10584 (hppabsd_core_get_symtab_upper_bound): Don't define.
10585 (hppabsd_core_get_symtab): Likewise.
10586 (hppabsd_core_print_symbol): Likewise.
10587 (hppabsd_core_get_symbol_info): Likewise.
10588 (hppabsd_core_bfd_is_local_label_name): Likewise.
10589 (hppabsd_core_get_lineno): Likewise.
10590 (hppabsd_core_find_nearest_line): Likewise.
10591 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10592 (hppabsd_core_read_minisymbols): Likewise.
10593 (hppabsd_core_minisymbol_to_symbol): Likewise.
10594 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10595 Formatting fixes.
10596 * hpux-core.c: Similarly.
10597 * irix-core.c: Similarly.
10598 * osf-core.c: Similarly.
10599 * sco5-core.c: Similarly.
10600 * binary.c (binary_make_empty_symbol): Remove function, define as
10601 _bfd_generic_make_empty_symbol.
10602 * ihex.c (ihex_make_empty_symbol): Likewise.
10603 * mmo.c (mmo_make_empty_symbol): Likewise.
10604 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10605 * srec.c (srec_make_empty_symbol): Likewise.
10606 * versados.c (versados_make_empty_symbol): Likewise.
10607 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10608 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10609 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10610 rather than _bfd_vms_make_empty_symbol.
10611 * vms-misc.c (new_symbol): Likewise.
10612
3f0a7f7f
AM
106132002-01-05 Alan Modra <amodra@bigpond.net.au>
10614
9e7b37b3
AM
10615 * section.c (bfd_section_init): Remove unnecessary initialisations.
10616 (bfd_section_list_clear): New function.
10617 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10618 (_bfd_strip_section_from_output): Use them.
10619 * coffcode.h (coff_set_alignment_hook): Likewise.
10620 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10621 * elf64-mips.c (mips_elf64_final_link): Likewise.
10622 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10623 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10624 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10625 * bfd-in2.h: Regenerate.
10626
10627 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10628 rather than doing our own section handling. Clean up after errors
10629 with bfd_release and bfd_section_list_clear. Handle unexpected
10630 flags.
10631 * aoutf1.h (sunos4_core_file_p): Likewise.
10632 * aix386-core.c (aix386_core_file_p): Likewise.
10633 * cisco-core.c (cisco_core_file_validate): Likewise.
10634 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10635 * trad-core.c (trad_unix_core_file_p): Likewise.
10636
9b5ecbd0 10637 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10638 with bfd_release and bfd_section_list_clear.
10639 * hpux-core.c (hpux_core_core_file_p): Likewise.
10640 * irix-core.c (irix_core_core_file_p): Likewise.
10641 * lynx-core.c (lynx_core_file_p): Likewise.
10642 * osf-core.c (osf_core_core_file_p): Likewise.
10643 * rs6000-core.c (rs6000coff_core_p): Likewise.
10644 * sco5-core.c (sco5_core_file_p): Likewise.
10645
3f0a7f7f
AM
10646 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10647 sign extension adjustments without conditionals.
10648
a3aa38ee
JJ
106492002-01-04 Jakub Jelinek <jakub@redhat.com>
10650
10651 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10652 CIE at .eh_frame start is removed due to no FDEs referencing it.
10653
8a8b2d4b
AJ
106542002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10655
10656 * config.bfd (x86_64-*-netbsd*): New target.
10657 * configure.in (x86_64-*-netbsd*): Set COREFILE
10658 to netbsd-core.lo.
10659 * configure: Regenerated.
10660
04b5af89
TR
106612002-01-03 Tom Rix <trix@redhat.com>
10662
10663 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10664 for recent bfd_make_section_anyway change.
10665
51c5503b
NC
106662002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10667
10668 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10669 R_ARM_THM_PC11 reloc.
10670
07f7c046
NC
106712002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10672
10673 * configure.in (LINGUAS): Add ja.
10674 * configure: Regenerate.
10675 * po/ja.po: Import from translation project's web site.
10676
5eefb65f
NC
106772002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10678
10679 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10680 messages to ease translation into other languages.
10681
39e90f10 10682For older changes see ChangeLog-0001
56882138
AM
10683\f
10684Local Variables:
10685mode: change-log
10686left-margin: 8
10687fill-column: 74
10688version-control: never
10689End:
This page took 0.699397 seconds and 4 git commands to generate.