]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
* osabi.c (generic_elf_osabi_sniffer): Add check for FreeBSD 3.x's
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
bc0ba537
AM
12002-07-04 Alan Modra <amodra@bigpond.net.au>
2
3 * section.c (_bfd_strip_section_from_output): Remove unnecessary
4 link order code. Don't actually remove the output section here;
5 Just set a flag for the linker to do so.
6 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7 sections when setting up output section dynsyms.
8
797fc050
AM
92002-07-04 Alan Modra <amodra@bigpond.net.au>
10
11 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
12 fudge.
13 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
14 libs here instead.
15
99881371
MS
162002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
17
18 * elf64-s390.c (create_got_section): Set .got section alignment to
19 8 bytes.
20 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
21
47d9a591
AM
222002-07-02 Alan Modra <amodra@bigpond.net.au>
23
24 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
25
179d3252
JT
262002-07-01 Matt Thomas <matt@3am-software.com>
27
28 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
29 to EF_VAX_*.
30
4a14403c
TS
312002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
32
33 * elfxx-mips.c (ABI_64_P): Fix comment.
34 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
35 new section names for N64 ABI.
36 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
37 (mips_elf_calculate_relocation): Code formatting.
38 (mips_elf_create_dynamic_relocation): Likewise.
39 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
40 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
41 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
42 in any NewABI.
43 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
44 for NewABI.
45 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
46 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
47 here, too.
48
607c0e09
AS
492002-07-01 Andreas Schwab <schwab@suse.de>
50
51 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
52 R_X86_64_64 to R_X86_64_RELATIVE.
53
ba26fd96
AM
542002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
55
56 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
57 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
58 Run "make dep-am".
59 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
60 host_aout_vec.
61 * configure.in (vaxbsd_vec): Add.
62 * targets.c (vaxbsd_vec): Add.
63 * Makefile.in: Rebuild.
64 * configure: Rebuild.
65 * po/SRC-POTFILES.in: Rebuild.
66
1e2f5b6e
AM
672002-07-01 Alan Modra <amodra@bigpond.net.au>
68
69 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
70 examining to gc_mark_hook, rather than the bfd.
71 (elf_gc_sections): Adjust.
72 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
73 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
74 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
75 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
76 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
77 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
78 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
79 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
80 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
81 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
82 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
83 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
84 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
85 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
86 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
87 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
88 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
89 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
90 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
91 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
92 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
93 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
94 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
95 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
96 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
97 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
98 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
99 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
100 redundant local sym tests.
101 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
102 (link_hash_newfunc): Init is_entry.
103 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
104 (ppc64_elf_link_hash_table_create): Init all_local_syms.
105 (create_linkage_sections): Use bfd_make_section_anyway rather than
106 bfd_make_section.
107 (ppc64_elf_mark_entry_syms): New function.
108 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
109 up opd entry to function section map.
110 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
111 relocs that reference the opd section.
112 (edit_opd): New function.
113 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
114 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
115 (get_local_syms): Do so here. Exit if we already have local syms.
116 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
117 read local syms on non-ELF input.
118 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
119 than duplicating it's function here. Adjust free of internal
120 relocs to suit.
121 (ppc64_elf_relocate_section): Adjust local syms in opd section.
122 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
123 * elf32-hppa.c (elf32_hppa_size_stubs): Call
124 _bfd_elf32_link_read_relocs rather than duplicating it's function
125 here. Adjust free of internal relocs to suit.
126
1b71fb54
AJ
1272002-07-01 Andreas Jaeger <aj@suse.de>
128
129 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
130 are not allowed in shared libs code, enforce -fPIC.
131
8d28f606
HPN
1322002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
133
134 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
135 trailing zero-sequences when there's previous left-over data.
136
5ac81c74
JL
1372002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
138
139 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
140 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
141 and opd_rel_sec in order for starting rela section. Check _raw_size.
142 (elf_backend_reloc_type_class): Define.
143
91a4d569
AM
1442002-06-27 Kevin Buettner <kevinb@redhat.com>
145
146 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
147 DWARF2 formats.
148
feee612b
AM
1492002-06-27 Alan Modra <amodra@bigpond.net.au>
150
151 * cpu-powerpc.c: Comment on ordering of arch_info.
152 * elf32-ppc.c (ppc_elf_object_p): New function.
153 (elf_backend_object_p): Define.
154 * elf64-ppc.c (ppc64_elf_object_p): New function.
155 (elf_backend_object_p): Define.
156
a4e6cefc
JT
1572002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
158
159 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
160 * configure: Regenerate.
161
dae2dd0d
NC
1622002-06-25 Jason Eckhardt <jle@rice.edu>
163
164 * dwarf2.c (decode_line_info): Check unit->addr_size
165 to read in the proper number of prologue bytes.
166
680f9d5c
NC
1672002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
168
169 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
170 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
171 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
172 been enabled.
dae2dd0d 173
680f9d5c
NC
174 * targets.c (_bfd_target_vector[]): Only include
175 aix5coff64_vec if 64-bit bfd support has been enabled.
176
d4c88bbb
AM
1772002-06-25 Alan Modra <amodra@bigpond.net.au>
178
179 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
180 * elf32-hppa.c (hppa_add_stub): Likewise.
181 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
182 * elflink.h (elf_add_default_symbol): Fix comment typo.
183 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
184 (elf_link_add_object_symbols): Likewise.
185 (elf_link_assign_sym_version): Likewise.
186 * hash.c (bfd_hash_lookup): Likewise.
187 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
188 * section.c (bfd_get_unique_section_name): Likewise.
189 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
190 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
191 (assign_section_numbers): Likewise.
192 (_bfd_elfcore_make_pseudosection): Likewise.
193 (elfcore_grok_lwpstatus): Likewise.
194 (elfcore_grok_win32pstatus): Likewise.
195 (elfcore_write_note): Constify input params. Use PTR instead of
196 void *. Include terminating NUL in namesz. Correct padding.
197 Support NULL "name" param. Use memcpy instead of strcpy.
198 (elfcore_write_prpsinfo): Constify input params.
199 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
200 (elfcore_write_lwpstatus): Likewise.
201 (elfcore_write_pstatus): Likewise.
202 (elfcore_write_prfpreg): Likewise.
203 (elfcore_write_prxfpreg): Likewise.
204 * elf-bfd.h (elfcore_write_note): Update declaration.
205 (elfcore_write_prpsinfo): Likewise.
206 (elfcore_write_prstatus): Likewise.
207 (elfcore_write_pstatus): Likewise.
208 (elfcore_write_prfpreg): Likewise.
209 (elfcore_write_prxfpreg): Likewise.
210 (elfcore_write_lwpstatus): Likewise.
211
b0ac09d2
NC
2122002-06-25 Jason Eckhardt <jle@rice.edu>
213
214 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
215 symbols of type stProc and stStaticProc.
216
2172002-06-25 Nick Clifton <nickc@redhat.com>
218
219 * ecoff.c: VArious formatting fixes.
220
021d6096
AM
2212002-06-25 Alan Modra <amodra@bigpond.net.au>
222
223 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
224
82e51918
AM
2252002-06-25 Alan Modra <amodra@bigpond.net.au>
226
227 * aout-adobe.c: Don't compare against "true" or "false.
228 * aout-target.h: Likewise.
229 * aoutx.h: Likewise.
230 * archive.c: Likewise.
231 * bout.c: Likewise.
232 * cache.c: Likewise.
233 * coff-a29k.c: Likewise.
234 * coff-alpha.c: Likewise.
235 * coff-i386.c: Likewise.
236 * coff-mips.c: Likewise.
237 * coff-or32.c: Likewise.
238 * coff64-rs6000.c: Likewise.
239 * coffcode.h: Likewise.
240 * coffgen.c: Likewise.
241 * cpu-ns32k.c: Likewise.
242 * ecoff.c: Likewise.
243 * ecofflink.c: Likewise.
244 * elf.c: Likewise.
245 * elf32-arm.h: Likewise.
246 * elf32-cris.c: Likewise.
247 * elf32-d30v.c: Likewise.
248 * elf32-i386.c: Likewise.
249 * elf32-mcore.c: Likewise.
250 * elf32-ppc.c: Likewise.
251 * elf32-sh.c: Likewise.
252 * elf32-sh64.c: Likewise.
253 * elf32-v850.c: Likewise.
254 * elf64-alpha.c: Likewise.
255 * elf64-sh64.c: Likewise.
256 * elfcode.h: Likewise.
257 * elfcore.h: Likewise.
258 * elflink.h: Likewise.
259 * elfxx-mips.c: Likewise.
260 * i386os9k.c: Likewise.
261 * ieee.c: Likewise.
262 * libbfd.c: Likewise.
263 * linker.c: Likewise.
264 * mmo.c: Likewise.
265 * nlm32-alpha.c: Likewise.
266 * nlm32-i386.c: Likewise.
267 * nlm32-ppc.c: Likewise.
268 * nlm32-sparc.c: Likewise.
269 * nlmcode.h: Likewise.
270 * oasys.c: Likewise.
271 * pdp11.c: Likewise.
272 * peicode.h: Likewise.
273 * reloc.c: Likewise.
274 * som.c: Likewise.
275 * srec.c: Likewise.
276 * tekhex.c: Likewise.
277 * vms.c: Likewise.
278 * xcofflink.c: Likewise.
279 * elf64-sparc.c: Edit comment to not use "== false".
280
281 * aoutf1.h: Don't use "? true : false".
282 * ecoff.c: Likewise.
283 * format.c: Likewise.
284 * ieee.c: Likewise.
285 * linker.c: Likewise.
286 * mmo.c: Likewise.
287 * oasys.c: Likewise.
288
48fc70a2
AM
2892002-06-23 H.J. Lu <hjl@gnu.org>
290
291 * elflink.h (elf_link_add_archive_symbols): For the default
292 version, check references with only one `@' first.
293
47b7c2db
AM
2942002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
295
296 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
297 function.
298 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
299 symbol table.
300 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
301 (elf64_hppa_size_dynamic_sections): Revise to use
302 elf64_hppa_mark_milli_and_exported_functions.
303 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
304 symbols out of dynamic symbol table.
305
f5d44ba0
AM
3062002-06-23 Alan Modra <amodra@bigpond.net.au>
307
bb3fff1e
AM
308 * Makefile.in: Regenerate.
309 * libbfd.h: Regenerate.
310 * bfd-in2.h: Regenerate.
311 * configure: Regenerate.
312 * po/SRC-POTFILES.in: Regenerate.
313
f5d44ba0
AM
314 * elflink.h: Comment typo fixes.
315
3162002-06-23 H.J. Lu <hjl@gnu.org>
317
318 * elf-bfd.h (elf_link_loaded_list): New structure.
319 (elf_link_hash_table): Add "loaded".
320 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
321 * elflink.h (elf_link_check_versioned_symbol): New function.
322 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
323
cc36acdf
NC
3242002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
325
326 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 327 support an ELF style hash table, return true, indicating that
cc36acdf
NC
328 nothing needed to be done, rather than false, indicating that the
329 section's size could not be computed.
330
4e5ba5b7
DB
3312002-06-18 Dave Brolley <brolley@redhat.com>
332
333 From Catherine Moore, Michael Meissner, Dave Brolley:
334 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
335 * targets.c: Support bfd_elf32_frv_vec.
336 * reloc.c: Add FRV relocs.
337 * configure.in: Add support for bfd-elf32-frv-vec.
338 * config.bfd (targ_cpu): Add support for frv-*-elf.
339 * archures.c: Add frv arch and machines.
340 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
341 (ALL_MACHINES_CFILES): Add cpu-frv.c.
342 (BFD32_BACKENDS): Add elf32-frv.lo.
343 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
344 (cpu-frv.lo): New target.
345 (elf32-frv.lo): New target.
346 * cpu-frv.c: New file.
347 * elf32-frv.c: New file.
348
7ece0d85
JJ
3492002-06-18 Jakub Jelinek <jakub@redhat.com>
350
351 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
352 e_shnum == 0.
353 Only read the first section header if e_shoff is non-zero.
354 Don't consider e_shstrndx if there are no sections.
355
57fb03ac
TR
3562002-06-17 Tom Rix <trix@redhat.com>
357
358 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 359 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
360 complain_overflow_bitfield.
361
341ca622
AM
3622002-06-17 Alan Modra <amodra@bigpond.net.au>
363
767e34d1
AM
364 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
365 (bfd_fdopenr): Likewise.
366 (bfd_openstreamr): Likewise.
367 (bfd_openw): Likewise.
368
341ca622
AM
369 * targets.c: Sort target vecs.
370 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
371 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
372 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
373 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
374 * configure.in: Sort target vecs. Add m88kmach3_vec.
375 * configure: Regenerate.
376
dfbbae4c
HPN
3772002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
378
379 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
380 bpo_reloc_no to break sort order ties, not address of items.
381
d663e1cd
JL
3822002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
383
384 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
385 Skip excluded sections in determing __gp value.
386 (elf_hppa_final_link_relocate): Use the symbol's address in
387 R_PARISC_FPTR64 relocations that don't need an opd entry.
388 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
389 (elf64_hppa_finalize_dynreloc): Likewise.
390 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
391 (elf64_hppa_finish_dynamic_symbol): Break up assert.
392
a8295218
NC
3932002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
394
395 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
396 alignment for .bss, .data and .text sections so that sse and sse2
397 code will work.
398 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
399
4002002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
401
402 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
403 sh[1234]*-elf*.
404
3db4b612
JL
4052002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
406
2cb69dd3
JL
407 * elflink.h (elf_bfd_final_link): Improve error handling for missing
408 dynamic sections.
409
3db4b612
JL
410 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
411 for a symbol that has no output section.
412 (allocate_dynrel_entries): Correct comment.
413 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
414 unless we want one.
415 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
416 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
417 with no section. Remove unnecessary parentheses.
418
f3813499
TR
4192002-06-11 Tom Rix <trix@redhat.com>
420
421 * coffcode.h (coff_compute_section_file_positions): Add data
422 section to AIX loader alignment check.
423
f5d44ba0 424 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
425 alignment to 4 bytes.
426 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
427 power accessor macro.
428 (do_shared_object_padding): Remove invalid assertion.
429
0ebaf185
RS
4302002-06-10 Richard Sandiford <rsandifo@redhat.com>
431
432 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
433 for removed output sections.
434
ebe3e2d1
NC
4352002-06-10 Geoffrey Keating <geoffk@redhat.com>
436
437 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
438 htab_alloc.
439 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
440
0b14c2aa
L
4412002-06-08 H.J. Lu <hjl@gnu.org>
442
443 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
444 work around a long long bug in gcc 2.96 on mips.
445
3c2bfad6
JT
4462002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
447
448 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
449 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
450 Regenerate dependency lists.
451 * Makefile.in: Regenerate.
452 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
453 vax1knetbsd_vec to targ_selvecs.
454 * configure.in: Add vax1knetbsd_vec.
455 * configure: Regenerate.
456 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
457 * vax1knetbsd.c: New file.
458 * vaxnetbsd.c: Update copyright years.
459 (TARGET_PAGE_SIZE): Set to 0x1000.
460 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
461
91149be3
JT
4622002-06-08 Matt Thomas <matt@3am-software.com>
463
464 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
465
21e15248
AM
4662002-06-08 Alan Modra <amodra@bigpond.net.au>
467
468 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
469
986b7daa
AM
4702002-06-08 Alan Modra <amodra@bigpond.net.au>
471
e90b95f6
AM
472 * Makefile.am: Run "make dep-am".
473 * Makefile.in: Regenerate.
474
3f9c735e
AM
475 * armnetbsd.c: Replace CONST with const.
476 * corefile.c: Likewise.
477 * elf32-dlx.c: Likewise.
478 * elf64-mips.c: Likewise.
479 * mmo.c: Likewise.
480 * ns32knetbsd.c: Likewise.
481
986b7daa
AM
482 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
483 table is elf64-sparc.
484
5a659663
TS
4852002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
486
487 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
488 Fix RELA addends to get not shifted in the result. Don't do special
489 handling of R_MIPS_64 for NewABI.
490
9bab7074
AM
4912002-06-07 Alan Modra <amodra@bigpond.net.au>
492
493 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
494 (NAME(aout,slurp_reloc_table)): Likewise.
495 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
496 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
497 (xcoff_write_archive_contents_big): Likewise.
498 (xcoff_generate_rtinit): Likewise.
499 (xcoff_generate_rtinit): Likewise, and check error return.
500 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
501 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
502 (coff_get_normalized_symtab): Likewise.
503 (coff_make_empty_symbol): Likewise.
504 (bfd_coff_set_symbol_class): Likewise.
505 * cofflink.c (coff_link_add_symbols): Likewise.
506 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
507 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
508 (bfd_ecoff_write_accumulated_debug): Likewise.
509 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
510 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
511 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
512 * ieee.c (do_with_relocs): Use bfd_zalloc.
513 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
514 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
515 (NAME(aout,slurp_reloc_table)): Likewise.
516 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
517 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
518 * som.c (som_build_and_write_symbol_table): Likewise.
519 (som_slurp_string_table): Likewise.
520 (som_slurp_symbol_table): Likewise.
521 (som_bfd_ar_write_symbol_stuff): Likewise.
522 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
523 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
524 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
525 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
526 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
527
1126897b
AM
5282002-06-07 Alan Modra <amodra@bigpond.net.au>
529
530 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
531 "group" union.
532 (elf_group_name): Update.
533 (elf_group_id): Define.
534 (bfd_elf_set_group_contents): Declare.
535 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
536 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
537 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
538 that sym for the signature.
539 (_bfd_elf_compute_section_file_positions): Don't call
540 set_group_contents for "ld -r" case.
541 (swap_out_syms): Use bfd_zalloc.
542 * elflink.h (elf_link_add_archive_symbols): Likewise.
543 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
544 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
545
3fad3c7c
AM
5462002-06-07 Alan Modra <amodra@bigpond.net.au>
547
548 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
549 relocs in opd for non-shared too.
550
76f99c63
JL
5512002-06-06 Jeffrey Law <law@redhat.com
552
553 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
554 relocations.
555
7217313c
NC
5562002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
557
558 * merge.c: Include libiberty.h.
559 * elf-strtab.c: Include libiberty.h.
560
6cb22815
AM
5612002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
562
563 * peXXigen.c (pe_print_idata): Remove unused variable.
564
1ed89aa9
NC
5652002-06-06 David Heine <dlheine@tensilica.com>
566
567 * elf.c (assign_file_positions_for_segments): Remove unallocated
568 sections from the section to segment mapping for PT_LOAD segments.
569 Update comment about empty loadable segments.
570
644c4c80
RS
5712002-06-06 Richard Sandiford <rsandifo@redhat.com>
572
573 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
574 is within the .stabstr section.
575
f8ecb12b
AM
5762002-06-06 Alan Modra <amodra@bigpond.net.au>
577
578 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
579 are "const PTR", not "const PTR *".
580 (bfd_elf32_swap_symbol_in): Likewise.
581 (bfd_elf64_swap_symbol_in): Likewise.
582 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
583 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
584 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
585 (elf_link_add_object_symbols): Likewise.
586 (elf_link_record_local_dynamic_symbol): Likewise.
587 (elf_link_input_bfd): Likewise.
588 (elf_gc_mark): Likewise.
589 (elf_reloc_symbol_deleted_p): Likewise.
590 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
591 (mn10200_elf_relax_delete_bytes): Likewise.
592 (mn10200_elf_symbol_address_p): Likewise.
593 (mn10200_elf_get_relocated_section_contents): Likewise.
594 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
595 (mn10300_elf_relax_section): Likewise.
596 (mn10300_elf_relax_delete_bytes): Likewise.
597 (mn10300_elf_symbol_address_p): Likewise.
598 (mn10300_elf_get_relocated_section_contents): Likewise.
599 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
600 (elf32_h8_relax_delete_bytes): Likewise.
601 (elf32_h8_symbol_address_p): Likewise.
602 (elf32_h8_get_relocated_section_contents): Likewise.
603 * elf32-hppa.c (get_local_syms): Likewise.
604 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
605 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
606 * elf32-sh.c (sh_elf_relax_section): Likewise.
607 (sh_elf_relax_delete_bytes): Likewise.
608 (sh_elf_get_relocated_section_contents): Likewise.
609 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
610 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
611 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
612 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
613 * elf64-ppc.c (get_local_syms): Likewise.
614 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
615 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
616
1ed89aa9 6172002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
618
619 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
620
73ff0d56
AM
6212002-06-05 Alan Modra <amodra@bigpond.net.au>
622
9dce4196
AM
623 * elf.c (group_signature): Swap in the whole symbol, and handle
624 extracting section symbol names.
625 (setup_group): Add comment.
626 (set_group_contents): When called from objcopy or ld, arrange for
627 section contents to be written. Write group member output section
628 indices to allow objcopy to reorganize sections.
629 (_bfd_elf_copy_private_section_data): Copy group info.
630
73ff0d56
AM
631 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
632 (bfd_elf32_swap_symbol_in): Update prototype.
633 (bfd_elf64_swap_symbol_in): Likewise.
634 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
635 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
636 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
637 (elf_link_add_object_symbols): Likewise.
638 (elf_link_record_local_dynamic_symbol): Likewise.
639 (elf_link_input_bfd): Likewise.
640 (elf_gc_mark): Likewise.
641 (elf_reloc_symbol_deleted_p): Likewise.
642 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
643 (mn10200_elf_relax_delete_bytes): Likewise.
644 (mn10200_elf_symbol_address_p): Likewise.
645 (mn10200_elf_get_relocated_section_contents): Likewise.
646 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
647 (mn10300_elf_relax_section): Likewise.
648 (mn10300_elf_relax_delete_bytes): Likewise.
649 (mn10300_elf_symbol_address_p): Likewise.
650 (mn10300_elf_get_relocated_section_contents): Likewise.
651 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
652 (elf32_h8_relax_delete_bytes): Likewise.
653 (elf32_h8_symbol_address_p): Likewise.
654 (elf32_h8_get_relocated_section_contents): Likewise.
655 * elf32-hppa.c (get_local_syms): Likewise.
656 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
657 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
658 * elf32-sh.c (sh_elf_relax_section): Likewise.
659 (sh_elf_relax_delete_bytes): Likewise.
660 (sh_elf_get_relocated_section_contents): Likewise.
661 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
662 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
663 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
664 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
665 * elf64-ppc.c (get_local_syms): Likewise.
666 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
667 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
668 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
669 * elf64-alpha.c (alpha_elf_size_info): Likewise.
670 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
671 * elf64-mips.c (mips_elf64_size_info): Likewise.
672 * elf64-s390.c (s390_elf64_size_info): Likewise.
673 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
674
53bfd6b4
MR
6752002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
676
677 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
678 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
679 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
680 _bfd_mips_elf_ignore_discarded_relocs.
681 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
682
d4df96e6
L
6832002-06-05 H.J. Lu <hjl@gnu.org>
684
685 * elfxx-mips.c (mips_elf_calculate_relocation): Call
686 _bfd_elf_rel_local_sym for STT_SECTION relocations against
687 the SEC_MERGE section.
688
e61463e1
AM
6892002-06-05 Alan Modra <amodra@bigpond.net.au>
690
3cac74d0
AM
691 * coff-alpha.c: Update copyright date.
692 * coff-mips.c: Likewise.
693 * xcoff-target.h: Likewise.
694
e61463e1
AM
695 * bfd-in.h: Remove "taken from the source" comment.
696 * libbfd-in.h: Likewise.
697 * libcoff-in.h: Likewise.
698 * bfd-in2.h: Regenerate.
699 * libbfd.h: Regenerate.
700 * libcoff.h: Regenerate.
701
702 * elf.c (bfd_elf_discard_group): Return true.
703 * elf-bfd.h (bfd_elf_discard_group): Declare.
704 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
705 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
706 * bfd.c (bfd_discard_group): Define.
707 * targets.c (struct bfd_target): Add _bfd_discard_group.
708 (BFD_JUMP_TABLE_LINK): Here too.
709 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
710 * aout-adobe.c (aout_32_bfd_discard_group): Define.
711 * aout-target.h (MY_bfd_discard_group): Define.
712 * aout-tic30.c (MY_bfd_discard_group): Define.
713 * binary.c (binary_bfd_discard_group): Define.
714 * bout.c (b_out_bfd_discard_group): Define.
715 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
716 * coffcode.h (coff_bfd_discard_group): Define.
717 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
718 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
719 * i386msdos.c (msdos_bfd_discard_group): Define.
720 * i386os9k.c (os9k_bfd_discard_group): Define.
721 * ieee.c (ieee_bfd_discard_group): Define.
722 * ihex.c (ihex_bfd_discard_group): Define.
723 * mmo.c (mmo_bfd_discard_group): Define.
724 * nlm-target.h (nlm_bfd_discard_group): Define.
725 * oasys.c (oasys_bfd_discard_group): Define.
726 * ppcboot.c (ppcboot_bfd_discard_group): Define.
727 * som.c (som_bfd_discard_group): Define.
728 * srec.c (srec_bfd_discard_group): Define.
729 * tekhex.c (tekhex_bfd_discard_group): Define.
730 * versados.c (versados_bfd_discard_group): Define.
731 * vms.c (vms_bfd_discard_group): Define.
732 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
733 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
734 (aix5coff64_vec): Likewise.
735 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
736
9cba27b2
JT
7372002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
738
739 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
740 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
741 (elf32-sh64-com.lo): New dependency list.
742 * Makefile.in: Regenerate.
743 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
744 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
745 elf32-sh64-com.lo.
746 * configure: Regenerate.
747 * elf32-sh64.c (sh64_address_in_cranges)
748 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
749 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
750 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
751 * elf32-sh64-com.c: ...here. New file.
752
8d2c33be
AM
7532002-06-04 Alan Modra <amodra@bigpond.net.au>
754
755 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
756 ATTRIBUTE_UNUSED on used params.
757 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
758 before calling bfd_section_from_elf_index on local syms.
759 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
760
5b0e55b6
JT
7612002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
762
763 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
764 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
765 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
766 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
767 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
768 * Makefile.in: Regenerate.
769 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
770 (sh64-*-netbsd*): New targets.
771 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
772 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
773 * configure: Regenerate.
774 * elf32-sh64-nbsd.c: New file.
775 * elf64-sh64-nbsd.c: New file.
776 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
777 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
778 bfd_elf64_sh64lnbsd_vec.
779
b885599b
AM
7802002-06-04 Alan Modra <amodra@bigpond.net.au>
781
782 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
783 (bfd_section_from_shdr): Likewise. Set section name of group
784 sections from signature.
785 (group_signature): Split out from setup_group. Ensure symbol table
786 is available.
787 (bfd_elf_discard_group): New function.
788 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
789 .gnu.linkonce* sections if they are members of a group.
790 (set_group_contents): Set GRP_COMDAT flag.
791 * section.c (bfd_discard_group): New function.
792 * bfd-in.h (bfd_elf_discard_group): Declare.
793 * bfd-in2.h: Regenerate.
794 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
795 (elf_linkonce_p): Define.
796
90937f86
AM
7972002-06-04 Alan Modra <amodra@bigpond.net.au>
798
799 * elf.c (bfd_section_from_shdr): Make "name" const.
800 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
801 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
802 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
803 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
804 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
805 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
806 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
807 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
808 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
809 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
810 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
811
cf6fb9ce
MR
8122002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
813
814 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
815 ABI.
816
cedb70c5
KH
8172002-06-02 Kazu Hirata <kazu@cs.umass.edu>
818
819 * elf32-arc.c: Fix formatting.
820 * elf32-arm.h: Likewise.
821 * elf32-cris.c: Likewise.
822 * elf32-dlx.c: Likewise.
823 * elf32-hppa.c: Likewise.
824 * elf32-i386.c: Likewise.
825 * elf32-i386qnx.c: Likewise.
826 * elf32-or32.c: Likewise.
827 * elf32-s390.c: Likewise.
828 * elf32-sh64.c: Likewise.
829 * elf32-vax.c: Likewise.
830 * elf32-xstormy16.c: Likewise.
831 * elf64-alpha.c: Likewise.
832 * elf64-mmix.c: Likewise.
833 * elf64-ppc.c: Likewise.
834 * elf64-s390.c: Likewise.
835 * elf64-sh64.c: Likewise.
836 * elf64-x86-64.c: Likewise.
837
048d873d
RH
8382002-06-02 Richard Henderson <rth@redhat.com>
839
840 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
841 null when there are no got entries for a symbol.
842 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
843 uninitialized variable warning.
844
4a67a098
RH
8452002-06-01 Richard Henderson <rth@redhat.com>
846
847 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
848 undefined symbols here.
849 (elf64_alpha_relax_section): Do it here. Also test for not
850 defined in the current module.
851 (elf64_alpha_relocate_section_r): Split out of ...
852 (elf64_alpha_relocate_section): ... here. Don't dereference
853 NULL when looking up local got entries.
854
f44f99a5
RH
8552002-06-01 Richard Henderson <rth@redhat.com>
856
857 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
858 symbols from JSR relaxation.
859 (elf64_alpha_size_plt_section_1): New.
860 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
861 (elf64_alpha_size_rela_got_1): ... here.
862 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
863 (elf64_alpha_size_rela_got_section): ... here.
864 (elf64_alpha_size_plt_section): New.
865 (elf64_alpha_relax_section): Call them.
866 (elf64_alpha_size_got_sections): Remove output_bfd arg.
867 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
868
9e756d64
RH
8692002-06-01 Richard Henderson <rth@redhat.com>
870
871 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
872 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
873 in shared libraries. Fix DTPRELHI and TPRELHI value.
874 (INSN_ADDQ, INSN_RDUNIQ): New.
875 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
876 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
877 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
878 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
879 Handle GOTDTPREL and GOTTPREL relocations.
880 (elf64_alpha_relax_gprelhilo): New.
881 (elf64_alpha_relax_tls_get_addr): New.
882 (elf64_alpha_relax_find_tls_segment): New.
883 (elf64_alpha_relax_section): Handle TLS relocations.
884 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
885 (elf64_alpha_check_relocs): Set it.
886
c853d7f6
RH
8872002-06-01 Richard Henderson <rth@redhat.com>
888
b646261c
RH
889 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
890
c853d7f6
RH
891 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
892 check; don't suppress dynamic relocs for non-allocated sections.
893
d7e41a96
RH
894 * elf64-alpha.c: Remove dead code.
895
5f333394
AM
8962002-05-31 Alan Modra <amodra@bigpond.net.au>
897
08e0ee05
AM
898 * bfd-in2.h: Regenerate.
899 * libbfd.h: Regenerate.
900 * po/SRC-POTFILES.in: Regenerate.
901
5f333394
AM
902 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
903 space for bss .plt.
904
caf47ea6
AM
9052002-05-31 Graeme Peterson <gp@qnx.com>
906
907 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
908 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
909 Run "make dep-am".
910 * Makefile.in: Regenerate.
911 * config.bfd: Add i[3456]86-*-nto-qnx* support.
912 * configure.in: Add bfd_elf32_i386qnx_vec support.
913 * configure: Regenerate.
914 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
915 is_contained_by_filepos, and copy_private_bfd_data_p.
916 * elf.c (assign_file_positions_for_segments): Call backend
917 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
918 (IS_CONTAINED_BY_FILEPOS): Define.
919 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
920 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
921 Fix non-K&R call to _bfd_error_handler.
922 (_bfd_elf_copy_private_section_data): Use backend
923 copy_private_bfd_data_p.
924 * elf32-i386.c: Don't include elfxx-target.h when
925 ELF32_I386_C_INCLUDED is defined.
926 * elf32-i386qnx.c: New QNX elf backend file.
927 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
928 elf_backend_is_contained_by_filepos, and
929 elf_backend_do_copy_private_bfd_data.
930 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
931
5bc56484
AM
9322002-05-31 Alan Modra <amodra@bigpond.net.au>
933
934 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
935 Move other similar defines to start of file.
936
1b164155
TR
9372002-05-30 Tom Rix <trix@redhat.com>
938
939 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
940 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
941
3765b1be
RH
9422002-05-30 Richard Henderson <rth@redhat.com>
943
944 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
945 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
946 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
947 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
948 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
949 (struct alpha_elf_obj_tdata): Rename total_got_entries and
950 n_local_got_entries to total_got_size and local_got_size.
951 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
952 (alpha_got_entry_size): New.
953 (elf64_alpha_relax_with_lituse): Use it.
954 (elf64_alpha_relax_without_lituse): Likewise.
955 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
956 (get_got_entry): New.
957 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
958 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
959 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
960 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
961 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
962 (elf64_alpha_calc_got_offsets): Likewise.
963 (alpha_dynamic_entries_for_reloc): New.
964 (elf64_alpha_calc_dynrel_sizes): Use it.
965 (elf64_alpha_size_dynamic_sections): Likewise.
966 (elf64_alpha_relocate_section): Handle TLS relocations.
967 * reloc.c: Add Alpha TLS relocations.
968 * bfd-in2.h, libbfd.h: Rebuild.
969
5e226794
NC
9702002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
971
972 * peXXigen.c (pe_print_idata): Remove double printed
973 import table lines; add Bound-To comment.
974
90ace9e9
JT
9752002-05-29 Matt Thomas <matt@3am-software.com>
976
977 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
978 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
979 (elf32-vax.lo): New rule.
980 * Makefile.in: Regenerate.
981 * configure.in (bfd_elf32_vax_vec)
982 (vaxnetbsd_vec): New vectors.
983 * configure: Regenerate.
984 * config.bfd (vax-*-netbsdelf*)
985 (vax-*-netbsdaout*)
986 (vax-*-netbsd*): New targets.
987 * elf32-vax.c: New file.
988 * reloc.c: Add VAX relocations.
989 * bfd-in2.h: Regenerate.
990 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
991
4a253e81
JT
9922002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
993
994 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
995 and bfd_elf32_bigarm_vec to targ_selvecs.
996
6e7c73dd
CF
9972002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
998
999 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1000 with auto-imported symbols.
1001
8afb0e02
NC
10022002-05-29 Adam Nemet <anemet@lnxw.com>
1003
1004 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1005 sections only record bfd.
9bab7074 1006 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 1007 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 1008 * bfd-in2.h: Regenerate.
8afb0e02 1009
a95653f5
NC
10102002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
1011
1012 * syms.c (_bfd_stab_section_find_nearest_line): Move
1013 declaration and initialisation of saw_line and saw_func out of
1014 for loop.
1015
7cdc5bba
AM
10162002-05-29 Alan Modra <amodra@bigpond.net.au>
1017
1018 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
1019 (bfd_elf64_get_symbol_info): Define.
1020 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
1021
4c7aad1c
AM
10222002-05-29 Andrey Volkov <avolkov@transas.com>
1023
1024 * cpu-h8300.c: Make default h8300 machine first in machine list.
1025
d172d4ba
NC
10262002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
1027
1028 * config.bfd: Added DLX configuraton.
1029 * Makefile.am: Added DLX configuraton.
1030 * configure.in: Added DLX configuraton.
1031 * archures.c: Add DLX architecure.
1032 * reloc.c: Add DLX relocs.
1033 * targets.c: Added DLX target vector.
1034 * configure: Regenerate.
1035 * Makefile.in: Regenreate.
1036 * bfd-in2.h: Regenreate.
1037 * elf32-dlx.c: New file: Support DLX target.
1038 * cpu-dlx.c: New file: Support DLX target.
1039
d1329ca3
AM
10402002-05-25 Alan Modra <amodra@bigpond.net.au>
1041
428d0de3
AM
1042 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
1043
d1329ca3
AM
1044 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
1045 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
1046 strings to point inside function code sym string.
1047 (func_desc_adjust): Likewise.
1048 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
1049
3bab7989
ML
10502002-05-24 Michal Ludvig <mludvig@suse.cz>
1051
1052 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
1053 (elf64_x86_64_grok_psinfo): Added.
1054
436e8db0
NC
10552002-05-24 TAMURA Kent <kent@netbsd.org>
1056
1057 * config.bfd: Add a target for i386-netbsdpe.
1058
ea1e4b0d
AM
10592002-05-24 Alan Modra <amodra@bigpond.net.au>
1060
1061 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
1062 and is_func_descriptor.
1063 (func_desc_adjust): Hide function code sym in shared libs unless
1064 there is a matching exported function descriptor sym.
1065
13ae64f3
JJ
10662002-05-23 Jakub Jelinek <jakub@redhat.com>
1067
1068 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
1069 for symbols from SHF_TLS section.
1070 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
1071 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
1072 (map_sections_to_segments): Build PT_TLS segment if necessary.
1073 (assign_file_positions_for_segments): Likewise.
1074 (get_program_header_size): Account for PT_TLS segment.
1075 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
1076 SEC_THREAD_LOCAL sections to STT_TLS.
1077 * reloc.c: Add 386 and IA-64 TLS relocs.
1078 * section.c (SEC_THREAD_LOCAL): Define.
1079 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
1080 Remove.
1081 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
1082 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
1083 unconditionally.
1084 (struct elf_final_link_info): Add first_tls_sec.
1085 (elf_bfd_final_link): Set first_tls_sec.
1086 Compute elf_hash_table (info)->tls_segment.
1087 (elf_link_output_extsym): Handle STT_TLS symbols.
1088 (elf_link_input_bfd): Likewise.
1089 * syms.c (BSF_THREAD_LOCAL): Define.
1090 * bfd-in2.h: Rebuilt.
1091 * libbfd.h: Rebuilt.
1092 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
1093 elf_i386_mkobject, elf_i386_object_p): New functions.
1094 (elf_howto_table): Add TLS relocs.
1095 (elf_i386_reloc_type_lookup): Support TLS relocs.
1096 (elf_i386_info_to_howto_rel): Likewise.
1097 (struct elf_i386_link_hash_entry): Add tls_type.
1098 (struct elf_i386_obj_tdata): New.
1099 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
1100 New macros.
1101 (struct elf_i386_link_hash_table): Add tls_ldm_got.
1102 (link_hash_newfunc): Clear tls_type.
1103 (elf_i386_check_relocs): Support TLS relocs.
1104 (elf_i386_gc_sweep_hook): Likewise.
1105 (allocate_dynrelocs): Likewise.
1106 (elf_i386_size_dynamic_sections): Likewise.
1107 (elf_i386_relocate_section): Likewise.
1108 (elf_i386_finish_dynamic_symbol): Likewise.
1109 (bfd_elf32_mkobject, elf_backend_object_p): Define.
1110 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
1111 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
1112 want_tprel, want_dtpmod, want_dtprel.
1113 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
1114 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
1115 R_IA64_LTOFF_TPREL22.
1116 (elf_code_to_howto_index): Add TLS relocs.
1117 (elfNN_ia64_check_relocs): Support TLS relocs.
1118 (allocate_global_data_got): Account for TLS .got data.
1119 (allocate_dynrel_entries): Account for TLS dynamic relocations.
1120 (elfNN_ia64_install_value): Supprt TLS relocs.
1121 (set_got_entry): Support TLS relocs.
1122 (elfNN_ia64_relocate_section): Likewise.
1123
c62e1cc3
NC
11242002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
1125
1126 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
1127 BLX reloc round the relocation up rather than down.
1128 * coff-arm.c (coff_arm_relocate_section): Likewise.
1129
c5a43a5d
L
11302002-05-21 H.J. Lu (hjl@gnu.org)
1131
1132 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
1133 definition.
1134
afbe61cf
AM
11352002-05-22 Alan Modra <amodra@bigpond.net.au>
1136
1137 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
1138 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
1139
9c07fe7c
AM
11402002-05-22 Alan Modra <amodra@bigpond.net.au>
1141
1142 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
1143 unresolved relocs.
1144 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
1145
21611032
TS
11462002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1147
1148 * bfd/bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
1149 non-ELF targets.
1150
41241523
TS
11512002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1152
1153 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
1154 an error value.
1155 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
1156 return with false on error.
1157 (elf_link_input_bfd): Check reloc_emitter return value.
1158
658f2588
JT
11592002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
1160
1161 * config.bfd (armeb-*-netbsdelf*): New target.
1162
c862ae31
AM
11632002-05-20 Alan Modra <amodra@bigpond.net.au>
1164
1165 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
1166 at the plt call stub.
1167
6dd14845
TS
11682002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1169
1170 * cpu-mips.c (mips_compatible): Don't try to check machine
1171 compatibility.
1172
a58d9c34
TR
11732002-05-18 Tom Rix <trix@redhat.com>
1174
1175 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
1176
ef60b7ff
AM
11772002-05-17 Alan Modra <amodra@bigpond.net.au>
1178
1179 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
1180 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
1181 we've already warned about an undefined symbol. Report more
1182 detail on reloc errors.
1183
a703a6ea
AM
11842002-05-17 Alan Modra <amodra@bigpond.net.au>
1185
1186 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
1187 * configure.in: Invoke AM_INSTALL_LIBBFD.
1188 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
1189 (install_libbfd): .. New target.
1190 (uninstall_libbfd): Likewise.
1191 (install-bfdlibLTLIBRARIES): Likewise.
1192 (uninstall-bfdlibLTLIBRARIES): Likewise.
1193 (bfdlibdir): New.
1194 (bfdincludedir): New.
1195 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
1196 * aclocal.m4: Regenerate.
1197 * configure: Regenerate.
1198 * Makefile.in: Regenerate.
1199
2c13d98b
NC
12002002-05-17 Stuart Balfour <sbalfour@cisco.com>
1201
1202 * hash.c (bfd_hash_lookup): Remove computation of len from inside
1203 hash loop.
1204
629936c5
NC
12052002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
1206
1207 * config.bfd: Add targets for sh64-linux (little endian and
1208 big endian).
1209
e4cf60a8
NC
12102002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
1211
1212 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
1213 is located in the same section as the import table. Instead
1214 check, and if necessary load the section containing the thunk.
1215
d1e66cd4
NC
12162002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
1217
1218 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
1219 bfd_bread.
1220 (xcoff64_core_file_matches_executable_p): Replace bfd_read
1221 with bfd_bread.
d1e66cd4 1222
2d653fc7
AM
12232002-05-15 Alan Modra <amodra@bigpond.net.au>
1224
1225 * aix5ppc-core.c: Warning fixes.
1226 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
1227 * aout-target.h (MY_bfd_link_just_syms): Define.
1228 * aout-tic30.c (MY_bfd_link_just_syms): Define.
1229 * bfd.c (bfd_link_just_syms): Define.
1230 * binary.c (binary_bfd_link_just_syms): Define.
1231 * bout.c (b_out_bfd_link_just_syms): Define.
1232 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
1233 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
1234 * coffcode.h (coff_bfd_link_just_syms): Define.
1235 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
1236 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
1237 (_bfd_elf_link_just_syms): Declare.
1238 * elf.c (_bfd_elf_link_just_syms): New function.
1239 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
1240 sections haven't already been discarded by the linker.
1241 * elflink.h (elf_link_add_object_symbols): Likewise for stab
1242 sections and SEC_MERGE sections.
1243 (elf_bfd_discard_info): Similarly here.
1244 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
1245 * i386msdos.c (msdos_bfd_link_just_syms): Define.
1246 * i386os9k.c (os9k_bfd_link_just_syms): Define.
1247 * ieee.c (ieee_bfd_link_just_syms): Define.
1248 * ihex.c (ihex_bfd_link_just_syms): Define.
1249 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
1250 (_bfd_generic_link_just_syms): Declare.
1251 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
1252 * linker.c (_bfd_generic_link_just_syms): New function.
1253 * mmo.c (mmo_bfd_link_just_syms): Define.
1254 * nlm-target.h (nlm_bfd_link_just_syms): Define.
1255 * oasys.c (oasys_bfd_link_just_syms): Define.
1256 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
1257 * som.c (som_bfd_link_just_syms): Define.
1258 * srec.c (srec_bfd_link_just_syms): Define.
1259 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
1260 (BFD_JUMP_TABLE_LINK): And here.
1261 * tekhex.c (tekhex_bfd_link_just_syms): Define.
1262 * versados.c (versados_bfd_link_just_syms): Define.
1263 * vms.c (vms_bfd_link_just_syms): Define.
1264 * libbfd.h: Regenerate.
1265 * bfd-in2.h: Regenerate.
1266
cb7394f2
TS
12672002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1268
1269 * elf32-mips.c: Remove superfluous definitions copied from
1270 elfxx-mips.c.
1271 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
1272 SGIish vectors to check the special case.
1273 (mips_elf_hi16_reloc): Fix comment.
1274 (mips_elf_got16_reloc): Likewise.
1275 (_bfd_mips_elf32_gprel16_reloc): Likewise.
1276 (elf_reloc_map): Code cleanup.
1277 (mips_reloc_map): Add comment.
1278 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
1279 (mips_elf32_rtype_to_howto): Likewise.
1280 (mips_elf32_discard_info): Likewise.
1281 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
1282 lead to IRIX compatibility now.
1283
8dc1a139
TS
12842002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1285
1286 * elfxx-mips.c: Call it IRIX, not Irix in comments.
1287
2051e1b5
JT
12882002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
1289
1290 * config.bfd (shle-*-netbsdelf*): Add target which includes
1291 sh64 support.
1292
83954261
AM
12932002-05-13 David Edelsohn <edelsohn@gnu.org>
1294
1295 * configure.in: Revert 2002-04-07. Instead, auto-configure
1296 HAVE_ST_C_IMPL.
1297 * configure: Regenerate.
1298 * config.in: Regenerate.
1299 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
1300 or AIX_5_CORE.
1301
a9bf1154
NC
13022002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
1303
1304 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
1305 corefiles as well.2
1306 * configure: Regenerate.
1307
3129eb7a
AM
13082002-05-13 Alan Modra <amodra@bigpond.net.au>
1309
1310 * Makefile.am (install-data-local): Install headers to
1311 $(exec_prefix)/include.
1312 * Makefile.in: Regenerate.
1313
a9a32010
DJ
13142002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1315 Daniel Jacobowitz <drow@mvista.com>
1316
1317 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
1318 map BFD_RELOC_RVA.
1319
13202002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
1321
1322 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
1323 hppa*-*-openbsd*): New targets.
1324 * configure.in (alpha*-*-openbsd*): Set COREFILE.
1325 * configure: Regenerate.
1326
f1f0d9ab
TR
13272002-05-10 Tom Rix <trix@redhat.com>
1328
ea1e4b0d 1329 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
1330 xcoff64_ppc_relocate_section.
1331 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
1332 * libxcoff.h: Common xcoff_reloc_type function declaration.
1333
c432ba1a
AM
13342002-05-10 Alan Modra <amodra@bigpond.net.au>
1335
16a10388 1336 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 1337 added in 2002-05-09 commit.
16a10388 1338
c432ba1a
AM
1339 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
1340 don't look for stubs on all undefined syms.
1341
4a335f3d
AM
13422002-05-09 Alan Modra <amodra@bigpond.net.au>
1343
8fc39d5d
AM
1344 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
1345 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
1346 pcrel_offset.
1347
4a335f3d
AM
1348 * elf32-i386.c (elf_howto_table): Comments.
1349 (elf_i386_relocate_section): Handle more relocs for relocatable
1350 linking and against SEC_MERGE sections.
1351
41fcb14e
AM
13522002-05-08 Alan Modra <amodra@bigpond.net.au>
1353
1354 * elf32-ppc.c (ppc_elf_create_got): New function.
1355 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 1356 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
1357 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
1358 _bfd_elf_create_got_section.
1359
b491616a
AM
13602002-05-07 Alan Modra <amodra@bigpond.net.au>
1361
1362 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
1363 * elfxx-target.h (elf_backend_rela_normal): Define.
1364 (elfNN_bed): Init rela_normal.
1365 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
1366 for section symbols here if rela_normal. Simplify abs section test.
1367 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
1368 return immediately. Remove code handling relocatable linking.
1369 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
1370 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
1371 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1372 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1373 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1374 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1375 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1376 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1377 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1378 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1379 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1380 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1381 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1382 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1383 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
1384 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1385 * elf-m10200.c (elf_backend_rela_normal): Define.
1386 * elf-m10300.c (elf_backend_rela_normal): Define.
1387 * elf32-fr30.c (elf_backend_rela_normal): Define.
1388 * elf32-i370.c (elf_backend_rela_normal): Define.
1389 * elf32-i860.c (elf_backend_rela_normal): Define.
1390 * elf32-m68k.c (elf_backend_rela_normal): Define.
1391 * elf32-mcore.c (elf_backend_rela_normal): Define.
1392 * elf32-openrisc.c (elf_backend_rela_normal): Define.
1393 * elf32-ppc.c (elf_backend_rela_normal): Define.
1394 * elf32-s390.c (elf_backend_rela_normal): Define.
1395 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
1396 * elf64-ppc.c (elf_backend_rela_normal): Define.
1397 * elf64-s390.c (elf_backend_rela_normal): Define.
1398 * elf64-x86-64.c (elf_backend_rela_normal): Define.
1399 * elfxx-ia64.c (elf_backend_rela_normal): Define.
1400 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
1401 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
1402
df212a7e
NC
14032002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
1404
1405 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
1406 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
1407
3decf53c
AM
14082002-05-06 Alan Modra <amodra@bigpond.net.au>
1409
1410 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
1411 when not relocatable. Fix reloc_emitter call for K&R.
1412
f46c2da6
AM
14132002-05-04 Alan Modra <amodra@bigpond.net.au>
1414
1415 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
1416 reloading local sym addend mistakenly removed in 2002-05-01 change.
1417
1418 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
1419 (read_abbrevs): Change "offset" param to bfd_vma.
1420 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
1421 Change "abbrev_offset" to bfd_vma.
1422 (read_indirect_string): Use correct conversion chars in error
1423 message format string, cast bfd_vma's to unsigned long.
1424 (read_abbrevs): Likewise.
1425 (read_attribute_value): Likewise.
1426 (decode_line_info): Likewise.
1427 (scan_unit_for_functions): Likewise.
1428 (parse_comp_unit): Likewise.
1429
59862849
TR
14302002-05-04 Tom Rix <trix@redhat.com>
1431
1432 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
1433 (coff_swap_reloc_out): Same.
1434 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
1435 (xcoff_swap_reloc_out): Same.
1436 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
1437 case some 16 bit relocs. Add reloc value to output.
1438 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 1439 R_RBR. Improve names.
59862849
TR
1440 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
1441 (bfd_xcoff_backend_data): Update with new reloc swap names.
1442 (bfd_pmac_xcoff_backend_data) : Same.
1443 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
1444 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 1445 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 1446 R_POS. Add reloc value to output.
ea1e4b0d
AM
1447 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
1448 bit R_RBR. Improve names, masks.
59862849
TR
1449 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
1450 (bfd_xcoff_backend_data): Update with new reloc swap names.
1451 (bfd_xcoff_aix5_backend_data) : Same.
1452
b4655ea9
AM
14532002-05-04 Alan Modra <amodra@bigpond.net.au>
1454
1455 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
1456 bfd_count top_index, input_list, all_local_syms.
1457 (elf32_hppa_setup_section_lists): New function, split from
1458 elf32_hppa_size_stubs.
1459 (elf32_hppa_next_input_section): Likewise.
1460 (group_sections): Likewise.
1461 (get_local_syms): Likewise.
1462 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
1463 stubs on undefined syms too.
1464 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 1465 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
1466 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
1467 (elf32_hppa_next_input_section): Declare.
1468
301e3139
AM
14692002-05-04 Bob Byrnes <byrnes@curl.com>
1470
1471 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
1472 _bfd_new_bfd.
1473
7c5fcef7
L
14742002-05-03 H.J. Lu (hjl@gnu.org)
1475
1476 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
1477 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
1478 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
1479 to hide a global symbol.
1480 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 1481 forced_local to true.
7c5fcef7 1482
84de6048
RH
14832002-05-02 Richard Henderson <rth@redhat.com>
1484
1485 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
1486 vs SHN_UNDEF to zero.
1487
805fc799
AM
14882002-05-02 Alan Modra <amodra@bigpond.net.au>
1489
c061c2d8
AM
1490 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
1491 16 bit reloc.
1492 <R_PPC64_SECTOFF_DS>: Likewise.
1493 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1494 SECTOFF reloc.
1495 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
1496 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
1497 SECTOFF reloc.
1498
805fc799
AM
1499 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
1500 (ppc64_elf_ha_reloc): New function.
1501 (ppc64_elf_brtaken_reloc): New function.
1502 (ppc64_elf_sectoff_reloc): New function.
1503 (ppc64_elf_sectoff_ha_reloc): New function.
1504 (ppc64_elf_toc_reloc): New function.
1505 (ppc64_elf_toc_ha_reloc): New function.
1506 (ppc64_elf_toc64_reloc): New function.
1507 (ppc64_elf_unhandled_reloc): New function.
1508 (ppc64_elf_howto_raw): Use the above.
1509 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
1510 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
1511 <R_PPC64_SECTOFF_DS>: Likewise.
1512 (IS_ABSOLUTE_RELOC): Update.
1513 (struct ppc_link_hash_table): Add have_undefweak.
1514 (ppc64_elf_link_hash_table_create): Init.
1515 (func_desc_adjust): Set have_undefweak.
1516 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
1517 add the .sfpr blr when have_undefweak.
1518 (ppc64_elf_setup_section_lists): Check hash table flavour.
1519 (ppc64_elf_next_input_section): Move output_section->owner test to
1520 ppc64elf.em.
1521 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
1522 and relocatable test. Return TOCstart and don't set elf_gp.
1523 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
1524 offset calculation. Add assert on weak sym branch tweaks.
1525 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
1526 (ppc64_elf_toc): Declare.
1527 (ppc64_elf_next_input_section): Update.
ea1e4b0d 1528
818c39a3
AM
15292002-05-01 Alan Modra <amodra@bigpond.net.au>
1530
1531 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
1532 file_name.
1533
721956f4
AM
15342002-05-01 Alan Modra <amodra@bigpond.net.au>
1535
1536 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
1537 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
1538 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
1539 call branches. Correct undefined weak destination.
1540 (ppc64_elf_func_desc_adjust): Always create at least one blr in
1541 .sfpr, and correct case where either only savef* or restf* is
1542 needed.
1543
1544 Long branch stubs, multiple stub sections.
1545 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
1546 (ppc64_elf_next_input_section): Declare.
1547 * elf64-ppc.c: Move linker-only prototypes.
1548 (STUB_SUFFIX): Define.
1549 (enum ppc_stub_type): New.
1550 (struct ppc_stub_hash_entry): New.
1551 (struct ppc_branch_hash_entry): New.
1552 (struct ppc_link_hash_entry): Add stub_cache, oh.
1553 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
1554 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
1555 Rename plt_overflow to stub_error.
1556 (ppc_stub_hash_lookup): Define.
1557 (ppc_branch_hash_lookup): Define.
1558 (stub_hash_newfunc): New function.
1559 (branch_hash_newfunc): New function.
1560 (link_hash_newfunc): Init new fields.
1561 (ppc64_elf_link_hash_table_create): Likewise.
1562 (ppc64_elf_link_hash_table_free): New function.
1563 (ppc_stub_name): New function.
1564 (ppc_get_stub_entry): New function.
1565 (ppc_add_stub): New function.
1566 (create_linkage_sections): Use bfd_make_section_anyway. Create
1567 .branch_lt and .rela.branch_lt sections. Don't create .stub.
1568 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
1569 and set up for plt call stubs. Link func and func desc syms.
1570 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
1571 (func_desc_adjust): Avoid hash lookup when func desc sym available
1572 via shortcut, and set links when processing.
1573 (ppc64_elf_hide_symbol): Likewise.
1574 (allocate_dynrelocs): Don't allocate stub section here.
1575 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
1576 Remove sstub code.
1577 (ppc_type_of_stub): New function.
1578 (build_one_stub): Delete.
1579 (ppc_build_one_stub): New function.
1580 (ppc_size_one_stub): New function.
1581 (ppc64_elf_setup_section_lists): New function.
1582 (ppc64_elf_next_input_section): New function.
1583 (group_sections): New function.
1584 (get_local_syms): New function.
1585 (ppc64_elf_size_stubs): Rewrite.
1586 (ppc64_elf_build_stubs): Rewrite.
1587 (ppc64_elf_relocate_section): Look up stub entry for REL24
1588 relocs. Don't propagate REL14* to dynamic objects. Look for long
1589 branch stubs if REL14* or REL24 relocs won't reach.
1590 (bfd_elf64_bfd_link_hash_table_free): Define.
1591
09c2219b
MM
15922002-04-30 Mark Mitchell <mark@codesourcery.com>
1593
1594 * bfd/config.bfd: Add support for powerpc-*-windiss.
1595
07b678c0
TR
15962002-04-30 Tom Rix <trix@redhat.com>
1597
1598 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
1599 symbol names into the hash table.
1600
dbe341c6
TR
16012002-04-28 Tom Rix <trix@redhat.com>
1602
1603 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 1604 calulating relocations.
dbe341c6 1605 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
1606 (xcoff_ppc_relocate_section): Use relocation and complain function
1607 tables.
1608 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
1609 (xcoff_complain_overflow_signed_func): Same.
1610 (xcoff_complain_overflow_bitfield_func): Same.
1611 (xcoff_complain_overflow_dont_func): Same.
1612 (xcoff_reloc_type_crel): New recot function.
1613 (xcoff_reloc_type_br): Same.
1614 (xcoff_reloc_type_ba): Same.
1615 (xcoff_reloc_type_toc): Same.
1616 (xcoff_reloc_type_rel): Same.
1617 (xcoff_reloc_type_neg): Same.
1618 (xcoff_reloc_type_pos): Same.
1619 (xcoff_reloc_type_fail): Same.
1620 (xcoff_reloc_type_noop): Same.
1621 * libxcoff.h : Declare common parts for xcoff64.
1622 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 1623 and complain function tables.
dbe341c6 1624
985142a4
AM
16252002-04-28 Alan Modra <amodra@bigpond.net.au>
1626
1627 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
1628 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
1629
eba91044
AM
16302002-04-26 Alan Modra <amodra@bigpond.net.au>
1631
e54fdaa5
AM
1632 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
1633 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
1634
a50c1845
AM
1635 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
1636 same as the output before calling elf_link_input_bfd.
1637
eba91044
AM
1638 * coffcode.h (coff_compute_section_file_positions): Set
1639 section_tail after shuffling section list.
1640
3c25c5f6
NC
16412002-04-24 Christian Groessler <chris@groessler.org>
1642
1643 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
1644 addresses are 23bit with a special layout, not plain 32bit
1645 values. Prevent relocation of immediate values.
1646
40d32fc6
CD
16472002-04-24 Chris G. Demetriou <cgd@broadcom.com>
1648
1649 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
1650 MIPS-16 ASE flags are set, print something to indicate that.
1651
067fa4a6
AM
16522002-04-23 Alan Modra <amodra@bigpond.net.au>
1653
1654 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
1655 under which a plt call stub is used.
1656 (final_link_relocate): Similarly.
1657 (allocate_plt_static): Clear h-plabel except when plt entry is
1658 exclusively used for a plabel.
1659 (allocate_dynrelocs): Use the above to simplify plt sizing.
1660 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
1661 (elf32_hppa_link_hash_table_create): Init.
1662 (BL22_RP): Define.
1663 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
1664 (elf32_hppa_check_relocs): Set has_22bit_branch.
1665
1666 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
1667 (final_link_relocate): Likewise.
1668
af40ce3c
JJ
16692002-04-22 Jakub Jelinek <jakub@redhat.com>
1670
1671 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
1672 search table if some FDE is DW_EH_PE_aligned encoded either.
1673 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
1674
09ae86c2
JJ
16752002-04-22 Richard Smith <richard@ex-parrot.com>
1676 Jakub Jelinek <jakub@redhat.com>
1677
1678 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
1679 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
1680 encoded personality.
1681 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
1682 for CIE/FDE removal.
1683
deeb2cd7
TR
16842002-04-20 Tom Rix <trix@redhat.com>
1685
1686 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
1687
99dc0092
AM
16882002-04-20 Alan Modra <amodra@bigpond.net.au>
1689
aa3d5824
AM
1690 * archures.c (bfd_lookup_arch): Move the list order comment..
1691 (struct bfd_arch_info): ..to where it belongs.
1692 * bfd-in2.h: Regenerate.
1693
99dc0092
AM
1694 * archures.c (bfd_lookup_arch): Add comment on list order.
1695 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
1696 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
1697 is always at head of list.
1698
7831a775
NC
16992002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1700
1701 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
1702 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
1703 definition of these functions for ARM_WINCE builds as they are
1704 not used.
ea1e4b0d 1705 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
1706 for ARM_WINCE builds.
1707
17082002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
1709
ea1e4b0d 1710 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
1711
17122002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
1713
1714 * cpu-sh.c (scan_mach): Delete.
1715 (arch_info_struct): Replace scan_mach with bfd_default_scan.
1716 (bfd_sh_arch): Likewise.
1717
3d8dbe36
NC
17182002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
1719
1720 * ihex.c (ihex_write_object_contents): Fix check for records
1721 crossing 64K boundaries.
1722
4ab82700
AM
17232002-04-16 Alan Modra <amodra@bigpond.net.au>
1724
1725 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
1726 type rather than just assuming entries are ELF.
1727 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
1728 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
1729 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
1730 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
1731 rather than elf_link_hash_entry.
1732
036fe0fe
RH
17332002-04-15 Richard Henderson <rth@redhat.com>
1734
1735 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
1736 n32 binaries.
1737
c4f3d130
NC
17382002-04-15 Michael Snyder <msnyder@redhat.com>
1739
1740 * opncls.c (bfd_close): Write contents if writeable.
1741 Minor formatting tidy-ups.
1742
4ab82700 17432002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
1744
1745 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
1746
0c04d169
MS
17472002-04-12 Michael Snyder <msnyder@redhat.com>
1748
1749 * bfd-in.h (bfd_get_section_lma): New access macro.
1750 Minor white-space fix-up.
1751
89d4966f
AM
17522002-04-12 Alan Modra <amodra@bigpond.net.au>
1753
1754 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
1755 header pad.
1756
8d0da3c2
DD
17572002-04-09 DJ Delorie <dj@redhat.com>
1758
1759 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
1760
05793179
NC
17612002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
1762
1763 * coffcode.h (coff_read_word): New.
1764 (coff_compute_checksum): New.
1765 (coff_apply_checksum): New.
1766 (coff_write_object_contents): Call coff_apply_checksum () to
1767 apply checksum to PE image.
1768
46fe4e66
AM
17692002-04-08 Randolph Chung <tausq@debian.org>
1770
1771 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
1772 (elf32_hppa_final_link): Split out sorting logic to..
1773 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
1774 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
1775
3b5b409c
AC
17762002-04-07 Andrew Cagney <ac131313@redhat.com>
1777
1778 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
1779 pattern.
1780 * configure: Re-generate.
1781
ac7b6ceb
AC
17822002-04-07 Andrew Cagney <ac131313@redhat.com>
1783
1784 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
1785 is greater or equal to 4.3.3.
1786 * configure: Regenerate.
1787 Fix PR gdb/344.
1788
44aa49bb
HPN
17892002-04-05 Hans-Peter Nilsson <hp@axis.com>
1790
1791 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
1792 R_CRIS_32_PCREL>: Fix typo in name.
1793 (cris_elf_check_relocs): Always create .rela.got here when
1794 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
1795 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
1796 assume it's created.
1797
e2d34d7d
DJ
17982002-04-04 Daniel Jacobowitz <drow@mvista.com>
1799
1800 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
1801 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
1802 define.
1803 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
1804 * bfd.c (bfd_link_hash_table_free): Define.
1805 * binary.c (binary_bfd_link_hash_table_free): Define.
1806 * bout.c (b_out_bfd_link_hash_table_free): Define.
1807 * coff-rs6000.c (rs6000coff_vec): Include
1808 _bfd_generic_link_hash_table_free.
1809 (pmac_xcoff_vec): Likewise.
1810 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
1811 (aix5coff64_vec): Likewise.
1812 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
1813 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
1814 (bfd_elf32_bfd_link_hash_table_free): Define.
1815 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
1816 (bfd_elf32_bfd_link_hash_table_free): Define.
1817 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
1818 define.
1819 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
1820 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
1821 * ieee.c (ieee_bfd_link_hash_table_free): Define.
1822 * ihex.c (ihex_bfd_link_hash_table_free): Define.
1823 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
1824 (_bfd_generic_link_hash_table_free): Add prototype.
1825 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
1826 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
1827 * linker.c (_bfd_generic_link_hash_table_free): New function.
1828 * mmo.c (mmo_bfd_link_hash_table_free): Define.
1829 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
1830 * oasys.c (oasys_bfd_link_hash_table_free): Define.
1831 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
1832 * som.c (som_bfd_link_hash_table_free): Define.
1833 * srec.c (srec_bfd_link_hash_table_free): Define.
1834 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
1835 * versados.c (versados_bfd_link_hash_table_free): Define.
1836 * vms.c (vms_bfd_link_hash_table_free): New function.
1837 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
1838
1839 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
1840 instead of bfd_alloc.
1841 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
1842 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
1843 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
1844 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
1845 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
1846 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
1847 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
1848 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
1849 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
1850 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
1851 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
1852 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
1853 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
1854 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
1855 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
1856 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
1857 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
1858 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
1859 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
1860 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
1861 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
1862 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
1863 * m68klinux.c (linux_link_hash_table_create): Likewise.
1864 * sparclinux.c (linux_link_hash_table_create): Likewise.
1865 * sunos.c (sunos_link_hash_table_create): Likewise.
1866 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
1867
1868 * targets.c: Add _bfd_link_hash_table_free to xvec.
1869
1870 * bfd-in2.h: Regenerate.
1871 * libbfd.h: Regenerate.
1872 * libcoff.h: Regenerate.
1873
830629ab
AM
18742002-04-04 Alan Modra <amodra@bigpond.net.au>
1875
1876 * dep-in.sed: Cope with absolute paths.
1877 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
1878 Run "make dep-am".
1879 * Makefile.in: Regenerate.
1880 * coff-arm.c: Fix copyright date.
1881 * cpu-h8300.c: Likewise.
1882 * cpu-i370.c: Likewise.
1883 * cpu-s390.c: Likewise.
1884 * cpu-mips.c: Likewise.
1885 * po/SRC-POTFILES.in: Regenerate.
1886
c6e90b02
TS
18872002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1888
1889 * Makefile.am: Add elfxx-mips.c to the known backends.
1890 (elf32-mips.lo): remove dependency to coff/external.h.
1891 * Makefile.in: Regenerate.
1892 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
1893 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
1894 accordingly.
1895 * configure: Regenerate.
1896 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
1897 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
1898 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
1899 MIPS specific backend functions.
1900 * elf32-mips.c: Moved most code to elfxx-mips.c.
1901 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
1902 static.
1903 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
1904 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
1905 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
1906 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
1907 interface to allow selection of the right REL or RELA howto table.
1908 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
1909 static. Let it refuse n32 objects.
1910 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
1911 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
1912 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
1913 (elf32_mips_ignore_discarded_relocs): Rename from
1914 _bfd_elf32_mips_ignore_discarded_relocs.
1915 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
1916 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
1917 (elf_mips_howto_table_rela): Remove.
1918 * elf64-mips.c: Moved most code to elfxx-mips.c.
1919 (bfd_elf64_bfd_reloc_type_lookup): Make static.
1920 (mips_elf64_rtype_to_howto): New function.
1921 (mips_elf64_object_p): Likewise.
1922 (elf64_mips_irix_compat): Likewise.
1923 * elfxx-mips.c: New file containing common code merged together from
1924 elf32-mips.c and elf64-mips.c.
1925 * elfxx-mips.h: New file containing MIPS specific prototypes from
1926 elf-bfd.h.
1927 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
1928 elf_backend_mips_rtype_to_howto.
1929
d8dce692
AM
19302002-04-04 Alan Modra <amodra@bigpond.net.au>
1931
1932 * srec.c (MAXCHUNK, Chunk): Revise comments.
1933 (srec_write_record): Correct buffer size.
1934 (srec_write_header): Do without intermediate buffer.
1935 (srec_write_section): Validate Chunk.
1936 (srec_write_terminator): Pass NULL instead of dummy buffer.
1937 (srec_write_symbols): Pass file and symbol names directly to
1938 bfd_bwrite so sprintf won't overflow buffer.
1939
b88a866a
JJ
19402002-04-03 Jakub Jelinek <jakub@redhat.com>
1941
1942 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
1943 PC relative relocs against hidden symbols.
1944 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1945
d7866f04
AM
19462002-04-03 Alan Modra <amodra@bigpond.net.au>
1947
1948 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
1949 LMAs, loop over segments until p_vaddr and p_memsz specify an
1950 extent enclosing the section.
1951
9e81ee67
NC
19522002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
1953
1954 * ihex.c (ihex_write_object_contents): Do not allow records to
1955 cross a 64K boundary - wrap if necessary.
1956
d2b64500
JT
19572002-04-01 Nathan Williams <nathanw@wasabisystems.com>
1958
1959 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
1960 which caused the returned LWP ID to always be 0.
1961
e36f7d53
RH
19622002-04-01 Richard Henderson <rth@redhat.com>
1963
1964 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
1965 (elf32_sparc_relocate_section): Use it to figure out when to
1966 initialize .got entries.
1967 * elf64-sparc.c: Similarly.
1968
e92d460e
AM
19692002-03-28 Alan Modra <amodra@bigpond.net.au>
1970
1971 * linker.c (link_action): Ignore duplicate warning syms.
1972 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
1973 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
1974 (elf_adjust_dynamic_symbol): Likewise.
1975 (elf_export_symbol): Likewise.
1976 (elf_link_find_version_dependencies): Likewise.
1977 (elf_link_assign_sym_version): Likewise.
1978 (elf_link_sec_merge_syms): Likewise.
1979 (elf_link_output_extsym): Likewise.
1980 (elf_gc_sweep_symbol): Likewise.
1981 (elf_gc_propagate_vtable_entries_used): Likewise.
1982 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1983 (elf_gc_allocate_got_offsets): Likewise.
1984 (elf_collect_hash_codes): Likewise.
1985 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
1986 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
1987 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
1988 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
1989 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
1990 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
1991 (elf_cris_discard_excess_dso_dynamics): Likewise.
1992 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
1993 (mark_PIC_calls): Likewise.
1994 (allocate_plt_static): Likewise.
1995 (allocate_dynrelocs): Likewise.
1996 (readonly_dynrelocs): Likewise.
1997 * elf32-i386.c (allocate_dynrelocs): Likewise.
1998 (readonly_dynrelocs): Likewise.
1999 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2000 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2001 * elf32-mips.c (mips_elf_output_extsym): Likewise.
2002 (mips_elf_sort_hash_table_f): Likewise.
2003 (mips_elf_check_mips16_stubs): Likewise.
2004 * elf32-s390.c (allocate_dynrelocs): Likewise.
2005 (readonly_dynrelocs): Likewise.
2006 * elf32-sh.c (sh_elf_discard_copies): Likewise.
2007 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2008 (xstormy16_relax_plt_realloc): Likewise.
2009 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
2010 (elf64_alpha_output_extsym): Likewise.
2011 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
2012 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
2013 (mips_elf64_check_mips16_stubs): Likewise.
2014 (mips_elf64_output_extsym): Likewise.
2015 * elf64-ppc.c (func_desc_adjust): Likewise.
2016 (allocate_dynrelocs): Likewise.
2017 (readonly_dynrelocs): Likewise.
2018 * elf64-s390.c (allocate_dynrelocs): Likewise.
2019 (readonly_dynrelocs): Likewise.
2020 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2021 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2022 (readonly_dynrelocs): Likewise.
2023 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
2024 * aoutx.h (aout_link_write_other_symbol): Likewise.
2025 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
2026 (_bfd_coff_write_global_sym): Likewise.
2027 * i386linux.c (linux_tally_symbols): Likewise.
2028 * m68klinux.c (linux_tally_symbols): Likewise.
2029 * sparclinux.c (linux_tally_symbols): Likewise.
2030 * pdp11.c (aout_link_write_other_symbol): Likewise.
2031 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2032 * xcofflink.c (xcoff_build_ldsyms): Likewise.
2033 (xcoff_write_global_symbol): Likewise.
2034
2035 * cofflink.c (_bfd_coff_final_link): Formatting.
2036 * cpu-mips.c (mips_compatible): Make static, prototype.
2037 * elf32-i386.c (elf_i386_check_relocs): Formatting.
2038 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
2039 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
2040 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
2041 (mips_elf64_final_link): Likewise.
2042 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
2043 prototype.
2044
2106126f
NC
20452002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
2046
2047 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
2048 (SWAP_OUT_RELOC_OFFSET): Define.
2049
b99d1833
AM
20502002-03-27 Gregory Steuck <greg@nest.cx>
2051
2052 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
2053 terminating NULL if empty symbol table.
2054 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
2055
ad43ed4c
L
20562002-03-26 H.J. Lu (hjl@gnu.org)
2057
2058 * elflink.h (elf_link_input_bfd): Revert the last change since
2059 the gcc exception handling isn't fixed yet.
2060
3851fca4
L
20612002-03-26 H.J. Lu (hjl@gnu.org)
2062
2063 * elflink.h (elf_link_input_bfd): Complain about relocations
2064 against local symbols in discarded sections.
2065
b91afed7
AM
20662002-03-26 Alan Modra <amodra@bigpond.net.au>
2067
2068 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
2069
dba143ef
AM
20702002-03-23 Alan Modra <amodra@bigpond.net.au>
2071
2072 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
2073 section file offset for !SEC_LOAD sections.
2074
ee29b9fb
RE
20752002-03-21 Richard Earnshaw <rearnsha@arm.com>
2076
830629ab
AM
2077 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
2078 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 2079
54327882
AM
20802002-03-21 Alan Modra <amodra@bigpond.net.au>
2081
2082 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
2083 Whitespace changes.
2084 * archive.c: Update copyright date.
2085 * bfd-in2.h: Regenerate.
2086 * libbfd.h: Regenerate.
2087 * Makefile.am: Run "make dep-am"
2088 * Makefile.in: Regenerate.
2089 * po/SRC-POTFILES.in: Regenerate.
2090
1ee24f27
DJ
20912002-03-20 Daniel Jacobowitz <drow@mvista.com>
2092
2093 * dwarf2.c (struct funcinfo): Move up.
2094 (lookup_address_in_function_table): New argument function_ptr.
2095 Set it.
2096 (lookup_address_in_line_table): New argument function. If function
2097 is non-NULL, use it to handle ``addr'' before the first line note of
2098 the function.
2099 (comp_unit_find_nearest_line): Update and swap calls to
2100 lookup_address_in_function_table and lookup_address_in_line_table.
2101 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
2102 N_SLINE encountered if we see an N_FUN before any N_SLINE.
2103
51b9608c
TR
21042002-03-20 Tom Rix <trix@redhat.com>
2105
ea1e4b0d 2106 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 2107 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 2108 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 2109
789c90aa
TR
21102002-03-19 Tom Rix <trix@redhat.com>
2111
ea1e4b0d 2112 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
2113 dynamic objects in archives.
2114
1da54d81
HPN
21152002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
2116
2117 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
2118 STT_NOTYPE symbols to STT_OBJECT.
2119
7831a775 21202002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
2121
2122 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
2123
eb1e0e80
NC
21242002-03-18 Tom Rix <trix@redhat.com>
2125
2126 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
2127 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
2128 * coff-rs6000 (do_pad) : New function for archive padding.
2129 (do_copy) : New function for object file copying in archives.
2130 (do_shared_object_padding) : New function for padding shared
2131 objects to their text section alignment in archives.
2132 (bfd_xcoff_ar_achive_set_magic) : Stub.
2133 (xcoff_write_armap_big) : Use do_copy and do_pad.
2134 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
2135 do_copy and do_pad.
2136 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 2137 bfd_xcoff_magic_number.
eb1e0e80
NC
2138 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
2139 fop.
2140 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
2141 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
2142 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
2143 * rs6000-core.c : Update copyright date.
ea1e4b0d 2144 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
2145 csectpp.
2146 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
2147 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
2148 (coff_set_flags) : Use bfd_xcoff_magic_number.
2149 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
2150 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
2151 * Makefile.am : Same.
2152 * config.bfd : Same.
2153 * targets.c : Same.
2154 * configure : Regnerate.
2155 * Makefile.in : Same.
2156 * bfd-in2.h : Same.
2157
a1c259a1
NC
21582002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
2159
2160 * po/fr.po: Updated version.
2161
4dae1ae7
AM
21622002-03-18 Alan Modra <amodra@bigpond.net.au>
2163
2164 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
2165 * libbfd.h: Regenerate.
2166 * archive.c (coff_write_armap): Pass on failures from
2167 bfd_write_bigendian_4byte_int.
2168
36b4f6e7
L
21692002-03-14 H.J. Lu <hjl@gnu.org>
2170
2171 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
2172 error to bfd_error_nonrepresentable_section for reinit_array
2173 section in DSO.
2174
a1aefc76
NC
21752002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2176
a181be0a
NC
2177 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
2178 OR it in rather than replacing previously selected flags.
2179
a1aefc76
NC
2180 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
2181 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
2182
c119f9b8
AM
21832002-03-14 Alan Modra <amodra@bigpond.net.au>
2184
2185 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
2186 (N): Use the above.
2187 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
2188 ensure reloc size matches before calling elf_link_input_bfd.
2189 Add an assert to check reloc size when counting output relocs.
2190
c295a511
NC
21912002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
2192
2193 * mmo.c (mmo_get_loc): Return NULL rather than false.
2194
9ce88e60
NC
21952002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
2196
2197 * po/fr.po: Updated version.
2198
4ddafab0
AM
21992002-03-13 Alan Modra <amodra@bigpond.net.au>
2200
b74fa2cd
AM
2201 * archures.c (bfd_default_compatible): Test bits_per_word.
2202 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
2203 bfd_default_compatible.
2204 * cpu-i370.c (i370_compatible): Likewise.
2205 * cpu-sparc.c (sparc_compatible): Likewise.
2206 * cpu-h8300.c (compatible): Test in->arch == out->arch.
2207
40b829d4
AM
2208 * elflink.h: Formatting fixes.
2209 (elf_link_output_extsym): Merge undefined and undef weak cases.
2210
4ddafab0
AM
2211 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
2212 when word size of input matches output word size.
2213
dd53c801
AJ
22142002-03-12 Andreas Jaeger <aj@suse.de>
2215
2216 * cpu-i386.c (i386_compatible): New. Use it instead of
2217 bfd_default_compatible.
2218
aa066ac8
L
22192002-03-07 H.J. Lu (hjl@gnu.org)
2220
2221 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
2222 as the type for bfd_reloc_val.
2223
1bf42538
JL
22242002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
2225
2226 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
2227 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
2228 (elf_hppa_final_link_relocate): Correct relocations for indirect
2229 references to local data through the DLT. Fix .opd creation for
2230 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
2231 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
2232 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
2233 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2234 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
2235 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
2236 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
2237
86eaf01e
JJ
22382002-03-05 Jakub Jelinek <jakub@redhat.com>
2239
2240 * merge.c (_bfd_merge_sections): Don't segfault if there
2241 is nothing to merge due to GC.
2242
c44233aa
AM
22432002-03-05 Alan Modra <amodra@bigpond.net.au>
2244
039cc25f
AM
2245 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
2246 symbols that have been forced local.
2247
c44233aa
AM
2248 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
2249 to output forced local syms for non-shared link.
2250 (elf_link_output_extsym): Tweak condition for calling backend
2251 adjust_dynamic_symbol so that previous behaviour is kept.
2252 Whitespace changes throughout file.
2253
25e27870
L
22542002-03-04 H.J. Lu <hjl@gnu.org>
2255
2256 * elf.c (bfd_section_from_shdr): Handle special sections,
2257 .init_array, .fini_array and .preinit_array.
2258 (elf_fake_sections): Likewise.
2259
2260 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
2261 DT entry only if the section is in output for .init_array,
2262 .fini_array and .preinit_array. Complain about .preinit_array
2263 section in DSO.
2264 (elf_bfd_final_link): Warn zero size for .init_array,
2265 .fini_array and .preinit_array sections.
2266
2267 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
2268 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
2269 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
2270 .preinit_array.
2271
bb2a49f2
AM
22722002-03-04 Alan Modra <amodra@bigpond.net.au>
2273
2274 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
2275 * configure: Regenerate.
2276
38487e5e
TR
22772002-03-02 Tom Rix <trix@redhat.com>
2278
c44233aa
AM
2279 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
2280 symbolic equiv.
38487e5e
TR
2281 * coff-rs6000.c (xcoff_howto_table): Same.
2282
30831527
RH
22832002-03-01 David Mosberger <davidm@hpl.hp.com>
2284
2285 * elflink.h (size_dynamic_sections): If section named
2286 ".preinit_array" exists, create DT_PREINIT_ARRAY and
2287 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
2288 ".init_array" and ".fini_array".
2289 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
2290 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
2291 DT_FINI_ARRAY.
2292
c8e5ddc8
AM
22932002-02-26 Andrew Macleod <amacleod@cygnus.com>
2294
2295 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
2296 dynsyms.
2297
96e0dda4
AM
22982002-02-25 Alan Modra <amodra@bigpond.net.au>
2299
1c5b6bf8
AM
2300 * elf64-hppa.h: Update copyright date.
2301
96e0dda4
AM
2302 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
2303 (ppc64_elf_relocate_section): Don't generate power4 style branch
2304 hints for *_BRTAKEN and *_BRNTAKEN relocs.
2305
0fb19cbc
JJ
23062002-02-22 Jakub Jelinek <jakub@redhat.com>
2307
2308 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
2309 last patch.
2310 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2311
c434dee6
AJ
23122002-02-21 Andreas Jaeger <aj@suse.de>
2313
2314 * elf64-x86-64.c: Major rework that introduces all recent changes
2315 to the x86-64 backend. Get a closer match to elf32-i386.
2316 (struct elf64_x86_64_dyn_relocs): Rename from
2317 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
2318 all users.
2319 (struct elf64_x86_64_link_hash_table): Add short cuts to some
2320 sections.
2321 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
2322 remove casts, initialize new hash members.
2323 (create_got_section): New.
2324 (elf64_x86_64_create_dynamic_sections): New.
2325 (elf64_x86_64_copy_indirect_symbol): New.
2326 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
2327 relocs, .got or .relgot here but do it in allocate_dynrelocs.
2328 Reference count possible .plt and .got entries. Don't test input
2329 section SEC_READONLY here to try to avoid copy relocs, and keep
2330 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
2331 DF_TEXTREL here. Delay setting of variables until needed. Cache
2332 pointer to "sreloc" section in elf_section_data. Tweak condition
2333 under which .got created. Report files with bad relocation
2334 section names.
2335 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
2336 Reference count possible .plt entries. Don't deallocate .got and
2337 .relgot space here.
2338 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
2339 do copy reloc processing for weakdefs. Remove redundant casts and
2340 aborts. Delay setting of vars until needed. Move creation of
2341 dynamic symbols and allocation of .plt and .rela.plt to
2342 allocate_dynrelocs. Replace BFD_ASSERT with abort.
2343 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2344 (allocate_dynrelocs): New.
2345 (readonly_dynrelocs): New.
2346 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
2347 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
2348 Zero out the dynamic allocated content space.
2349 (elf64_x86_64_discard_copies): Removed.
2350 (elf64_x86_64_relocate_section): Make use of dynamic section
2351 short-cuts. Localise vars, and delay setting. Better error
2352 reporting, replace BFD_ASSERT with abort. Check
2353 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
2354 regular object file and tread the weak definition as the normal
2355 one. Don't discard relocs for undefweak or undefined symbols and
2356 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
2357 relocs.
2358 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
2359 symbols that have been forced local. Use same test to decide if
2360 we can use a relative reloc for got as relocate_section. Expand
2361 SHN_UNDEF comment. Move expressions out of function calls.
2362 Replace BFD_ASSERT with abort.
2363 (bfd_elf64_bfd_final_link): Removed.
2364 (elf_backend_copy_indirect_symbol): Define.
2365
ff3a6ee3
TR
23662002-02-20 Tom Rix <trix@redhat.com>
2367
2368 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
2369 (_bfd_xcoff_reloc_type_lookup): Use it.
2370 * coff64-rs6000.c (xcoff64_howto_table): Same.
2371 (xcoff64_reloc_type_lookup): Same.
c434dee6 2372
a68d41fb
AM
23732002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
2374
2375 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
2376 little endian.
2377
befc3abb
MS
23782002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
2379
2380 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
2381 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
2382 * bfd-in2.h: Regenerate.
2383 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
2384 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
2385 with "s390:64-bit".
2386 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
2387 (elf_s390_reloc_type_lookup): Likewise.
2388 (elf_s390_check_relocs): Likewise.
2389 (elf_s390_gc_sweep_hook): Likewise.
2390 (elf_s390_relocate_section): Likewise.
2391 (elf_s390_object_p): Use renamed architecture define.
2392 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
2393
6eeeec9b
FCE
23942002-02-19 Frank Ch. Eigler <fche@redhat.com>
2395
2396 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
2397
0bb2d96a
JJ
23982002-02-19 Jakub Jelinek <jakub@redhat.com>
2399
2400 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
2401 absptr -> pcrel optimization for shared libs.
2402 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
2403 library cannot be converted to pcrel.
2404 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
2405 relative.
2406 * elf32-i386.c (elf_i386_relocate_section): If
2407 _bfd_elf_section_offset returned -2, skip, but make sure the
2408 relocation is installed.
2409 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
2410 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2411 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2412 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2413 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2414 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2415 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2416 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2417 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2418 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2419 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2420 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2421 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2422 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2423 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
2424 _bfd_elf_section_offset returning -2 the same way as -1.
2425 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
2426 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
2427 and BFD_ASSERT.
2428 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
2429
69f284c7
TR
24302002-02-18 Tom Rix <trix@redhat.com>
2431
2432 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
2433 (bfd_xcoff_size_dynamic_sections): Same.
2434 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
2435 (bfd_xcoff_size_dynamic_sections): Same.
2436 * coff-rs6000.c (xcoff_generate_rtinit): Same.
2437 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
2438 * libxcoff.h (struct xcoff_backend_data_rec): Same.
2439 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
2440 * bfd-in2.h: Regenerate.
2441
82bd7b59
AM
24422002-02-18 Alan Modra <amodra@bigpond.net.au>
2443
2444 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
2445 (struct ppc_link_hash_table): Add sfpr.
2446 (ppc64_elf_link_hash_table_create): Init it.
2447 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
2448 .glink out to..
2449 (create_linkage_sections): ..here. Make .sfpr too.
2450 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
2451 dynobj early.
2452 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
2453 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
2454 ._restf* functions, and create as needed.
2455 (func_desc_adjust): Only force_local for shared libs.
2456
ef1355e8
NC
24572002-02-18 David O'Brien <obrien@FreeBSD.org>
2458
2459 * configure.in: Bump version number post 2.12 branching.
2460 * configure: Regenerate.
2461
dfa36a69
HPN
24622002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
2463
2464 * mmo.c: Correct and improve comments.
2465 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
2466 zero-pad. Use input to fill up non-empty bfd buffer.
2467 (mmo_flush_chunk): New function.
2468 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
2469 changed. Don't emit location specifier if VMA is same as
2470 *LAST_VMAP after omitting leading zero contents. Call
2471 mmo_flush_chunk before emitting location specifier.
2472 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
2473 with mmo_write_loc_chunk calls.
2474 (mmo_internal_write_section): Call mmo_flush_chunk after
2475 mmo_write_chunk.
2476 (mmo_write_symbols_and_terminator): Move :Main to first position
2477 in symbol array. Add faked one if it does not exist if there are
2478 other symbols. Don't add it if there are no symbols at all. Move
2479 out test for value of :Main from symbol loop. Rename table
2480 fakemain to maintable and variable mainsym to fakemain.
2481
ccf00ab6
RH
24822002-02-15 Richard Henderson <rth@redhat.com>
2483
2484 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
2485 section with no got matches any got. Simplify error generaion.
2486
88eaccc2
AM
24872002-02-15 Alan Modra <amodra@bigpond.net.au>
2488
fd96f80f
AM
2489 Support arbitrary length fill patterns.
2490 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
2491 (_bfd_default_link_order): Remove bfd_fill_link_order code.
2492 Call default_data_link_order.
2493 (default_fill_link_order): Delete.
2494 (default_data_link_order): New function.
2495 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
2496 of bfd_fill_link_order with bfd_data_link_order.
2497 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
2498 * elf64-mips.c (mips_elf64_final_link): Likewise.
2499
88eaccc2
AM
2500 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
2501 Correct value returned in "end" for "0x<non-hex>".
2502
e2fd756b
NC
25032002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
2504
2505 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
2506 (scan): Test against 'mach' field in info structure.
2507
edd29cf9
AM
25082002-02-14 Alan Modra <amodra@bigpond.net.au>
2509
2510 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
2511
1e30956e 25122002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
2513
2514 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
2515 EF_M68000.
2516
bf36db18
NC
25172002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
2518
2519 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
2520 non-zero physical addresses when adjusting the LMAs of new
2521 sections.
bf36db18 2522
189c6563
AM
25232002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2524
2525 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
2526 from _bfd_elf_hppa_gen_reloc_type.
2527 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
2528 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
2529 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
2530 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
2531
e948afaf
AO
25322002-02-12 Alexandre Oliva <aoliva@redhat.com>
2533
2534 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
2535 loading its contents if there's nothing to do in it.
2536
19397422
AM
25372002-02-12 Alan Modra <amodra@bigpond.net.au>
2538
0ad3a73b
AM
2539 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
2540 64k boundary.
2541
19397422
AM
2542 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
2543 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
2544 (ppc64_elf_finish_dynamic_sections): Set values for them.
2545
51316059
MS
25462002-02-11 Michael Snyder <msnyder@redhat.com>
2547
2548 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
2549 * elf.c (elfcore_grok_pstatus): Add prototype.
2550 (elfcore_grok_lwpstatus): Add prototype.
2551 (elfcore_write_lwpstatus): New function.
2552 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
2553
518313c3
AO
25542002-02-11 Alexandre Oliva <aoliva@redhat.com>
2555
2556 * elf32-sh.c: Added missing prototypes.
2557 * elf32-sh64.c: Likewise.
2558 (sh_elf_align_loads): Mark unused args as such.
2559 * elf64-sh64.c: Added missing prototypes.
2560 (struct elf_sh64_link_hash_entry): Fix typo.
2561 (sh_elf64_relocate_section): Fix info argument passed to
2562 _bfd_elf_section_offset.
2563
2c73f9d8
AM
25642002-02-11 Alan Modra <amodra@bigpond.net.au>
2565
2566 * Makefile.am: "make dep-am".
2567 * Makefile.in: Regenerate.
2568 * aclocal.m4: Regenerate.
2569 * config.in: Regenerate.
2570 * configure: Regenerate.
2571
d426c6b0
DJ
25722002-02-10 Daniel Jacobowitz <drow@mvista.com>
2573
2574 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
2575 variable warnings.
2576 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
2577 comparison warning.
2578 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
2579 cast warnings for the common case.
2580
e58ee0cd
HPN
25812002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
2582
2583 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
2584 vectors.
2585 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
2586 vectors.
2587
7793f4d0
RH
25882002-02-09 Richard Henderson <rth@redhat.com>
2589
2590 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
2591 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
2592 (elf64_alpha_relocate_section): Likewise.
2593 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
2594 * bfd-in2.h, libbfd.h: Rebuild.
2595
7e799044
HPN
25962002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
2597
2598 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
2599 that base-plus-offset reloc accounting is consistent.
2600 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
2601 up to date for undefined symbols.
2602
027d73eb
EC
26032002-02-08 Eric Christopher <echristo@redhat.com>
2604
2605 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2606
2607 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
2608 sections for the O32 ABI.
2609
517662d4
CD
26102002-02-08 Chris Demetriou <cgd@broadcom.com>
2611
2612 * elf32-arm.h: Fix formatting of _("...").
2613 * elf32-d10v.c: Likewise.
2614 * elf32-m68k.c: Likewise.
2615 * elf32-mips.c: Likewise.
2616
5e37cc46
NC
26172002-02-08 Ivan Guzvinec <ivang@opencores.org>
2618
2619 * coff-or32.c: Fix compile time warning messages.
2620
fbca6ad9
AO
26212002-02-08 Alexandre Oliva <aoliva@redhat.com>
2622
2623 Contribute sh64-elf.
2624 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
2625 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
2626 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
2627 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
2628 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
2629 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
2630 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
2631 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
2632 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
2633 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
2634 New relocs.
2635 * libbfd.h, bfd-in2.h: Rebuilt.
2636 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
2637 (sh_reloc_map): Map them.
2638 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
2639 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
2640 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
2641 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
2642 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
2643 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
2644 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
2645 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
2646 datalabel_got_offset.
2647 (sh_elf_link_hash_newfunc): Initialize it.
2648 (sh_elf_relocate_section): Augment the scope of
2649 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
2650 GOT and GOTOFF handling to new SHmedia relocation types. Support
2651 GOT_BIAS.
2652 (sh_elf_check_relocs): Likewise.
2653 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
2654 PLT entries using movi_shori_putval. Support GOT_BIAS.
2655 (sh_elf_finish_dynamic_sections): Likewise.
2656 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
2657 relocation, it's now done by the caller.
2658 (GOT_BIAS): New.
2659 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
2660 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
2661 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
2662 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
2663 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
2664 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
2665 sh64_elf64_hash_table): New.
2666 (sh_elf64_howto_table): Introduce new relocs.
2667 (sh_elf64_info_to_howto): Accept new PIC relocs.
2668 (sh_elf64_relocate_section): Augment the scope of
2669 seen_stt_datalabel. Support new PIC relocs.
2670 (sh_elf64_check_relocs): Support new PIC relocs.
2671 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
2672 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
2673 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
2674 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
2675 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
2676 movi_shori_putval, movi_3shori_putval,
2677 sh64_elf64_create_dynamic_sections,
2678 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
2679 sh64_elf64_size_dynamic_sections,
2680 sh64_elf64_finish_dynamic_symbol,
2681 sh64_elf64_finish_dynamic_sections): New.
2682 (elf_backend_create_dynamic-sections,
2683 bfd_elf64_bfd_link_hash_table_create,
2684 elf_backend_adjust_dynamic_symbol,
2685 elf_backend_size_dynamic_sections,
2686 elf_backend_finish_dynamic_symbol,
2687 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
2688 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2689 elf_backend_got_header_size, elf_backend_plt_header_size):
2690 Define.
2691 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
2692 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
2693 match official numbers and names; moved unmaching ones to the
2694 range 0xf2-0xff.
2695 * elf32-sh64.c, elf64-sh64.c: Likewise.
2696 2001-03-12 DJ Delorie <dj@redhat.com>
2697 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
2698 sections.
2699 2001-03-12 DJ Delorie <dj@redhat.com>
2700 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
2701 be aligned.
2702 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
2703 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
2704 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
2705 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
2706 .cranges section with SEC_SORT_ENTRIES set.
2707 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
2708 incoming sorted .cranges section.
2709 (sh64_bfd_elf_copy_private_section_data): New.
2710 (sh64_elf_final_write_processing): Only sort .cranges and modify
2711 start address if called by linker.
2712 2001-01-08 Ben Elliston <bje@redhat.com>
2713 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
2714 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
2715 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
2716 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2717 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
2718 line. Add comments before all entries.
2719 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
2720 comment.
2721 (sh_elf64_reloc): Correct head comment.
2722 (sh_elf64_relocate_section): Correct spacing.
2723 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
2724 instead call reloc_dangerous callback.
2725 <case R_SH_SHMEDIA_CODE>: New case.
2726 (sh_elf64_gc_mark_hook): Correct spacing.
2727 (sh_elf64_check_relocs): Ditto.
2728 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
2729 New case.
2730 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
2731 functions.
2732 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
2733 clarify describing comment. Add comments before all entries.
2734 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
2735 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
2736 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
2737 Sort .cranges section in final link. Prepare to set bit 0 on
2738 entry address.
2739 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
2740 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
2741 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
2742 .cranges section.
2743 (sh64_backend_section_from_shdr): New, to recognize
2744 SHT_SH5_CR_SORTED on incoming .cranges section.
2745 (elf_backend_section_from_shdr): Define.
2746 (sh64_elf_final_write_processing): Sort outgoing .cranges
2747 section. (New, temporarily disabled:) Set bit 0 on entry address
2748 according to ISA type.
2749 (sh64_find_section_for_address): New.
2750 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
2751 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
2752 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
2753 bfd_malloc, not xmalloc.
2754 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
2755 global.
2756 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
2757 temporarily disabled) setting bit 0 on entry address.
2758 (elf_backend_final_write_processing): Define.
2759 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
2760 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
2761 be a proper relocation for PTA and PTB rather than a marker.
2762 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
2763 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
2764 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
2765 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
2766 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
2767 Zero src_mask.
2768 * elf64-sh64.c: Ditto.
2769 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
2770 * elf32-sh64.c: Include opcodes/sh64-opc.h
2771 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
2772 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
2773 parameters. No unused parameters. Caller changed.
2774 <case R_SH_PT_16>: New case.
2775 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
2776 * Makefile.in: Regenerate.
2777 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
2778 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
2779 all code sections.
2780 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2781 (sh64_elf_merge_private_data): Ditto.
2782 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
2783 to access stored section flags.
2784 (sh64_elf_final_write_processing): Return immediately unless
2785 called by linker. Use sh64_elf_section_data (cranges) to get size
2786 of linker-generated cranges entries.
2787 (sh64_elf_copy_private_data): Add missing "return true".
2788 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
2789 (sh_elf64_merge_private_data): Ditto.
2790 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
2791 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
2792 elf64-sh64.c:sh64_elf_fake_sections.
2793 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
2794 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
2795 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
2796 (sh64_elf_final_write_processing): New.
2797 (elf_backend_final_write_processing): Define.
2798 (sh64_elf_fake_sections): Get header flags from tdata field.
2799 (sh64_elf_copy_private_data): Do not call
2800 sh64_elf_copy_private_data_internal, just copy e_flags field.
2801 (sh64_elf_merge_private_data): Do not call
2802 sh64_elf_copy_private_data_internal.
2803 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
2804 Remove EF_SH64_ABI64, let ELF size make difference.
2805 Remove SH64-specific BFD section flag.
2806 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
2807 containing SHmedia through elf_section_data (asect)->tdata
2808 non-zero, not using a BFD section flag.
2809 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
2810 (sh64_elf_merge_private_data): Similar.
2811 (elf_backend_section_flags): Don't define.
2812 (sh64_elf_backend_section_flags): Delete.
2813 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
2814 not EF_SH64_ABI64.
2815 (sh_elf64_merge_private_data): Similar.
2816 * section.c (Section flags definitions): Don't define
2817 SEC_SH_ISA_SHMEDIA.
2818 (bfd-in2.h): Regenerate.
2819 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
2820 Make DataLabel references work with partial linking.
2821 * elf32-sh64.c: Fix formatting.
2822 (sh64_elf_link_output_symbol_hook): New.
2823 (elf_backend_link_output_symbol_hook): Define to
2824 sh64_elf_link_output_symbol_hook.
2825 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
2826 undefined if partial linking. Adjust sanity check.
2827 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
2828 (elf_backend_link_output_symbol_hook): Define to
2829 sh64_elf64_link_output_symbol_hook.
2830 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
2831 undefined if partial linking. Adjust sanity check.
2832 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
2833 Implement semantics for inter-file DataLabel references.
2834 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
2835 (sh64_elf64_add_symbol_hook): New.
2836 (sh_elf64_relocate_section): If passing an indirect symbol with
2837 st_type STT_DATALABEL on the way to a symbol with st_other
2838 STO_SH5_ISA32, do not bitor 1 to the relocation.
2839 (elf_backend_add_symbol_hook): Define to
2840 sh64_elf64_add_symbol_hook.
2841 * elf64-sh32.c: Tweak comments.
2842 (DATALABEL_SUFFIX): Define.
2843 (sh64_elf_add_symbol_hook): New.
2844 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
2845 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
2846 symbol with st_type STT_DATALABEL on the way to a symbol with
2847 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
2848 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
2849 Pass through STT_DATALABEL.
2850 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
2851 (elf_backend_get_symbol_type): Define.
2852 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
2853 (elf_backend_get_symbol_type): Define.
2854 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
2855 * elf32-sh64.c: Tweak comments.
2856 (sh64_elf_copy_private_data_internal): Add prototype.
2857 (bfd_elf32_bfd_set_private_flags): Define.
2858 (sh64_elf_copy_private_data_internal): Compare machine name, not
2859 textual BFD target name, to check whether to copy section flag
2860 SHF_SH5_ISA32.
2861 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
2862 Tweak section-contents-type-mismatch message.
2863 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
2864 Validize reloc-types.
2865 * elf64-sh64.c: New file.
2866 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
2867 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
2868 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
2869 Regenerate dependencies.
2870 * Makefile.in: Regenerate.
2871 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
2872 bfd_elf64_sh64l_vec.
2873 * configure.in: Handle bfd_elf64_sh64_vec and
2874 bfd_elf64_sh64l_vec.
2875 * configure: Regenerate.
2876 * po/POTFILES.in: Regenerate.
2877 * po/bfd.pot: Regenerate.
2878 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
2879 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
2880 anything else but EF_SH64 and EF_SH64_ABI64.
2881 (sh64_elf_merge_private_data): Emit error for anything else but
2882 EF_SH64 and EF_SH64_ABI64.
2883 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
2884 from targ_selvecs.
2885 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
2886 bfd_elf32_sh64l_vec as a temporary measure.
2887 * configure: Regenerate.
2888 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
2889 * cpu-sh.c (arch_info_struct): Include sh5 item
2890 unconditionalized.
2891 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
2892 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
2893 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
2894 * elf32-sh64.c: Tweak comments.
2895 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
2896 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
2897 (sh64_elf_copy_private_data_internal): Wrap long line.
2898 (sh64_elf_merge_private_data): Rewrite to allow objects from
2899 SH64 subsets to be linked together.
2900 (INCLUDE_SHMEDIA): Define.
2901 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
2902 Parenthesize plus-expression inside or-expression.
2903 <global symbol>: Ditto.
2904 (sh_elf_set_mach_from_flags): Remove code refusing
2905 deleted EF_SH64_32BIT_ABI flag.
2906 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
2907 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
2908 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
2909 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
2910 (sh_elf_relocate_section) <local symbol>: Or 1 in
2911 calculation of relocation if sym->st_other & STO_SH5_ISA32.
2912 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
2913 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
2914 relocation.
2915 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
2916 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
2917 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
2918 Regenerate dependencies.
2919 * Makefile.in: Regenerate.
2920 * archures.c: Add bfd_mach_sh5.
2921 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
2922 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
2923 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
2924 * configure: Regenerate.
2925 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
2926 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
2927 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
2928 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
2929 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
2930 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
2931 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
2932 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
2933 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
2934 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
2935 in item for SH5.
2936 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
2937 for SHmedia relocs.
2938 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
2939 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
2940 shmedia_prepare_reloc, goto final_link_relocate if it returns
2941 non-zero, else fail as before.
2942 (sh_elf_set_mach_from_flags): Provide function only if not defined
2943 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
2944 (sh_elf_set_private_flags): Provide function only if not defined
2945 as a macro.
2946 (sh_elf_copy_private_data): Similar.
2947 (sh_elf_merge_private_data): Similar.
2948 * section.c (SEC_SH_ISA_SHMEDIA): New.
2949 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
2950 * elf32-sh64.c: New file.
2951 * libbfd.h: Regenerate.
2952 * bfd-in2.h: Regenerate.
2953 * po/POTFILES.in: Regenerate.
2954 * po/bfd.pot: Regenerate.
2955 * bfd-in2.h: Regenerate.
2956 * libbfd.h: Regenerate.
2957
e108f470
DJ
29582002-02-07 Daniel Jacobowitz <drow@mvista.com>
2959
2960 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
2961 been included, not drag it in.
2962 * bfd-in2.h: Regenerate.
2963
259d18a3
L
29642002-02-06 H.J. Lu (hjl@gnu.org)
2965
2966 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
2967 the mach and ISA fields if necessary.
2968
f13b834e
NC
29692002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
2970
2971 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
2972 ARM architecture when an F_ARM_5 flag is detected, since we cannot
2973 be sure exactly which architecture this represents.
2974
82f6addb
NC
29752002-02-05 Nick Clifton <nickc@redhat.com>
2976
2977 * po/tr.po: Updated translation.
2978
899f54f5
AM
29792002-02-05 Alan Modra <amodra@bigpond.net.au>
2980
2981 From Jimi X <jimix@watson.ibm.com>
2982 * archures (bfd_mach_ppc64): Define.
2983 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
2984 (bfd_powerpc_arch): Define.
2985 * bfd-in2.h: Regenerate.
2986 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
2987 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
2988 (bfd_powerpc_archs): Add default powerpc64 arch.
2989
248866a8
AM
29902002-02-05 Alan Modra <amodra@bigpond.net.au>
2991
2992 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
2993 against section syms in readonly sections. Don't do the global
2994 sym check if we find one.
2995 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
2996 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 2997 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
2998 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
2999 (elf_s390_grok_prstatus): Add missing prototype.
3000
4fa5c2a8
HPN
30012002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
3002
3003 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3004 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3005 Call bfd_get_section_by_name only once. Initialize
3006 bpodata->n_bpo_relocs_this_section.
3007 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3008 referring to DSOs.
3009 (bpo_reloc_request_sort_fn): Don't use difference of values as
3010 return-value.
3011
537c972e
DB
30122002-02-02 David O'Brien <obrien@FreeBSD>
3013
3014 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
3015 version 4.5 and later the same as 5-CURRENT.
3016 * configure: Re-generate.
3017
006336b8
JT
30182002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
3019
3020 * config.bfd (hppa*-*-netbsd*): New target.
3021
6c571f00
PT
30222002-01-31 Philipp Thomas <pthomas@suse.de>
3023
19397422
AM
3024 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
3025 to front of message. Unify messages with elf32-arm.h. Use
3026 commas where neccessary.
3027 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
3028 ERROR in messages. Unify messages with coff-arm.c. Correct
3029 VFP/FPA error message.
3030 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
3031 APCS-32 for translation.
6c571f00 3032
930b4cb2
HPN
30332002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
3034
3035 Perform on-demand global register allocation from
3036 R_MMIX_BASE_PLUS_OFFSET relocs.
3037 * elf64-mmix.c (struct bpo_reloc_section_info, struct
3038 bpo_reloc_request, struct bpo_greg_section_info): New.
3039 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
3040 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
3041 _bfd_mmix_check_all_relocs,
3042 _bfd_mmix_prepare_linker_allocated_gregs,
3043 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
3044 (elf_mmix_howto_table): Correct src_mask for most relocs.
3045 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
3046 case.
3047 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
3048 case. Fix typo in comment. New label do_mmix_reloc.
3049 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
3050 store first object file with a base-plus-offset reloc. Call
3051 mmix_elf_check_common_relocs for the part common with mmo.
3052 (mmix_elf_final_link): Write out linker-allocated register
3053 contents section.
3054 (elf_backend_gc_sweep_hook): Define.
3055 (bfd_elf64_bfd_relax_section): Define.
3056
3057 * mmo.c: Don't include <ctype.h>
3058 (mmo_init): Correct init-once logic.
3059
3e36d993
TR
30602002-02-01 Tom Rix <trix@redhat.com>
3061
3062 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
3063
ba323545
AM
30642002-02-01 Alan Modra <amodra@bigpond.net.au>
3065
3066 * Makefile.am: Run "make dep-am"
3067 * Makefile.in: Regenerate.
3068
012884d6
DB
30692002-01-31 David O'Brien <obrien@FreeBSD>
3070
3071 * configure.in: Recognize the differences in core files from FreeBSD
3072 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
3073 5-CURRENT.
3074 * configure: Regenerate.
3075
3b16e843
NC
30762002-01-31 Ivan Guzvinec <ivang@opencores.org>
3077
3078 * coff-or32.c: New file.
3079 * cpu-or32.c: New file.
3080 * elf32-or32.c: New file.
3081 * archures.c: Add support for or32.
3082 * targets.c: Add support for or32.
3083 * bfd-in2.h: Regenerate.
7dc0ab31 3084 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
3085 coff_write_object_contents): Add support for or32.
3086 * config.bfd: Add target.
3087 * configure.in: Add support for or32.
3088 * configure: Regenerate.
3089 * Makefile.am: Add support for or32.
3090 * Makefile.in: Regenerate.
3b16e843
NC
3091 * po/SRC-POTFILES.in: Add or32 files.
3092 * po/bfd.pot: Regenerate.
7dc0ab31 3093
caf8ca8e
NC
30942002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
3095 Don Lindsay <lindsayd@cisco.com>
3096
3097 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
3098 false' with a return of a bfd_reloc_ error code.
3099
e5dfef09
HPN
31002002-01-31 Hans-Peter Nilsson <hp@axis.com>
3101
3102 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
3103 unexport unreferenced symbols when --export-dynamic. Call
3104 _bfd_elf_strtab_delref when unexporting.
3105
4e4770d0
DJ
31062002-01-30 Daniel Jacobowitz <drow@mvista.com>
3107
3108 * bfd-in.h: Include <stdbool.h> if it is available.
3109 * bfd-in2.h: Regenerated.
3110
e1fa50e7
AM
31112002-01-31 Alan Modra <amodra@bigpond.net.au>
3112
3113 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
3114 not go via the plt.
3115
b5f79c76
NC
31162002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3117
b5f79c76
NC
3118 * archures.c: Tidy up formatting of embedded comments.
3119 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 3120 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
3121 * reloc.c: Tidy up formatting of ordinary & embedded comments.
3122 * section.c: Tidy up formatting of embedded comments.
3123 * syms.c: Tidy up formatting of embedded comments.
3124 * targets.c: Tidy up formatting of embedded comments.
3125
3126 * bfd-in2.h: Regenerate.
3127
ca09e32b
NC
31282002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
3129
3130 * vms-tir.c (cmd_name): New function.
3131 (tir_cmd_name): New function.
3132 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
3133 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
3134 Fix formatting.
7dc0ab31 3135
ca09e32b
NC
3136 * peXXigen.c (pe_print_idata): Rearrange message to aid in
3137 translation.
3138 (pe_print_pdata): Rearrange message to aid in translation.
3139
3140 * libbfd.c (warn_deprecated): Rearrange error message to aid in
3141 translation.
3142
3143 * ihex.c (ihex_write_object_contents): Fix spelling typo.
3144
3145 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
3146
3147 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
3148 message to aid in translation.
3149
3150 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
3151 to aid in translation.
3152
3153 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
3154
7dc0ab31 31552002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
3156
3157 * coff-arm.c, elf32-elf.h: Unify messages.
3158
05f64ac6
NC
31592002-01-30 Nick Clifton <nickc@redhat.com>
3160
3161 * po/sv.po: Updated translation.
3162
f5a3e38a
NC
31632002-01-30 Philipp Thomas <pthomas@suse.de>
3164
3165 * dwarf2.c (read_abbrev): Use full section name in error message.
3166 (decode_line_info): Likewise.
661a3fd4
NC
3167
3168 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
3169 message.
3170
d926e03d
AM
31712002-01-30 Alan Modra <amodra@bigpond.net.au>
3172
3173 * elf64-ppc.c (func_desc_adjust): Only provide missing function
3174 descriptor symbols for undefined function code syms. Clear
3175 ELF_LINK_NON_ELF so that they can stay weak.
3176
030d18fb 31772002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 3178 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
3179
3180 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
3181 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
3182 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
3183 generation.
3184 * bfd-in2.h: Regenerate.
3185
fcc76bea
CD
31862002-01-29 Chris Demetriou <cgd@broadcom.com>
3187
3188 * elf32-mips.c: Add additional comments about HI16 relocation
3189 processing.
3190 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
3191 pc-relative relocations. (Reverts change made on 2001-10-31.)
3192 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
3193 for pc-relative relocations.
3194 (mips_elf_calculate_relocation): Add a comment about a kludge
3195 in the R_MIPS_GNU_REL_HI16 handling.
3196 (_bfd_mips_elf_relocate_section): Implement that kludge;
3197 adjust pc-relative HI16 relocation for difference in HI16 and
3198 LO16 addresses, since it can't easily be done in
3199 mips_elf_calculate_relocation.
3200
f9cd9119
MS
32012002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
3202
3203 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
3204 relocations with PC32 relocations for undefined or weak symbols.
3205 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
3206 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
3207
702248bb
JT
32082002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
3209
3210 * elfcore.h (elf_core_file_p): Improve comment for last change.
3211
4867be41
DJ
32122002-01-27 Daniel Jacobowitz <drow@mvista.com>
3213
3214 * configure: Regenerated.
3215
a94cef6a
JT
32162002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
3217
3218 * elfcore.h (elf_core_file_p): Set the machine architecture
3219 before processing the program headers.
3220
7562a296
HPN
32212002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
3222
966abd70
HPN
3223 * configure.in <64-bit configuration>: If using gcc, check and
3224 emit error for egcs-1.1.2.
3225 * configure: Regenerate.
3226
e8eab623
NC
32272002-01-26 Egor Duda <deo@logos-m.ru>
3228
3229 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
3230 as possible to avoid stack corruption.
3231
73896efb
RH
32322002-01-26 Richard Henderson <rth@redhat.com>
3233
3234 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
3235 for non-allocated sections.
3236
32372002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
3238
3239 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
3240 prstat.pr_reg even if it is a struct.
3241
73896efb 32422002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743
NC
3243
3244 * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
3245
3d66c4f7
NC
32462002-01-25 Philipp Thomas <pthomas@suse.de>
3247
3248 * coffgen.c (coff_print_symbol): Don't mark info message
3249 for translation.
3250
9460ecda
NC
32512002-01-25 Nick Clifton <nickc@redhat.com>
3252
3253 * po/fr.po: Updated translation.
3254 * po/es.po: Updated translation.
3255
cc9ff76a
AM
32562002-01-25 Philipp Thomas <pthomas@suse.de>
3257
3258 * coff-alpha.c (alpha_relocate_section): Unify warning message
3259 for GP relative relocations without GP defined.
3260 * coff-mips.c (mips_relocate_section): Likewise.
3261
c68836a9
AM
32622002-01-25 Alan Modra <amodra@bigpond.net.au>
3263
3264 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
3265 unsigned overflow when new_offset < old_offset.
3266
e8eab623 32672002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
3268
3269 * bfd.c (_bfd_abort): Fix typo.
3270
8ba89f17
RH
32712002-01-23 Richard Henderson <rth@redhat.com>
3272
3273 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
3274 plt entries for undefweak symbols.
3275
c6953948
NC
32762002-01-23 Steve Ellcey <sje@cup.hp.com>
3277
3278 * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
3279 DEFAULT_VECTOR.
3280 (bfd_elf64_ia64_hpux_big_vec): Ditto.
3281 (bfd_elf32_h8300_vec): Ditto.
3282
41bd81ab
AM
32832002-01-23 Alan Modra <amodra@bigpond.net.au>
3284
3285 * elf64-ppc.c: Remove stale part of ABI comment.
3286 (NO_OPD_RELOCS): Define.
3287 (ppc64_elf_check_relocs): Use it.
3288 (ppc64_elf_relocate_section): Here too.
3289 (build_one_stub): Don't point function syms at the stub. Instead,
3290 hijack plt.offset.
3291 (ppc64_elf_relocate_section): Check whether REL24 relocs should
3292 really go to the stub. Make all dynamic relocs in opd against
3293 locals.
3294 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
3295 plt.offset.
3296
f304919d
RH
32972002-01-22 Richard Henderson <rth@redhat.com>
3298
3299 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
3300
c0ef99a7
AM
33012002-01-22 Alan Modra <amodra@bigpond.net.au>
3302
60ee0d4a
AM
3303 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
3304 TOC_BASE_OFF adjustment.
3305
c0ef99a7
AM
3306 * Makefile.am: Run "make dep-am".
3307 * Makefile.in: Regenerate.
3308 * po/SRC-POTFILES.in: Regenerate.
3309
64328b46
AM
33102002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
3311
3312 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
3313 host defines.
3314
59953665 33152002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
3316
3317 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
3318 Check for and emit error if sgot is NULL at this point.
3319
9596feea
JT
33202002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
3321
3322 * config.bfd (ia64*-*-netbsd*): New target.
3323
7b45c6e1
AM
33242002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
3325
3326 * som.c (som_write_space_strings): Comment typo fix.
3327
e5094212
AM
33282002-01-21 Alan Modra <amodra@bigpond.net.au>
3329
e86ce104
AM
3330 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
3331 is_func_descriptor fields.
3332 (link_hash_newfunc): Init them.
3333 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
3334 dot are candidates for plt entries. When processing .opd relocs,
3335 set function descriptor strings to point inside function code
3336 string, and set new ppc_link_hash_entry fields.
3337 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
3338 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
3339 function descriptors. It's now done in..
3340 (func_desc_adjust): New.
3341 (ppc64_elf_func_desc_adjust): New.
3342 (define elf_backend_always_size_sections): Define.
3343 (ppc64_elf_hide_symbol): New.
3344 (define elf_backend_hide_symbol): Define.
3345 (allocate_dynrelocs): Remove code looking up function descriptors
3346 as that has been done earlier.
3347 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
3348 table.
3349 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
3350 up function descriptor.
3351 (build_one_stub): Look up the function code sym. Check for
3352 invalid plt offsets.
3353 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
3354 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
3355
e5094212
AM
3356 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
3357 boolean param.
3358 (_bfd_elf_link_hash_hide_symbol): Likewise.
3359 * elflink.h (elf_link_add_object_symbols): Adjust call to
3360 elf_backend_hide_symbol.
3361 (elf_fix_symbol_flags): Likewise.
3362 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
3363 than bfd_alloc.
3364 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
3365 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
3366 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3367 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
3368 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
3369 and adjust to suit.
3370 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
3371 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
3372 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3373
40b8271b
AM
33742002-01-18 Alan Modra <amodra@bigpond.net.au>
3375
3376 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
3377 dynamic function descriptor symbol, not the associated function
3378 symbol.
3379
55baa95b
EC
33802002-01-17 Eric Christopher <echristo@redhat.com>
3381
3382 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
3383
328577ad
NC
33842002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
3385
3386 * po/bfd.pot: Regenerate.
3387 * po/fr.po: Regenerate.
3388
af746e92
AM
33892002-01-17 Alan Modra <amodra@bigpond.net.au>
3390
3391 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
3392 Remove "Elf_Internal_Shdr *" param.
3393 (_bfd_mips_elf_section_from_bfd_section): Ditto.
3394 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
3395 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
3396 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
3397 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
3398 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
3399 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
3400 function to override special sections. Remove hdr arg from
3401 backend call, and don't loop.
3402
175e9962
EC
34032002-01-16 Eric Christopher <echristo@redhat.com>
3404
3405 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
3406 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
3407 relocations requiring gp0 and gp.
3408
96a846ea
RE
34092002-01-16 Richard Earnshaw <rearnsha@arm.com>
3410
175e9962 3411 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
3412 EF_ARM_VFP_FLOAT.
3413 (elf32_arm_print_private_bfd_data): Likewise.
3414
af3ae48d
NC
34152002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
3416
3417 * po/tr.po: Import new version.
3418
10ed1bba
AM
34192002-01-16 Alan Modra <amodra@bigpond.net.au>
3420
3421 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
3422 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
3423 (ORI_R0_R0_0): Correct.
3424
5d1634d7
AM
34252002-01-16 Alan Modra <amodra@bigpond.net.au>
3426
3427 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
3428 when plt_not_loaded.
3429 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
3430 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
3431 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
3432 (ppc64_elf_glink_code): Delete.
3433 (PPC64_ELF_GLINK_SIZE): Delete.
3434 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
3435 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
3436 ORI_R0_R0_0): Define.
3437 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
3438 (struct ppc_link_hash_table): Add sstub and plt_overflow.
3439 (ppc64_elf_link_hash_table_create): Init them.
3440 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
3441 Don't copy to shared lib.
3442 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
3443 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
3444 (allocate_dynrelocs <plt>): Don't change function sym here. Make
3445 room for .stub and .glink code.
3446 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
3447 DT_PPC64_GLINK.
3448 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
3449 bfd_elf64_bfd_final_link.
3450 (bfd_elf64_bfd_final_link): Don't define.
3451 (ppc64_elf_size_stubs): New.
3452 (build_plt_stub): New.
3453 (build_one_stub): New.
3454 (ppc64_elf_build_stubs): New.
3455 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
3456 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
3457 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
3458 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
3459 case output sections not separate. Adjust DT_RELASZ to not
3460 include plt relocs. Set reserved got entry. Set got and plt
3461 entry size.
3462 (elf_backend_got_header_size): Set to 8.
3463 * elf64-ppc.h: New file.
3464
c601ffdb
AM
34652002-01-16 Alan Modra <amodra@bigpond.net.au>
3466
3467 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
3468 sections, use bfd_section_list_remove.
3469 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
3470 * elflink.h (elf_link_add_object_symbols): When removing all
3471 sections, use bfd_section_list_clear.
3472
8fb4cb7f
NC
34732002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3474
3475 * po/sv.po: New file: Swedish translation.
3476 * configure.in (ALL_LINGUAS): Add sv.
3477 * configure: Regenerate.
3478
d3c456e9
JJ
34792002-01-15 Jakub Jelinek <jakub@redhat.com>
3480
3481 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
3482 * elf.c (merge_sections_remove_hook): New function.
3483 (_bfd_elf_merge_sections): Pass it as 3rd argument to
3484 _bfd_merge_sections.
3485 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
3486 * libbfd.h: Rebuilt.
3487 * merge.c (_bfd_merge_sections): Add remove_hook argument.
3488 Call remove_hook if a SEC_EXCLUDE section is encountered.
3489
1f7fd478
NC
34902002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
3491
3492 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
3493 (xstormy16_reloc_map): Initialise new field with correct howto
3494 table.
3495 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
3496 howto entry.
3497
b87011e9
MS
34982002-01-10 Michael Snyder <msnyder@redhat.com>
3499
3500 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
3501 (elfcore_write_pstatus): Use long instead of pid_t;
3502 * elf-bfd.h: Change prototypes to use long instead of pid_t;
3503
175e9962 35042002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
3505
3506 * elf.c: Update copyright years.
3507 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
3508 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
3509
7c76fa91
MS
35102002-01-08 Michael Snyder <msnyder@redhat.com>
3511
3512 Add capability to write corefile note sections, for gdb.
3513 * elf.c (elfcore_write_note): New function.
3514 (elfcore_write_prpsinfo): New function.
3515 (elfcore_write_prstatus): New function.
3516 (elfcore_write_pstatus): New function.
3517 (elfcore_write_prfpreg): New function.
3518 (elfcore_write_prxfpreg): New function.
97996af6 3519 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 3520
e1fddb6b
AO
35212002-01-08 Alexandre Oliva <aoliva@redhat.com>
3522
3523 * elf.c (elf_fake_sections): Propagate errors from
3524 elf_backend_fake_section.
3525
8d05742f
JT
35262002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
3527
3528 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
3529 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
3530 (elf32-sh-nbsd.lo): New rule.
3531 * Makefile.in: Regenerate.
3532 * config.bfd (sh*le-*-netbsdelf*): New target.
3533 (sh*-*-netbsdelf*): New target.
3534 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
3535 (bfd_elf32_shnbsd_vec): New vector.
3536 (bfd_elf32_shlnbsd_vec): New vector.
3537 * configure: Regenerate.
3538 * elf32-sh-nbsd.c: New file.
3539 * targets.c: Update copyright years.
175e9962 3540 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
3541 bfd_elf32_shnbsd_vec.
3542
1dba4cb4
AH
35432002-01-07 Aldy Hernandez <aldyh@redhat.com>
3544
3545 * coff-rs6000.c (READ20): Use bfd_scan_vma.
3546
47b22aef
GK
35472002-01-07 Geoffrey Keating <geoffk@redhat.com>
3548
3549 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
3550 of a symbol in a section that will be deleted.
3551
be2d1673
NC
35522002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
3553
3554 * po/es.po: New file: Spanish translation.
3555 * configure.in (ALL_LINGUAS): Add es.
3556 * configure: Regenerate.
3557
d9cf1b54
AM
35582002-01-06 Steve Ellcey <sje@cup.hp.com>
3559
3560 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
3561 argument so we can handle HP-UX specially.
3562 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
3563 (elfNN_hpux_backend_section_from_bfd_section): New for support
3564 of SHN_IA_64_ANSI_COMMON.
3565 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
3566 (is_unwind_section_name): Add special HP-UX support.
3567 (elfNN_ia64_section_from_shdr): Add support for more sections.
3568 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
3569 add support for more sections.
3570 (elfNN_ia64_additional_program_headers): Modify
3571 is_unwind_section_name call.
3572 (elfNN_ia64_modify_segment_map): Remove assumption that there is
3573 only one unwind section in segment.
3574
3f3c5c34
AM
35752002-01-06 Alan Modra <amodra@bigpond.net.au>
3576
3577 * syms.c (_bfd_generic_make_empty_symbol): New function.
3578 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
3579 _bfd_generic_make_empty_symbol.
3580 * libbfd.h: Regenerate.
3581 * bfd-in2.h: Regenerate.
3582 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
3583 (hppabsd_core_get_symtab_upper_bound): Don't define.
3584 (hppabsd_core_get_symtab): Likewise.
3585 (hppabsd_core_print_symbol): Likewise.
3586 (hppabsd_core_get_symbol_info): Likewise.
3587 (hppabsd_core_bfd_is_local_label_name): Likewise.
3588 (hppabsd_core_get_lineno): Likewise.
3589 (hppabsd_core_find_nearest_line): Likewise.
3590 (hppabsd_core_bfd_make_debug_symbol): Likewise.
3591 (hppabsd_core_read_minisymbols): Likewise.
3592 (hppabsd_core_minisymbol_to_symbol): Likewise.
3593 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
3594 Formatting fixes.
3595 * hpux-core.c: Similarly.
3596 * irix-core.c: Similarly.
3597 * osf-core.c: Similarly.
3598 * sco5-core.c: Similarly.
3599 * binary.c (binary_make_empty_symbol): Remove function, define as
3600 _bfd_generic_make_empty_symbol.
3601 * ihex.c (ihex_make_empty_symbol): Likewise.
3602 * mmo.c (mmo_make_empty_symbol): Likewise.
3603 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
3604 * srec.c (srec_make_empty_symbol): Likewise.
3605 * versados.c (versados_make_empty_symbol): Likewise.
3606 * vms.c (_bfd_vms_make_empty_symbol): Remove.
3607 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
3608 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
3609 rather than _bfd_vms_make_empty_symbol.
3610 * vms-misc.c (new_symbol): Likewise.
3611
3f0a7f7f
AM
36122002-01-05 Alan Modra <amodra@bigpond.net.au>
3613
9e7b37b3
AM
3614 * section.c (bfd_section_init): Remove unnecessary initialisations.
3615 (bfd_section_list_clear): New function.
3616 (bfd_section_list_remove, bfd_section_list_insert): New macros.
3617 (_bfd_strip_section_from_output): Use them.
3618 * coffcode.h (coff_set_alignment_hook): Likewise.
3619 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
3620 * elf64-mips.c (mips_elf64_final_link): Likewise.
3621 * elf64-mmix.c (mmix_elf_final_link): Likewise.
3622 * sunos.c (sunos_add_dynamic_symbols): Likewise.
3623 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
3624 * bfd-in2.h: Regenerate.
3625
3626 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
3627 rather than doing our own section handling. Clean up after errors
3628 with bfd_release and bfd_section_list_clear. Handle unexpected
3629 flags.
3630 * aoutf1.h (sunos4_core_file_p): Likewise.
3631 * aix386-core.c (aix386_core_file_p): Likewise.
3632 * cisco-core.c (cisco_core_file_validate): Likewise.
3633 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
3634 * trad-core.c (trad_unix_core_file_p): Likewise.
3635
3636 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
3637 with bfd_release and bfd_section_list_clear.
3638 * hpux-core.c (hpux_core_core_file_p): Likewise.
3639 * irix-core.c (irix_core_core_file_p): Likewise.
3640 * lynx-core.c (lynx_core_file_p): Likewise.
3641 * osf-core.c (osf_core_core_file_p): Likewise.
3642 * rs6000-core.c (rs6000coff_core_p): Likewise.
3643 * sco5-core.c (sco5_core_file_p): Likewise.
3644
3f0a7f7f
AM
3645 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
3646 sign extension adjustments without conditionals.
3647
a3aa38ee
JJ
36482002-01-04 Jakub Jelinek <jakub@redhat.com>
3649
3650 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
3651 CIE at .eh_frame start is removed due to no FDEs referencing it.
3652
8a8b2d4b
AJ
36532002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
3654
3655 * config.bfd (x86_64-*-netbsd*): New target.
3656 * configure.in (x86_64-*-netbsd*): Set COREFILE
3657 to netbsd-core.lo.
3658 * configure: Regenerated.
3659
04b5af89
TR
36602002-01-03 Tom Rix <trix@redhat.com>
3661
3662 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
3663 for recent bfd_make_section_anyway change.
3664
51c5503b
NC
36652002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
3666
3667 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
3668 R_ARM_THM_PC11 reloc.
3669
07f7c046
NC
36702002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3671
3672 * configure.in (LINGUAS): Add ja.
3673 * configure: Regenerate.
3674 * po/ja.po: Import from translation project's web site.
3675
5eefb65f
NC
36762002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
3677
3678 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
3679 messages to ease translation into other languages.
3680
39e90f10 3681For older changes see ChangeLog-0001
56882138
AM
3682\f
3683Local Variables:
3684mode: change-log
3685left-margin: 8
3686fill-column: 74
3687version-control: never
3688End: