Change from OTHER_RELOCATING_SECTIONS to STACK_ADDR in elf32frv.sh
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
7a624474
AM
12002-07-26 Alan Modra <amodra@bigpond.net.au>
2
3 From John Reiser <jreiser@BitWagon.com>
4 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5 tls_ldm_got.refcount.
6
a4382ec6
TS
72002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8
9 * elf64-mips.c: Update TODO comment.
10 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
11 mips_elf64_gprel16_reloca): Remove prototypes.
12 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
13 (UNUSED_RELOC): Replace by EMPTY_RELOC.
14 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
15 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
16 R_MIPS_HIGHEST.
17 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
18 R_MIPS_GOT16. Remove wrong comments.
19 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
20 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
21 from elf32-mips.c.
22 (mips_elf64_hi16_reloc): Fix formatting.
23 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
24 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
25 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
26 (mips_elf64_gprel16_reloc): Make static. Add check for
27 partial_inplace.
28 (mips_elf64_gprel16_reloca): Remove.
29 (mips_elf64_literal_reloc): New function.
30 (mips_elf64_gprel32_reloc): Fix formatting.
31 (mips_elf64_shift6_reloc): Fix comment. Make static.
32 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
33 elf32-mips.c.
34 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
35 elf32-mips.c
36 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
37 specific relocations.
38 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
39 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
40 (ELF_MAXPAGESIZE): Add comment.
41
219576a4
NC
422002-07-25 Nick Clifton <nickc@redhat.com>
43
44 * po/sv.po: Updated Swedish translation.
45 * po/es.po: Updated Spanish translation.
46 * po/fr.po: Updated French translation.
47
8c58d23b
AM
482002-07-25 Alan Modra <amodra@bigpond.net.au>
49
50 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
51 as elf_link_record_local_dynamic_symbol.
52 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
53 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
54 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
55 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
56 attempt is made to record a symbol in a discarded section, and
57 return `2' in that case.
58
ff3063f5
NC
592002-07-24 Nick Clifton <nickc@redhat.com>
60
61 * po/sv.po: Updated Swedish translation.
62 * po/es.po: Updated Spanish translation.
63
f0fe0e16
AM
642002-07-23 Alan Modra <amodra@bigpond.net.au>
65
c1fb5f8a
AM
66 * po/SRC-POTFILES.in: Regenerate.
67
f0fe0e16
AM
68 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
69 immediately. Remove code handling relocatable linking.
70 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
71 * elf32-cris.c (cris_elf_relocate_section): Likewise.
72 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 73 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
74 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
75 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
76 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
77 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
78 * elf32-v850.c (v850_elf_relocate_section): Likewise.
79 * elf32-vax.c (elf_vax_relocate_section): Likewise.
80 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
81 * elf32-avr.c (elf_backend_rela_normal): Define.
82 * elf32-cris.c: Likewise.
83 * elf32-fr30.c: Likewise.
de2d743e 84 * elf32-frv.c: Likewise.
f0fe0e16
AM
85 * elf32-h8300.c: Likewise.
86 * elf32-hppa.c: Likewise.
87 * elf32-ip2k.c: Likewise.
88 * elf32-sparc.c: Likewise.
89 * elf32-v850.c: Likewise.
90 * elf32-vax.c: Likewise.
91 * elf64-hppa.c: Likewise.
92 * elf64-sparc.c: Likewise.
93 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 94 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
95 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
96 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
97 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
98 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
99 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
100 * elf-m10200.c (USE_RELA): Don't define.
101 * elf-m10300.c: Likewise.
de2d743e 102 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
103 * elf32-i370.c: Likewise.
104 * elf32-ip2k.c: Likewise.
105 * elf32-m68k.c: Likewise.
106 * elf32-mcore.c: Likewise.
107 * elf32-ppc.c: Likewise.
108 * elf32-s390.c: Likewise.
109 * elf32-vax.c: Likewise.
110 * elf64-ppc.c: Likewise.
111 * elf64-s390.c: Likewise.
112 * elf64-x86-64.c: Likewise.
113 * elfxx-ia64.c: Likewise.
114 * elf32-avr.c (USE_REL): Don't undef.
115 * elf32-ip2k.c: Likewise.
116
5e8d7549
NC
1172002-07-23 Nick Clifton <nickc@redhat.com>
118
119 * elf-bfd.h (struct elf_backend_data): Add new bitfield
120 'want_p_paddr_set_to_zero'.
121 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
122 to false;
123 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
124 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
125
9e12c7db
NC
1262002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
127
128 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
129 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
130 show the Copyright string.
131 Minor formatting tidy ups.
132
0461a601
NC
1332002-07-23 Nick Clifton <nickc@redhat.com>
134
ff3063f5
NC
135 * po/fr.po: Updated French translation.
136 * po/sv.po: Updated Swedish translation.
0461a601 137
fad2542d
AM
1382002-07-23 Alan Modra <amodra@bigpond.net.au>
139
140 * elflink.h (elf_link_input_bfd): Don't change internal symbols
141 when outputting relocs.
142
c0647bfc
JT
1432002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
144
145 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
146 DT_PLTGOT into the dynamic section if there is a PLT.
147
d01414a5
TS
1482002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
149
150 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
151 elf32-mips.c.
152 (_bfd_mips_elf_write_section): Likewise.
153 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
154 (_bfd_mips_elf_write_section): Likewise.
155 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
156 (elf32_mips_write_section): Likewise.
157 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
158 (_bfd_mips_elf_write_section): Likewise.
159
40c97fc6
AM
1602002-07-19 Alan Modra <amodra@bigpond.net.au>
161
162 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
163 PT_IA_64_UNWIND segments for a given section.
164
58378160
L
1652002-07-17 H.J. Lu <hjl@gnu.org>
166
167 * Makefile.am: Fix a typo.
168 * Makefile.in: Regenerate.
169
cf88bb9f
NC
1702002-07-15 Denis Chertykov <denisc@overta.ru>
171 Frank Ch. Eigler <fche@redhat.com>
172 Ben Elliston <bje@redhat.com>
173 Alan Lehotsky <alehotsky@cygnus.com>
174 John Healy <jhealy@redhat.com>
175 Graham Stott <grahams@redhat.com>
176 Jeff Johnston <jjohnstn@redhat.com>
177
178 * Makefile.am: Add support for ip2k.
179 * Makefile.in: Regenerate.
180 * doc/Makefile.in: Regenerate.
181 * archures.c: Add support for ip2k.
182 * config.bfd: Add support for ip2k.
183 * configure.in: Add support for ip2k.
184 * configure: Regenerate.
185 * reloc.c: Add support for ip2k.
186 * targets.c: Add support for ip2k.
187 * bfd-in2.h: Regenerate.
188 * libbfd.h: Regenerate.
189 * cpu-ip2k.c: New file.
190 * elf32-ip2k.c: New file.
191
0dafd5f6
RE
1922002-07-17 Ian Rickards <irickard@arm.com>
193
40c97fc6 194 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
195 just return the filename.
196
36b08f12
AM
1972002-07-16 Moritz Jodeit <moritz@jodeit.org>
198
199 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
200
58821868
AM
2012002-07-16 Alan Modra <amodra@bigpond.net.au>
202
203 * elflink.h: Formatting fixes, tidy prototypes.
204 (elf_link_assign_sym_version): Move common code out of loop.
205
c89583f8
AM
2062002-07-16 Alan Modra <amodra@bigpond.net.au>
207
208 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
209 reloc section size is zero. Correct reloc output location.
210
ba94744e
AM
2112002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
212
213 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
214 the final type for the e_fsel selector when generating PA2.0W code.
215 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
216 relocations.
217
96a94295
L
2182002-07-14 H.J. Lu <hjl@gnu.org>
219
220 * elflink.h (elf_link_assign_sym_version): Hide the default
221 definition if there is a hidden versioned definition.
222
6849c52f
HPN
2232002-07-12 Hans-Peter Nilsson <hp@axis.com>
224
225 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
226 dynamic reference test in assertion when initializing GOT with
227 static contents. Just assert that there are either no dynamic
228 sections, the symbol is defined in the regular objects or that the
229 symbol is undef weak. Tweak comment.
230 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
231 only if the symbol isn't defined in the program and isn't undef
232 weak.
233 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
234 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
235 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
236 (elf_cris_discard_excess_program_dynamics): Don't consider
237 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
238
239e1f3a
AM
2392002-07-11 Alan Modra <amodra@bigpond.net.au>
240
241 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
242 unresolved debugging relocs in dynamic applications.
243 * elf32-s390.c (elf_s390_relocate_section): Likewise.
244 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
245 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
246 * elf64-s390.c (elf_s390_relocate_section): Likewise.
247 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
248 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
249
2f6d9989
AM
2502002-07-10 Alan Modra <amodra@bigpond.net.au>
251
f5e87a1d
AM
252 * elf64-ppc.c (ONES): Define.
253 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
254 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
255 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
256
2f6d9989
AM
257 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
258 (ppc64_elf_set_private_flags): Delete.
259 (ppc64_elf_section_from_shdr): Delete.
260 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
261 (ppc64_elf_fake_sections): Delete.
262 (bfd_elf64_bfd_set_private_flags): Don't define.
263 (bfd_elf64_get_symbol_info): Likewise.
264 (elf_backend_section_from_shdr): Likewise.
265 (elf_backend_fake_sections): Likewise.
266
0594c12d
AM
2672002-07-10 Marco Walther <Marco.Walther@sun.com>
268
269 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
270 when not already set.
271 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
272 (elf_backend_fake_sections): Define.
273
699cb9b8
AM
2742002-07-10 Alan Modra <amodra@bigpond.net.au>
275
276 * merge.c (_bfd_merge_section): Remove redundant output_section check.
277 Formatting.
278 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
279
0a4787a0
HPN
2802002-07-09 Hans-Peter Nilsson <hp@axis.com>
281
282 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
283 NULL sym_hashes to just before use.
284 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
285 symbol with non-default visibility.
286 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
287 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
288 Ditto.
289 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
290 symbol with non-default visibility.
291 (cris_elf_check_relocs): At tests for local symbol before
292 increasing h->plt.refcount, also check for non-default
293 visibility. Ditto when checking for local symbol to eliminate
294 pc-relative runtime relocs.
295
aecc8f8a
AM
2962002-07-08 Alan Modra <amodra@bigpond.net.au>
297
298 * elf.c: Formatting.
299 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
300 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
301 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
302 segments.
303
e9168c1e
MM
3042002-07-07 Mark Mitchell <mark@codesourcery.com>
305 Alan Modra <amodra@bigpond.net.au>
306
307 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
308 account the impact of relocation count overflow when computing
309 section offsets.
310 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
311 or not to apply the PE COFF reloc overflow handling. Fix a
312 fencepost error in deciding whether or not to use that technique.
313
6cdc0ccc
AM
3142002-07-07 Alan Modra <amodra@bigpond.net.au>
315
316 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
317 change type of locsyms.
318 (bfd_elf_get_elf_syms): Declare.
319 * elf.c (bfd_elf_get_elf_syms): New function.
320 (group_signature): Use bfd_elf_get_elf_syms.
321 (bfd_section_from_r_symndx): Likewise.
322 * elfcode.h (elf_slurp_symbol_table): Likewise.
323 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
324 (elf_link_add_object_symbols): Likewise. Reorganise to increase
325 locality of various data structures. Properly free internal relocs.
326 (elf_bfd_final_link): Properly free internal relocs.
327 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
328 (elf_link_input_bfd): Likewise.
329 (elf_gc_mark): Likewise. Properly free internal relocs.
330 (elf_gc_sweep): Properly free internal relocs.
331 (elf_reloc_symbol_deleted_p): No need to swap syms in.
332 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
333 internal relocs.
334 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
335 Properly free possibly cached info.
336 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
337 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
338 symbol swapping code.
339 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
340 Properly free possibly cached info.
341 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
342 (mn10300_elf_relax_delete_bytes): Likewise.
343 (mn10300_elf_symbol_address_p): Likewise.
344 (mn10300_elf_get_relocated_section_contents): Likewise.
345 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
346 (elf32_h8_relax_delete_bytes): Likewise.
347 (elf32_h8_symbol_address_p): Likewise.
348 (elf32_h8_get_relocated_section_contents): Likewise.
349 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
350 (m32r_elf_relax_delete_bytes): Likewise.
351 (m32r_elf_get_relocated_section_contents): Likewise.
352 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
353 elf_section_data to determine whether cached.
354 (sh_elf_relax_section): As above for elf-m10200.c.
355 (sh_elf_relax_delete_bytes): Likewise.
356 (sh_elf_get_relocated_section_contents): Likewise.
357 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
358 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
359 reading of local syms.
360 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
361 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
362 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
363 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
364 relocs.
365 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
366 free internal relocs and section contents. Don't read symbols.
367 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
368 (elf32_hppa_size_stubs): Don't free local syms.
369 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
370 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
371 possibly cached info.
372 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
373 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
374 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
375 all_local_syms.
376 (get_local_syms): Delete function.
377 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
378 on exit.
379 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
380
b3212001
JW
3812002-07-05 Jim Wilson <wilson@redhat.com>
382
383 * syms.c (decode_section_type): New.
384 (bfd_decode_symclass): Call decode_section_type.
385
894bb1ee
JJ
3862002-07-04 Jakub Jelinek <jakub@redhat.com>
387
388 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
389 section content start.
390 Reported by Michael Schumacher <mike@hightec-rt.com>.
391
bc0ba537
AM
3922002-07-04 Alan Modra <amodra@bigpond.net.au>
393
394 * section.c (_bfd_strip_section_from_output): Remove unnecessary
395 link order code. Don't actually remove the output section here;
396 Just set a flag for the linker to do so.
397 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
398 sections when setting up output section dynsyms.
399
797fc050
AM
4002002-07-04 Alan Modra <amodra@bigpond.net.au>
401
402 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
403 fudge.
404 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
405 libs here instead.
406
99881371
MS
4072002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
408
409 * elf64-s390.c (create_got_section): Set .got section alignment to
410 8 bytes.
411 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
412
47d9a591
AM
4132002-07-02 Alan Modra <amodra@bigpond.net.au>
414
415 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
416
179d3252
JT
4172002-07-01 Matt Thomas <matt@3am-software.com>
418
419 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
420 to EF_VAX_*.
421
4a14403c
TS
4222002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
423
424 * elfxx-mips.c (ABI_64_P): Fix comment.
425 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
426 new section names for N64 ABI.
427 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
428 (mips_elf_calculate_relocation): Code formatting.
429 (mips_elf_create_dynamic_relocation): Likewise.
430 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
431 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
432 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
433 in any NewABI.
434 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
435 for NewABI.
436 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
437 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
438 here, too.
439
607c0e09
AS
4402002-07-01 Andreas Schwab <schwab@suse.de>
441
442 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
443 R_X86_64_64 to R_X86_64_RELATIVE.
444
ba26fd96
AM
4452002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
446
447 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
448 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
449 Run "make dep-am".
450 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
451 host_aout_vec.
452 * configure.in (vaxbsd_vec): Add.
453 * targets.c (vaxbsd_vec): Add.
454 * Makefile.in: Rebuild.
455 * configure: Rebuild.
456 * po/SRC-POTFILES.in: Rebuild.
457
1e2f5b6e
AM
4582002-07-01 Alan Modra <amodra@bigpond.net.au>
459
460 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
461 examining to gc_mark_hook, rather than the bfd.
462 (elf_gc_sections): Adjust.
463 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
464 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
465 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
466 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
467 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
468 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
469 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
470 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
471 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
472 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
473 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
474 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
475 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
476 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
477 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
478 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
479 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
480 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
481 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
482 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
483 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
484 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
485 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
486 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
487 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
488 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
489 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
490 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
491 redundant local sym tests.
492 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
493 (link_hash_newfunc): Init is_entry.
494 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
495 (ppc64_elf_link_hash_table_create): Init all_local_syms.
496 (create_linkage_sections): Use bfd_make_section_anyway rather than
497 bfd_make_section.
498 (ppc64_elf_mark_entry_syms): New function.
499 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
500 up opd entry to function section map.
501 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
502 relocs that reference the opd section.
503 (edit_opd): New function.
504 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
505 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
506 (get_local_syms): Do so here. Exit if we already have local syms.
507 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
508 read local syms on non-ELF input.
509 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
510 than duplicating it's function here. Adjust free of internal
511 relocs to suit.
512 (ppc64_elf_relocate_section): Adjust local syms in opd section.
513 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
514 * elf32-hppa.c (elf32_hppa_size_stubs): Call
515 _bfd_elf32_link_read_relocs rather than duplicating it's function
516 here. Adjust free of internal relocs to suit.
517
1b71fb54
AJ
5182002-07-01 Andreas Jaeger <aj@suse.de>
519
520 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
521 are not allowed in shared libs code, enforce -fPIC.
522
8d28f606
HPN
5232002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
524
525 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
526 trailing zero-sequences when there's previous left-over data.
527
5ac81c74
JL
5282002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
529
530 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
531 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
532 and opd_rel_sec in order for starting rela section. Check _raw_size.
533 (elf_backend_reloc_type_class): Define.
534
91a4d569
AM
5352002-06-27 Kevin Buettner <kevinb@redhat.com>
536
537 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
538 DWARF2 formats.
539
feee612b
AM
5402002-06-27 Alan Modra <amodra@bigpond.net.au>
541
542 * cpu-powerpc.c: Comment on ordering of arch_info.
543 * elf32-ppc.c (ppc_elf_object_p): New function.
544 (elf_backend_object_p): Define.
545 * elf64-ppc.c (ppc64_elf_object_p): New function.
546 (elf_backend_object_p): Define.
547
a4e6cefc
JT
5482002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
549
550 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
551 * configure: Regenerate.
552
dae2dd0d
NC
5532002-06-25 Jason Eckhardt <jle@rice.edu>
554
555 * dwarf2.c (decode_line_info): Check unit->addr_size
556 to read in the proper number of prologue bytes.
557
680f9d5c
NC
5582002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
559
560 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
561 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
562 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
563 been enabled.
dae2dd0d 564
680f9d5c
NC
565 * targets.c (_bfd_target_vector[]): Only include
566 aix5coff64_vec if 64-bit bfd support has been enabled.
567
d4c88bbb
AM
5682002-06-25 Alan Modra <amodra@bigpond.net.au>
569
570 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
571 * elf32-hppa.c (hppa_add_stub): Likewise.
572 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
573 * elflink.h (elf_add_default_symbol): Fix comment typo.
574 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
575 (elf_link_add_object_symbols): Likewise.
576 (elf_link_assign_sym_version): Likewise.
577 * hash.c (bfd_hash_lookup): Likewise.
578 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
579 * section.c (bfd_get_unique_section_name): Likewise.
580 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
581 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
582 (assign_section_numbers): Likewise.
583 (_bfd_elfcore_make_pseudosection): Likewise.
584 (elfcore_grok_lwpstatus): Likewise.
585 (elfcore_grok_win32pstatus): Likewise.
586 (elfcore_write_note): Constify input params. Use PTR instead of
587 void *. Include terminating NUL in namesz. Correct padding.
588 Support NULL "name" param. Use memcpy instead of strcpy.
589 (elfcore_write_prpsinfo): Constify input params.
590 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
591 (elfcore_write_lwpstatus): Likewise.
592 (elfcore_write_pstatus): Likewise.
593 (elfcore_write_prfpreg): Likewise.
594 (elfcore_write_prxfpreg): Likewise.
595 * elf-bfd.h (elfcore_write_note): Update declaration.
596 (elfcore_write_prpsinfo): Likewise.
597 (elfcore_write_prstatus): Likewise.
598 (elfcore_write_pstatus): Likewise.
599 (elfcore_write_prfpreg): Likewise.
600 (elfcore_write_prxfpreg): Likewise.
601 (elfcore_write_lwpstatus): Likewise.
602
b0ac09d2
NC
6032002-06-25 Jason Eckhardt <jle@rice.edu>
604
605 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
606 symbols of type stProc and stStaticProc.
607
6082002-06-25 Nick Clifton <nickc@redhat.com>
609
610 * ecoff.c: VArious formatting fixes.
611
021d6096
AM
6122002-06-25 Alan Modra <amodra@bigpond.net.au>
613
614 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
615
82e51918
AM
6162002-06-25 Alan Modra <amodra@bigpond.net.au>
617
618 * aout-adobe.c: Don't compare against "true" or "false.
619 * aout-target.h: Likewise.
620 * aoutx.h: Likewise.
621 * archive.c: Likewise.
622 * bout.c: Likewise.
623 * cache.c: Likewise.
624 * coff-a29k.c: Likewise.
625 * coff-alpha.c: Likewise.
626 * coff-i386.c: Likewise.
627 * coff-mips.c: Likewise.
628 * coff-or32.c: Likewise.
629 * coff64-rs6000.c: Likewise.
630 * coffcode.h: Likewise.
631 * coffgen.c: Likewise.
632 * cpu-ns32k.c: Likewise.
633 * ecoff.c: Likewise.
634 * ecofflink.c: Likewise.
635 * elf.c: Likewise.
636 * elf32-arm.h: Likewise.
637 * elf32-cris.c: Likewise.
638 * elf32-d30v.c: Likewise.
639 * elf32-i386.c: Likewise.
640 * elf32-mcore.c: Likewise.
641 * elf32-ppc.c: Likewise.
642 * elf32-sh.c: Likewise.
643 * elf32-sh64.c: Likewise.
644 * elf32-v850.c: Likewise.
645 * elf64-alpha.c: Likewise.
646 * elf64-sh64.c: Likewise.
647 * elfcode.h: Likewise.
648 * elfcore.h: Likewise.
649 * elflink.h: Likewise.
650 * elfxx-mips.c: Likewise.
651 * i386os9k.c: Likewise.
652 * ieee.c: Likewise.
653 * libbfd.c: Likewise.
654 * linker.c: Likewise.
655 * mmo.c: Likewise.
656 * nlm32-alpha.c: Likewise.
657 * nlm32-i386.c: Likewise.
658 * nlm32-ppc.c: Likewise.
659 * nlm32-sparc.c: Likewise.
660 * nlmcode.h: Likewise.
661 * oasys.c: Likewise.
662 * pdp11.c: Likewise.
663 * peicode.h: Likewise.
664 * reloc.c: Likewise.
665 * som.c: Likewise.
666 * srec.c: Likewise.
667 * tekhex.c: Likewise.
668 * vms.c: Likewise.
669 * xcofflink.c: Likewise.
670 * elf64-sparc.c: Edit comment to not use "== false".
671
672 * aoutf1.h: Don't use "? true : false".
673 * ecoff.c: Likewise.
674 * format.c: Likewise.
675 * ieee.c: Likewise.
676 * linker.c: Likewise.
677 * mmo.c: Likewise.
678 * oasys.c: Likewise.
679
48fc70a2
AM
6802002-06-23 H.J. Lu <hjl@gnu.org>
681
682 * elflink.h (elf_link_add_archive_symbols): For the default
683 version, check references with only one `@' first.
684
47b7c2db
AM
6852002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
686
687 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
688 function.
689 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
690 symbol table.
691 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
692 (elf64_hppa_size_dynamic_sections): Revise to use
693 elf64_hppa_mark_milli_and_exported_functions.
694 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
695 symbols out of dynamic symbol table.
696
f5d44ba0
AM
6972002-06-23 Alan Modra <amodra@bigpond.net.au>
698
bb3fff1e
AM
699 * Makefile.in: Regenerate.
700 * libbfd.h: Regenerate.
701 * bfd-in2.h: Regenerate.
702 * configure: Regenerate.
703 * po/SRC-POTFILES.in: Regenerate.
704
f5d44ba0
AM
705 * elflink.h: Comment typo fixes.
706
7072002-06-23 H.J. Lu <hjl@gnu.org>
708
709 * elf-bfd.h (elf_link_loaded_list): New structure.
710 (elf_link_hash_table): Add "loaded".
711 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
712 * elflink.h (elf_link_check_versioned_symbol): New function.
713 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
714
cc36acdf
NC
7152002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
716
717 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 718 support an ELF style hash table, return true, indicating that
cc36acdf
NC
719 nothing needed to be done, rather than false, indicating that the
720 section's size could not be computed.
721
4e5ba5b7
DB
7222002-06-18 Dave Brolley <brolley@redhat.com>
723
724 From Catherine Moore, Michael Meissner, Dave Brolley:
725 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
726 * targets.c: Support bfd_elf32_frv_vec.
727 * reloc.c: Add FRV relocs.
728 * configure.in: Add support for bfd-elf32-frv-vec.
729 * config.bfd (targ_cpu): Add support for frv-*-elf.
730 * archures.c: Add frv arch and machines.
731 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
732 (ALL_MACHINES_CFILES): Add cpu-frv.c.
733 (BFD32_BACKENDS): Add elf32-frv.lo.
734 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
735 (cpu-frv.lo): New target.
736 (elf32-frv.lo): New target.
737 * cpu-frv.c: New file.
738 * elf32-frv.c: New file.
739
7ece0d85
JJ
7402002-06-18 Jakub Jelinek <jakub@redhat.com>
741
742 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
743 e_shnum == 0.
744 Only read the first section header if e_shoff is non-zero.
745 Don't consider e_shstrndx if there are no sections.
746
57fb03ac
TR
7472002-06-17 Tom Rix <trix@redhat.com>
748
749 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 750 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
751 complain_overflow_bitfield.
752
341ca622
AM
7532002-06-17 Alan Modra <amodra@bigpond.net.au>
754
767e34d1
AM
755 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
756 (bfd_fdopenr): Likewise.
757 (bfd_openstreamr): Likewise.
758 (bfd_openw): Likewise.
759
341ca622
AM
760 * targets.c: Sort target vecs.
761 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
762 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
763 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
764 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
765 * configure.in: Sort target vecs. Add m88kmach3_vec.
766 * configure: Regenerate.
767
dfbbae4c
HPN
7682002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
769
770 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
771 bpo_reloc_no to break sort order ties, not address of items.
772
d663e1cd
JL
7732002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
774
775 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
776 Skip excluded sections in determing __gp value.
777 (elf_hppa_final_link_relocate): Use the symbol's address in
778 R_PARISC_FPTR64 relocations that don't need an opd entry.
779 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
780 (elf64_hppa_finalize_dynreloc): Likewise.
781 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
782 (elf64_hppa_finish_dynamic_symbol): Break up assert.
783
a8295218
NC
7842002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
785
786 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
787 alignment for .bss, .data and .text sections so that sse and sse2
788 code will work.
789 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
790
7912002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
792
793 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
794 sh[1234]*-elf*.
795
3db4b612
JL
7962002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
797
2cb69dd3
JL
798 * elflink.h (elf_bfd_final_link): Improve error handling for missing
799 dynamic sections.
800
3db4b612
JL
801 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
802 for a symbol that has no output section.
803 (allocate_dynrel_entries): Correct comment.
804 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
805 unless we want one.
806 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
807 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
808 with no section. Remove unnecessary parentheses.
809
f3813499
TR
8102002-06-11 Tom Rix <trix@redhat.com>
811
812 * coffcode.h (coff_compute_section_file_positions): Add data
813 section to AIX loader alignment check.
814
f5d44ba0 815 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
816 alignment to 4 bytes.
817 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
818 power accessor macro.
819 (do_shared_object_padding): Remove invalid assertion.
820
0ebaf185
RS
8212002-06-10 Richard Sandiford <rsandifo@redhat.com>
822
823 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
824 for removed output sections.
825
ebe3e2d1
NC
8262002-06-10 Geoffrey Keating <geoffk@redhat.com>
827
828 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
829 htab_alloc.
830 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
831
0b14c2aa
L
8322002-06-08 H.J. Lu <hjl@gnu.org>
833
834 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
835 work around a long long bug in gcc 2.96 on mips.
836
3c2bfad6
JT
8372002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
838
839 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
840 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
841 Regenerate dependency lists.
842 * Makefile.in: Regenerate.
843 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
844 vax1knetbsd_vec to targ_selvecs.
845 * configure.in: Add vax1knetbsd_vec.
846 * configure: Regenerate.
847 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
848 * vax1knetbsd.c: New file.
849 * vaxnetbsd.c: Update copyright years.
850 (TARGET_PAGE_SIZE): Set to 0x1000.
851 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
852
91149be3
JT
8532002-06-08 Matt Thomas <matt@3am-software.com>
854
855 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
856
21e15248
AM
8572002-06-08 Alan Modra <amodra@bigpond.net.au>
858
859 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
860
986b7daa
AM
8612002-06-08 Alan Modra <amodra@bigpond.net.au>
862
e90b95f6
AM
863 * Makefile.am: Run "make dep-am".
864 * Makefile.in: Regenerate.
865
3f9c735e
AM
866 * armnetbsd.c: Replace CONST with const.
867 * corefile.c: Likewise.
868 * elf32-dlx.c: Likewise.
869 * elf64-mips.c: Likewise.
870 * mmo.c: Likewise.
871 * ns32knetbsd.c: Likewise.
872
986b7daa
AM
873 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
874 table is elf64-sparc.
875
5a659663
TS
8762002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
877
878 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
879 Fix RELA addends to get not shifted in the result. Don't do special
880 handling of R_MIPS_64 for NewABI.
881
9bab7074
AM
8822002-06-07 Alan Modra <amodra@bigpond.net.au>
883
884 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
885 (NAME(aout,slurp_reloc_table)): Likewise.
886 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
887 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
888 (xcoff_write_archive_contents_big): Likewise.
889 (xcoff_generate_rtinit): Likewise.
890 (xcoff_generate_rtinit): Likewise, and check error return.
891 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
892 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
893 (coff_get_normalized_symtab): Likewise.
894 (coff_make_empty_symbol): Likewise.
895 (bfd_coff_set_symbol_class): Likewise.
896 * cofflink.c (coff_link_add_symbols): Likewise.
897 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
898 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
899 (bfd_ecoff_write_accumulated_debug): Likewise.
900 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
901 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
902 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
903 * ieee.c (do_with_relocs): Use bfd_zalloc.
904 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
905 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
906 (NAME(aout,slurp_reloc_table)): Likewise.
907 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
908 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
909 * som.c (som_build_and_write_symbol_table): Likewise.
910 (som_slurp_string_table): Likewise.
911 (som_slurp_symbol_table): Likewise.
912 (som_bfd_ar_write_symbol_stuff): Likewise.
913 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
914 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
915 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
916 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
917 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
918
1126897b
AM
9192002-06-07 Alan Modra <amodra@bigpond.net.au>
920
921 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
922 "group" union.
923 (elf_group_name): Update.
924 (elf_group_id): Define.
925 (bfd_elf_set_group_contents): Declare.
926 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
927 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
928 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
929 that sym for the signature.
930 (_bfd_elf_compute_section_file_positions): Don't call
931 set_group_contents for "ld -r" case.
932 (swap_out_syms): Use bfd_zalloc.
933 * elflink.h (elf_link_add_archive_symbols): Likewise.
934 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
935 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
936
3fad3c7c
AM
9372002-06-07 Alan Modra <amodra@bigpond.net.au>
938
939 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
940 relocs in opd for non-shared too.
941
76f99c63
JL
9422002-06-06 Jeffrey Law <law@redhat.com
943
944 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
945 relocations.
946
7217313c
NC
9472002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
948
949 * merge.c: Include libiberty.h.
950 * elf-strtab.c: Include libiberty.h.
951
6cb22815
AM
9522002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
953
954 * peXXigen.c (pe_print_idata): Remove unused variable.
955
1ed89aa9
NC
9562002-06-06 David Heine <dlheine@tensilica.com>
957
958 * elf.c (assign_file_positions_for_segments): Remove unallocated
959 sections from the section to segment mapping for PT_LOAD segments.
960 Update comment about empty loadable segments.
961
644c4c80
RS
9622002-06-06 Richard Sandiford <rsandifo@redhat.com>
963
964 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
965 is within the .stabstr section.
966
f8ecb12b
AM
9672002-06-06 Alan Modra <amodra@bigpond.net.au>
968
969 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
970 are "const PTR", not "const PTR *".
971 (bfd_elf32_swap_symbol_in): Likewise.
972 (bfd_elf64_swap_symbol_in): Likewise.
973 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
974 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
975 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
976 (elf_link_add_object_symbols): Likewise.
977 (elf_link_record_local_dynamic_symbol): Likewise.
978 (elf_link_input_bfd): Likewise.
979 (elf_gc_mark): Likewise.
980 (elf_reloc_symbol_deleted_p): Likewise.
981 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
982 (mn10200_elf_relax_delete_bytes): Likewise.
983 (mn10200_elf_symbol_address_p): Likewise.
984 (mn10200_elf_get_relocated_section_contents): Likewise.
985 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
986 (mn10300_elf_relax_section): Likewise.
987 (mn10300_elf_relax_delete_bytes): Likewise.
988 (mn10300_elf_symbol_address_p): Likewise.
989 (mn10300_elf_get_relocated_section_contents): Likewise.
990 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
991 (elf32_h8_relax_delete_bytes): Likewise.
992 (elf32_h8_symbol_address_p): Likewise.
993 (elf32_h8_get_relocated_section_contents): Likewise.
994 * elf32-hppa.c (get_local_syms): Likewise.
995 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
996 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
997 * elf32-sh.c (sh_elf_relax_section): Likewise.
998 (sh_elf_relax_delete_bytes): Likewise.
999 (sh_elf_get_relocated_section_contents): Likewise.
1000 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1001 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1002 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1003 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1004 * elf64-ppc.c (get_local_syms): Likewise.
1005 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1006 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1007
1ed89aa9 10082002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
1009
1010 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
1011
73ff0d56
AM
10122002-06-05 Alan Modra <amodra@bigpond.net.au>
1013
9dce4196
AM
1014 * elf.c (group_signature): Swap in the whole symbol, and handle
1015 extracting section symbol names.
1016 (setup_group): Add comment.
1017 (set_group_contents): When called from objcopy or ld, arrange for
1018 section contents to be written. Write group member output section
1019 indices to allow objcopy to reorganize sections.
1020 (_bfd_elf_copy_private_section_data): Copy group info.
1021
73ff0d56
AM
1022 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
1023 (bfd_elf32_swap_symbol_in): Update prototype.
1024 (bfd_elf64_swap_symbol_in): Likewise.
1025 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
1026 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1027 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1028 (elf_link_add_object_symbols): Likewise.
1029 (elf_link_record_local_dynamic_symbol): Likewise.
1030 (elf_link_input_bfd): Likewise.
1031 (elf_gc_mark): Likewise.
1032 (elf_reloc_symbol_deleted_p): Likewise.
1033 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1034 (mn10200_elf_relax_delete_bytes): Likewise.
1035 (mn10200_elf_symbol_address_p): Likewise.
1036 (mn10200_elf_get_relocated_section_contents): Likewise.
1037 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1038 (mn10300_elf_relax_section): Likewise.
1039 (mn10300_elf_relax_delete_bytes): Likewise.
1040 (mn10300_elf_symbol_address_p): Likewise.
1041 (mn10300_elf_get_relocated_section_contents): Likewise.
1042 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1043 (elf32_h8_relax_delete_bytes): Likewise.
1044 (elf32_h8_symbol_address_p): Likewise.
1045 (elf32_h8_get_relocated_section_contents): Likewise.
1046 * elf32-hppa.c (get_local_syms): Likewise.
1047 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1048 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1049 * elf32-sh.c (sh_elf_relax_section): Likewise.
1050 (sh_elf_relax_delete_bytes): Likewise.
1051 (sh_elf_get_relocated_section_contents): Likewise.
1052 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1053 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1054 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1055 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1056 * elf64-ppc.c (get_local_syms): Likewise.
1057 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1058 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1059 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
1060 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1061 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1062 * elf64-mips.c (mips_elf64_size_info): Likewise.
1063 * elf64-s390.c (s390_elf64_size_info): Likewise.
1064 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1065
53bfd6b4
MR
10662002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1067
1068 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
1069 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
1070 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
1071 _bfd_mips_elf_ignore_discarded_relocs.
1072 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
1073
d4df96e6
L
10742002-06-05 H.J. Lu <hjl@gnu.org>
1075
1076 * elfxx-mips.c (mips_elf_calculate_relocation): Call
1077 _bfd_elf_rel_local_sym for STT_SECTION relocations against
1078 the SEC_MERGE section.
1079
e61463e1
AM
10802002-06-05 Alan Modra <amodra@bigpond.net.au>
1081
3cac74d0
AM
1082 * coff-alpha.c: Update copyright date.
1083 * coff-mips.c: Likewise.
1084 * xcoff-target.h: Likewise.
1085
e61463e1
AM
1086 * bfd-in.h: Remove "taken from the source" comment.
1087 * libbfd-in.h: Likewise.
1088 * libcoff-in.h: Likewise.
1089 * bfd-in2.h: Regenerate.
1090 * libbfd.h: Regenerate.
1091 * libcoff.h: Regenerate.
1092
1093 * elf.c (bfd_elf_discard_group): Return true.
1094 * elf-bfd.h (bfd_elf_discard_group): Declare.
1095 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
1096 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
1097 * bfd.c (bfd_discard_group): Define.
1098 * targets.c (struct bfd_target): Add _bfd_discard_group.
1099 (BFD_JUMP_TABLE_LINK): Here too.
1100 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
1101 * aout-adobe.c (aout_32_bfd_discard_group): Define.
1102 * aout-target.h (MY_bfd_discard_group): Define.
1103 * aout-tic30.c (MY_bfd_discard_group): Define.
1104 * binary.c (binary_bfd_discard_group): Define.
1105 * bout.c (b_out_bfd_discard_group): Define.
1106 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
1107 * coffcode.h (coff_bfd_discard_group): Define.
1108 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
1109 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
1110 * i386msdos.c (msdos_bfd_discard_group): Define.
1111 * i386os9k.c (os9k_bfd_discard_group): Define.
1112 * ieee.c (ieee_bfd_discard_group): Define.
1113 * ihex.c (ihex_bfd_discard_group): Define.
1114 * mmo.c (mmo_bfd_discard_group): Define.
1115 * nlm-target.h (nlm_bfd_discard_group): Define.
1116 * oasys.c (oasys_bfd_discard_group): Define.
1117 * ppcboot.c (ppcboot_bfd_discard_group): Define.
1118 * som.c (som_bfd_discard_group): Define.
1119 * srec.c (srec_bfd_discard_group): Define.
1120 * tekhex.c (tekhex_bfd_discard_group): Define.
1121 * versados.c (versados_bfd_discard_group): Define.
1122 * vms.c (vms_bfd_discard_group): Define.
1123 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
1124 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
1125 (aix5coff64_vec): Likewise.
1126 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
1127
9cba27b2
JT
11282002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1129
1130 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
1131 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
1132 (elf32-sh64-com.lo): New dependency list.
1133 * Makefile.in: Regenerate.
1134 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
1135 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
1136 elf32-sh64-com.lo.
1137 * configure: Regenerate.
1138 * elf32-sh64.c (sh64_address_in_cranges)
1139 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
1140 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
1141 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
1142 * elf32-sh64-com.c: ...here. New file.
1143
8d2c33be
AM
11442002-06-04 Alan Modra <amodra@bigpond.net.au>
1145
1146 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
1147 ATTRIBUTE_UNUSED on used params.
1148 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
1149 before calling bfd_section_from_elf_index on local syms.
1150 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1151
5b0e55b6
JT
11522002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1153
1154 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
1155 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
1156 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
1157 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
1158 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
1159 * Makefile.in: Regenerate.
1160 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1161 (sh64-*-netbsd*): New targets.
1162 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
1163 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
1164 * configure: Regenerate.
1165 * elf32-sh64-nbsd.c: New file.
1166 * elf64-sh64-nbsd.c: New file.
1167 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
1168 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
1169 bfd_elf64_sh64lnbsd_vec.
1170
b885599b
AM
11712002-06-04 Alan Modra <amodra@bigpond.net.au>
1172
1173 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
1174 (bfd_section_from_shdr): Likewise. Set section name of group
1175 sections from signature.
1176 (group_signature): Split out from setup_group. Ensure symbol table
1177 is available.
1178 (bfd_elf_discard_group): New function.
1179 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
1180 .gnu.linkonce* sections if they are members of a group.
1181 (set_group_contents): Set GRP_COMDAT flag.
1182 * section.c (bfd_discard_group): New function.
1183 * bfd-in.h (bfd_elf_discard_group): Declare.
1184 * bfd-in2.h: Regenerate.
1185 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
1186 (elf_linkonce_p): Define.
1187
90937f86
AM
11882002-06-04 Alan Modra <amodra@bigpond.net.au>
1189
1190 * elf.c (bfd_section_from_shdr): Make "name" const.
1191 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
1192 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
1193 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1194 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1195 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1196 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1197 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1198 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
1199 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1200 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1201 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1202
cf6fb9ce
MR
12032002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1204
1205 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
1206 ABI.
1207
cedb70c5
KH
12082002-06-02 Kazu Hirata <kazu@cs.umass.edu>
1209
1210 * elf32-arc.c: Fix formatting.
1211 * elf32-arm.h: Likewise.
1212 * elf32-cris.c: Likewise.
1213 * elf32-dlx.c: Likewise.
1214 * elf32-hppa.c: Likewise.
1215 * elf32-i386.c: Likewise.
1216 * elf32-i386qnx.c: Likewise.
1217 * elf32-or32.c: Likewise.
1218 * elf32-s390.c: Likewise.
1219 * elf32-sh64.c: Likewise.
1220 * elf32-vax.c: Likewise.
1221 * elf32-xstormy16.c: Likewise.
1222 * elf64-alpha.c: Likewise.
1223 * elf64-mmix.c: Likewise.
1224 * elf64-ppc.c: Likewise.
1225 * elf64-s390.c: Likewise.
1226 * elf64-sh64.c: Likewise.
1227 * elf64-x86-64.c: Likewise.
1228
048d873d
RH
12292002-06-02 Richard Henderson <rth@redhat.com>
1230
1231 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
1232 null when there are no got entries for a symbol.
1233 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
1234 uninitialized variable warning.
1235
4a67a098
RH
12362002-06-01 Richard Henderson <rth@redhat.com>
1237
1238 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
1239 undefined symbols here.
1240 (elf64_alpha_relax_section): Do it here. Also test for not
1241 defined in the current module.
1242 (elf64_alpha_relocate_section_r): Split out of ...
1243 (elf64_alpha_relocate_section): ... here. Don't dereference
1244 NULL when looking up local got entries.
1245
f44f99a5
RH
12462002-06-01 Richard Henderson <rth@redhat.com>
1247
1248 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
1249 symbols from JSR relaxation.
1250 (elf64_alpha_size_plt_section_1): New.
1251 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
1252 (elf64_alpha_size_rela_got_1): ... here.
1253 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
1254 (elf64_alpha_size_rela_got_section): ... here.
1255 (elf64_alpha_size_plt_section): New.
1256 (elf64_alpha_relax_section): Call them.
1257 (elf64_alpha_size_got_sections): Remove output_bfd arg.
1258 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
1259
9e756d64
RH
12602002-06-01 Richard Henderson <rth@redhat.com>
1261
1262 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
1263 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
1264 in shared libraries. Fix DTPRELHI and TPRELHI value.
1265 (INSN_ADDQ, INSN_RDUNIQ): New.
1266 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
1267 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
1268 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
1269 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
1270 Handle GOTDTPREL and GOTTPREL relocations.
1271 (elf64_alpha_relax_gprelhilo): New.
1272 (elf64_alpha_relax_tls_get_addr): New.
1273 (elf64_alpha_relax_find_tls_segment): New.
1274 (elf64_alpha_relax_section): Handle TLS relocations.
1275 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
1276 (elf64_alpha_check_relocs): Set it.
1277
c853d7f6
RH
12782002-06-01 Richard Henderson <rth@redhat.com>
1279
b646261c
RH
1280 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
1281
c853d7f6
RH
1282 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
1283 check; don't suppress dynamic relocs for non-allocated sections.
1284
d7e41a96
RH
1285 * elf64-alpha.c: Remove dead code.
1286
5f333394
AM
12872002-05-31 Alan Modra <amodra@bigpond.net.au>
1288
08e0ee05
AM
1289 * bfd-in2.h: Regenerate.
1290 * libbfd.h: Regenerate.
1291 * po/SRC-POTFILES.in: Regenerate.
1292
5f333394
AM
1293 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
1294 space for bss .plt.
1295
caf47ea6
AM
12962002-05-31 Graeme Peterson <gp@qnx.com>
1297
1298 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
1299 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
1300 Run "make dep-am".
1301 * Makefile.in: Regenerate.
1302 * config.bfd: Add i[3456]86-*-nto-qnx* support.
1303 * configure.in: Add bfd_elf32_i386qnx_vec support.
1304 * configure: Regenerate.
1305 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
1306 is_contained_by_filepos, and copy_private_bfd_data_p.
1307 * elf.c (assign_file_positions_for_segments): Call backend
1308 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
1309 (IS_CONTAINED_BY_FILEPOS): Define.
1310 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
1311 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
1312 Fix non-K&R call to _bfd_error_handler.
1313 (_bfd_elf_copy_private_section_data): Use backend
1314 copy_private_bfd_data_p.
1315 * elf32-i386.c: Don't include elfxx-target.h when
1316 ELF32_I386_C_INCLUDED is defined.
1317 * elf32-i386qnx.c: New QNX elf backend file.
1318 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
1319 elf_backend_is_contained_by_filepos, and
1320 elf_backend_do_copy_private_bfd_data.
1321 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
1322
5bc56484
AM
13232002-05-31 Alan Modra <amodra@bigpond.net.au>
1324
1325 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
1326 Move other similar defines to start of file.
1327
1b164155
TR
13282002-05-30 Tom Rix <trix@redhat.com>
1329
1330 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
1331 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
1332
3765b1be
RH
13332002-05-30 Richard Henderson <rth@redhat.com>
1334
1335 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
1336 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
1337 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
1338 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
1339 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
1340 (struct alpha_elf_obj_tdata): Rename total_got_entries and
1341 n_local_got_entries to total_got_size and local_got_size.
1342 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
1343 (alpha_got_entry_size): New.
1344 (elf64_alpha_relax_with_lituse): Use it.
1345 (elf64_alpha_relax_without_lituse): Likewise.
1346 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
1347 (get_got_entry): New.
1348 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
1349 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
1350 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
1351 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
1352 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
1353 (elf64_alpha_calc_got_offsets): Likewise.
1354 (alpha_dynamic_entries_for_reloc): New.
1355 (elf64_alpha_calc_dynrel_sizes): Use it.
1356 (elf64_alpha_size_dynamic_sections): Likewise.
1357 (elf64_alpha_relocate_section): Handle TLS relocations.
1358 * reloc.c: Add Alpha TLS relocations.
1359 * bfd-in2.h, libbfd.h: Rebuild.
1360
5e226794
NC
13612002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1362
1363 * peXXigen.c (pe_print_idata): Remove double printed
1364 import table lines; add Bound-To comment.
1365
90ace9e9
JT
13662002-05-29 Matt Thomas <matt@3am-software.com>
1367
1368 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
1369 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
1370 (elf32-vax.lo): New rule.
1371 * Makefile.in: Regenerate.
1372 * configure.in (bfd_elf32_vax_vec)
1373 (vaxnetbsd_vec): New vectors.
1374 * configure: Regenerate.
1375 * config.bfd (vax-*-netbsdelf*)
1376 (vax-*-netbsdaout*)
1377 (vax-*-netbsd*): New targets.
1378 * elf32-vax.c: New file.
1379 * reloc.c: Add VAX relocations.
1380 * bfd-in2.h: Regenerate.
1381 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
1382
4a253e81
JT
13832002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
1384
1385 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
1386 and bfd_elf32_bigarm_vec to targ_selvecs.
1387
6e7c73dd
CF
13882002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1389
1390 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1391 with auto-imported symbols.
1392
8afb0e02
NC
13932002-05-29 Adam Nemet <anemet@lnxw.com>
1394
1395 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1396 sections only record bfd.
9bab7074 1397 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 1398 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 1399 * bfd-in2.h: Regenerate.
8afb0e02 1400
a95653f5
NC
14012002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
1402
1403 * syms.c (_bfd_stab_section_find_nearest_line): Move
1404 declaration and initialisation of saw_line and saw_func out of
1405 for loop.
1406
7cdc5bba
AM
14072002-05-29 Alan Modra <amodra@bigpond.net.au>
1408
1409 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
1410 (bfd_elf64_get_symbol_info): Define.
1411 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
1412
4c7aad1c
AM
14132002-05-29 Andrey Volkov <avolkov@transas.com>
1414
1415 * cpu-h8300.c: Make default h8300 machine first in machine list.
1416
d172d4ba
NC
14172002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
1418
1419 * config.bfd: Added DLX configuraton.
1420 * Makefile.am: Added DLX configuraton.
1421 * configure.in: Added DLX configuraton.
1422 * archures.c: Add DLX architecure.
1423 * reloc.c: Add DLX relocs.
1424 * targets.c: Added DLX target vector.
1425 * configure: Regenerate.
1426 * Makefile.in: Regenreate.
1427 * bfd-in2.h: Regenreate.
1428 * elf32-dlx.c: New file: Support DLX target.
1429 * cpu-dlx.c: New file: Support DLX target.
1430
d1329ca3
AM
14312002-05-25 Alan Modra <amodra@bigpond.net.au>
1432
428d0de3
AM
1433 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
1434
d1329ca3
AM
1435 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
1436 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
1437 strings to point inside function code sym string.
1438 (func_desc_adjust): Likewise.
1439 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
1440
3bab7989
ML
14412002-05-24 Michal Ludvig <mludvig@suse.cz>
1442
1443 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
1444 (elf64_x86_64_grok_psinfo): Added.
1445
436e8db0
NC
14462002-05-24 TAMURA Kent <kent@netbsd.org>
1447
1448 * config.bfd: Add a target for i386-netbsdpe.
1449
ea1e4b0d
AM
14502002-05-24 Alan Modra <amodra@bigpond.net.au>
1451
1452 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
1453 and is_func_descriptor.
1454 (func_desc_adjust): Hide function code sym in shared libs unless
1455 there is a matching exported function descriptor sym.
1456
13ae64f3
JJ
14572002-05-23 Jakub Jelinek <jakub@redhat.com>
1458
1459 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
1460 for symbols from SHF_TLS section.
1461 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
1462 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
1463 (map_sections_to_segments): Build PT_TLS segment if necessary.
1464 (assign_file_positions_for_segments): Likewise.
1465 (get_program_header_size): Account for PT_TLS segment.
1466 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
1467 SEC_THREAD_LOCAL sections to STT_TLS.
1468 * reloc.c: Add 386 and IA-64 TLS relocs.
1469 * section.c (SEC_THREAD_LOCAL): Define.
1470 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
1471 Remove.
1472 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
1473 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
1474 unconditionally.
1475 (struct elf_final_link_info): Add first_tls_sec.
1476 (elf_bfd_final_link): Set first_tls_sec.
1477 Compute elf_hash_table (info)->tls_segment.
1478 (elf_link_output_extsym): Handle STT_TLS symbols.
1479 (elf_link_input_bfd): Likewise.
1480 * syms.c (BSF_THREAD_LOCAL): Define.
1481 * bfd-in2.h: Rebuilt.
1482 * libbfd.h: Rebuilt.
1483 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
1484 elf_i386_mkobject, elf_i386_object_p): New functions.
1485 (elf_howto_table): Add TLS relocs.
1486 (elf_i386_reloc_type_lookup): Support TLS relocs.
1487 (elf_i386_info_to_howto_rel): Likewise.
1488 (struct elf_i386_link_hash_entry): Add tls_type.
1489 (struct elf_i386_obj_tdata): New.
1490 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
1491 New macros.
1492 (struct elf_i386_link_hash_table): Add tls_ldm_got.
1493 (link_hash_newfunc): Clear tls_type.
1494 (elf_i386_check_relocs): Support TLS relocs.
1495 (elf_i386_gc_sweep_hook): Likewise.
1496 (allocate_dynrelocs): Likewise.
1497 (elf_i386_size_dynamic_sections): Likewise.
1498 (elf_i386_relocate_section): Likewise.
1499 (elf_i386_finish_dynamic_symbol): Likewise.
1500 (bfd_elf32_mkobject, elf_backend_object_p): Define.
1501 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
1502 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
1503 want_tprel, want_dtpmod, want_dtprel.
1504 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
1505 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
1506 R_IA64_LTOFF_TPREL22.
1507 (elf_code_to_howto_index): Add TLS relocs.
1508 (elfNN_ia64_check_relocs): Support TLS relocs.
1509 (allocate_global_data_got): Account for TLS .got data.
1510 (allocate_dynrel_entries): Account for TLS dynamic relocations.
1511 (elfNN_ia64_install_value): Supprt TLS relocs.
1512 (set_got_entry): Support TLS relocs.
1513 (elfNN_ia64_relocate_section): Likewise.
1514
c62e1cc3
NC
15152002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
1516
1517 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
1518 BLX reloc round the relocation up rather than down.
1519 * coff-arm.c (coff_arm_relocate_section): Likewise.
1520
c5a43a5d
L
15212002-05-21 H.J. Lu (hjl@gnu.org)
1522
1523 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
1524 definition.
1525
afbe61cf
AM
15262002-05-22 Alan Modra <amodra@bigpond.net.au>
1527
1528 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
1529 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
1530
9c07fe7c
AM
15312002-05-22 Alan Modra <amodra@bigpond.net.au>
1532
1533 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
1534 unresolved relocs.
1535 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
1536
21611032
TS
15372002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1538
1539 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
1540 non-ELF targets.
1541
41241523
TS
15422002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1543
1544 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
1545 an error value.
1546 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1547 return with false on error.
1548 (elf_link_input_bfd): Check reloc_emitter return value.
1549
658f2588
JT
15502002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
1551
1552 * config.bfd (armeb-*-netbsdelf*): New target.
1553
c862ae31
AM
15542002-05-20 Alan Modra <amodra@bigpond.net.au>
1555
1556 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1557 at the plt call stub.
1558
6dd14845
TS
15592002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1560
1561 * cpu-mips.c (mips_compatible): Don't try to check machine
1562 compatibility.
1563
a58d9c34
TR
15642002-05-18 Tom Rix <trix@redhat.com>
1565
1566 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
1567
ef60b7ff
AM
15682002-05-17 Alan Modra <amodra@bigpond.net.au>
1569
1570 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1571 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1572 we've already warned about an undefined symbol. Report more
1573 detail on reloc errors.
1574
a703a6ea
AM
15752002-05-17 Alan Modra <amodra@bigpond.net.au>
1576
1577 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1578 * configure.in: Invoke AM_INSTALL_LIBBFD.
1579 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
1580 (install_libbfd): .. New target.
1581 (uninstall_libbfd): Likewise.
1582 (install-bfdlibLTLIBRARIES): Likewise.
1583 (uninstall-bfdlibLTLIBRARIES): Likewise.
1584 (bfdlibdir): New.
1585 (bfdincludedir): New.
1586 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1587 * aclocal.m4: Regenerate.
1588 * configure: Regenerate.
1589 * Makefile.in: Regenerate.
1590
2c13d98b
NC
15912002-05-17 Stuart Balfour <sbalfour@cisco.com>
1592
1593 * hash.c (bfd_hash_lookup): Remove computation of len from inside
1594 hash loop.
1595
629936c5
NC
15962002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
1597
1598 * config.bfd: Add targets for sh64-linux (little endian and
1599 big endian).
1600
e4cf60a8
NC
16012002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
1602
1603 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1604 is located in the same section as the import table. Instead
1605 check, and if necessary load the section containing the thunk.
1606
d1e66cd4
NC
16072002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
1608
1609 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
1610 bfd_bread.
1611 (xcoff64_core_file_matches_executable_p): Replace bfd_read
1612 with bfd_bread.
d1e66cd4 1613
2d653fc7
AM
16142002-05-15 Alan Modra <amodra@bigpond.net.au>
1615
1616 * aix5ppc-core.c: Warning fixes.
1617 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1618 * aout-target.h (MY_bfd_link_just_syms): Define.
1619 * aout-tic30.c (MY_bfd_link_just_syms): Define.
1620 * bfd.c (bfd_link_just_syms): Define.
1621 * binary.c (binary_bfd_link_just_syms): Define.
1622 * bout.c (b_out_bfd_link_just_syms): Define.
1623 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1624 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1625 * coffcode.h (coff_bfd_link_just_syms): Define.
1626 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1627 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1628 (_bfd_elf_link_just_syms): Declare.
1629 * elf.c (_bfd_elf_link_just_syms): New function.
1630 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1631 sections haven't already been discarded by the linker.
1632 * elflink.h (elf_link_add_object_symbols): Likewise for stab
1633 sections and SEC_MERGE sections.
1634 (elf_bfd_discard_info): Similarly here.
1635 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1636 * i386msdos.c (msdos_bfd_link_just_syms): Define.
1637 * i386os9k.c (os9k_bfd_link_just_syms): Define.
1638 * ieee.c (ieee_bfd_link_just_syms): Define.
1639 * ihex.c (ihex_bfd_link_just_syms): Define.
1640 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1641 (_bfd_generic_link_just_syms): Declare.
1642 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1643 * linker.c (_bfd_generic_link_just_syms): New function.
1644 * mmo.c (mmo_bfd_link_just_syms): Define.
1645 * nlm-target.h (nlm_bfd_link_just_syms): Define.
1646 * oasys.c (oasys_bfd_link_just_syms): Define.
1647 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1648 * som.c (som_bfd_link_just_syms): Define.
1649 * srec.c (srec_bfd_link_just_syms): Define.
1650 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1651 (BFD_JUMP_TABLE_LINK): And here.
1652 * tekhex.c (tekhex_bfd_link_just_syms): Define.
1653 * versados.c (versados_bfd_link_just_syms): Define.
1654 * vms.c (vms_bfd_link_just_syms): Define.
1655 * libbfd.h: Regenerate.
1656 * bfd-in2.h: Regenerate.
1657
cb7394f2
TS
16582002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1659
1660 * elf32-mips.c: Remove superfluous definitions copied from
1661 elfxx-mips.c.
1662 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1663 SGIish vectors to check the special case.
1664 (mips_elf_hi16_reloc): Fix comment.
1665 (mips_elf_got16_reloc): Likewise.
1666 (_bfd_mips_elf32_gprel16_reloc): Likewise.
1667 (elf_reloc_map): Code cleanup.
1668 (mips_reloc_map): Add comment.
1669 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1670 (mips_elf32_rtype_to_howto): Likewise.
1671 (mips_elf32_discard_info): Likewise.
1672 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1673 lead to IRIX compatibility now.
1674
8dc1a139
TS
16752002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1676
1677 * elfxx-mips.c: Call it IRIX, not Irix in comments.
1678
2051e1b5
JT
16792002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
1680
1681 * config.bfd (shle-*-netbsdelf*): Add target which includes
1682 sh64 support.
1683
83954261
AM
16842002-05-13 David Edelsohn <edelsohn@gnu.org>
1685
1686 * configure.in: Revert 2002-04-07. Instead, auto-configure
1687 HAVE_ST_C_IMPL.
1688 * configure: Regenerate.
1689 * config.in: Regenerate.
1690 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1691 or AIX_5_CORE.
1692
a9bf1154
NC
16932002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1694
1695 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1696 corefiles as well.2
1697 * configure: Regenerate.
1698
3129eb7a
AM
16992002-05-13 Alan Modra <amodra@bigpond.net.au>
1700
1701 * Makefile.am (install-data-local): Install headers to
1702 $(exec_prefix)/include.
1703 * Makefile.in: Regenerate.
1704
a9a32010
DJ
17052002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1706 Daniel Jacobowitz <drow@mvista.com>
1707
1708 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
1709 map BFD_RELOC_RVA.
1710
17112002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
1712
1713 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1714 hppa*-*-openbsd*): New targets.
1715 * configure.in (alpha*-*-openbsd*): Set COREFILE.
1716 * configure: Regenerate.
1717
f1f0d9ab
TR
17182002-05-10 Tom Rix <trix@redhat.com>
1719
ea1e4b0d 1720 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
1721 xcoff64_ppc_relocate_section.
1722 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
1723 * libxcoff.h: Common xcoff_reloc_type function declaration.
1724
c432ba1a
AM
17252002-05-10 Alan Modra <amodra@bigpond.net.au>
1726
16a10388 1727 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 1728 added in 2002-05-09 commit.
16a10388 1729
c432ba1a
AM
1730 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
1731 don't look for stubs on all undefined syms.
1732
4a335f3d
AM
17332002-05-09 Alan Modra <amodra@bigpond.net.au>
1734
8fc39d5d
AM
1735 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
1736 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
1737 pcrel_offset.
1738
4a335f3d
AM
1739 * elf32-i386.c (elf_howto_table): Comments.
1740 (elf_i386_relocate_section): Handle more relocs for relocatable
1741 linking and against SEC_MERGE sections.
1742
41fcb14e
AM
17432002-05-08 Alan Modra <amodra@bigpond.net.au>
1744
1745 * elf32-ppc.c (ppc_elf_create_got): New function.
1746 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 1747 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
1748 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
1749 _bfd_elf_create_got_section.
1750
b491616a
AM
17512002-05-07 Alan Modra <amodra@bigpond.net.au>
1752
1753 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
1754 * elfxx-target.h (elf_backend_rela_normal): Define.
1755 (elfNN_bed): Init rela_normal.
1756 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
1757 for section symbols here if rela_normal. Simplify abs section test.
1758 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
1759 return immediately. Remove code handling relocatable linking.
1760 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1761 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1762 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1763 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1764 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1765 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1766 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1767 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1768 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1769 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1770 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1771 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1772 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1773 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1774 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
1775 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1776 * elf-m10200.c (elf_backend_rela_normal): Define.
1777 * elf-m10300.c (elf_backend_rela_normal): Define.
1778 * elf32-fr30.c (elf_backend_rela_normal): Define.
1779 * elf32-i370.c (elf_backend_rela_normal): Define.
1780 * elf32-i860.c (elf_backend_rela_normal): Define.
1781 * elf32-m68k.c (elf_backend_rela_normal): Define.
1782 * elf32-mcore.c (elf_backend_rela_normal): Define.
1783 * elf32-openrisc.c (elf_backend_rela_normal): Define.
1784 * elf32-ppc.c (elf_backend_rela_normal): Define.
1785 * elf32-s390.c (elf_backend_rela_normal): Define.
1786 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
1787 * elf64-ppc.c (elf_backend_rela_normal): Define.
1788 * elf64-s390.c (elf_backend_rela_normal): Define.
1789 * elf64-x86-64.c (elf_backend_rela_normal): Define.
1790 * elfxx-ia64.c (elf_backend_rela_normal): Define.
1791 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
1792 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
1793
df212a7e
NC
17942002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
1795
1796 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
1797 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
1798
3decf53c
AM
17992002-05-06 Alan Modra <amodra@bigpond.net.au>
1800
1801 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
1802 when not relocatable. Fix reloc_emitter call for K&R.
1803
f46c2da6
AM
18042002-05-04 Alan Modra <amodra@bigpond.net.au>
1805
1806 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
1807 reloading local sym addend mistakenly removed in 2002-05-01 change.
1808
1809 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
1810 (read_abbrevs): Change "offset" param to bfd_vma.
1811 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
1812 Change "abbrev_offset" to bfd_vma.
1813 (read_indirect_string): Use correct conversion chars in error
1814 message format string, cast bfd_vma's to unsigned long.
1815 (read_abbrevs): Likewise.
1816 (read_attribute_value): Likewise.
1817 (decode_line_info): Likewise.
1818 (scan_unit_for_functions): Likewise.
1819 (parse_comp_unit): Likewise.
1820
59862849
TR
18212002-05-04 Tom Rix <trix@redhat.com>
1822
1823 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
1824 (coff_swap_reloc_out): Same.
1825 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
1826 (xcoff_swap_reloc_out): Same.
1827 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
1828 case some 16 bit relocs. Add reloc value to output.
1829 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 1830 R_RBR. Improve names.
59862849
TR
1831 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
1832 (bfd_xcoff_backend_data): Update with new reloc swap names.
1833 (bfd_pmac_xcoff_backend_data) : Same.
1834 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
1835 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 1836 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 1837 R_POS. Add reloc value to output.
ea1e4b0d
AM
1838 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
1839 bit R_RBR. Improve names, masks.
59862849
TR
1840 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
1841 (bfd_xcoff_backend_data): Update with new reloc swap names.
1842 (bfd_xcoff_aix5_backend_data) : Same.
1843
b4655ea9
AM
18442002-05-04 Alan Modra <amodra@bigpond.net.au>
1845
1846 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
1847 bfd_count top_index, input_list, all_local_syms.
1848 (elf32_hppa_setup_section_lists): New function, split from
1849 elf32_hppa_size_stubs.
1850 (elf32_hppa_next_input_section): Likewise.
1851 (group_sections): Likewise.
1852 (get_local_syms): Likewise.
1853 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
1854 stubs on undefined syms too.
1855 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 1856 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
1857 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
1858 (elf32_hppa_next_input_section): Declare.
1859
301e3139
AM
18602002-05-04 Bob Byrnes <byrnes@curl.com>
1861
1862 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
1863 _bfd_new_bfd.
1864
7c5fcef7
L
18652002-05-03 H.J. Lu (hjl@gnu.org)
1866
1867 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
1868 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
1869 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
1870 to hide a global symbol.
1871 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 1872 forced_local to true.
7c5fcef7 1873
84de6048
RH
18742002-05-02 Richard Henderson <rth@redhat.com>
1875
1876 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
1877 vs SHN_UNDEF to zero.
1878
805fc799
AM
18792002-05-02 Alan Modra <amodra@bigpond.net.au>
1880
c061c2d8
AM
1881 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
1882 16 bit reloc.
1883 <R_PPC64_SECTOFF_DS>: Likewise.
1884 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1885 SECTOFF reloc.
1886 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
1887 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1888 SECTOFF reloc.
1889
805fc799
AM
1890 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
1891 (ppc64_elf_ha_reloc): New function.
1892 (ppc64_elf_brtaken_reloc): New function.
1893 (ppc64_elf_sectoff_reloc): New function.
1894 (ppc64_elf_sectoff_ha_reloc): New function.
1895 (ppc64_elf_toc_reloc): New function.
1896 (ppc64_elf_toc_ha_reloc): New function.
1897 (ppc64_elf_toc64_reloc): New function.
1898 (ppc64_elf_unhandled_reloc): New function.
1899 (ppc64_elf_howto_raw): Use the above.
1900 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
1901 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
1902 <R_PPC64_SECTOFF_DS>: Likewise.
1903 (IS_ABSOLUTE_RELOC): Update.
1904 (struct ppc_link_hash_table): Add have_undefweak.
1905 (ppc64_elf_link_hash_table_create): Init.
1906 (func_desc_adjust): Set have_undefweak.
1907 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
1908 add the .sfpr blr when have_undefweak.
1909 (ppc64_elf_setup_section_lists): Check hash table flavour.
1910 (ppc64_elf_next_input_section): Move output_section->owner test to
1911 ppc64elf.em.
1912 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
1913 and relocatable test. Return TOCstart and don't set elf_gp.
1914 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
1915 offset calculation. Add assert on weak sym branch tweaks.
1916 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
1917 (ppc64_elf_toc): Declare.
1918 (ppc64_elf_next_input_section): Update.
ea1e4b0d 1919
818c39a3
AM
19202002-05-01 Alan Modra <amodra@bigpond.net.au>
1921
1922 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1923 file_name.
1924
721956f4
AM
19252002-05-01 Alan Modra <amodra@bigpond.net.au>
1926
1927 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1928 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
1929 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
1930 call branches. Correct undefined weak destination.
1931 (ppc64_elf_func_desc_adjust): Always create at least one blr in
1932 .sfpr, and correct case where either only savef* or restf* is
1933 needed.
1934
1935 Long branch stubs, multiple stub sections.
1936 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1937 (ppc64_elf_next_input_section): Declare.
1938 * elf64-ppc.c: Move linker-only prototypes.
1939 (STUB_SUFFIX): Define.
1940 (enum ppc_stub_type): New.
1941 (struct ppc_stub_hash_entry): New.
1942 (struct ppc_branch_hash_entry): New.
1943 (struct ppc_link_hash_entry): Add stub_cache, oh.
1944 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
1945 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1946 Rename plt_overflow to stub_error.
1947 (ppc_stub_hash_lookup): Define.
1948 (ppc_branch_hash_lookup): Define.
1949 (stub_hash_newfunc): New function.
1950 (branch_hash_newfunc): New function.
1951 (link_hash_newfunc): Init new fields.
1952 (ppc64_elf_link_hash_table_create): Likewise.
1953 (ppc64_elf_link_hash_table_free): New function.
1954 (ppc_stub_name): New function.
1955 (ppc_get_stub_entry): New function.
1956 (ppc_add_stub): New function.
1957 (create_linkage_sections): Use bfd_make_section_anyway. Create
1958 .branch_lt and .rela.branch_lt sections. Don't create .stub.
1959 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1960 and set up for plt call stubs. Link func and func desc syms.
1961 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1962 (func_desc_adjust): Avoid hash lookup when func desc sym available
1963 via shortcut, and set links when processing.
1964 (ppc64_elf_hide_symbol): Likewise.
1965 (allocate_dynrelocs): Don't allocate stub section here.
1966 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1967 Remove sstub code.
1968 (ppc_type_of_stub): New function.
1969 (build_one_stub): Delete.
1970 (ppc_build_one_stub): New function.
1971 (ppc_size_one_stub): New function.
1972 (ppc64_elf_setup_section_lists): New function.
1973 (ppc64_elf_next_input_section): New function.
1974 (group_sections): New function.
1975 (get_local_syms): New function.
1976 (ppc64_elf_size_stubs): Rewrite.
1977 (ppc64_elf_build_stubs): Rewrite.
1978 (ppc64_elf_relocate_section): Look up stub entry for REL24
1979 relocs. Don't propagate REL14* to dynamic objects. Look for long
1980 branch stubs if REL14* or REL24 relocs won't reach.
1981 (bfd_elf64_bfd_link_hash_table_free): Define.
1982
09c2219b
MM
19832002-04-30 Mark Mitchell <mark@codesourcery.com>
1984
1985 * bfd/config.bfd: Add support for powerpc-*-windiss.
1986
07b678c0
TR
19872002-04-30 Tom Rix <trix@redhat.com>
1988
1989 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1990 symbol names into the hash table.
1991
dbe341c6
TR
19922002-04-28 Tom Rix <trix@redhat.com>
1993
1994 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 1995 calulating relocations.
dbe341c6 1996 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
1997 (xcoff_ppc_relocate_section): Use relocation and complain function
1998 tables.
1999 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
2000 (xcoff_complain_overflow_signed_func): Same.
2001 (xcoff_complain_overflow_bitfield_func): Same.
2002 (xcoff_complain_overflow_dont_func): Same.
2003 (xcoff_reloc_type_crel): New recot function.
2004 (xcoff_reloc_type_br): Same.
2005 (xcoff_reloc_type_ba): Same.
2006 (xcoff_reloc_type_toc): Same.
2007 (xcoff_reloc_type_rel): Same.
2008 (xcoff_reloc_type_neg): Same.
2009 (xcoff_reloc_type_pos): Same.
2010 (xcoff_reloc_type_fail): Same.
2011 (xcoff_reloc_type_noop): Same.
2012 * libxcoff.h : Declare common parts for xcoff64.
2013 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 2014 and complain function tables.
dbe341c6 2015
985142a4
AM
20162002-04-28 Alan Modra <amodra@bigpond.net.au>
2017
2018 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
2019 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
2020
eba91044
AM
20212002-04-26 Alan Modra <amodra@bigpond.net.au>
2022
e54fdaa5
AM
2023 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
2024 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2025
a50c1845
AM
2026 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
2027 same as the output before calling elf_link_input_bfd.
2028
eba91044
AM
2029 * coffcode.h (coff_compute_section_file_positions): Set
2030 section_tail after shuffling section list.
2031
3c25c5f6
NC
20322002-04-24 Christian Groessler <chris@groessler.org>
2033
2034 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
2035 addresses are 23bit with a special layout, not plain 32bit
2036 values. Prevent relocation of immediate values.
2037
40d32fc6
CD
20382002-04-24 Chris G. Demetriou <cgd@broadcom.com>
2039
2040 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
2041 MIPS-16 ASE flags are set, print something to indicate that.
2042
067fa4a6
AM
20432002-04-23 Alan Modra <amodra@bigpond.net.au>
2044
2045 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
2046 under which a plt call stub is used.
2047 (final_link_relocate): Similarly.
2048 (allocate_plt_static): Clear h-plabel except when plt entry is
2049 exclusively used for a plabel.
2050 (allocate_dynrelocs): Use the above to simplify plt sizing.
2051 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
2052 (elf32_hppa_link_hash_table_create): Init.
2053 (BL22_RP): Define.
2054 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
2055 (elf32_hppa_check_relocs): Set has_22bit_branch.
2056
2057 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
2058 (final_link_relocate): Likewise.
2059
af40ce3c
JJ
20602002-04-22 Jakub Jelinek <jakub@redhat.com>
2061
2062 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
2063 search table if some FDE is DW_EH_PE_aligned encoded either.
2064 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
2065
09ae86c2
JJ
20662002-04-22 Richard Smith <richard@ex-parrot.com>
2067 Jakub Jelinek <jakub@redhat.com>
2068
2069 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
2070 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
2071 encoded personality.
2072 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
2073 for CIE/FDE removal.
2074
deeb2cd7
TR
20752002-04-20 Tom Rix <trix@redhat.com>
2076
2077 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
2078
99dc0092
AM
20792002-04-20 Alan Modra <amodra@bigpond.net.au>
2080
aa3d5824
AM
2081 * archures.c (bfd_lookup_arch): Move the list order comment..
2082 (struct bfd_arch_info): ..to where it belongs.
2083 * bfd-in2.h: Regenerate.
2084
99dc0092
AM
2085 * archures.c (bfd_lookup_arch): Add comment on list order.
2086 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
2087 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
2088 is always at head of list.
2089
7831a775
NC
20902002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2091
2092 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
2093 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
2094 definition of these functions for ARM_WINCE builds as they are
2095 not used.
ea1e4b0d 2096 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
2097 for ARM_WINCE builds.
2098
20992002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2100
ea1e4b0d 2101 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
2102
21032002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
2104
2105 * cpu-sh.c (scan_mach): Delete.
2106 (arch_info_struct): Replace scan_mach with bfd_default_scan.
2107 (bfd_sh_arch): Likewise.
2108
3d8dbe36
NC
21092002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
2110
2111 * ihex.c (ihex_write_object_contents): Fix check for records
2112 crossing 64K boundaries.
2113
4ab82700
AM
21142002-04-16 Alan Modra <amodra@bigpond.net.au>
2115
2116 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
2117 type rather than just assuming entries are ELF.
2118 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2119 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2120 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
2121 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
2122 rather than elf_link_hash_entry.
2123
036fe0fe
RH
21242002-04-15 Richard Henderson <rth@redhat.com>
2125
2126 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
2127 n32 binaries.
2128
c4f3d130
NC
21292002-04-15 Michael Snyder <msnyder@redhat.com>
2130
2131 * opncls.c (bfd_close): Write contents if writeable.
2132 Minor formatting tidy-ups.
2133
4ab82700 21342002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
2135
2136 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2137
0c04d169
MS
21382002-04-12 Michael Snyder <msnyder@redhat.com>
2139
2140 * bfd-in.h (bfd_get_section_lma): New access macro.
2141 Minor white-space fix-up.
2142
89d4966f
AM
21432002-04-12 Alan Modra <amodra@bigpond.net.au>
2144
2145 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
2146 header pad.
2147
8d0da3c2
DD
21482002-04-09 DJ Delorie <dj@redhat.com>
2149
2150 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
2151
05793179
NC
21522002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
2153
2154 * coffcode.h (coff_read_word): New.
2155 (coff_compute_checksum): New.
2156 (coff_apply_checksum): New.
2157 (coff_write_object_contents): Call coff_apply_checksum () to
2158 apply checksum to PE image.
2159
46fe4e66
AM
21602002-04-08 Randolph Chung <tausq@debian.org>
2161
2162 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
2163 (elf32_hppa_final_link): Split out sorting logic to..
2164 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
2165 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
2166
3b5b409c
AC
21672002-04-07 Andrew Cagney <ac131313@redhat.com>
2168
2169 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
2170 pattern.
2171 * configure: Re-generate.
2172
ac7b6ceb
AC
21732002-04-07 Andrew Cagney <ac131313@redhat.com>
2174
2175 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
2176 is greater or equal to 4.3.3.
2177 * configure: Regenerate.
2178 Fix PR gdb/344.
2179
44aa49bb
HPN
21802002-04-05 Hans-Peter Nilsson <hp@axis.com>
2181
2182 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
2183 R_CRIS_32_PCREL>: Fix typo in name.
2184 (cris_elf_check_relocs): Always create .rela.got here when
2185 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
2186 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
2187 assume it's created.
2188
e2d34d7d
DJ
21892002-04-04 Daniel Jacobowitz <drow@mvista.com>
2190
2191 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
2192 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
2193 define.
2194 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
2195 * bfd.c (bfd_link_hash_table_free): Define.
2196 * binary.c (binary_bfd_link_hash_table_free): Define.
2197 * bout.c (b_out_bfd_link_hash_table_free): Define.
2198 * coff-rs6000.c (rs6000coff_vec): Include
2199 _bfd_generic_link_hash_table_free.
2200 (pmac_xcoff_vec): Likewise.
2201 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2202 (aix5coff64_vec): Likewise.
2203 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
2204 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
2205 (bfd_elf32_bfd_link_hash_table_free): Define.
2206 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
2207 (bfd_elf32_bfd_link_hash_table_free): Define.
2208 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
2209 define.
2210 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
2211 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
2212 * ieee.c (ieee_bfd_link_hash_table_free): Define.
2213 * ihex.c (ihex_bfd_link_hash_table_free): Define.
2214 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
2215 (_bfd_generic_link_hash_table_free): Add prototype.
2216 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
2217 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
2218 * linker.c (_bfd_generic_link_hash_table_free): New function.
2219 * mmo.c (mmo_bfd_link_hash_table_free): Define.
2220 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
2221 * oasys.c (oasys_bfd_link_hash_table_free): Define.
2222 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
2223 * som.c (som_bfd_link_hash_table_free): Define.
2224 * srec.c (srec_bfd_link_hash_table_free): Define.
2225 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
2226 * versados.c (versados_bfd_link_hash_table_free): Define.
2227 * vms.c (vms_bfd_link_hash_table_free): New function.
2228 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
2229
2230 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
2231 instead of bfd_alloc.
2232 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2233 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
2234 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
2235 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
2236 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2237 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2238 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
2239 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
2240 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2241 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2242 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2243 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2244 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2245 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
2246 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
2247 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2248 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2249 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2250 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
2251 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
2252 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2253 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
2254 * m68klinux.c (linux_link_hash_table_create): Likewise.
2255 * sparclinux.c (linux_link_hash_table_create): Likewise.
2256 * sunos.c (sunos_link_hash_table_create): Likewise.
2257 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2258
2259 * targets.c: Add _bfd_link_hash_table_free to xvec.
2260
2261 * bfd-in2.h: Regenerate.
2262 * libbfd.h: Regenerate.
2263 * libcoff.h: Regenerate.
2264
830629ab
AM
22652002-04-04 Alan Modra <amodra@bigpond.net.au>
2266
2267 * dep-in.sed: Cope with absolute paths.
2268 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
2269 Run "make dep-am".
2270 * Makefile.in: Regenerate.
2271 * coff-arm.c: Fix copyright date.
2272 * cpu-h8300.c: Likewise.
2273 * cpu-i370.c: Likewise.
2274 * cpu-s390.c: Likewise.
2275 * cpu-mips.c: Likewise.
2276 * po/SRC-POTFILES.in: Regenerate.
2277
c6e90b02
TS
22782002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2279
2280 * Makefile.am: Add elfxx-mips.c to the known backends.
2281 (elf32-mips.lo): remove dependency to coff/external.h.
2282 * Makefile.in: Regenerate.
2283 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
2284 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
2285 accordingly.
2286 * configure: Regenerate.
2287 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
2288 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
2289 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
2290 MIPS specific backend functions.
2291 * elf32-mips.c: Moved most code to elfxx-mips.c.
2292 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
2293 static.
2294 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
2295 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
2296 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
2297 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
2298 interface to allow selection of the right REL or RELA howto table.
2299 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
2300 static. Let it refuse n32 objects.
2301 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
2302 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
2303 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
2304 (elf32_mips_ignore_discarded_relocs): Rename from
2305 _bfd_elf32_mips_ignore_discarded_relocs.
2306 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
2307 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
2308 (elf_mips_howto_table_rela): Remove.
2309 * elf64-mips.c: Moved most code to elfxx-mips.c.
2310 (bfd_elf64_bfd_reloc_type_lookup): Make static.
2311 (mips_elf64_rtype_to_howto): New function.
2312 (mips_elf64_object_p): Likewise.
2313 (elf64_mips_irix_compat): Likewise.
2314 * elfxx-mips.c: New file containing common code merged together from
2315 elf32-mips.c and elf64-mips.c.
2316 * elfxx-mips.h: New file containing MIPS specific prototypes from
2317 elf-bfd.h.
2318 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
2319 elf_backend_mips_rtype_to_howto.
2320
d8dce692
AM
23212002-04-04 Alan Modra <amodra@bigpond.net.au>
2322
2323 * srec.c (MAXCHUNK, Chunk): Revise comments.
2324 (srec_write_record): Correct buffer size.
2325 (srec_write_header): Do without intermediate buffer.
2326 (srec_write_section): Validate Chunk.
2327 (srec_write_terminator): Pass NULL instead of dummy buffer.
2328 (srec_write_symbols): Pass file and symbol names directly to
2329 bfd_bwrite so sprintf won't overflow buffer.
2330
b88a866a
JJ
23312002-04-03 Jakub Jelinek <jakub@redhat.com>
2332
2333 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
2334 PC relative relocs against hidden symbols.
2335 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2336
d7866f04
AM
23372002-04-03 Alan Modra <amodra@bigpond.net.au>
2338
2339 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
2340 LMAs, loop over segments until p_vaddr and p_memsz specify an
2341 extent enclosing the section.
2342
9e81ee67
NC
23432002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
2344
2345 * ihex.c (ihex_write_object_contents): Do not allow records to
2346 cross a 64K boundary - wrap if necessary.
2347
d2b64500
JT
23482002-04-01 Nathan Williams <nathanw@wasabisystems.com>
2349
2350 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
2351 which caused the returned LWP ID to always be 0.
2352
e36f7d53
RH
23532002-04-01 Richard Henderson <rth@redhat.com>
2354
2355 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2356 (elf32_sparc_relocate_section): Use it to figure out when to
2357 initialize .got entries.
2358 * elf64-sparc.c: Similarly.
2359
e92d460e
AM
23602002-03-28 Alan Modra <amodra@bigpond.net.au>
2361
2362 * linker.c (link_action): Ignore duplicate warning syms.
2363 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
2364 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
2365 (elf_adjust_dynamic_symbol): Likewise.
2366 (elf_export_symbol): Likewise.
2367 (elf_link_find_version_dependencies): Likewise.
2368 (elf_link_assign_sym_version): Likewise.
2369 (elf_link_sec_merge_syms): Likewise.
2370 (elf_link_output_extsym): Likewise.
2371 (elf_gc_sweep_symbol): Likewise.
2372 (elf_gc_propagate_vtable_entries_used): Likewise.
2373 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2374 (elf_gc_allocate_got_offsets): Likewise.
2375 (elf_collect_hash_codes): Likewise.
2376 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
2377 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2378 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2379 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
2380 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
2381 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
2382 (elf_cris_discard_excess_dso_dynamics): Likewise.
2383 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
2384 (mark_PIC_calls): Likewise.
2385 (allocate_plt_static): Likewise.
2386 (allocate_dynrelocs): Likewise.
2387 (readonly_dynrelocs): Likewise.
2388 * elf32-i386.c (allocate_dynrelocs): Likewise.
2389 (readonly_dynrelocs): Likewise.
2390 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2391 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2392 * elf32-mips.c (mips_elf_output_extsym): Likewise.
2393 (mips_elf_sort_hash_table_f): Likewise.
2394 (mips_elf_check_mips16_stubs): Likewise.
2395 * elf32-s390.c (allocate_dynrelocs): Likewise.
2396 (readonly_dynrelocs): Likewise.
2397 * elf32-sh.c (sh_elf_discard_copies): Likewise.
2398 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2399 (xstormy16_relax_plt_realloc): Likewise.
2400 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
2401 (elf64_alpha_output_extsym): Likewise.
2402 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
2403 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
2404 (mips_elf64_check_mips16_stubs): Likewise.
2405 (mips_elf64_output_extsym): Likewise.
2406 * elf64-ppc.c (func_desc_adjust): Likewise.
2407 (allocate_dynrelocs): Likewise.
2408 (readonly_dynrelocs): Likewise.
2409 * elf64-s390.c (allocate_dynrelocs): Likewise.
2410 (readonly_dynrelocs): Likewise.
2411 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2412 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2413 (readonly_dynrelocs): Likewise.
2414 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
2415 * aoutx.h (aout_link_write_other_symbol): Likewise.
2416 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
2417 (_bfd_coff_write_global_sym): Likewise.
2418 * i386linux.c (linux_tally_symbols): Likewise.
2419 * m68klinux.c (linux_tally_symbols): Likewise.
2420 * sparclinux.c (linux_tally_symbols): Likewise.
2421 * pdp11.c (aout_link_write_other_symbol): Likewise.
2422 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2423 * xcofflink.c (xcoff_build_ldsyms): Likewise.
2424 (xcoff_write_global_symbol): Likewise.
2425
2426 * cofflink.c (_bfd_coff_final_link): Formatting.
2427 * cpu-mips.c (mips_compatible): Make static, prototype.
2428 * elf32-i386.c (elf_i386_check_relocs): Formatting.
2429 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
2430 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
2431 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
2432 (mips_elf64_final_link): Likewise.
2433 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
2434 prototype.
2435
2106126f
NC
24362002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
2437
2438 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
2439 (SWAP_OUT_RELOC_OFFSET): Define.
2440
b99d1833
AM
24412002-03-27 Gregory Steuck <greg@nest.cx>
2442
2443 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
2444 terminating NULL if empty symbol table.
2445 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
2446
ad43ed4c
L
24472002-03-26 H.J. Lu (hjl@gnu.org)
2448
2449 * elflink.h (elf_link_input_bfd): Revert the last change since
2450 the gcc exception handling isn't fixed yet.
2451
3851fca4
L
24522002-03-26 H.J. Lu (hjl@gnu.org)
2453
2454 * elflink.h (elf_link_input_bfd): Complain about relocations
2455 against local symbols in discarded sections.
2456
b91afed7
AM
24572002-03-26 Alan Modra <amodra@bigpond.net.au>
2458
2459 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
2460
dba143ef
AM
24612002-03-23 Alan Modra <amodra@bigpond.net.au>
2462
2463 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2464 section file offset for !SEC_LOAD sections.
2465
ee29b9fb
RE
24662002-03-21 Richard Earnshaw <rearnsha@arm.com>
2467
830629ab
AM
2468 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
2469 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 2470
54327882
AM
24712002-03-21 Alan Modra <amodra@bigpond.net.au>
2472
2473 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
2474 Whitespace changes.
2475 * archive.c: Update copyright date.
2476 * bfd-in2.h: Regenerate.
2477 * libbfd.h: Regenerate.
2478 * Makefile.am: Run "make dep-am"
2479 * Makefile.in: Regenerate.
2480 * po/SRC-POTFILES.in: Regenerate.
2481
1ee24f27
DJ
24822002-03-20 Daniel Jacobowitz <drow@mvista.com>
2483
2484 * dwarf2.c (struct funcinfo): Move up.
2485 (lookup_address_in_function_table): New argument function_ptr.
2486 Set it.
2487 (lookup_address_in_line_table): New argument function. If function
2488 is non-NULL, use it to handle ``addr'' before the first line note of
2489 the function.
2490 (comp_unit_find_nearest_line): Update and swap calls to
2491 lookup_address_in_function_table and lookup_address_in_line_table.
2492 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
2493 N_SLINE encountered if we see an N_FUN before any N_SLINE.
2494
51b9608c
TR
24952002-03-20 Tom Rix <trix@redhat.com>
2496
ea1e4b0d 2497 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 2498 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 2499 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 2500
789c90aa
TR
25012002-03-19 Tom Rix <trix@redhat.com>
2502
ea1e4b0d 2503 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
2504 dynamic objects in archives.
2505
1da54d81
HPN
25062002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
2507
2508 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
2509 STT_NOTYPE symbols to STT_OBJECT.
2510
7831a775 25112002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
2512
2513 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
2514
eb1e0e80
NC
25152002-03-18 Tom Rix <trix@redhat.com>
2516
2517 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
2518 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
2519 * coff-rs6000 (do_pad) : New function for archive padding.
2520 (do_copy) : New function for object file copying in archives.
2521 (do_shared_object_padding) : New function for padding shared
2522 objects to their text section alignment in archives.
2523 (bfd_xcoff_ar_achive_set_magic) : Stub.
2524 (xcoff_write_armap_big) : Use do_copy and do_pad.
2525 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
2526 do_copy and do_pad.
2527 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 2528 bfd_xcoff_magic_number.
eb1e0e80
NC
2529 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
2530 fop.
2531 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
2532 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
2533 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
2534 * rs6000-core.c : Update copyright date.
ea1e4b0d 2535 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
2536 csectpp.
2537 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
2538 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
2539 (coff_set_flags) : Use bfd_xcoff_magic_number.
2540 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
2541 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
2542 * Makefile.am : Same.
2543 * config.bfd : Same.
2544 * targets.c : Same.
2545 * configure : Regnerate.
2546 * Makefile.in : Same.
2547 * bfd-in2.h : Same.
2548
a1c259a1
NC
25492002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
2550
2551 * po/fr.po: Updated version.
2552
4dae1ae7
AM
25532002-03-18 Alan Modra <amodra@bigpond.net.au>
2554
2555 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2556 * libbfd.h: Regenerate.
2557 * archive.c (coff_write_armap): Pass on failures from
2558 bfd_write_bigendian_4byte_int.
2559
36b4f6e7
L
25602002-03-14 H.J. Lu <hjl@gnu.org>
2561
2562 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2563 error to bfd_error_nonrepresentable_section for reinit_array
2564 section in DSO.
2565
a1aefc76
NC
25662002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2567
a181be0a
NC
2568 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2569 OR it in rather than replacing previously selected flags.
2570
a1aefc76
NC
2571 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2572 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2573
c119f9b8
AM
25742002-03-14 Alan Modra <amodra@bigpond.net.au>
2575
2576 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
2577 (N): Use the above.
2578 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
2579 ensure reloc size matches before calling elf_link_input_bfd.
2580 Add an assert to check reloc size when counting output relocs.
2581
c295a511
NC
25822002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2583
2584 * mmo.c (mmo_get_loc): Return NULL rather than false.
2585
9ce88e60
NC
25862002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
2587
2588 * po/fr.po: Updated version.
2589
4ddafab0
AM
25902002-03-13 Alan Modra <amodra@bigpond.net.au>
2591
b74fa2cd
AM
2592 * archures.c (bfd_default_compatible): Test bits_per_word.
2593 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
2594 bfd_default_compatible.
2595 * cpu-i370.c (i370_compatible): Likewise.
2596 * cpu-sparc.c (sparc_compatible): Likewise.
2597 * cpu-h8300.c (compatible): Test in->arch == out->arch.
2598
40b829d4
AM
2599 * elflink.h: Formatting fixes.
2600 (elf_link_output_extsym): Merge undefined and undef weak cases.
2601
4ddafab0
AM
2602 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2603 when word size of input matches output word size.
2604
dd53c801
AJ
26052002-03-12 Andreas Jaeger <aj@suse.de>
2606
2607 * cpu-i386.c (i386_compatible): New. Use it instead of
2608 bfd_default_compatible.
2609
aa066ac8
L
26102002-03-07 H.J. Lu (hjl@gnu.org)
2611
2612 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2613 as the type for bfd_reloc_val.
2614
1bf42538
JL
26152002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
2616
2617 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2618 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2619 (elf_hppa_final_link_relocate): Correct relocations for indirect
2620 references to local data through the DLT. Fix .opd creation for
2621 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2622 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
2623 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2624 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2625 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2626 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2627 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2628
86eaf01e
JJ
26292002-03-05 Jakub Jelinek <jakub@redhat.com>
2630
2631 * merge.c (_bfd_merge_sections): Don't segfault if there
2632 is nothing to merge due to GC.
2633
c44233aa
AM
26342002-03-05 Alan Modra <amodra@bigpond.net.au>
2635
039cc25f
AM
2636 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2637 symbols that have been forced local.
2638
c44233aa
AM
2639 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2640 to output forced local syms for non-shared link.
2641 (elf_link_output_extsym): Tweak condition for calling backend
2642 adjust_dynamic_symbol so that previous behaviour is kept.
2643 Whitespace changes throughout file.
2644
25e27870
L
26452002-03-04 H.J. Lu <hjl@gnu.org>
2646
2647 * elf.c (bfd_section_from_shdr): Handle special sections,
2648 .init_array, .fini_array and .preinit_array.
2649 (elf_fake_sections): Likewise.
2650
2651 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2652 DT entry only if the section is in output for .init_array,
2653 .fini_array and .preinit_array. Complain about .preinit_array
2654 section in DSO.
2655 (elf_bfd_final_link): Warn zero size for .init_array,
2656 .fini_array and .preinit_array sections.
2657
2658 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2659 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2660 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2661 .preinit_array.
2662
bb2a49f2
AM
26632002-03-04 Alan Modra <amodra@bigpond.net.au>
2664
2665 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2666 * configure: Regenerate.
2667
38487e5e
TR
26682002-03-02 Tom Rix <trix@redhat.com>
2669
c44233aa
AM
2670 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2671 symbolic equiv.
38487e5e
TR
2672 * coff-rs6000.c (xcoff_howto_table): Same.
2673
30831527
RH
26742002-03-01 David Mosberger <davidm@hpl.hp.com>
2675
2676 * elflink.h (size_dynamic_sections): If section named
2677 ".preinit_array" exists, create DT_PREINIT_ARRAY and
2678 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
2679 ".init_array" and ".fini_array".
2680 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2681 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2682 DT_FINI_ARRAY.
2683
c8e5ddc8
AM
26842002-02-26 Andrew Macleod <amacleod@cygnus.com>
2685
2686 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2687 dynsyms.
2688
96e0dda4
AM
26892002-02-25 Alan Modra <amodra@bigpond.net.au>
2690
1c5b6bf8
AM
2691 * elf64-hppa.h: Update copyright date.
2692
96e0dda4
AM
2693 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2694 (ppc64_elf_relocate_section): Don't generate power4 style branch
2695 hints for *_BRTAKEN and *_BRNTAKEN relocs.
2696
0fb19cbc
JJ
26972002-02-22 Jakub Jelinek <jakub@redhat.com>
2698
2699 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2700 last patch.
2701 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2702
c434dee6
AJ
27032002-02-21 Andreas Jaeger <aj@suse.de>
2704
2705 * elf64-x86-64.c: Major rework that introduces all recent changes
2706 to the x86-64 backend. Get a closer match to elf32-i386.
2707 (struct elf64_x86_64_dyn_relocs): Rename from
2708 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
2709 all users.
2710 (struct elf64_x86_64_link_hash_table): Add short cuts to some
2711 sections.
2712 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2713 remove casts, initialize new hash members.
2714 (create_got_section): New.
2715 (elf64_x86_64_create_dynamic_sections): New.
2716 (elf64_x86_64_copy_indirect_symbol): New.
2717 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
2718 relocs, .got or .relgot here but do it in allocate_dynrelocs.
2719 Reference count possible .plt and .got entries. Don't test input
2720 section SEC_READONLY here to try to avoid copy relocs, and keep
2721 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
2722 DF_TEXTREL here. Delay setting of variables until needed. Cache
2723 pointer to "sreloc" section in elf_section_data. Tweak condition
2724 under which .got created. Report files with bad relocation
2725 section names.
2726 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2727 Reference count possible .plt entries. Don't deallocate .got and
2728 .relgot space here.
2729 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
2730 do copy reloc processing for weakdefs. Remove redundant casts and
2731 aborts. Delay setting of vars until needed. Move creation of
2732 dynamic symbols and allocation of .plt and .rela.plt to
2733 allocate_dynrelocs. Replace BFD_ASSERT with abort.
2734 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2735 (allocate_dynrelocs): New.
2736 (readonly_dynrelocs): New.
2737 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
2738 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
2739 Zero out the dynamic allocated content space.
2740 (elf64_x86_64_discard_copies): Removed.
2741 (elf64_x86_64_relocate_section): Make use of dynamic section
2742 short-cuts. Localise vars, and delay setting. Better error
2743 reporting, replace BFD_ASSERT with abort. Check
2744 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
2745 regular object file and tread the weak definition as the normal
2746 one. Don't discard relocs for undefweak or undefined symbols and
2747 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
2748 relocs.
2749 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
2750 symbols that have been forced local. Use same test to decide if
2751 we can use a relative reloc for got as relocate_section. Expand
2752 SHN_UNDEF comment. Move expressions out of function calls.
2753 Replace BFD_ASSERT with abort.
2754 (bfd_elf64_bfd_final_link): Removed.
2755 (elf_backend_copy_indirect_symbol): Define.
2756
ff3a6ee3
TR
27572002-02-20 Tom Rix <trix@redhat.com>
2758
2759 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
2760 (_bfd_xcoff_reloc_type_lookup): Use it.
2761 * coff64-rs6000.c (xcoff64_howto_table): Same.
2762 (xcoff64_reloc_type_lookup): Same.
c434dee6 2763
a68d41fb
AM
27642002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
2765
2766 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
2767 little endian.
2768
befc3abb
MS
27692002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
2770
2771 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
2772 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
2773 * bfd-in2.h: Regenerate.
2774 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
2775 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
2776 with "s390:64-bit".
2777 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
2778 (elf_s390_reloc_type_lookup): Likewise.
2779 (elf_s390_check_relocs): Likewise.
2780 (elf_s390_gc_sweep_hook): Likewise.
2781 (elf_s390_relocate_section): Likewise.
2782 (elf_s390_object_p): Use renamed architecture define.
2783 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2784
6eeeec9b
FCE
27852002-02-19 Frank Ch. Eigler <fche@redhat.com>
2786
2787 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
2788
0bb2d96a
JJ
27892002-02-19 Jakub Jelinek <jakub@redhat.com>
2790
2791 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
2792 absptr -> pcrel optimization for shared libs.
2793 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
2794 library cannot be converted to pcrel.
2795 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
2796 relative.
2797 * elf32-i386.c (elf_i386_relocate_section): If
2798 _bfd_elf_section_offset returned -2, skip, but make sure the
2799 relocation is installed.
2800 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
2801 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2802 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2803 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2804 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2805 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2806 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2807 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2808 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2809 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2810 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2811 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2812 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2813 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2814 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
2815 _bfd_elf_section_offset returning -2 the same way as -1.
2816 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2817 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
2818 and BFD_ASSERT.
2819 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2820
69f284c7
TR
28212002-02-18 Tom Rix <trix@redhat.com>
2822
2823 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
2824 (bfd_xcoff_size_dynamic_sections): Same.
2825 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
2826 (bfd_xcoff_size_dynamic_sections): Same.
2827 * coff-rs6000.c (xcoff_generate_rtinit): Same.
2828 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
2829 * libxcoff.h (struct xcoff_backend_data_rec): Same.
2830 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
2831 * bfd-in2.h: Regenerate.
2832
82bd7b59
AM
28332002-02-18 Alan Modra <amodra@bigpond.net.au>
2834
2835 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
2836 (struct ppc_link_hash_table): Add sfpr.
2837 (ppc64_elf_link_hash_table_create): Init it.
2838 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
2839 .glink out to..
2840 (create_linkage_sections): ..here. Make .sfpr too.
2841 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
2842 dynobj early.
2843 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
2844 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
2845 ._restf* functions, and create as needed.
2846 (func_desc_adjust): Only force_local for shared libs.
2847
ef1355e8
NC
28482002-02-18 David O'Brien <obrien@FreeBSD.org>
2849
2850 * configure.in: Bump version number post 2.12 branching.
2851 * configure: Regenerate.
2852
dfa36a69
HPN
28532002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
2854
2855 * mmo.c: Correct and improve comments.
2856 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
2857 zero-pad. Use input to fill up non-empty bfd buffer.
2858 (mmo_flush_chunk): New function.
2859 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
2860 changed. Don't emit location specifier if VMA is same as
2861 *LAST_VMAP after omitting leading zero contents. Call
2862 mmo_flush_chunk before emitting location specifier.
2863 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
2864 with mmo_write_loc_chunk calls.
2865 (mmo_internal_write_section): Call mmo_flush_chunk after
2866 mmo_write_chunk.
2867 (mmo_write_symbols_and_terminator): Move :Main to first position
2868 in symbol array. Add faked one if it does not exist if there are
2869 other symbols. Don't add it if there are no symbols at all. Move
2870 out test for value of :Main from symbol loop. Rename table
2871 fakemain to maintable and variable mainsym to fakemain.
2872
ccf00ab6
RH
28732002-02-15 Richard Henderson <rth@redhat.com>
2874
2875 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
2876 section with no got matches any got. Simplify error generaion.
2877
88eaccc2
AM
28782002-02-15 Alan Modra <amodra@bigpond.net.au>
2879
fd96f80f
AM
2880 Support arbitrary length fill patterns.
2881 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
2882 (_bfd_default_link_order): Remove bfd_fill_link_order code.
2883 Call default_data_link_order.
2884 (default_fill_link_order): Delete.
2885 (default_data_link_order): New function.
2886 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
2887 of bfd_fill_link_order with bfd_data_link_order.
2888 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
2889 * elf64-mips.c (mips_elf64_final_link): Likewise.
2890
88eaccc2
AM
2891 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
2892 Correct value returned in "end" for "0x<non-hex>".
2893
e2fd756b
NC
28942002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
2895
2896 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
2897 (scan): Test against 'mach' field in info structure.
2898
edd29cf9
AM
28992002-02-14 Alan Modra <amodra@bigpond.net.au>
2900
2901 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2902
1e30956e 29032002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
2904
2905 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
2906 EF_M68000.
2907
bf36db18
NC
29082002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
2909
2910 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
2911 non-zero physical addresses when adjusting the LMAs of new
2912 sections.
bf36db18 2913
189c6563
AM
29142002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2915
2916 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
2917 from _bfd_elf_hppa_gen_reloc_type.
2918 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2919 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2920 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2921 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2922
e948afaf
AO
29232002-02-12 Alexandre Oliva <aoliva@redhat.com>
2924
2925 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2926 loading its contents if there's nothing to do in it.
2927
19397422
AM
29282002-02-12 Alan Modra <amodra@bigpond.net.au>
2929
0ad3a73b
AM
2930 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2931 64k boundary.
2932
19397422
AM
2933 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2934 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2935 (ppc64_elf_finish_dynamic_sections): Set values for them.
2936
51316059
MS
29372002-02-11 Michael Snyder <msnyder@redhat.com>
2938
2939 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2940 * elf.c (elfcore_grok_pstatus): Add prototype.
2941 (elfcore_grok_lwpstatus): Add prototype.
2942 (elfcore_write_lwpstatus): New function.
2943 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2944
518313c3
AO
29452002-02-11 Alexandre Oliva <aoliva@redhat.com>
2946
2947 * elf32-sh.c: Added missing prototypes.
2948 * elf32-sh64.c: Likewise.
2949 (sh_elf_align_loads): Mark unused args as such.
2950 * elf64-sh64.c: Added missing prototypes.
2951 (struct elf_sh64_link_hash_entry): Fix typo.
2952 (sh_elf64_relocate_section): Fix info argument passed to
2953 _bfd_elf_section_offset.
2954
2c73f9d8
AM
29552002-02-11 Alan Modra <amodra@bigpond.net.au>
2956
2957 * Makefile.am: "make dep-am".
2958 * Makefile.in: Regenerate.
2959 * aclocal.m4: Regenerate.
2960 * config.in: Regenerate.
2961 * configure: Regenerate.
2962
d426c6b0
DJ
29632002-02-10 Daniel Jacobowitz <drow@mvista.com>
2964
2965 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2966 variable warnings.
2967 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2968 comparison warning.
2969 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2970 cast warnings for the common case.
2971
e58ee0cd
HPN
29722002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
2973
2974 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2975 vectors.
2976 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2977 vectors.
2978
7793f4d0
RH
29792002-02-09 Richard Henderson <rth@redhat.com>
2980
2981 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2982 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2983 (elf64_alpha_relocate_section): Likewise.
2984 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2985 * bfd-in2.h, libbfd.h: Rebuild.
2986
7e799044
HPN
29872002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
2988
2989 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2990 that base-plus-offset reloc accounting is consistent.
2991 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2992 up to date for undefined symbols.
2993
027d73eb
EC
29942002-02-08 Eric Christopher <echristo@redhat.com>
2995
2996 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2997
2998 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2999 sections for the O32 ABI.
3000
517662d4
CD
30012002-02-08 Chris Demetriou <cgd@broadcom.com>
3002
3003 * elf32-arm.h: Fix formatting of _("...").
3004 * elf32-d10v.c: Likewise.
3005 * elf32-m68k.c: Likewise.
3006 * elf32-mips.c: Likewise.
3007
5e37cc46
NC
30082002-02-08 Ivan Guzvinec <ivang@opencores.org>
3009
3010 * coff-or32.c: Fix compile time warning messages.
3011
fbca6ad9
AO
30122002-02-08 Alexandre Oliva <aoliva@redhat.com>
3013
3014 Contribute sh64-elf.
3015 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
3016 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
3017 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
3018 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
3019 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
3020 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
3021 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
3022 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
3023 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
3024 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
3025 New relocs.
3026 * libbfd.h, bfd-in2.h: Rebuilt.
3027 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
3028 (sh_reloc_map): Map them.
3029 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3030 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
3031 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
3032 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3033 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
3034 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
3035 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
3036 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
3037 datalabel_got_offset.
3038 (sh_elf_link_hash_newfunc): Initialize it.
3039 (sh_elf_relocate_section): Augment the scope of
3040 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
3041 GOT and GOTOFF handling to new SHmedia relocation types. Support
3042 GOT_BIAS.
3043 (sh_elf_check_relocs): Likewise.
3044 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
3045 PLT entries using movi_shori_putval. Support GOT_BIAS.
3046 (sh_elf_finish_dynamic_sections): Likewise.
3047 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
3048 relocation, it's now done by the caller.
3049 (GOT_BIAS): New.
3050 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
3051 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
3052 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
3053 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
3054 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
3055 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
3056 sh64_elf64_hash_table): New.
3057 (sh_elf64_howto_table): Introduce new relocs.
3058 (sh_elf64_info_to_howto): Accept new PIC relocs.
3059 (sh_elf64_relocate_section): Augment the scope of
3060 seen_stt_datalabel. Support new PIC relocs.
3061 (sh_elf64_check_relocs): Support new PIC relocs.
3062 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
3063 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
3064 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
3065 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
3066 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
3067 movi_shori_putval, movi_3shori_putval,
3068 sh64_elf64_create_dynamic_sections,
3069 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
3070 sh64_elf64_size_dynamic_sections,
3071 sh64_elf64_finish_dynamic_symbol,
3072 sh64_elf64_finish_dynamic_sections): New.
3073 (elf_backend_create_dynamic-sections,
3074 bfd_elf64_bfd_link_hash_table_create,
3075 elf_backend_adjust_dynamic_symbol,
3076 elf_backend_size_dynamic_sections,
3077 elf_backend_finish_dynamic_symbol,
3078 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3079 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3080 elf_backend_got_header_size, elf_backend_plt_header_size):
3081 Define.
3082 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
3083 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
3084 match official numbers and names; moved unmaching ones to the
3085 range 0xf2-0xff.
3086 * elf32-sh64.c, elf64-sh64.c: Likewise.
3087 2001-03-12 DJ Delorie <dj@redhat.com>
3088 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
3089 sections.
3090 2001-03-12 DJ Delorie <dj@redhat.com>
3091 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
3092 be aligned.
3093 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
3094 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
3095 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
3096 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
3097 .cranges section with SEC_SORT_ENTRIES set.
3098 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
3099 incoming sorted .cranges section.
3100 (sh64_bfd_elf_copy_private_section_data): New.
3101 (sh64_elf_final_write_processing): Only sort .cranges and modify
3102 start address if called by linker.
3103 2001-01-08 Ben Elliston <bje@redhat.com>
3104 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
3105 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
3106 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
3107 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3108 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
3109 line. Add comments before all entries.
3110 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
3111 comment.
3112 (sh_elf64_reloc): Correct head comment.
3113 (sh_elf64_relocate_section): Correct spacing.
3114 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
3115 instead call reloc_dangerous callback.
3116 <case R_SH_SHMEDIA_CODE>: New case.
3117 (sh_elf64_gc_mark_hook): Correct spacing.
3118 (sh_elf64_check_relocs): Ditto.
3119 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
3120 New case.
3121 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
3122 functions.
3123 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
3124 clarify describing comment. Add comments before all entries.
3125 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
3126 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
3127 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3128 Sort .cranges section in final link. Prepare to set bit 0 on
3129 entry address.
3130 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
3131 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
3132 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
3133 .cranges section.
3134 (sh64_backend_section_from_shdr): New, to recognize
3135 SHT_SH5_CR_SORTED on incoming .cranges section.
3136 (elf_backend_section_from_shdr): Define.
3137 (sh64_elf_final_write_processing): Sort outgoing .cranges
3138 section. (New, temporarily disabled:) Set bit 0 on entry address
3139 according to ISA type.
3140 (sh64_find_section_for_address): New.
3141 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
3142 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
3143 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
3144 bfd_malloc, not xmalloc.
3145 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
3146 global.
3147 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
3148 temporarily disabled) setting bit 0 on entry address.
3149 (elf_backend_final_write_processing): Define.
3150 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
3151 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
3152 be a proper relocation for PTA and PTB rather than a marker.
3153 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
3154 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
3155 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
3156 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
3157 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
3158 Zero src_mask.
3159 * elf64-sh64.c: Ditto.
3160 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
3161 * elf32-sh64.c: Include opcodes/sh64-opc.h
3162 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
3163 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
3164 parameters. No unused parameters. Caller changed.
3165 <case R_SH_PT_16>: New case.
3166 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
3167 * Makefile.in: Regenerate.
3168 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
3169 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
3170 all code sections.
3171 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3172 (sh64_elf_merge_private_data): Ditto.
3173 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
3174 to access stored section flags.
3175 (sh64_elf_final_write_processing): Return immediately unless
3176 called by linker. Use sh64_elf_section_data (cranges) to get size
3177 of linker-generated cranges entries.
3178 (sh64_elf_copy_private_data): Add missing "return true".
3179 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3180 (sh_elf64_merge_private_data): Ditto.
3181 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
3182 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
3183 elf64-sh64.c:sh64_elf_fake_sections.
3184 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
3185 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
3186 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
3187 (sh64_elf_final_write_processing): New.
3188 (elf_backend_final_write_processing): Define.
3189 (sh64_elf_fake_sections): Get header flags from tdata field.
3190 (sh64_elf_copy_private_data): Do not call
3191 sh64_elf_copy_private_data_internal, just copy e_flags field.
3192 (sh64_elf_merge_private_data): Do not call
3193 sh64_elf_copy_private_data_internal.
3194 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
3195 Remove EF_SH64_ABI64, let ELF size make difference.
3196 Remove SH64-specific BFD section flag.
3197 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
3198 containing SHmedia through elf_section_data (asect)->tdata
3199 non-zero, not using a BFD section flag.
3200 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
3201 (sh64_elf_merge_private_data): Similar.
3202 (elf_backend_section_flags): Don't define.
3203 (sh64_elf_backend_section_flags): Delete.
3204 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
3205 not EF_SH64_ABI64.
3206 (sh_elf64_merge_private_data): Similar.
3207 * section.c (Section flags definitions): Don't define
3208 SEC_SH_ISA_SHMEDIA.
3209 (bfd-in2.h): Regenerate.
3210 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
3211 Make DataLabel references work with partial linking.
3212 * elf32-sh64.c: Fix formatting.
3213 (sh64_elf_link_output_symbol_hook): New.
3214 (elf_backend_link_output_symbol_hook): Define to
3215 sh64_elf_link_output_symbol_hook.
3216 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
3217 undefined if partial linking. Adjust sanity check.
3218 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
3219 (elf_backend_link_output_symbol_hook): Define to
3220 sh64_elf64_link_output_symbol_hook.
3221 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
3222 undefined if partial linking. Adjust sanity check.
3223 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
3224 Implement semantics for inter-file DataLabel references.
3225 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
3226 (sh64_elf64_add_symbol_hook): New.
3227 (sh_elf64_relocate_section): If passing an indirect symbol with
3228 st_type STT_DATALABEL on the way to a symbol with st_other
3229 STO_SH5_ISA32, do not bitor 1 to the relocation.
3230 (elf_backend_add_symbol_hook): Define to
3231 sh64_elf64_add_symbol_hook.
3232 * elf64-sh32.c: Tweak comments.
3233 (DATALABEL_SUFFIX): Define.
3234 (sh64_elf_add_symbol_hook): New.
3235 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
3236 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
3237 symbol with st_type STT_DATALABEL on the way to a symbol with
3238 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
3239 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
3240 Pass through STT_DATALABEL.
3241 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
3242 (elf_backend_get_symbol_type): Define.
3243 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
3244 (elf_backend_get_symbol_type): Define.
3245 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
3246 * elf32-sh64.c: Tweak comments.
3247 (sh64_elf_copy_private_data_internal): Add prototype.
3248 (bfd_elf32_bfd_set_private_flags): Define.
3249 (sh64_elf_copy_private_data_internal): Compare machine name, not
3250 textual BFD target name, to check whether to copy section flag
3251 SHF_SH5_ISA32.
3252 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
3253 Tweak section-contents-type-mismatch message.
3254 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
3255 Validize reloc-types.
3256 * elf64-sh64.c: New file.
3257 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
3258 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
3259 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
3260 Regenerate dependencies.
3261 * Makefile.in: Regenerate.
3262 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
3263 bfd_elf64_sh64l_vec.
3264 * configure.in: Handle bfd_elf64_sh64_vec and
3265 bfd_elf64_sh64l_vec.
3266 * configure: Regenerate.
3267 * po/POTFILES.in: Regenerate.
3268 * po/bfd.pot: Regenerate.
3269 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
3270 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
3271 anything else but EF_SH64 and EF_SH64_ABI64.
3272 (sh64_elf_merge_private_data): Emit error for anything else but
3273 EF_SH64 and EF_SH64_ABI64.
3274 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
3275 from targ_selvecs.
3276 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
3277 bfd_elf32_sh64l_vec as a temporary measure.
3278 * configure: Regenerate.
3279 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
3280 * cpu-sh.c (arch_info_struct): Include sh5 item
3281 unconditionalized.
3282 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
3283 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
3284 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
3285 * elf32-sh64.c: Tweak comments.
3286 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
3287 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
3288 (sh64_elf_copy_private_data_internal): Wrap long line.
3289 (sh64_elf_merge_private_data): Rewrite to allow objects from
3290 SH64 subsets to be linked together.
3291 (INCLUDE_SHMEDIA): Define.
3292 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
3293 Parenthesize plus-expression inside or-expression.
3294 <global symbol>: Ditto.
3295 (sh_elf_set_mach_from_flags): Remove code refusing
3296 deleted EF_SH64_32BIT_ABI flag.
3297 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
3298 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
3299 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
3300 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
3301 (sh_elf_relocate_section) <local symbol>: Or 1 in
3302 calculation of relocation if sym->st_other & STO_SH5_ISA32.
3303 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
3304 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
3305 relocation.
3306 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
3307 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
3308 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
3309 Regenerate dependencies.
3310 * Makefile.in: Regenerate.
3311 * archures.c: Add bfd_mach_sh5.
3312 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
3313 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
3314 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
3315 * configure: Regenerate.
3316 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
3317 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
3318 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
3319 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
3320 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
3321 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
3322 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
3323 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
3324 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
3325 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
3326 in item for SH5.
3327 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
3328 for SHmedia relocs.
3329 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
3330 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
3331 shmedia_prepare_reloc, goto final_link_relocate if it returns
3332 non-zero, else fail as before.
3333 (sh_elf_set_mach_from_flags): Provide function only if not defined
3334 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
3335 (sh_elf_set_private_flags): Provide function only if not defined
3336 as a macro.
3337 (sh_elf_copy_private_data): Similar.
3338 (sh_elf_merge_private_data): Similar.
3339 * section.c (SEC_SH_ISA_SHMEDIA): New.
3340 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
3341 * elf32-sh64.c: New file.
3342 * libbfd.h: Regenerate.
3343 * bfd-in2.h: Regenerate.
3344 * po/POTFILES.in: Regenerate.
3345 * po/bfd.pot: Regenerate.
3346 * bfd-in2.h: Regenerate.
3347 * libbfd.h: Regenerate.
3348
e108f470
DJ
33492002-02-07 Daniel Jacobowitz <drow@mvista.com>
3350
3351 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
3352 been included, not drag it in.
3353 * bfd-in2.h: Regenerate.
3354
259d18a3
L
33552002-02-06 H.J. Lu (hjl@gnu.org)
3356
3357 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
3358 the mach and ISA fields if necessary.
3359
f13b834e
NC
33602002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
3361
3362 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
3363 ARM architecture when an F_ARM_5 flag is detected, since we cannot
3364 be sure exactly which architecture this represents.
3365
82f6addb
NC
33662002-02-05 Nick Clifton <nickc@redhat.com>
3367
3368 * po/tr.po: Updated translation.
3369
899f54f5
AM
33702002-02-05 Alan Modra <amodra@bigpond.net.au>
3371
3372 From Jimi X <jimix@watson.ibm.com>
3373 * archures (bfd_mach_ppc64): Define.
3374 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
3375 (bfd_powerpc_arch): Define.
3376 * bfd-in2.h: Regenerate.
3377 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
3378 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
3379 (bfd_powerpc_archs): Add default powerpc64 arch.
3380
248866a8
AM
33812002-02-05 Alan Modra <amodra@bigpond.net.au>
3382
3383 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
3384 against section syms in readonly sections. Don't do the global
3385 sym check if we find one.
3386 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
3387 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 3388 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
3389 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
3390 (elf_s390_grok_prstatus): Add missing prototype.
3391
4fa5c2a8
HPN
33922002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
3393
3394 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3395 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3396 Call bfd_get_section_by_name only once. Initialize
3397 bpodata->n_bpo_relocs_this_section.
3398 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3399 referring to DSOs.
3400 (bpo_reloc_request_sort_fn): Don't use difference of values as
3401 return-value.
3402
537c972e
DB
34032002-02-02 David O'Brien <obrien@FreeBSD>
3404
3405 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
3406 version 4.5 and later the same as 5-CURRENT.
3407 * configure: Re-generate.
3408
006336b8
JT
34092002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
3410
3411 * config.bfd (hppa*-*-netbsd*): New target.
3412
6c571f00
PT
34132002-01-31 Philipp Thomas <pthomas@suse.de>
3414
19397422
AM
3415 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
3416 to front of message. Unify messages with elf32-arm.h. Use
3417 commas where neccessary.
3418 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
3419 ERROR in messages. Unify messages with coff-arm.c. Correct
3420 VFP/FPA error message.
3421 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
3422 APCS-32 for translation.
6c571f00 3423
930b4cb2
HPN
34242002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
3425
3426 Perform on-demand global register allocation from
3427 R_MMIX_BASE_PLUS_OFFSET relocs.
3428 * elf64-mmix.c (struct bpo_reloc_section_info, struct
3429 bpo_reloc_request, struct bpo_greg_section_info): New.
3430 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
3431 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
3432 _bfd_mmix_check_all_relocs,
3433 _bfd_mmix_prepare_linker_allocated_gregs,
3434 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
3435 (elf_mmix_howto_table): Correct src_mask for most relocs.
3436 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
3437 case.
3438 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
3439 case. Fix typo in comment. New label do_mmix_reloc.
3440 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
3441 store first object file with a base-plus-offset reloc. Call
3442 mmix_elf_check_common_relocs for the part common with mmo.
3443 (mmix_elf_final_link): Write out linker-allocated register
3444 contents section.
3445 (elf_backend_gc_sweep_hook): Define.
3446 (bfd_elf64_bfd_relax_section): Define.
3447
3448 * mmo.c: Don't include <ctype.h>
3449 (mmo_init): Correct init-once logic.
3450
3e36d993
TR
34512002-02-01 Tom Rix <trix@redhat.com>
3452
3453 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
3454
ba323545
AM
34552002-02-01 Alan Modra <amodra@bigpond.net.au>
3456
3457 * Makefile.am: Run "make dep-am"
3458 * Makefile.in: Regenerate.
3459
012884d6
DB
34602002-01-31 David O'Brien <obrien@FreeBSD>
3461
3462 * configure.in: Recognize the differences in core files from FreeBSD
3463 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
3464 5-CURRENT.
3465 * configure: Regenerate.
3466
3b16e843
NC
34672002-01-31 Ivan Guzvinec <ivang@opencores.org>
3468
3469 * coff-or32.c: New file.
3470 * cpu-or32.c: New file.
3471 * elf32-or32.c: New file.
3472 * archures.c: Add support for or32.
3473 * targets.c: Add support for or32.
3474 * bfd-in2.h: Regenerate.
7dc0ab31 3475 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
3476 coff_write_object_contents): Add support for or32.
3477 * config.bfd: Add target.
3478 * configure.in: Add support for or32.
3479 * configure: Regenerate.
3480 * Makefile.am: Add support for or32.
3481 * Makefile.in: Regenerate.
3b16e843
NC
3482 * po/SRC-POTFILES.in: Add or32 files.
3483 * po/bfd.pot: Regenerate.
7dc0ab31 3484
caf8ca8e
NC
34852002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
3486 Don Lindsay <lindsayd@cisco.com>
3487
3488 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
3489 false' with a return of a bfd_reloc_ error code.
3490
e5dfef09
HPN
34912002-01-31 Hans-Peter Nilsson <hp@axis.com>
3492
3493 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3494 unexport unreferenced symbols when --export-dynamic. Call
3495 _bfd_elf_strtab_delref when unexporting.
3496
4e4770d0
DJ
34972002-01-30 Daniel Jacobowitz <drow@mvista.com>
3498
3499 * bfd-in.h: Include <stdbool.h> if it is available.
3500 * bfd-in2.h: Regenerated.
3501
e1fa50e7
AM
35022002-01-31 Alan Modra <amodra@bigpond.net.au>
3503
3504 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
3505 not go via the plt.
3506
b5f79c76
NC
35072002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3508
b5f79c76
NC
3509 * archures.c: Tidy up formatting of embedded comments.
3510 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 3511 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
3512 * reloc.c: Tidy up formatting of ordinary & embedded comments.
3513 * section.c: Tidy up formatting of embedded comments.
3514 * syms.c: Tidy up formatting of embedded comments.
3515 * targets.c: Tidy up formatting of embedded comments.
3516
3517 * bfd-in2.h: Regenerate.
3518
ca09e32b
NC
35192002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3520
3521 * vms-tir.c (cmd_name): New function.
3522 (tir_cmd_name): New function.
3523 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
3524 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
3525 Fix formatting.
7dc0ab31 3526
ca09e32b
NC
3527 * peXXigen.c (pe_print_idata): Rearrange message to aid in
3528 translation.
3529 (pe_print_pdata): Rearrange message to aid in translation.
3530
3531 * libbfd.c (warn_deprecated): Rearrange error message to aid in
3532 translation.
3533
3534 * ihex.c (ihex_write_object_contents): Fix spelling typo.
3535
3536 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
3537
3538 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
3539 message to aid in translation.
3540
3541 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
3542 to aid in translation.
3543
3544 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
3545
7dc0ab31 35462002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
3547
3548 * coff-arm.c, elf32-elf.h: Unify messages.
3549
05f64ac6
NC
35502002-01-30 Nick Clifton <nickc@redhat.com>
3551
3552 * po/sv.po: Updated translation.
3553
f5a3e38a
NC
35542002-01-30 Philipp Thomas <pthomas@suse.de>
3555
3556 * dwarf2.c (read_abbrev): Use full section name in error message.
3557 (decode_line_info): Likewise.
661a3fd4
NC
3558
3559 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3560 message.
3561
d926e03d
AM
35622002-01-30 Alan Modra <amodra@bigpond.net.au>
3563
3564 * elf64-ppc.c (func_desc_adjust): Only provide missing function
3565 descriptor symbols for undefined function code syms. Clear
3566 ELF_LINK_NON_ELF so that they can stay weak.
3567
030d18fb 35682002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 3569 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
3570
3571 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3572 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3573 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3574 generation.
3575 * bfd-in2.h: Regenerate.
3576
fcc76bea
CD
35772002-01-29 Chris Demetriou <cgd@broadcom.com>
3578
3579 * elf32-mips.c: Add additional comments about HI16 relocation
3580 processing.
3581 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3582 pc-relative relocations. (Reverts change made on 2001-10-31.)
3583 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3584 for pc-relative relocations.
3585 (mips_elf_calculate_relocation): Add a comment about a kludge
3586 in the R_MIPS_GNU_REL_HI16 handling.
3587 (_bfd_mips_elf_relocate_section): Implement that kludge;
3588 adjust pc-relative HI16 relocation for difference in HI16 and
3589 LO16 addresses, since it can't easily be done in
3590 mips_elf_calculate_relocation.
3591
f9cd9119
MS
35922002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
3593
3594 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3595 relocations with PC32 relocations for undefined or weak symbols.
3596 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3597 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3598
702248bb
JT
35992002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
3600
3601 * elfcore.h (elf_core_file_p): Improve comment for last change.
3602
4867be41
DJ
36032002-01-27 Daniel Jacobowitz <drow@mvista.com>
3604
3605 * configure: Regenerated.
3606
a94cef6a
JT
36072002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
3608
3609 * elfcore.h (elf_core_file_p): Set the machine architecture
3610 before processing the program headers.
3611
7562a296
HPN
36122002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
3613
966abd70
HPN
3614 * configure.in <64-bit configuration>: If using gcc, check and
3615 emit error for egcs-1.1.2.
3616 * configure: Regenerate.
3617
e8eab623
NC
36182002-01-26 Egor Duda <deo@logos-m.ru>
3619
3620 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3621 as possible to avoid stack corruption.
3622
73896efb
RH
36232002-01-26 Richard Henderson <rth@redhat.com>
3624
3625 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3626 for non-allocated sections.
3627
36282002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
3629
3630 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3631 prstat.pr_reg even if it is a struct.
3632
73896efb 36332002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743
NC
3634
3635 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3636
3d66c4f7
NC
36372002-01-25 Philipp Thomas <pthomas@suse.de>
3638
3639 * coffgen.c (coff_print_symbol): Don't mark info message
3640 for translation.
3641
9460ecda
NC
36422002-01-25 Nick Clifton <nickc@redhat.com>
3643
3644 * po/fr.po: Updated translation.
3645 * po/es.po: Updated translation.
3646
cc9ff76a
AM
36472002-01-25 Philipp Thomas <pthomas@suse.de>
3648
3649 * coff-alpha.c (alpha_relocate_section): Unify warning message
3650 for GP relative relocations without GP defined.
3651 * coff-mips.c (mips_relocate_section): Likewise.
3652
c68836a9
AM
36532002-01-25 Alan Modra <amodra@bigpond.net.au>
3654
3655 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3656 unsigned overflow when new_offset < old_offset.
3657
e8eab623 36582002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
3659
3660 * bfd.c (_bfd_abort): Fix typo.
3661
8ba89f17
RH
36622002-01-23 Richard Henderson <rth@redhat.com>
3663
3664 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3665 plt entries for undefweak symbols.
3666
c6953948
NC
36672002-01-23 Steve Ellcey <sje@cup.hp.com>
3668
3669 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3670 DEFAULT_VECTOR.
3671 (bfd_elf64_ia64_hpux_big_vec): Ditto.
3672 (bfd_elf32_h8300_vec): Ditto.
3673
41bd81ab
AM
36742002-01-23 Alan Modra <amodra@bigpond.net.au>
3675
3676 * elf64-ppc.c: Remove stale part of ABI comment.
3677 (NO_OPD_RELOCS): Define.
3678 (ppc64_elf_check_relocs): Use it.
3679 (ppc64_elf_relocate_section): Here too.
3680 (build_one_stub): Don't point function syms at the stub. Instead,
3681 hijack plt.offset.
3682 (ppc64_elf_relocate_section): Check whether REL24 relocs should
3683 really go to the stub. Make all dynamic relocs in opd against
3684 locals.
3685 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3686 plt.offset.
3687
f304919d
RH
36882002-01-22 Richard Henderson <rth@redhat.com>
3689
3690 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3691
c0ef99a7
AM
36922002-01-22 Alan Modra <amodra@bigpond.net.au>
3693
60ee0d4a
AM
3694 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3695 TOC_BASE_OFF adjustment.
3696
c0ef99a7
AM
3697 * Makefile.am: Run "make dep-am".
3698 * Makefile.in: Regenerate.
3699 * po/SRC-POTFILES.in: Regenerate.
3700
64328b46
AM
37012002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
3702
3703 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3704 host defines.
3705
59953665 37062002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
3707
3708 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3709 Check for and emit error if sgot is NULL at this point.
3710
9596feea
JT
37112002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
3712
3713 * config.bfd (ia64*-*-netbsd*): New target.
3714
7b45c6e1
AM
37152002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
3716
3717 * som.c (som_write_space_strings): Comment typo fix.
3718
e5094212
AM
37192002-01-21 Alan Modra <amodra@bigpond.net.au>
3720
e86ce104
AM
3721 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
3722 is_func_descriptor fields.
3723 (link_hash_newfunc): Init them.
3724 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
3725 dot are candidates for plt entries. When processing .opd relocs,
3726 set function descriptor strings to point inside function code
3727 string, and set new ppc_link_hash_entry fields.
3728 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
3729 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
3730 function descriptors. It's now done in..
3731 (func_desc_adjust): New.
3732 (ppc64_elf_func_desc_adjust): New.
3733 (define elf_backend_always_size_sections): Define.
3734 (ppc64_elf_hide_symbol): New.
3735 (define elf_backend_hide_symbol): Define.
3736 (allocate_dynrelocs): Remove code looking up function descriptors
3737 as that has been done earlier.
3738 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
3739 table.
3740 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
3741 up function descriptor.
3742 (build_one_stub): Look up the function code sym. Check for
3743 invalid plt offsets.
3744 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
3745 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
3746
e5094212
AM
3747 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
3748 boolean param.
3749 (_bfd_elf_link_hash_hide_symbol): Likewise.
3750 * elflink.h (elf_link_add_object_symbols): Adjust call to
3751 elf_backend_hide_symbol.
3752 (elf_fix_symbol_flags): Likewise.
3753 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
3754 than bfd_alloc.
3755 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
3756 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
3757 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3758 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
3759 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
3760 and adjust to suit.
3761 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
3762 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
3763 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3764
40b8271b
AM
37652002-01-18 Alan Modra <amodra@bigpond.net.au>
3766
3767 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
3768 dynamic function descriptor symbol, not the associated function
3769 symbol.
3770
55baa95b
EC
37712002-01-17 Eric Christopher <echristo@redhat.com>
3772
3773 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
3774
328577ad
NC
37752002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
3776
3777 * po/bfd.pot: Regenerate.
3778 * po/fr.po: Regenerate.
3779
af746e92
AM
37802002-01-17 Alan Modra <amodra@bigpond.net.au>
3781
3782 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
3783 Remove "Elf_Internal_Shdr *" param.
3784 (_bfd_mips_elf_section_from_bfd_section): Ditto.
3785 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
3786 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
3787 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
3788 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
3789 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
3790 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
3791 function to override special sections. Remove hdr arg from
3792 backend call, and don't loop.
3793
175e9962
EC
37942002-01-16 Eric Christopher <echristo@redhat.com>
3795
3796 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
3797 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
3798 relocations requiring gp0 and gp.
3799
96a846ea
RE
38002002-01-16 Richard Earnshaw <rearnsha@arm.com>
3801
175e9962 3802 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
3803 EF_ARM_VFP_FLOAT.
3804 (elf32_arm_print_private_bfd_data): Likewise.
3805
af3ae48d
NC
38062002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
3807
3808 * po/tr.po: Import new version.
3809
10ed1bba
AM
38102002-01-16 Alan Modra <amodra@bigpond.net.au>
3811
3812 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
3813 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
3814 (ORI_R0_R0_0): Correct.
3815
5d1634d7
AM
38162002-01-16 Alan Modra <amodra@bigpond.net.au>
3817
3818 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
3819 when plt_not_loaded.
3820 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
3821 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
3822 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
3823 (ppc64_elf_glink_code): Delete.
3824 (PPC64_ELF_GLINK_SIZE): Delete.
3825 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
3826 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
3827 ORI_R0_R0_0): Define.
3828 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
3829 (struct ppc_link_hash_table): Add sstub and plt_overflow.
3830 (ppc64_elf_link_hash_table_create): Init them.
3831 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
3832 Don't copy to shared lib.
3833 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
3834 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
3835 (allocate_dynrelocs <plt>): Don't change function sym here. Make
3836 room for .stub and .glink code.
3837 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
3838 DT_PPC64_GLINK.
3839 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
3840 bfd_elf64_bfd_final_link.
3841 (bfd_elf64_bfd_final_link): Don't define.
3842 (ppc64_elf_size_stubs): New.
3843 (build_plt_stub): New.
3844 (build_one_stub): New.
3845 (ppc64_elf_build_stubs): New.
3846 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
3847 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
3848 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
3849 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
3850 case output sections not separate. Adjust DT_RELASZ to not
3851 include plt relocs. Set reserved got entry. Set got and plt
3852 entry size.
3853 (elf_backend_got_header_size): Set to 8.
3854 * elf64-ppc.h: New file.
3855
c601ffdb
AM
38562002-01-16 Alan Modra <amodra@bigpond.net.au>
3857
3858 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
3859 sections, use bfd_section_list_remove.
3860 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3861 * elflink.h (elf_link_add_object_symbols): When removing all
3862 sections, use bfd_section_list_clear.
3863
8fb4cb7f
NC
38642002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3865
3866 * po/sv.po: New file: Swedish translation.
3867 * configure.in (ALL_LINGUAS): Add sv.
3868 * configure: Regenerate.
3869
d3c456e9
JJ
38702002-01-15 Jakub Jelinek <jakub@redhat.com>
3871
3872 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
3873 * elf.c (merge_sections_remove_hook): New function.
3874 (_bfd_elf_merge_sections): Pass it as 3rd argument to
3875 _bfd_merge_sections.
3876 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
3877 * libbfd.h: Rebuilt.
3878 * merge.c (_bfd_merge_sections): Add remove_hook argument.
3879 Call remove_hook if a SEC_EXCLUDE section is encountered.
3880
1f7fd478
NC
38812002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3882
3883 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
3884 (xstormy16_reloc_map): Initialise new field with correct howto
3885 table.
3886 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
3887 howto entry.
3888
b87011e9
MS
38892002-01-10 Michael Snyder <msnyder@redhat.com>
3890
3891 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
3892 (elfcore_write_pstatus): Use long instead of pid_t;
3893 * elf-bfd.h: Change prototypes to use long instead of pid_t;
3894
175e9962 38952002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
3896
3897 * elf.c: Update copyright years.
3898 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
3899 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
3900
7c76fa91
MS
39012002-01-08 Michael Snyder <msnyder@redhat.com>
3902
3903 Add capability to write corefile note sections, for gdb.
3904 * elf.c (elfcore_write_note): New function.
3905 (elfcore_write_prpsinfo): New function.
3906 (elfcore_write_prstatus): New function.
3907 (elfcore_write_pstatus): New function.
3908 (elfcore_write_prfpreg): New function.
3909 (elfcore_write_prxfpreg): New function.
97996af6 3910 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 3911
e1fddb6b
AO
39122002-01-08 Alexandre Oliva <aoliva@redhat.com>
3913
3914 * elf.c (elf_fake_sections): Propagate errors from
3915 elf_backend_fake_section.
3916
8d05742f
JT
39172002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
3918
3919 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3920 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3921 (elf32-sh-nbsd.lo): New rule.
3922 * Makefile.in: Regenerate.
3923 * config.bfd (sh*le-*-netbsdelf*): New target.
3924 (sh*-*-netbsdelf*): New target.
3925 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3926 (bfd_elf32_shnbsd_vec): New vector.
3927 (bfd_elf32_shlnbsd_vec): New vector.
3928 * configure: Regenerate.
3929 * elf32-sh-nbsd.c: New file.
3930 * targets.c: Update copyright years.
175e9962 3931 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
3932 bfd_elf32_shnbsd_vec.
3933
1dba4cb4
AH
39342002-01-07 Aldy Hernandez <aldyh@redhat.com>
3935
3936 * coff-rs6000.c (READ20): Use bfd_scan_vma.
3937
47b22aef
GK
39382002-01-07 Geoffrey Keating <geoffk@redhat.com>
3939
3940 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3941 of a symbol in a section that will be deleted.
3942
be2d1673
NC
39432002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
3944
3945 * po/es.po: New file: Spanish translation.
3946 * configure.in (ALL_LINGUAS): Add es.
3947 * configure: Regenerate.
3948
d9cf1b54
AM
39492002-01-06 Steve Ellcey <sje@cup.hp.com>
3950
3951 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3952 argument so we can handle HP-UX specially.
3953 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3954 (elfNN_hpux_backend_section_from_bfd_section): New for support
3955 of SHN_IA_64_ANSI_COMMON.
3956 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3957 (is_unwind_section_name): Add special HP-UX support.
3958 (elfNN_ia64_section_from_shdr): Add support for more sections.
3959 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3960 add support for more sections.
3961 (elfNN_ia64_additional_program_headers): Modify
3962 is_unwind_section_name call.
3963 (elfNN_ia64_modify_segment_map): Remove assumption that there is
3964 only one unwind section in segment.
3965
3f3c5c34
AM
39662002-01-06 Alan Modra <amodra@bigpond.net.au>
3967
3968 * syms.c (_bfd_generic_make_empty_symbol): New function.
3969 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3970 _bfd_generic_make_empty_symbol.
3971 * libbfd.h: Regenerate.
3972 * bfd-in2.h: Regenerate.
3973 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3974 (hppabsd_core_get_symtab_upper_bound): Don't define.
3975 (hppabsd_core_get_symtab): Likewise.
3976 (hppabsd_core_print_symbol): Likewise.
3977 (hppabsd_core_get_symbol_info): Likewise.
3978 (hppabsd_core_bfd_is_local_label_name): Likewise.
3979 (hppabsd_core_get_lineno): Likewise.
3980 (hppabsd_core_find_nearest_line): Likewise.
3981 (hppabsd_core_bfd_make_debug_symbol): Likewise.
3982 (hppabsd_core_read_minisymbols): Likewise.
3983 (hppabsd_core_minisymbol_to_symbol): Likewise.
3984 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3985 Formatting fixes.
3986 * hpux-core.c: Similarly.
3987 * irix-core.c: Similarly.
3988 * osf-core.c: Similarly.
3989 * sco5-core.c: Similarly.
3990 * binary.c (binary_make_empty_symbol): Remove function, define as
3991 _bfd_generic_make_empty_symbol.
3992 * ihex.c (ihex_make_empty_symbol): Likewise.
3993 * mmo.c (mmo_make_empty_symbol): Likewise.
3994 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3995 * srec.c (srec_make_empty_symbol): Likewise.
3996 * versados.c (versados_make_empty_symbol): Likewise.
3997 * vms.c (_bfd_vms_make_empty_symbol): Remove.
3998 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3999 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
4000 rather than _bfd_vms_make_empty_symbol.
4001 * vms-misc.c (new_symbol): Likewise.
4002
3f0a7f7f
AM
40032002-01-05 Alan Modra <amodra@bigpond.net.au>
4004
9e7b37b3
AM
4005 * section.c (bfd_section_init): Remove unnecessary initialisations.
4006 (bfd_section_list_clear): New function.
4007 (bfd_section_list_remove, bfd_section_list_insert): New macros.
4008 (_bfd_strip_section_from_output): Use them.
4009 * coffcode.h (coff_set_alignment_hook): Likewise.
4010 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
4011 * elf64-mips.c (mips_elf64_final_link): Likewise.
4012 * elf64-mmix.c (mmix_elf_final_link): Likewise.
4013 * sunos.c (sunos_add_dynamic_symbols): Likewise.
4014 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
4015 * bfd-in2.h: Regenerate.
4016
4017 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
4018 rather than doing our own section handling. Clean up after errors
4019 with bfd_release and bfd_section_list_clear. Handle unexpected
4020 flags.
4021 * aoutf1.h (sunos4_core_file_p): Likewise.
4022 * aix386-core.c (aix386_core_file_p): Likewise.
4023 * cisco-core.c (cisco_core_file_validate): Likewise.
4024 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
4025 * trad-core.c (trad_unix_core_file_p): Likewise.
4026
4027 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
4028 with bfd_release and bfd_section_list_clear.
4029 * hpux-core.c (hpux_core_core_file_p): Likewise.
4030 * irix-core.c (irix_core_core_file_p): Likewise.
4031 * lynx-core.c (lynx_core_file_p): Likewise.
4032 * osf-core.c (osf_core_core_file_p): Likewise.
4033 * rs6000-core.c (rs6000coff_core_p): Likewise.
4034 * sco5-core.c (sco5_core_file_p): Likewise.
4035
3f0a7f7f
AM
4036 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
4037 sign extension adjustments without conditionals.
4038
a3aa38ee
JJ
40392002-01-04 Jakub Jelinek <jakub@redhat.com>
4040
4041 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
4042 CIE at .eh_frame start is removed due to no FDEs referencing it.
4043
8a8b2d4b
AJ
40442002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
4045
4046 * config.bfd (x86_64-*-netbsd*): New target.
4047 * configure.in (x86_64-*-netbsd*): Set COREFILE
4048 to netbsd-core.lo.
4049 * configure: Regenerated.
4050
04b5af89
TR
40512002-01-03 Tom Rix <trix@redhat.com>
4052
4053 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
4054 for recent bfd_make_section_anyway change.
4055
51c5503b
NC
40562002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
4057
4058 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4059 R_ARM_THM_PC11 reloc.
4060
07f7c046
NC
40612002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4062
4063 * configure.in (LINGUAS): Add ja.
4064 * configure: Regenerate.
4065 * po/ja.po: Import from translation project's web site.
4066
5eefb65f
NC
40672002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4068
4069 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
4070 messages to ease translation into other languages.
4071
39e90f10 4072For older changes see ChangeLog-0001
56882138
AM
4073\f
4074Local Variables:
4075mode: change-log
4076left-margin: 8
4077fill-column: 74
4078version-control: never
4079End:
This page took 0.26325 seconds and 4 git commands to generate.