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