]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
* itbl-parse.y (entry): Provide empty action.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
f52d1d64
JJ
12002-10-16 Jakub Jelinek <jakub@redhat.com>
2
3 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4 (s390x-*-linux*): Add targ_selvecs.
5
2bc3c89a
AM
62002-10-16 Alan Modra <amodra@bigpond.net.au>
7
8 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
9 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
10 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
11 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
12 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
13 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
14 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
15 (SOURCE_HFILES): Add elf32-qnx.h.
16 (BUILD_HFILES): Add bfdver.h.
17 Run "make dep-am".
18 * Makefile.in: Regenerate.
19 * configure.in Update bfd vector dependencies.
20 * configure: Regenerate.
21 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
22 * elf32-i386qnx.c: Likewise.
23 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
24 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
25 * elf32-sh-lin.c: Likewise.
26 * elf32-shqnx.c: Likewise.
27 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
28 * elf32-sh64-nbsd.c: Likewise.
29 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
30 * elf64-sh64-nbsd.c: Likewise.
31 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
32 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
33 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
34 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
35 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
36 (elf_backend_is_contained_by_filepos): Likewise.
37 (elf_backend_copy_private_bfd_data_p): Likewise.
38 Globalize and move functions to..
39 * elf32-qnx.c: ..here. New file.
40 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
41 emit target vectors when INCLUDE_SHMEDIA.
42 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
43 end of file.
44 * elf64-sh64.c: Remove ELF_ARCH test.
45 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
46 * po/BLD-POTFILES.in: Regenerate.
47 * po/SRC-POTFILES.in: Regenerate.
48
90c9df85
AM
492002-10-16 Alan Modra <amodra@bigpond.net.au>
50
366f2964
AM
51 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
52 loaded with --just-symbols.
53
90c9df85
AM
54 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
55 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
56 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
57 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
58
2238051f
RH
592002-10-15 Richard Henderson <rth@redhat.com>
60
61 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
62 (BFD64_BACKENDS_CFILES): Likewise.
63 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
64 * elf64-alpha-fbsd.c: Remove file, move code ...
65 * elf64-alpha.c: ... here.
66 * Makefile.in, configure: Rebuild.
67
64e04ecd
RH
682002-10-14 Richard Henderson <rth@redhat.com>
69
70 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
71 VALUE, not ADDEND.
72
396a6083
SC
732002-10-14 Stephen Clarke <stephen.clarke@superh.com>
74
75 * elf32-sh.c (elf_sh_link_hash_entry): Replace
76 datalabel_got_offset with union of datalabel_got
77 offset and refcount.
78 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
79 (allocate_dynrelocs): Delete unnecessary code for
80 STT_DATALABEL type. Create entry in got for
81 datalabel version of symbol if datalabel_got.refcount > 0.
82 (sh_elf_relocate_section): Use datalabel_got union.
83 (sh_elf_gc_sweep_hook): Pull common code to initialize
84 h and eh out of switch statement. Declare seen_stt_datalabel.
85 Initialize it. Decrement datalabel_got.refcount for
86 got relocs when seen_stt_datalabel is true.
87 Decrement local_got_refcounts entry for datalabel got relocs
88 of local symbols.
89 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
90 (sh_elf_check_relocs): Declare seen_stt_datalabel.
91 Initialize it. When seen_stt_datalabel is true, increment
92 datalabel_got refcount rather than got.refcount.
93 (sh_elf_finish_dynamic_symbol): Create relocs to
94 initialize got entry for datalabel version of symbol.
95
6a0735ef
AM
962002-10-14 Alan Modra <amodra@bigpond.net.au>
97
98 * Makefile.am: Run "make dep-am".
99 (BFD_H_FILES): Remove version.h.
100 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
101 * version.h: ..to here.
102 * configure.in (bfd_version_date): Remove.
103 (AC_OUTPUT): Make bfdver.h from version.h.
104 * bfd.c: #include "bfdver.h".
105 * vms-hdr.c: Likewise.
106 * Makefile.in: Regenerate.
107 * bfd-in2.h: Regenerate.
108 * configure: Regenerate.
109 * po/SRC-POTFILES.in: Regenerate.
110
686e4055
AM
1112002-10-14 Alan Modra <amodra@bigpond.net.au>
112
113 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
114 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
115 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
116 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
117 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
118 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
119 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
120 bfd_mach_ip2022, bfd_mach_ip2022ext,
121 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
122 * bfd-in2.h: Regenerate.
123
019dca2b
KK
1242002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
125
126 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
127 endian vector to targ_selvecs.
128
bce03d3d
AO
1292002-10-13 Alexandre Oliva <aoliva@redhat.com>
130
131 * elfxx-mips.c (mips_elf_calculate_relocation): Take
132 save_addend argument. Don't apply the 32-bit mask to a
133 GPREL32 value if it's to be used in another relocation. Don't
134 use forced-check computation of local_p to decide whether to
135 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
136 of the addend of a non-in-place GPREL16 relocation.
137 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
138 mips_elf_calculate_relocation().
139
9b691193
SC
1402002-10-12 Stephane Carrez <stcarrez@nerim.fr>
141
142 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
143 with symbols in other sections if we relaxed something; the sections
144 output offsets must be re-computed before.
145
1f4c5b47
SC
1462002-10-12 Stephane Carrez <stcarrez@nerim.fr>
147
148 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
149 handling to use Elf_Internal_Sym.
150 (m68hc11_elf_relax_delete_bytes): Likewise.
151
5dc97655
KK
1522002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
153
154 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
155 sh_elf_object_p, dtpoff_base): New functions.
156 (sh_elf_howto_table): Add TLS relocs.
157 (sh_reloc_map): Likewise.
158 (sh_elf_info_to_howto): Support TLS relocs.
159 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
160 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
161 New macros.
162 (sh_elf_obj_tdata): New.
163 (elf_sh_link_hash_table): Add tls_ldm_got.
164 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
165 (allocate_dynrelocs): Support TLS relocs.
166 (sh_elf_size_dynamic_sections): Likewise.
167 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
168 .rela.got section when found already. Return false after printing
169 error about unresolvable relocation.
170 (sh_elf_gc_sweep_hook): Support TLS relocs.
171 (sh_elf_check_relocs): Likewise.
172 (sh_elf_finish_dynamic_symbol): Likewise.
173 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
174 * reloc.c: Add SH TLS relocs.
175 * bfd-in2.h, libbfd.h: Regenerate.
176
6a0735ef
AM
1772002-10-11 Daniel Jacobowitz <drow@mvista.com>
178
179 * Makefile.in: Regenerated.
180
af39267e
DJ
1812002-10-11 Daniel Jacobowitz <drow@mvista.com>
182
183 * Makefile.am: Run dep-am.
6a0735ef 184 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
185 (BFD32_LIBS): Add simple.lo.
186 (BFD32_LIBS_CFILES): Add simple.c.
187 * Makefile.in: Regenerated.
188 * bfd-in2.h: Regenerated.
189 * simple.c: New file.
190
0be617ce
AM
1912002-10-11 Alan Modra <amodra@bigpond.net.au>
192
14a793b2
AM
193 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
194 (record_thumb_to_arm_glue): Likewise.
195 * ecoff.c (ecoff_link_add_externals): Likewise.
196 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
197 (record_thumb_to_arm_glue): Likewise.
198 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
199 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
200 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
201 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
202 * elf64-ppc.c (func_desc_adjust): Likewise.
203 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
204 (sh64_elf64_create_dynamic_sections): Likewise.
205 * elflink.c (_bfd_elf_create_got_section): Likewise.
206 (_bfd_elf_create_dynamic_sections): Likewise.
207 (_bfd_elf_create_linker_section): Likewise.
208 * elflink.h (elf_add_default_symbol): Likewise.
209 (elf_link_create_dynamic_sections): Likewise.
210 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
211 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
212 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
213 (_bfd_mips_elf_add_symbol_hook): Likewise.
214 (_bfd_mips_elf_create_dynamic_sections): Likewise.
215 * linker.c (generic_link_add_symbol_list): Likewise.
216 * xcofflink.c (xcoff_link_add_symbols): Likewise.
217
218 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
219
0be617ce 220 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 221 completely removed. Correct local sym adjustment.
0be617ce 222
0a4ef3f4
SC
2232002-10-10 Stephen Clarke <stephen.clarke@superh.com>
224
225 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
226 Correct mistake in calculation of address of .got.
227 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
228 elf_sh64_pic_plt_entry_le): Likewise.
229
efacd36e
SC
2302002-10-09 Richard Shann <richard.shann@superh.com>
231 Stephen Clarke <stephen.clarke@superh.com>
232
233 * Makefile.am: Add entries for elf32-sh64-lin.c and
234 elf64-sh64-lin.c. Regenerate.
235 * Makefile.in: Regenerate.
236 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
237 to use sh64 vectors rather than sh vectors.
238 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
239 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
240 * configure: Regenerate.
241 * elf32-sh64-lin.c: New file.
242 * elf64-sh64-lin.c: New file.
243 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
244 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
245
299bf759
L
2462002-10-08 H.J. Lu <hjl@gnu.org>
247
248 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
249 IE->LE transition for R_386_TLS_IE.
250
51020317
AM
2512002-10-08 Alan Modra <amodra@bigpond.net.au>
252
253 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
254
a8fcf378
NC
2552002-10-07 Mark Elbrecht <snowball3@softhome.net>
256
51020317
AM
257 * cofflink.c (mark_relocs): Don't mark relocations in excluded
258 sections.
a8fcf378 259
a16d5acb
AM
2602002-10-07 Alan Modra <amodra@bigpond.net.au>
261
a6b511bd
AM
262 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
263 code.
264
a16d5acb
AM
265 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
266
7c4a37eb
AM
2672002-10-06 Alan Modra <amodra@bigpond.net.au>
268
269 * opncls.c: Formatting.
270 (_bfd_new_bfd): Use a smaller section hash table.
271
7c4ca42d
AO
2722002-10-05 Alexandre Oliva <aoliva@redhat.com>
273
274 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
275 of the other two relocations packed with a REL32 to NONE.
276
4989d792
SC
2772002-10-02 Stephen Clarke <stephen.clarke@superh.com>
278
279 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
280 (sh_elf_link_hash_newfunc): Initialize it.
281 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
282 to got.refcount for symbols that are forced local or when
283 we have direct got refs.
284 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
285 to correctly adjust got.refcount and plt.refcount.
286 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
287 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 288
7c445aa3
JJ
2892002-10-01 Jakub Jelinek <jakub@redhat.com>
290
291 * elf32-i386.c (elf_i386_relocate_section): Fix
292 movl foo@indntpoff, %eax IE->LE transition.
293
abcf1d52
JJ
2942002-10-01 Jakub Jelinek <jakub@redhat.com>
295
296 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
297 sequence and its transitions.
298
a45bb67d
JJ
2992002-10-01 Jakub Jelinek <jakub@redhat.com>
300
301 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
302 to st_value + addend in non-code sections.
303 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
304 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
305
00707a0e 3062002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
307 Ken Raeburn <raeburn@cygnus.com>
308 Aldy Hernandez <aldyh@redhat.com>
309 Eric Christopher <echristo@redhat.com>
310 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
311
312 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
313 (bfd_mach_mips5500): New.
314 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
315 (arch_info_struct): Add corresponding entries here.
316 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
317 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
318 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
319 bfd_mach_mips5400 and bfd_mach_mips5500.
320 (_bfd_mips_elf_mach_extends_p): New function.
321 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
322 the EF_MIPS_MACH flags.
323 * bfd-in2.h: Regenerate.
324
624f0b25
JT
3252002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
326
327 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
328 .got sections.
329
b89fe0ee
AM
3302002-09-28 Alan Modra <amodra@bigpond.net.au>
331
332 * elf.c (map_sections_to_segments): Correct test for start of
333 writable section in the same page as end of read-only section.
334
b29635ba
JT
3352002-09-27 Matt Thomas <matt@3am-software.com>
336
337 * elf32-vax.c (elf_vax_check_relocs): Remove unused
338 local_got_refcounts usage. Remove allocation of got slot.
339 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
340 Remove de-allocation of got slot.
341 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
342 traversal for elf_vax_instantiate_got_entries. Allow empty .got
343 sections to be GC'ed.
344 (elf_vax_instantiate_got_entries): New function.
345 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
346 tests that are now handled by elf_vax_instantiate_got_entries.
347 Assert GOT entry falls within .got section size. Remove redundant
348 comparisions. Fix comments.
349
bffbf940
JJ
3502002-09-27 Jakub Jelinek <jakub@redhat.com>
351
352 * reloc.c: Add x86-64 TLS relocs.
353 * bfd-in2.h, libbfd.h: Rebuilt.
354 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
355 relocs. Add TLS relocs.
356 (x86_64_reloc_map): Add TLS relocs.
357 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
358 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
359 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
360 (elf64_x86_64_hash_entry): Define.
361 (struct elf64_x86_64_obj_tdata): New.
362 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
363 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
364 (link_hash_newfunc): Initialize tls_type.
365 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
366 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
367 (elf64_x86_64_mkobject): New.
368 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
369 (elf64_x86_64_tls_transition): New.
370 (elf64_x86_64_check_relocs): Add r_type variable and use it.
371 Handle TLS relocs.
372 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
373 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
374 (elf64_x86_64_size_dynamic_sections): Likewise.
375 (dtpoff_base, tpoff): New.
376 (elf64_x86_64_relocate_section): Handle TLS relocs.
377 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
378 entries.
379 (bfd_elf64_mkobject): Define.
380
381 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
382 DF_STATIC_TLS if shared.
383
14366460
TS
3842002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
385
386 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
387 empty relocation sections.
388
9f951329
AM
3892002-09-26 Alan Modra <amodra@bigpond.net.au>
390
391 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
392 (ppc64_elf_build_stubs): Build them here instead.
393
6b3ac709
JJ
3942002-09-24 Jakub Jelinek <jakub@redhat.com>
395
396 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
397 addend into r_addend, not *r_offset.
398 (elf32_sparc_finish_dynamic_symbol): Likewise.
399 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
400 R_SPARC_RELATIVE's r_offset.
401
e2f6d277
NC
4022002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
403
404 * dwarf2.c (decode_line_info): Update to correctly decode
405 the (non-standard DWARF2) out-of-order address sequences
406 generated by the Intel C++ 6.0 compiler for ia64-Linux.
407
f3961b2b
DD
4082002-09-23 Mark Elbrecht <snowball3@softhome.net>
409
410 * config.bfd: For DJGPP targets, match with any cpu and any machine.
411
ad34bc37
AM
4122002-09-23 Alan Modra <amodra@bigpond.net.au>
413
414 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
415 for discarded FDEs. Remove redundant assignment.
416 * elflink.h (elf_bfd_discard_info): Save edited relocs.
417
82988bff
L
4182002-09-22 H.J. Lu <hjl@gnu.org>
419
420 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
421 the relocation count between different .reloc sections.
422
5ad8645c
AM
4232002-09-21 Alan Modra <amodra@bigpond.net.au>
424
5f819128
AM
425 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
426 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
427 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
428 R_PPC_EMB_RELSDA.
429
5ad8645c
AM
430 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
431 unsigned. Move "symcount" assignment out of loop.
432 * Makefile.am: Run "make dep-am".
433 * Makefile.in: Regenerate.
434 * configure: Regenerate.
435 * po/SRC-POTFILES.in: Regnerate.
436
75936555
NC
4372002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
438
439 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
440 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
441 (e.g. IRIX64).
442
2243deae
L
4432002-09-19 Jakub Jelinek <jakub@redhat.com>
444
445 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
446 even if generating R_PPC_RELATIVE reloc.
447 (ppc_elf_relocate_section): Make sure relocation is performed
448 if skip == -2. Clear memory at r_offset when creating dynamic
449 relocation.
450
37e55690
JJ
4512002-09-19 Jakub Jelinek <jakub@redhat.com>
452
453 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
454 BFD_RELOC_386_TLS_GOTIE): Add.
455 * bfd-in2.h, libbfd.h: Rebuilt.
456 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
457 and R_386_TLS_GOTIE.
458 (elf_i386_reloc_type_lookup): Handle it.
459 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
460 char instead of enum, change GOT_* into defines.
461 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
462 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
463 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
464 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
465 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
466 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
467 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
468 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
469 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
470 tls_type is GOT_TLS_IE_BOTH.
471 (elf_i386_size_dynamic_sections): Likewise.
472 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
473 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
474 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
475 all 4 GOT_TLS_* TLS types.
476
8e67855b
NC
4772002-09-19 Nick Clifton <nickc@redhat.com>
478
479 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
480 follow indirect links.
481
1c59ba3f
NC
4822002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
483
484 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
485 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
486 on 64 bit machines.
487 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
488 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
489 ECOFF information: 'ioptMax' refers to the actual *size*
490 of the optimization symtab, not the number of entries.
1c59ba3f 491
9d7404b7
NC
4922002-09-19 Daniel Jacobowitz <drow@mvista.com>
493
494 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
495 ELF_LINK_HASH_NEEDS_PLT logic.
496
05a487dc
DJ
4972002-09-18 Daniel Jacobowitz <drow@mvista.com>
498
499 * elfcode.h (elf_slurp_reloc_table_from_section): Check
500 correct relocation count.
501
1f70368c
DJ
5022002-09-17 Daniel Jacobowitz <drow@mvista.com>
503
504 * bfd-in.h (bfd_get_dynamic_symcount): Define.
505 * bfd.c (struct _bfd): Add dynsymcount.
506 * bfd-in2.h: Regenerated.
507 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
508 abfd->dynsymcount.
509 * elfcode.h (elf_slurp_reloc_table_from_section): Check
510 for overflow.
511
51020317 5122002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
513
514 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
515 (mips_elf64_final_gp): Don't make up gp value.
516 * elfn32-mips.c (mips_elf_final_gp): Likewise.
517 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
518 .MIPS.options/.options section.
519
290062cc
DB
5202002-09-17 David O'Brien <obrien@FreeBSD.org>
521
522 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
523 It is benign for FreeBSD < 4.1. Minor reformatting.
524 * elf64-alpha-fbsd.c: Likewise.
525
c5c1f40c
JJ
5262002-09-17 Jakub Jelinek <jakub@redhat.com>
527
ca1eb0ba
JJ
528 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
529 addend.
c5c1f40c 530
562ace6b
AM
5312002-09-17 Alan Modra <amodra@bigpond.net.au>
532
533 * elf64-alpha.c (alpha_elf_size_info): Make static.
534
5af6ead6
AM
5352002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
536
537 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
538 * cpu-tic4x.c: Ditto.
539
cb9512fc
TS
5402002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
541
542 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
543 duplicate define.
544
4ada7262
DB
5452002-09-16 Bruno Haible <bruno@clisp.org>
546
547 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
548 by a target variant implementation.
549 * elf64-alpha.c: Likewise.
550 * elf32-i386-fbsd.c: New file.
551 * elf64-alpha-fbsd.c: New file.
552 * targets.c: Support bfd_elf32_i386_freebsd_vec and
553 bfd_elf64_alpha_freebsd_vec.
554 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
555 bfd_elf64_alpha_freebsd_vec.
556 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
557 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
558 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
559 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
560 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
561 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
562 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
563
6a30718d
JJ
5642002-09-12 Jakub Jelinek <jakub@redhat.com>
565
566 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
567 NULL.
568 (elf_i386_relocate_section): Return false after printing error about
569 unresolvable relocation.
570
6cf9e9fe
NC
5712002-09-12 Nick Clifton <nickc@redhat.com>
572
573 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
574 R_ARM_THM_PC11.
575
10f469bf
DJ
5762002-09-11 Jeffrey Law <law@redhat.com>
577
578 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
579
dc43ada5
NC
5802002-09-11 Andrew Haley <aph@cambridge.redhat.com>
581
582 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
583 line_ptr before deciding we've found a symbol.
584
e09f4395
NC
5852002-09-11 Nick Clifton <nickc@redhat.com>
586
587 * po/da.po: New Danish translation file.
588 * configure.in (LINGUAS): Add 'da'.
589 * configure: Regenerate.
590
b3018b5f
NC
5912002-09-10 Michael Snyder <msnyder@redhat.com>
592
593 * irix-core.c (do_sections, do_sections64): New functions.
51020317 594 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
595 do_sections64, depending on corefile (32-bit or 64-bit).
596
2f21f25e
RH
5972002-09-09 Richard Henderson <rth@redhat.com>
598
599 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
600 and PCREL21F like PCREL21B.
601
28b94e7c
KB
6022002-09-04 Kevin Buettner <kevinb@redhat.com>
603
51020317
AM
604 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
605 vector.
28b94e7c 606
5cec6941
NC
6072002-09-02 Nick Clifton <nickc@redhat.com>
608
609 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
610 names instead of cryptically overloaded bfd_reloc error
611 codes.
612 (v850_elf_relocate_section): Likewise.
613 (v850_elf_relax_section): Replace caching of external symbols
614 with caching of internal symbols obtained from calling
615 bfd_elf_get_elf_syms().
51020317 616 Fixup problems with freeing cached allocated memory blocks.
5cec6941 617
3b77b1d5
AM
6182002-09-02 Alan Modra <amodra@bigpond.net.au>
619
638524b5
AM
620 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
621 (bfd_pj_arch): Use bfd_default_scan.
622 * cpu-v850.c (scan): Remove.
623 (N): Use bfd_default_scan.
624 * cpu-z8k.c (scan_mach): Remove.
625 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
626 first. Use bfd_default_scan.
627
250d94fd
AM
628 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
629 bfd_mach constants.
630 (ecoff_get_magic): Likewise.
631 * elf32-v850.c (v850_elf_object_p): Likewise.
632 (v850_elf_final_write_processing): Likewise.
633 * mipsbsd.c (MY(set_arch_mach)): Likewise.
634 (MY(write_object_contents)): Likewise.
635 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
636 * coffcode.h (coff_write_object_contents): Likewise.
637 (coff_set_arch_mach_hook): Add comment describing machine == 0.
638 Remove unnecessary "machine" assignments.
639 (coff_write_relocs): Test for the absolute section sym by testing
640 section and flags.
641
3b77b1d5
AM
642 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
643 and bfd_mach_i386_i386_intel_syntax.
250d94fd 644 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 645
e5b45b83
DA
6462002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
647
648 * bfd-in.h (align_power): Cast constants to bfd_vma type.
649 * bfd-in2.h (align_power): Likewise.
650
37f45cf8
AM
6512002-08-30 Alan Modra <amodra@bigpond.net.au>
652
653 * Makefile.am: Run "make dep-am".
654 * Makefile.in: Regenerate.
655
656 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
657 * cpu-powerpc.c (powerpc_compatible): Likewise.
658 * cpu-rs6000.c (rs6000_compatible): Likewise.
659
86aba9db
NC
6602002-08-28 Catherine Moore <clm@redhat.com>
661
662 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
663 (v850-elf-reloc): Don't resolve pc relative relocs.
664 (v850_elf_ignore_reloc): New routine.
665 (v850_elf_final_link_relocate): Handle new relocs.
666 (v850_elf_relax_delete_bytes ): New routine.
667 (v850_elf_relax_section): New routine.
668 (bfd_elf32_bfd_relax_section): Define.
669 (HOWTO): New entries for new relocs.
670 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
671 (BFD_RELOC_V850_LONGJUMP): New reloc.
672 (BFD_RELOC_V850_ALIGN): New reloc.
673 * archures.c: Remove redundant v850ea architecture.
674 * cpu-v850.c: Remove redundant v850ea support.
675 * libbfd.h: Regenerate.
676 * bfd-in2.h: Regenerated.
677
026df7c5
NC
6782002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
679
680 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
681 * configure.in: Add tic4x_coff vector files.
682 * configure: Regenerate.
683 * Makefile.am: Add tic4x target.
684 * Makefile.in: Regenerate.
685
6862002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
687
688 * archures.c: Add the BFD arch type tic4x.
689 * bfd-in.h: Add BFD_IN_MEMORY flag.
690 * coff-tic4x.c: New file.
691 * coffswap.h (coff_swap_sym_out): Add preadjuster.
692 * cpu-tic4x.c: New file.
693 * targets.c: Added tic4x- in list of xvecs.
694 * ticoff.h: New file.
695 * bfd-in2.h: Regenerate.
696
88f7bcd5
NC
6972002-08-27 Adam Nemet <anemet@lnxw.com>
698
699 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
700 bit of DT_INIT and DT_FINI for Thumb functions.
701
c8e48751
AM
7022002-08-26 Alan Modra <amodra@bigpond.net.au>
703
704 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
705
2846975a
AM
7062002-08-26 Alan Modra <amodra@bigpond.net.au>
707
708 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
709
067653c5
AM
7102002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
711
712 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
713 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
714 Likewise.
715 (struct elf_sh_pcrel_relocs_copied): Removed.
716 (struct elf_sh_dyn_relocs): New.
717 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
718 field with dyn_relocs.
719 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
720 sections and sym_sec.
721 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
722 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
723 (sh_elf_create_dynamic_sections): Use create_got_section instead
724 of _bfd_elf_create_got_section.
725 (sh_elf_check_relocs): Likewise.
726 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
727 sections.
728 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
729 sh_elf_relocate_section, sh_elf_check_relocs,
730 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
731 Likewise.
732 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
733 dynamic relocations and avoiding the copy relocation when we
734 didn't find any dynamic relocations in the section which has
735 contents or is read-only.
736 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
737 (sh_elf_size_dynamic_sections): Don't reset the size of
738 .rela.got section even if dynamic_sections_created flag is off.
739 Don't use sh_elf_discard_copies. Scan all input bfd and use
740 allocate_dynrelocs. Call readonly_dynrelocs to determine
741 whether we need DT_TEXTREL.
742 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
743 whether the symbol was never referred to.
744 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
745 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
746 (sh_elf_check_relocs): Call create_got_section if the short-cut
747 to .got is null. Increment reference counters only instead of
748 allocating space on dynamic sections here. Don't conditionalize
749 uninitialized got.offset value when marking the symbol as a
750 global offset table entry. Keep relocations for symbols satisfied
751 by a dynamic library to avoid copy relocations for the symbol.
752 Set dynobj field of an elf hash table if needed.
753 (sh_elf_finish_dynamic_sections): Handle null section pointer
754 correctly.
755 (elf_backend_copy_indirect_symbol): Defined.
756 (elf_backend_can_refcount): Defined.
757
7e326afc
NC
7582002-08-23 Nick Clifton <nickc@redhat.com>
759
760 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
761 previous change. Add comment explaining why.
762
c8614e8e
AM
7632002-08-23 Stephen Clarke <stephen.clarke@superh.com>
764
765 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
766 contents of .got.plt[2] to tr0, not address of .got.plt.
767 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
768 patching absolute plt entry. For shmedia plt entry, set bottom bit
769 of branch to plt0 as this is a branch to an shmedia instruction.
770 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
771 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
772 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
773 branch to plt0.
774 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
775 patching absolute plt entry. For shmedia plt entry, branch to
776 plt0 is now ptrel, so use relative offset. Set bottom bit of
777 branch target as it is a branch to an shmedia instruction.
778
3b587c71
AM
7792002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
780 Richard Shann <richard.shann@superh.com>
781
782 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
783 value if .init is an SHmedia function. Similarly for DT_FINI.
784 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 785
957dcaa8
AM
7862002-08-23 Stephen Clarke <stephen.clarke@superh.com>
787
3b587c71 788 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 789 dynamic section.
3b587c71 790 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 791
a4263c47
NC
7922002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
793
794 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 795 byte read when reading the return address register column.
a4263c47 796
db4ed121
NC
7972002-08-22 Nick Clifton <nickc@redhat.com>
798
799 * config.bfd: Add powepc64-*-*bsd* target.
800
ed71e111
NC
8012002-08-22 Graeme Peterson <gp@qnx.com>
802
803 * Makefile.am: Add entries for elf32-shqnx.c
804 * Makefile.in: Regenerate.
805 * config.bfd: Add support sh-*-nto* target.
806 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
807 * configure: Regenerate.
808 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
809 * elf32-sh.c: Do not include elf32-target.h if
810 ELF32_SH_C_INCLUDED is defined.
811 * elf32-shqnx.c: New file: Support for QNX.
812 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
813
0ab72ee2
NC
8142002-08-22 Nick Clifton <nickc@redhat.com>
815
75c83283
NC
816 * po/tr.po: Updated Turkish translation.
817
0ab72ee2
NC
818 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
819 symbols are not read.
820
56780f18
AM
8212002-08-22 Alan Modra <amodra@bigpond.net.au>
822
823 * elf32-m68hc11.c: Formatting fixes.
824 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
825 * elf32-m68hc12.c: Formatting fixes.
826 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
827
b48fa14c
AM
8282002-08-22 Alan Modra <amodra@bigpond.net.au>
829
a7c71b0c
AM
830 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
831 SEC_DATA.
832 (pmac_xcoff_vec): Likewise.
833 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
834 (aix5coff64_vec): Likewise.
835
56780f18
AM
8362002-08-22 Alan Modra <amodra@bigpond.net.au>
837
b48fa14c
AM
838 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
839 param to elf_backend_copy_indirect_symbol.
840 (_bfd_elf_link_hash_copy_indirect): Likewise.
841 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
842 calls to copy_indirect_symbol.
843 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
844 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
845 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
846 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
847 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
848 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
849 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
850 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
851 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
852 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
853 test refcounts for "used" values.
854
8c2ab17d
AM
8552002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
856
857 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
858 argument declaration.
859
d62b1198 8602002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
861
862 * archures.c (bfd_mach_ppc_e500): Added.
863 * bfd-in2.h: Rebuilt.
d62b1198
EZ
864 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
865
9f88ba09
AM
8662002-08-19 Alan Modra <amodra@bigpond.net.au>
867
868 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
869
df622259
AC
8702002-08-17 Andrew Cagney <ac131313@redhat.com>
871
872 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 873 `bfd_byte'.
df622259 874
44c410de
SC
8752002-08-17 Stan Cox <scox@redhat.com>
876
877 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
878 IRIX 6 segment layout for NEWABI.
879
4972a8e9
SC
8802002-08-16 Stephen Clarke <stephen.clarke@superh.com>
881
882 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
883 symbols when looking for section referred to by a relocation.
884 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 885
c5cd6d62
AM
8862002-08-15 Alan Modra <amodra@bigpond.net.au>
887
888 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
889
0741c7be
HPN
8902002-08-15 Hans-Peter Nilsson <hp@axis.com>
891
892 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
893 missing check for whether the symbol is referenced by DSO before
894 unexporting it as an unneeded dynamic symbol.
895
e8d5d179
L
8962002-08-14 H.J. Lu <hjl@gnu.org>
897
898 * libbfd.h: Regenerate.
899
e9229007
L
9002002-08-14 H.J. Lu <hjl@gnu.org>
901
902 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
903
1fd03b5a
SC
9042002-08-14 Stephane Carrez <stcarrez@nerim.fr>
905
906 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
907 instructions.
908 (m68hc11_direct_relax): New to define table of relaxable instructions.
909 (find_relaxable_insn): New, find a relaxable insn.
910 (compare_reloc): New to compare two relocs.
911 (m68hc11_elf_relax_section): New, relax text sections.
912 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
913 (elf32_m68hc11_check_relocs): New function for GC support.
914 (elf32_m68hc11_relocate_section): New function for GC support.
915 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
916 (elf_backend_check_relocs): Likewise.
917 (elf_backend_relocate_section): Likewise.
918
c828c771
L
9192002-08-13 H.J. Lu <hjl@gnu.org>
920
921 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
922 definitions in shared objects when checking symbol with
923 undefined version.
924
9b701e44
SC
9252002-08-13 Stephane Carrez <stcarrez@nerim.fr>
926
927 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
928 (elf32_m68hc11_gc_sweep_hook): Likewise.
929 (elf_backend_gc_mark_hook): Define for GC section support.
930 (elf_backend_gc_sweep_hook): Likewise.
931 (elf_backend_can_gc_sections): Likewise.
932
933 * elf32-m68hc12.c: Likewise.
934
96405e3c
SC
9352002-08-13 Stephane Carrez <stcarrez@nerim.fr>
936
937 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
938 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
939 (_bfd_m68hc11_elf_set_private_flags): New function.
940 Use them to set/check/print ELF flags specific to 68HC11.
941
942 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
943 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
944 (_bfd_m68hc12_elf_set_private_flags): New function.
945 Use them to set/check/print ELF flags specific to 68HC12.
946
dae78fb0
SC
9472002-08-13 Stephane Carrez <stcarrez@nerim.fr>
948
949 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
950 fix masks for PC-rel relocs.
951 (m68hc11_elf_ignore_reloc): New function.
952
953 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
954 68HC12 banked addressing relocs.
955 (m68hc12_phys_addr): New to compute physical address of banked memory.
956 (m68hc12_phys_page): Likewise for page.
957 (m68hc12_addr_is_banked): New to see if address is in banked area.
958 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
959
3dbfec86
SC
9602002-08-13 Stephane Carrez <stcarrez@nerim.fr>
961
962 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
963 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
964 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
965 * bfd-in2.h: Regenerate.
966
871da94f
L
9672002-08-12 H.J. Lu <hjl@gnu.org>
968
969 * elflink.h (elf_add_default_symbol): Preserve section across
970 elf_merge_symbol.
971
59bc061d
NC
9722002-08-09 Graeme Peterson <gp@qnx.com>
973
51020317 974 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
975 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
976 * Makefile.in: Regenerate.
977 * config.bfd: Add support for powerpc{le}-*-nto targets.
978 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
979 * configure: Regenerate.
980 * elf32-i386qnx.c: Moved backend functions into a QNX specific
981 common file "elf32-qnx.h", and now include that file.
982 * elf32-qnx.h: New file: QNX specific common elf backend.
983 * elf32-ppc.c: Do not include elf32-target.h if
984 ELF32_PPC_C_INCLUDED is defined.
985 * elf32-ppcqnx.c: New file: Support for QNX.
986 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
987 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
988
2b692c59
NC
9892002-08-09 Nick Clifton <nickc@redhat.com>
990
991 * po/sv.po: Updated Swedish translation.
992
d0c7ff07
TS
9932002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
994
995 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
996 g->global_gotsym is NULL.
997
d8bbe778
L
9982002-08-08 H.J. Lu <hjl@gnu.org>
999
c5cd6d62 1000 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
1001 overrides an indirect versioned symbol.
1002
c366c25e
JJ
10032002-08-08 Jakub Jelinek <jakub@redhat.com>
1004
1005 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
1006 for R_386_TLS_TPOFF32 relocs against symndx 0.
1007
31941635
L
10082002-08-07 H.J. Lu <hjl@gnu.org>
1009
1010 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
1011 with undefined version if needed.
1012 (elf_link_assign_sym_version): Match a default symbol with a
1013 version without definition. No need to hide the default
1014 definition separately.
1015
0f3bd64f
AM
10162002-08-08 Alan Modra <amodra@bigpond.net.au>
1017
7330fb86
AM
1018 * elflink.h (elf_link_output_extsym): Don't output symbols from
1019 SEC_EXCLUDE sections.
1020
0f3bd64f
AM
1021 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
1022
a4aa0fb7
AM
10232002-08-07 Alan Modra <amodra@bigpond.net.au>
1024
1025 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
1026 entries.
1027
34ea4a36
TS
10282002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1029
1030 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
1031 mismatch.
1032
141ff970
TS
10332002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1034
1035 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
1036
28458e7e
TS
10372002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1038
1039 * elf32-mips.c (mips_reloc_map): Fix typo.
1040
0121a3da
AM
10412002-08-06 Alan Modra <amodra@bigpond.net.au>
1042
1043 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
1044
d006db6c
AM
10452002-08-06 Alan Modra <amodra@bigpond.net.au>
1046
1047 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
1048
8ea80f08
AM
10492002-08-06 Alan Modra <amodra@bigpond.net.au>
1050
2a52da53
AM
1051 * libxcoff.h: Use PARAMS on function declarations.
1052 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
1053 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1054
8ea80f08
AM
1055 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
1056 addend.
1057 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
1058
cf9ab45b
AM
10592002-08-06 Alan Modra <amodra@bigpond.net.au>
1060
1061 * coff-rs6000.c: Formatting fixes.
1062 (xcoff_calculate_relocation): Use PARAMS in declaration.
1063 (xcoff_complain_overflow): Likewise.
1064 (xcoff_ppc_relocate_section): Use old-style function pointer call.
1065 (bfd_xcoff_backend_data): Remove useless comments.
1066 (rs6000coff_vec): Likewise.
1067 (bfd_pmac_xcoff_backend_data): Likewise.
1068 (pmac_xcoff_vec): Likewise.
8ea80f08 1069
cf9ab45b
AM
1070 * coff64-rs6000.c: Formatting fixes.
1071 (xcoff64_calculate_relocation): Use PARAMS in declaration.
1072 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
1073 (bfd_xcoff_backend_data): Remove useless comments.
1074 (rs6000coff64_vec): Likewise.
1075 (bfd_xcoff_aix5_backend_data): Likewise.
1076 (aix5coff64_vec): Likewise.
1077
48bfecdd
AM
10782002-08-06 Alan Modra <amodra@bigpond.net.au>
1079
a78eab4e
AM
1080 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
1081 mask entries. Use complain_overflow_dont for R_REF.
1082 (xcoff_reloc_type_ba): Revert last change.
1083 (xcoff_reloc_type_br): Likewise.
1084 (xcoff_reloc_type_crel): Likewise.
1085 (xcoff_ppc_relocate_section): Likewise.
1086 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
1087 (xcoff64_ppc_relocate_section): Likewise.
1088 (xcoff64_howto_table): Revert some of last change to mask entries.
1089 Use complain_overflow_dont for R_REF.
1090
48bfecdd
AM
1091 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
1092 relocs with bitsize == 16 have size = 1.
1093 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
1094 (xcoff_reloc_type_br): Likewise.
1095 (xcoff_reloc_type_crel): Likewise.
1096 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1097 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
1098 dst_mask adjustment.
1099 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
1100 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
1101 bitsize == 16 have size = 1.
1102
fd13ed0c
DC
11032002-08-01 Denis Chertykov <denisc@overta.ru>
1104
1105 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
1106 (struct misc): New field isymbuf. All free_* fields removed.
1107 (symbol_value): Pass in internal syms. No need to swap syms in.
1108 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
1109 possibly cached info.
1110 (tidyup_after_error): Removed.
1111 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
1112 misc. Use new field.
1113 (adjust_all_relocations): Use internal syms. No need to swap syms
1114 in and out.
1115 (add_page_insn): Don't use removed fields of struct misc.
1116
24a1ba0f
NC
11172002-08-01 Nick Clifton <nickc@redhat.com>
1118
1119 * elf32-arm.h: Revert previous delta.
1120
a6903459
NC
11212002-08-01 Nick Clifton <nickc@redhat.com>
1122
1123 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
1124 * configure: Regenerate.
1125
39a2a3eb
L
11262002-07-31 H.J. Lu <hjl@gnu.org>
1127
1128 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
1129 selected.
1130
a0dfa6a8
L
11312002-07-31 H.J. Lu <hjl@gnu.org>
1132
1133 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
1134 is selected.
1135
cd67d266
JJ
11362002-07-31 Jakub Jelinek <jakub@redhat.com>
1137
1138 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
1139 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
1140
4eb6b71c
NC
11412002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1142
1143 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
1144 There is no 8 byte relocation type for this architecture.
1145 (do_ns32k_reloc): Use bfd_vma instead of native types.
1146 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
1147 returns void.
1148 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
1149 rely on generic code to do that.
1150 * aout-ns32k.c (howto_table): Add appropriate overflow detection
1151 to all table entries.
1152 (_bfd_ns32k_relocate_contents): put_data returns void.
1153 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
1154 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
1155 return void.
1156
f7c33884
NC
11572002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
1158
1159 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
1160 archive object is target dependant.
1161
8f64befb
NC
11622002-07-31 Adam Nemet <anemet@lnxw.com>
1163
1164 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
1165 (THUMB_PLT_ENTRY_SIZE): New macro.
1166 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
1167 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
1168 ARM_PLT_ENTRY_SIZE.
1169 (elf32_arm_plt_entry): Likewise.
1170 (elf_backend_plt_header_size): Likewise.
1171 (elf32_thumb_plt0_entry): New global.
1172 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
1173 into .plt.thumb.
1174 (elf32_thumb_plt_entry): New global.
1175 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
1176 Thumb entries. Set the bottom bit of the corresponding GOT entry
1177 for a Thumb PLT entry.
1178 (struct elf32_arm_plt_entry_info): New structure.
1179 (struct elf32_arm_link_hash_entry, plt_info): New member of this
1180 type.
1181 (elf32_arm_link_hash_newfunc): Initialize new member.
1182 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
1183 relocations against the PLT.
1184 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
1185 first_rel_type if this is the first time we encounter the symbol.
1186 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
1187 Determine if relocation needs a PLT entry. Set first_rel_type if
1188 this is the first time we encounter the symbol
1189 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
1190 functions as well.
1191 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
1192 (elf32_arm_create_dynamic_sections): New function. Create the
1193 .plt.thumb section.
1194 (elf_backend_create_dynamic_sections): Call it.
1195
47badb7b
NC
11962002-07-31 Nick Clifton <nickc@redhat.com>
1197
1198 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
1199 'alternative' in order to avoid shadowing global symbol of the
1200 same name.
1201 * bfd-in2.h: Regenerate.
1202 * libbfd.h: Regenerate.
1203 * libcoff.h: Regenerate.
1204
8a397dad
TS
12052002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1206
1207 * Makefile.am: Add n32 ABI support.
1208 * Makefile.in: Regenerate.
1209 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
1210 bit vectors for mips*-*-linux targets as optional.
1211 * configure.in: Add n32 ABI vectors.
1212 * configure: Regenerate.
1213 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
1214 * elfn32-mips.c: New file, n32 ABI support.
1215 * targets.c: Add n32 ABI vectors.
1216
7e392df6 12172002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 1218
7e392df6
NC
1219 * elfarmqnx-nabi.c: New file: Support for QNX.
1220 * config.bfd: Add support for arm-*-nto target.
1221 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
1222 * configure: Regenerate.
1223 * Makefile.am: Add entries for elfarmqnx-nabi.c.
1224 * Makefile.in: Regenerate.
1225 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
1226 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
1227 * elfarm-nabi.c: Do not include elf32-arm.h if
1228 ELFARM_NABI_C_INCLUDED is defined.
1229 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 1230
7e392df6 12312002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 1232
83e1617e
NC
1233 * po/sv.po: Updated Swedish translation.
1234
704afa60
JJ
12352002-07-30 Jakub Jelinek <jakub@redhat.com>
1236
1237 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
1238
487e54f2
AM
12392002-07-30 Alan Modra <amodra@bigpond.net.au>
1240
1241 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
1242 * archive.c (bfd_generic_archive_p): Likewise.
1243 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
1244 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
1245 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
1246 (xcoff64_archive_p): Likewise.
1247 (xcoff64_openr_next_archived_file): Likewise.
1248 (xcoff64_archive_p): Clean up tdata properly on error.
1249 * coffgen.c (coff_real_object_p): Likewise.
1250 (coff_object_p): Release filehdr and opthdr.
1251 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
1252 * ieee.c (ieee_archive_p): Likewise.
1253 * ihex.c (ihex_object_p): Likewise.
1254 (ihex_mkobject): Always allocate tdata.
1255 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
1256 * srec.c (srec_mkobject): Always allocate tdata.
1257 (srec_object_p): Clean up tdata properly on error.
1258 (symbolsrec_object_p): Likewise.
1259 * versados.c (versados_object_p): Likewise.
1260 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
1261 and bfd_realloc instead of realloc.
1262 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
1263 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
1264 place of bfd_malloc, simplifying error freeing. Free hash table too.
1265 (vms_object_p): Clean up tdata on error.
1266 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
1267 (vms_close_and_cleanup): Adjust for bfd_alloc use.
1268
9d46020e
AM
12692002-07-30 Alan Modra <amodra@bigpond.net.au>
1270
1271 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
1272
fb39dac1
RS
12732002-07-26 Chris Demetriou <cgd@broadcom.com>
1274
1275 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
1276 flags into resulting BFD.
1277
7a624474
AM
12782002-07-26 Alan Modra <amodra@bigpond.net.au>
1279
1280 From John Reiser <jreiser@BitWagon.com>
1281 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
1282 tls_ldm_got.refcount.
1283
a4382ec6
TS
12842002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1285
1286 * elf64-mips.c: Update TODO comment.
1287 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
1288 mips_elf64_gprel16_reloca): Remove prototypes.
1289 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
1290 (UNUSED_RELOC): Replace by EMPTY_RELOC.
1291 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
1292 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
1293 R_MIPS_HIGHEST.
1294 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
1295 R_MIPS_GOT16. Remove wrong comments.
1296 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
1297 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
1298 from elf32-mips.c.
1299 (mips_elf64_hi16_reloc): Fix formatting.
1300 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
1301 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
1302 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
1303 (mips_elf64_gprel16_reloc): Make static. Add check for
1304 partial_inplace.
1305 (mips_elf64_gprel16_reloca): Remove.
1306 (mips_elf64_literal_reloc): New function.
1307 (mips_elf64_gprel32_reloc): Fix formatting.
1308 (mips_elf64_shift6_reloc): Fix comment. Make static.
1309 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
1310 elf32-mips.c.
1311 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
1312 elf32-mips.c
1313 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
1314 specific relocations.
1315 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
1316 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
1317 (ELF_MAXPAGESIZE): Add comment.
1318
219576a4
NC
13192002-07-25 Nick Clifton <nickc@redhat.com>
1320
1321 * po/sv.po: Updated Swedish translation.
1322 * po/es.po: Updated Spanish translation.
1323 * po/fr.po: Updated French translation.
1324
8c58d23b
AM
13252002-07-25 Alan Modra <amodra@bigpond.net.au>
1326
1327 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
1328 as elf_link_record_local_dynamic_symbol.
1329 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
1330 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
1331 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
1332 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
1333 attempt is made to record a symbol in a discarded section, and
1334 return `2' in that case.
1335
ff3063f5
NC
13362002-07-24 Nick Clifton <nickc@redhat.com>
1337
1338 * po/sv.po: Updated Swedish translation.
1339 * po/es.po: Updated Spanish translation.
1340
f0fe0e16
AM
13412002-07-23 Alan Modra <amodra@bigpond.net.au>
1342
c1fb5f8a
AM
1343 * po/SRC-POTFILES.in: Regenerate.
1344
f0fe0e16
AM
1345 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
1346 immediately. Remove code handling relocatable linking.
1347 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
1348 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1349 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 1350 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
1351 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
1352 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1353 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1354 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1355 * elf32-v850.c (v850_elf_relocate_section): Likewise.
1356 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1357 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1358 * elf32-avr.c (elf_backend_rela_normal): Define.
1359 * elf32-cris.c: Likewise.
1360 * elf32-fr30.c: Likewise.
de2d743e 1361 * elf32-frv.c: Likewise.
f0fe0e16
AM
1362 * elf32-h8300.c: Likewise.
1363 * elf32-hppa.c: Likewise.
1364 * elf32-ip2k.c: Likewise.
1365 * elf32-sparc.c: Likewise.
1366 * elf32-v850.c: Likewise.
1367 * elf32-vax.c: Likewise.
1368 * elf64-hppa.c: Likewise.
1369 * elf64-sparc.c: Likewise.
1370 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 1371 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
1372 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
1373 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1374 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
1375 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
1376 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
1377 * elf-m10200.c (USE_RELA): Don't define.
1378 * elf-m10300.c: Likewise.
de2d743e 1379 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
1380 * elf32-i370.c: Likewise.
1381 * elf32-ip2k.c: Likewise.
1382 * elf32-m68k.c: Likewise.
1383 * elf32-mcore.c: Likewise.
1384 * elf32-ppc.c: Likewise.
1385 * elf32-s390.c: Likewise.
1386 * elf32-vax.c: Likewise.
1387 * elf64-ppc.c: Likewise.
1388 * elf64-s390.c: Likewise.
1389 * elf64-x86-64.c: Likewise.
1390 * elfxx-ia64.c: Likewise.
1391 * elf32-avr.c (USE_REL): Don't undef.
1392 * elf32-ip2k.c: Likewise.
1393
5e8d7549
NC
13942002-07-23 Nick Clifton <nickc@redhat.com>
1395
1396 * elf-bfd.h (struct elf_backend_data): Add new bitfield
1397 'want_p_paddr_set_to_zero'.
1398 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
1399 to false;
1400 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
1401 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
1402
9e12c7db
NC
14032002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
1404
1405 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
1406 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
1407 show the Copyright string.
1408 Minor formatting tidy ups.
1409
0461a601
NC
14102002-07-23 Nick Clifton <nickc@redhat.com>
1411
ff3063f5
NC
1412 * po/fr.po: Updated French translation.
1413 * po/sv.po: Updated Swedish translation.
0461a601 1414
fad2542d
AM
14152002-07-23 Alan Modra <amodra@bigpond.net.au>
1416
1417 * elflink.h (elf_link_input_bfd): Don't change internal symbols
1418 when outputting relocs.
1419
c0647bfc
JT
14202002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
1421
1422 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
1423 DT_PLTGOT into the dynamic section if there is a PLT.
1424
d01414a5
TS
14252002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1426
1427 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
1428 elf32-mips.c.
1429 (_bfd_mips_elf_write_section): Likewise.
1430 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
1431 (_bfd_mips_elf_write_section): Likewise.
1432 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
1433 (elf32_mips_write_section): Likewise.
1434 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
1435 (_bfd_mips_elf_write_section): Likewise.
1436
40c97fc6
AM
14372002-07-19 Alan Modra <amodra@bigpond.net.au>
1438
1439 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
1440 PT_IA_64_UNWIND segments for a given section.
1441
58378160
L
14422002-07-17 H.J. Lu <hjl@gnu.org>
1443
1444 * Makefile.am: Fix a typo.
1445 * Makefile.in: Regenerate.
1446
cf88bb9f
NC
14472002-07-15 Denis Chertykov <denisc@overta.ru>
1448 Frank Ch. Eigler <fche@redhat.com>
1449 Ben Elliston <bje@redhat.com>
1450 Alan Lehotsky <alehotsky@cygnus.com>
1451 John Healy <jhealy@redhat.com>
1452 Graham Stott <grahams@redhat.com>
1453 Jeff Johnston <jjohnstn@redhat.com>
1454
1455 * Makefile.am: Add support for ip2k.
1456 * Makefile.in: Regenerate.
1457 * doc/Makefile.in: Regenerate.
1458 * archures.c: Add support for ip2k.
1459 * config.bfd: Add support for ip2k.
1460 * configure.in: Add support for ip2k.
1461 * configure: Regenerate.
1462 * reloc.c: Add support for ip2k.
1463 * targets.c: Add support for ip2k.
1464 * bfd-in2.h: Regenerate.
1465 * libbfd.h: Regenerate.
1466 * cpu-ip2k.c: New file.
1467 * elf32-ip2k.c: New file.
1468
0dafd5f6
RE
14692002-07-17 Ian Rickards <irickard@arm.com>
1470
40c97fc6 1471 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
1472 just return the filename.
1473
36b08f12
AM
14742002-07-16 Moritz Jodeit <moritz@jodeit.org>
1475
1476 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
1477
58821868
AM
14782002-07-16 Alan Modra <amodra@bigpond.net.au>
1479
1480 * elflink.h: Formatting fixes, tidy prototypes.
1481 (elf_link_assign_sym_version): Move common code out of loop.
1482
c89583f8
AM
14832002-07-16 Alan Modra <amodra@bigpond.net.au>
1484
1485 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
1486 reloc section size is zero. Correct reloc output location.
1487
ba94744e
AM
14882002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1489
1490 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
1491 the final type for the e_fsel selector when generating PA2.0W code.
1492 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
1493 relocations.
1494
96a94295
L
14952002-07-14 H.J. Lu <hjl@gnu.org>
1496
1497 * elflink.h (elf_link_assign_sym_version): Hide the default
1498 definition if there is a hidden versioned definition.
1499
6849c52f
HPN
15002002-07-12 Hans-Peter Nilsson <hp@axis.com>
1501
1502 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
1503 dynamic reference test in assertion when initializing GOT with
1504 static contents. Just assert that there are either no dynamic
1505 sections, the symbol is defined in the regular objects or that the
1506 symbol is undef weak. Tweak comment.
1507 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
1508 only if the symbol isn't defined in the program and isn't undef
1509 weak.
1510 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
1511 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
1512 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
1513 (elf_cris_discard_excess_program_dynamics): Don't consider
1514 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
1515
239e1f3a
AM
15162002-07-11 Alan Modra <amodra@bigpond.net.au>
1517
1518 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
1519 unresolved debugging relocs in dynamic applications.
1520 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1521 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1522 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1523 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1524 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1525 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1526
2f6d9989
AM
15272002-07-10 Alan Modra <amodra@bigpond.net.au>
1528
f5e87a1d
AM
1529 * elf64-ppc.c (ONES): Define.
1530 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
1531 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
1532 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
1533
2f6d9989
AM
1534 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
1535 (ppc64_elf_set_private_flags): Delete.
1536 (ppc64_elf_section_from_shdr): Delete.
1537 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
1538 (ppc64_elf_fake_sections): Delete.
1539 (bfd_elf64_bfd_set_private_flags): Don't define.
1540 (bfd_elf64_get_symbol_info): Likewise.
1541 (elf_backend_section_from_shdr): Likewise.
1542 (elf_backend_fake_sections): Likewise.
1543
0594c12d
AM
15442002-07-10 Marco Walther <Marco.Walther@sun.com>
1545
1546 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
1547 when not already set.
1548 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
1549 (elf_backend_fake_sections): Define.
1550
699cb9b8
AM
15512002-07-10 Alan Modra <amodra@bigpond.net.au>
1552
1553 * merge.c (_bfd_merge_section): Remove redundant output_section check.
1554 Formatting.
1555 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
1556
0a4787a0
HPN
15572002-07-09 Hans-Peter Nilsson <hp@axis.com>
1558
1559 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
1560 NULL sym_hashes to just before use.
1561 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
1562 symbol with non-default visibility.
1563 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
1564 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
1565 Ditto.
1566 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
1567 symbol with non-default visibility.
1568 (cris_elf_check_relocs): At tests for local symbol before
1569 increasing h->plt.refcount, also check for non-default
1570 visibility. Ditto when checking for local symbol to eliminate
1571 pc-relative runtime relocs.
1572
aecc8f8a
AM
15732002-07-08 Alan Modra <amodra@bigpond.net.au>
1574
1575 * elf.c: Formatting.
1576 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
1577 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
1578 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
1579 segments.
1580
e9168c1e
MM
15812002-07-07 Mark Mitchell <mark@codesourcery.com>
1582 Alan Modra <amodra@bigpond.net.au>
1583
1584 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
1585 account the impact of relocation count overflow when computing
1586 section offsets.
1587 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
1588 or not to apply the PE COFF reloc overflow handling. Fix a
1589 fencepost error in deciding whether or not to use that technique.
1590
6cdc0ccc
AM
15912002-07-07 Alan Modra <amodra@bigpond.net.au>
1592
1593 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
1594 change type of locsyms.
1595 (bfd_elf_get_elf_syms): Declare.
1596 * elf.c (bfd_elf_get_elf_syms): New function.
1597 (group_signature): Use bfd_elf_get_elf_syms.
1598 (bfd_section_from_r_symndx): Likewise.
1599 * elfcode.h (elf_slurp_symbol_table): Likewise.
1600 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1601 (elf_link_add_object_symbols): Likewise. Reorganise to increase
1602 locality of various data structures. Properly free internal relocs.
1603 (elf_bfd_final_link): Properly free internal relocs.
1604 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
1605 (elf_link_input_bfd): Likewise.
1606 (elf_gc_mark): Likewise. Properly free internal relocs.
1607 (elf_gc_sweep): Properly free internal relocs.
1608 (elf_reloc_symbol_deleted_p): No need to swap syms in.
1609 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
1610 internal relocs.
1611 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
1612 Properly free possibly cached info.
1613 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
1614 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
1615 symbol swapping code.
1616 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
1617 Properly free possibly cached info.
1618 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
1619 (mn10300_elf_relax_delete_bytes): Likewise.
1620 (mn10300_elf_symbol_address_p): Likewise.
1621 (mn10300_elf_get_relocated_section_contents): Likewise.
1622 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
1623 (elf32_h8_relax_delete_bytes): Likewise.
1624 (elf32_h8_symbol_address_p): Likewise.
1625 (elf32_h8_get_relocated_section_contents): Likewise.
1626 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
1627 (m32r_elf_relax_delete_bytes): Likewise.
1628 (m32r_elf_get_relocated_section_contents): Likewise.
1629 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
1630 elf_section_data to determine whether cached.
1631 (sh_elf_relax_section): As above for elf-m10200.c.
1632 (sh_elf_relax_delete_bytes): Likewise.
1633 (sh_elf_get_relocated_section_contents): Likewise.
1634 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
1635 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
1636 reading of local syms.
1637 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1638 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
1639 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
1640 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
1641 relocs.
1642 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
1643 free internal relocs and section contents. Don't read symbols.
1644 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
1645 (elf32_hppa_size_stubs): Don't free local syms.
1646 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
1647 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
1648 possibly cached info.
1649 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1650 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
1651 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
1652 all_local_syms.
1653 (get_local_syms): Delete function.
1654 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
1655 on exit.
1656 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
1657
b3212001
JW
16582002-07-05 Jim Wilson <wilson@redhat.com>
1659
1660 * syms.c (decode_section_type): New.
1661 (bfd_decode_symclass): Call decode_section_type.
1662
894bb1ee
JJ
16632002-07-04 Jakub Jelinek <jakub@redhat.com>
1664
1665 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
1666 section content start.
1667 Reported by Michael Schumacher <mike@hightec-rt.com>.
1668
bc0ba537
AM
16692002-07-04 Alan Modra <amodra@bigpond.net.au>
1670
1671 * section.c (_bfd_strip_section_from_output): Remove unnecessary
1672 link order code. Don't actually remove the output section here;
1673 Just set a flag for the linker to do so.
1674 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
1675 sections when setting up output section dynsyms.
1676
797fc050
AM
16772002-07-04 Alan Modra <amodra@bigpond.net.au>
1678
1679 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
1680 fudge.
1681 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
1682 libs here instead.
1683
99881371
MS
16842002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
1685
1686 * elf64-s390.c (create_got_section): Set .got section alignment to
1687 8 bytes.
1688 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
1689
47d9a591
AM
16902002-07-02 Alan Modra <amodra@bigpond.net.au>
1691
1692 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
1693
179d3252
JT
16942002-07-01 Matt Thomas <matt@3am-software.com>
1695
1696 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
1697 to EF_VAX_*.
1698
4a14403c
TS
16992002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1700
1701 * elfxx-mips.c (ABI_64_P): Fix comment.
1702 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
1703 new section names for N64 ABI.
1704 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
1705 (mips_elf_calculate_relocation): Code formatting.
1706 (mips_elf_create_dynamic_relocation): Likewise.
1707 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
1708 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
1709 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
1710 in any NewABI.
1711 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
1712 for NewABI.
1713 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
1714 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
1715 here, too.
1716
607c0e09
AS
17172002-07-01 Andreas Schwab <schwab@suse.de>
1718
1719 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
1720 R_X86_64_64 to R_X86_64_RELATIVE.
1721
ba26fd96
AM
17222002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
1723
1724 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
1725 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
1726 Run "make dep-am".
1727 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
1728 host_aout_vec.
1729 * configure.in (vaxbsd_vec): Add.
1730 * targets.c (vaxbsd_vec): Add.
1731 * Makefile.in: Rebuild.
1732 * configure: Rebuild.
1733 * po/SRC-POTFILES.in: Rebuild.
1734
1e2f5b6e
AM
17352002-07-01 Alan Modra <amodra@bigpond.net.au>
1736
1737 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
1738 examining to gc_mark_hook, rather than the bfd.
1739 (elf_gc_sections): Adjust.
1740 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
1741 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
1742 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
1743 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
1744 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
1745 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
1746 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
1747 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
1748 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
1749 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
1750 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
1751 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
1752 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
1753 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
1754 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
1755 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
1756 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
1757 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
1758 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
1759 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
1760 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
1761 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1762 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
1763 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1764 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
1765 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
1766 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
1767 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
1768 redundant local sym tests.
1769 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
1770 (link_hash_newfunc): Init is_entry.
1771 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
1772 (ppc64_elf_link_hash_table_create): Init all_local_syms.
1773 (create_linkage_sections): Use bfd_make_section_anyway rather than
1774 bfd_make_section.
1775 (ppc64_elf_mark_entry_syms): New function.
1776 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
1777 up opd entry to function section map.
1778 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
1779 relocs that reference the opd section.
1780 (edit_opd): New function.
1781 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
1782 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
1783 (get_local_syms): Do so here. Exit if we already have local syms.
1784 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
1785 read local syms on non-ELF input.
1786 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
1787 than duplicating it's function here. Adjust free of internal
1788 relocs to suit.
1789 (ppc64_elf_relocate_section): Adjust local syms in opd section.
1790 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
1791 * elf32-hppa.c (elf32_hppa_size_stubs): Call
1792 _bfd_elf32_link_read_relocs rather than duplicating it's function
1793 here. Adjust free of internal relocs to suit.
1794
1b71fb54
AJ
17952002-07-01 Andreas Jaeger <aj@suse.de>
1796
1797 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
1798 are not allowed in shared libs code, enforce -fPIC.
1799
8d28f606
HPN
18002002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
1801
1802 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
1803 trailing zero-sequences when there's previous left-over data.
1804
5ac81c74
JL
18052002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
1806
1807 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
1808 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
1809 and opd_rel_sec in order for starting rela section. Check _raw_size.
1810 (elf_backend_reloc_type_class): Define.
1811
91a4d569
AM
18122002-06-27 Kevin Buettner <kevinb@redhat.com>
1813
1814 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
1815 DWARF2 formats.
1816
feee612b
AM
18172002-06-27 Alan Modra <amodra@bigpond.net.au>
1818
1819 * cpu-powerpc.c: Comment on ordering of arch_info.
1820 * elf32-ppc.c (ppc_elf_object_p): New function.
1821 (elf_backend_object_p): Define.
1822 * elf64-ppc.c (ppc64_elf_object_p): New function.
1823 (elf_backend_object_p): Define.
1824
a4e6cefc
JT
18252002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
1826
1827 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
1828 * configure: Regenerate.
1829
dae2dd0d
NC
18302002-06-25 Jason Eckhardt <jle@rice.edu>
1831
1832 * dwarf2.c (decode_line_info): Check unit->addr_size
1833 to read in the proper number of prologue bytes.
1834
680f9d5c
NC
18352002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
1836
1837 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
1838 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
1839 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
1840 been enabled.
dae2dd0d 1841
680f9d5c
NC
1842 * targets.c (_bfd_target_vector[]): Only include
1843 aix5coff64_vec if 64-bit bfd support has been enabled.
1844
d4c88bbb
AM
18452002-06-25 Alan Modra <amodra@bigpond.net.au>
1846
1847 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
1848 * elf32-hppa.c (hppa_add_stub): Likewise.
1849 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1850 * elflink.h (elf_add_default_symbol): Fix comment typo.
1851 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
1852 (elf_link_add_object_symbols): Likewise.
1853 (elf_link_assign_sym_version): Likewise.
1854 * hash.c (bfd_hash_lookup): Likewise.
1855 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1856 * section.c (bfd_get_unique_section_name): Likewise.
1857 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1858 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
1859 (assign_section_numbers): Likewise.
1860 (_bfd_elfcore_make_pseudosection): Likewise.
1861 (elfcore_grok_lwpstatus): Likewise.
1862 (elfcore_grok_win32pstatus): Likewise.
1863 (elfcore_write_note): Constify input params. Use PTR instead of
1864 void *. Include terminating NUL in namesz. Correct padding.
1865 Support NULL "name" param. Use memcpy instead of strcpy.
1866 (elfcore_write_prpsinfo): Constify input params.
1867 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
1868 (elfcore_write_lwpstatus): Likewise.
1869 (elfcore_write_pstatus): Likewise.
1870 (elfcore_write_prfpreg): Likewise.
1871 (elfcore_write_prxfpreg): Likewise.
1872 * elf-bfd.h (elfcore_write_note): Update declaration.
1873 (elfcore_write_prpsinfo): Likewise.
1874 (elfcore_write_prstatus): Likewise.
1875 (elfcore_write_pstatus): Likewise.
1876 (elfcore_write_prfpreg): Likewise.
1877 (elfcore_write_prxfpreg): Likewise.
1878 (elfcore_write_lwpstatus): Likewise.
1879
b0ac09d2
NC
18802002-06-25 Jason Eckhardt <jle@rice.edu>
1881
1882 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
1883 symbols of type stProc and stStaticProc.
1884
18852002-06-25 Nick Clifton <nickc@redhat.com>
1886
1887 * ecoff.c: VArious formatting fixes.
1888
021d6096
AM
18892002-06-25 Alan Modra <amodra@bigpond.net.au>
1890
1891 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
1892
82e51918
AM
18932002-06-25 Alan Modra <amodra@bigpond.net.au>
1894
1895 * aout-adobe.c: Don't compare against "true" or "false.
1896 * aout-target.h: Likewise.
1897 * aoutx.h: Likewise.
1898 * archive.c: Likewise.
1899 * bout.c: Likewise.
1900 * cache.c: Likewise.
1901 * coff-a29k.c: Likewise.
1902 * coff-alpha.c: Likewise.
1903 * coff-i386.c: Likewise.
1904 * coff-mips.c: Likewise.
1905 * coff-or32.c: Likewise.
1906 * coff64-rs6000.c: Likewise.
1907 * coffcode.h: Likewise.
1908 * coffgen.c: Likewise.
1909 * cpu-ns32k.c: Likewise.
1910 * ecoff.c: Likewise.
1911 * ecofflink.c: Likewise.
1912 * elf.c: Likewise.
1913 * elf32-arm.h: Likewise.
1914 * elf32-cris.c: Likewise.
1915 * elf32-d30v.c: Likewise.
1916 * elf32-i386.c: Likewise.
1917 * elf32-mcore.c: Likewise.
1918 * elf32-ppc.c: Likewise.
1919 * elf32-sh.c: Likewise.
1920 * elf32-sh64.c: Likewise.
1921 * elf32-v850.c: Likewise.
1922 * elf64-alpha.c: Likewise.
1923 * elf64-sh64.c: Likewise.
1924 * elfcode.h: Likewise.
1925 * elfcore.h: Likewise.
1926 * elflink.h: Likewise.
1927 * elfxx-mips.c: Likewise.
1928 * i386os9k.c: Likewise.
1929 * ieee.c: Likewise.
1930 * libbfd.c: Likewise.
1931 * linker.c: Likewise.
1932 * mmo.c: Likewise.
1933 * nlm32-alpha.c: Likewise.
1934 * nlm32-i386.c: Likewise.
1935 * nlm32-ppc.c: Likewise.
1936 * nlm32-sparc.c: Likewise.
1937 * nlmcode.h: Likewise.
1938 * oasys.c: Likewise.
1939 * pdp11.c: Likewise.
1940 * peicode.h: Likewise.
1941 * reloc.c: Likewise.
1942 * som.c: Likewise.
1943 * srec.c: Likewise.
1944 * tekhex.c: Likewise.
1945 * vms.c: Likewise.
1946 * xcofflink.c: Likewise.
1947 * elf64-sparc.c: Edit comment to not use "== false".
1948
1949 * aoutf1.h: Don't use "? true : false".
1950 * ecoff.c: Likewise.
1951 * format.c: Likewise.
1952 * ieee.c: Likewise.
1953 * linker.c: Likewise.
1954 * mmo.c: Likewise.
1955 * oasys.c: Likewise.
1956
48fc70a2
AM
19572002-06-23 H.J. Lu <hjl@gnu.org>
1958
1959 * elflink.h (elf_link_add_archive_symbols): For the default
1960 version, check references with only one `@' first.
1961
47b7c2db
AM
19622002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
1963
1964 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
1965 function.
1966 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
1967 symbol table.
1968 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
1969 (elf64_hppa_size_dynamic_sections): Revise to use
1970 elf64_hppa_mark_milli_and_exported_functions.
1971 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
1972 symbols out of dynamic symbol table.
1973
f5d44ba0
AM
19742002-06-23 Alan Modra <amodra@bigpond.net.au>
1975
bb3fff1e
AM
1976 * Makefile.in: Regenerate.
1977 * libbfd.h: Regenerate.
1978 * bfd-in2.h: Regenerate.
1979 * configure: Regenerate.
1980 * po/SRC-POTFILES.in: Regenerate.
1981
f5d44ba0
AM
1982 * elflink.h: Comment typo fixes.
1983
19842002-06-23 H.J. Lu <hjl@gnu.org>
1985
1986 * elf-bfd.h (elf_link_loaded_list): New structure.
1987 (elf_link_hash_table): Add "loaded".
1988 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
1989 * elflink.h (elf_link_check_versioned_symbol): New function.
1990 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
1991
cc36acdf
NC
19922002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1993
1994 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 1995 support an ELF style hash table, return true, indicating that
cc36acdf
NC
1996 nothing needed to be done, rather than false, indicating that the
1997 section's size could not be computed.
1998
4e5ba5b7
DB
19992002-06-18 Dave Brolley <brolley@redhat.com>
2000
2001 From Catherine Moore, Michael Meissner, Dave Brolley:
2002 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
2003 * targets.c: Support bfd_elf32_frv_vec.
2004 * reloc.c: Add FRV relocs.
2005 * configure.in: Add support for bfd-elf32-frv-vec.
2006 * config.bfd (targ_cpu): Add support for frv-*-elf.
2007 * archures.c: Add frv arch and machines.
2008 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
2009 (ALL_MACHINES_CFILES): Add cpu-frv.c.
2010 (BFD32_BACKENDS): Add elf32-frv.lo.
2011 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
2012 (cpu-frv.lo): New target.
2013 (elf32-frv.lo): New target.
2014 * cpu-frv.c: New file.
2015 * elf32-frv.c: New file.
2016
7ece0d85
JJ
20172002-06-18 Jakub Jelinek <jakub@redhat.com>
2018
2019 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
2020 e_shnum == 0.
2021 Only read the first section header if e_shoff is non-zero.
2022 Don't consider e_shstrndx if there are no sections.
2023
57fb03ac
TR
20242002-06-17 Tom Rix <trix@redhat.com>
2025
2026 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 2027 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
2028 complain_overflow_bitfield.
2029
341ca622
AM
20302002-06-17 Alan Modra <amodra@bigpond.net.au>
2031
767e34d1
AM
2032 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
2033 (bfd_fdopenr): Likewise.
2034 (bfd_openstreamr): Likewise.
2035 (bfd_openw): Likewise.
2036
341ca622
AM
2037 * targets.c: Sort target vecs.
2038 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
2039 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
2040 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
2041 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
2042 * configure.in: Sort target vecs. Add m88kmach3_vec.
2043 * configure: Regenerate.
2044
dfbbae4c
HPN
20452002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
2046
2047 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
2048 bpo_reloc_no to break sort order ties, not address of items.
2049
d663e1cd
JL
20502002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
2051
2052 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
2053 Skip excluded sections in determing __gp value.
2054 (elf_hppa_final_link_relocate): Use the symbol's address in
2055 R_PARISC_FPTR64 relocations that don't need an opd entry.
2056 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
2057 (elf64_hppa_finalize_dynreloc): Likewise.
2058 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
2059 (elf64_hppa_finish_dynamic_symbol): Break up assert.
2060
a8295218
NC
20612002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
2062
2063 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
2064 alignment for .bss, .data and .text sections so that sse and sse2
2065 code will work.
2066 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
2067
20682002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
2069
2070 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
2071 sh[1234]*-elf*.
2072
3db4b612
JL
20732002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
2074
2cb69dd3
JL
2075 * elflink.h (elf_bfd_final_link): Improve error handling for missing
2076 dynamic sections.
2077
3db4b612
JL
2078 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
2079 for a symbol that has no output section.
2080 (allocate_dynrel_entries): Correct comment.
2081 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
2082 unless we want one.
2083 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
2084 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
2085 with no section. Remove unnecessary parentheses.
2086
f3813499
TR
20872002-06-11 Tom Rix <trix@redhat.com>
2088
2089 * coffcode.h (coff_compute_section_file_positions): Add data
2090 section to AIX loader alignment check.
2091
f5d44ba0 2092 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
2093 alignment to 4 bytes.
2094 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
2095 power accessor macro.
2096 (do_shared_object_padding): Remove invalid assertion.
2097
0ebaf185
RS
20982002-06-10 Richard Sandiford <rsandifo@redhat.com>
2099
2100 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
2101 for removed output sections.
2102
ebe3e2d1
NC
21032002-06-10 Geoffrey Keating <geoffk@redhat.com>
2104
2105 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
2106 htab_alloc.
2107 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
2108
0b14c2aa
L
21092002-06-08 H.J. Lu <hjl@gnu.org>
2110
2111 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
2112 work around a long long bug in gcc 2.96 on mips.
2113
3c2bfad6
JT
21142002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
2115
2116 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
2117 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
2118 Regenerate dependency lists.
2119 * Makefile.in: Regenerate.
2120 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
2121 vax1knetbsd_vec to targ_selvecs.
2122 * configure.in: Add vax1knetbsd_vec.
2123 * configure: Regenerate.
2124 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
2125 * vax1knetbsd.c: New file.
2126 * vaxnetbsd.c: Update copyright years.
2127 (TARGET_PAGE_SIZE): Set to 0x1000.
2128 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
2129
91149be3
JT
21302002-06-08 Matt Thomas <matt@3am-software.com>
2131
2132 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
2133
21e15248
AM
21342002-06-08 Alan Modra <amodra@bigpond.net.au>
2135
2136 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
2137
986b7daa
AM
21382002-06-08 Alan Modra <amodra@bigpond.net.au>
2139
e90b95f6
AM
2140 * Makefile.am: Run "make dep-am".
2141 * Makefile.in: Regenerate.
2142
3f9c735e
AM
2143 * armnetbsd.c: Replace CONST with const.
2144 * corefile.c: Likewise.
2145 * elf32-dlx.c: Likewise.
2146 * elf64-mips.c: Likewise.
2147 * mmo.c: Likewise.
2148 * ns32knetbsd.c: Likewise.
2149
986b7daa
AM
2150 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
2151 table is elf64-sparc.
2152
5a659663
TS
21532002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2154
2155 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
2156 Fix RELA addends to get not shifted in the result. Don't do special
2157 handling of R_MIPS_64 for NewABI.
2158
9bab7074
AM
21592002-06-07 Alan Modra <amodra@bigpond.net.au>
2160
2161 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2162 (NAME(aout,slurp_reloc_table)): Likewise.
2163 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
2164 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
2165 (xcoff_write_archive_contents_big): Likewise.
2166 (xcoff_generate_rtinit): Likewise.
2167 (xcoff_generate_rtinit): Likewise, and check error return.
2168 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
2169 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
2170 (coff_get_normalized_symtab): Likewise.
2171 (coff_make_empty_symbol): Likewise.
2172 (bfd_coff_set_symbol_class): Likewise.
2173 * cofflink.c (coff_link_add_symbols): Likewise.
2174 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
2175 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
2176 (bfd_ecoff_write_accumulated_debug): Likewise.
2177 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
2178 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
2179 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
2180 * ieee.c (do_with_relocs): Use bfd_zalloc.
2181 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
2182 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
2183 (NAME(aout,slurp_reloc_table)): Likewise.
2184 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
2185 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
2186 * som.c (som_build_and_write_symbol_table): Likewise.
2187 (som_slurp_string_table): Likewise.
2188 (som_slurp_symbol_table): Likewise.
2189 (som_bfd_ar_write_symbol_stuff): Likewise.
2190 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
2191 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
2192 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
2193 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
2194 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
2195
1126897b
AM
21962002-06-07 Alan Modra <amodra@bigpond.net.au>
2197
2198 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
2199 "group" union.
2200 (elf_group_name): Update.
2201 (elf_group_id): Define.
2202 (bfd_elf_set_group_contents): Declare.
2203 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
2204 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
2205 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
2206 that sym for the signature.
2207 (_bfd_elf_compute_section_file_positions): Don't call
2208 set_group_contents for "ld -r" case.
2209 (swap_out_syms): Use bfd_zalloc.
2210 * elflink.h (elf_link_add_archive_symbols): Likewise.
2211 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
2212 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
2213
3fad3c7c
AM
22142002-06-07 Alan Modra <amodra@bigpond.net.au>
2215
2216 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
2217 relocs in opd for non-shared too.
2218
10f469bf 22192002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
2220
2221 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
2222 relocations.
2223
7217313c
NC
22242002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
2225
2226 * merge.c: Include libiberty.h.
2227 * elf-strtab.c: Include libiberty.h.
2228
6cb22815
AM
22292002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
2230
2231 * peXXigen.c (pe_print_idata): Remove unused variable.
2232
1ed89aa9
NC
22332002-06-06 David Heine <dlheine@tensilica.com>
2234
2235 * elf.c (assign_file_positions_for_segments): Remove unallocated
2236 sections from the section to segment mapping for PT_LOAD segments.
2237 Update comment about empty loadable segments.
2238
644c4c80
RS
22392002-06-06 Richard Sandiford <rsandifo@redhat.com>
2240
2241 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
2242 is within the .stabstr section.
2243
f8ecb12b
AM
22442002-06-06 Alan Modra <amodra@bigpond.net.au>
2245
2246 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
2247 are "const PTR", not "const PTR *".
2248 (bfd_elf32_swap_symbol_in): Likewise.
2249 (bfd_elf64_swap_symbol_in): Likewise.
2250 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
2251 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2252 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2253 (elf_link_add_object_symbols): Likewise.
2254 (elf_link_record_local_dynamic_symbol): Likewise.
2255 (elf_link_input_bfd): Likewise.
2256 (elf_gc_mark): Likewise.
2257 (elf_reloc_symbol_deleted_p): Likewise.
2258 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2259 (mn10200_elf_relax_delete_bytes): Likewise.
2260 (mn10200_elf_symbol_address_p): Likewise.
2261 (mn10200_elf_get_relocated_section_contents): Likewise.
2262 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2263 (mn10300_elf_relax_section): Likewise.
2264 (mn10300_elf_relax_delete_bytes): Likewise.
2265 (mn10300_elf_symbol_address_p): Likewise.
2266 (mn10300_elf_get_relocated_section_contents): Likewise.
2267 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2268 (elf32_h8_relax_delete_bytes): Likewise.
2269 (elf32_h8_symbol_address_p): Likewise.
2270 (elf32_h8_get_relocated_section_contents): Likewise.
2271 * elf32-hppa.c (get_local_syms): Likewise.
2272 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2273 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2274 * elf32-sh.c (sh_elf_relax_section): Likewise.
2275 (sh_elf_relax_delete_bytes): Likewise.
2276 (sh_elf_get_relocated_section_contents): Likewise.
2277 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2278 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2279 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2280 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2281 * elf64-ppc.c (get_local_syms): Likewise.
2282 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2283 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2284
1ed89aa9 22852002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
2286
2287 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
2288
73ff0d56
AM
22892002-06-05 Alan Modra <amodra@bigpond.net.au>
2290
9dce4196
AM
2291 * elf.c (group_signature): Swap in the whole symbol, and handle
2292 extracting section symbol names.
2293 (setup_group): Add comment.
2294 (set_group_contents): When called from objcopy or ld, arrange for
2295 section contents to be written. Write group member output section
2296 indices to allow objcopy to reorganize sections.
2297 (_bfd_elf_copy_private_section_data): Copy group info.
2298
73ff0d56
AM
2299 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
2300 (bfd_elf32_swap_symbol_in): Update prototype.
2301 (bfd_elf64_swap_symbol_in): Likewise.
2302 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
2303 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
2304 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
2305 (elf_link_add_object_symbols): Likewise.
2306 (elf_link_record_local_dynamic_symbol): Likewise.
2307 (elf_link_input_bfd): Likewise.
2308 (elf_gc_mark): Likewise.
2309 (elf_reloc_symbol_deleted_p): Likewise.
2310 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
2311 (mn10200_elf_relax_delete_bytes): Likewise.
2312 (mn10200_elf_symbol_address_p): Likewise.
2313 (mn10200_elf_get_relocated_section_contents): Likewise.
2314 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
2315 (mn10300_elf_relax_section): Likewise.
2316 (mn10300_elf_relax_delete_bytes): Likewise.
2317 (mn10300_elf_symbol_address_p): Likewise.
2318 (mn10300_elf_get_relocated_section_contents): Likewise.
2319 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2320 (elf32_h8_relax_delete_bytes): Likewise.
2321 (elf32_h8_symbol_address_p): Likewise.
2322 (elf32_h8_get_relocated_section_contents): Likewise.
2323 * elf32-hppa.c (get_local_syms): Likewise.
2324 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
2325 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
2326 * elf32-sh.c (sh_elf_relax_section): Likewise.
2327 (sh_elf_relax_delete_bytes): Likewise.
2328 (sh_elf_get_relocated_section_contents): Likewise.
2329 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
2330 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
2331 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
2332 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
2333 * elf64-ppc.c (get_local_syms): Likewise.
2334 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2335 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
2336 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
2337 * elf64-alpha.c (alpha_elf_size_info): Likewise.
2338 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2339 * elf64-mips.c (mips_elf64_size_info): Likewise.
2340 * elf64-s390.c (s390_elf64_size_info): Likewise.
2341 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2342
53bfd6b4
MR
23432002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2344
2345 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
2346 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
2347 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
2348 _bfd_mips_elf_ignore_discarded_relocs.
2349 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
2350
d4df96e6
L
23512002-06-05 H.J. Lu <hjl@gnu.org>
2352
2353 * elfxx-mips.c (mips_elf_calculate_relocation): Call
2354 _bfd_elf_rel_local_sym for STT_SECTION relocations against
2355 the SEC_MERGE section.
2356
e61463e1
AM
23572002-06-05 Alan Modra <amodra@bigpond.net.au>
2358
3cac74d0
AM
2359 * coff-alpha.c: Update copyright date.
2360 * coff-mips.c: Likewise.
2361 * xcoff-target.h: Likewise.
2362
e61463e1
AM
2363 * bfd-in.h: Remove "taken from the source" comment.
2364 * libbfd-in.h: Likewise.
2365 * libcoff-in.h: Likewise.
2366 * bfd-in2.h: Regenerate.
2367 * libbfd.h: Regenerate.
2368 * libcoff.h: Regenerate.
2369
2370 * elf.c (bfd_elf_discard_group): Return true.
2371 * elf-bfd.h (bfd_elf_discard_group): Declare.
2372 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
2373 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
2374 * bfd.c (bfd_discard_group): Define.
2375 * targets.c (struct bfd_target): Add _bfd_discard_group.
2376 (BFD_JUMP_TABLE_LINK): Here too.
2377 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
2378 * aout-adobe.c (aout_32_bfd_discard_group): Define.
2379 * aout-target.h (MY_bfd_discard_group): Define.
2380 * aout-tic30.c (MY_bfd_discard_group): Define.
2381 * binary.c (binary_bfd_discard_group): Define.
2382 * bout.c (b_out_bfd_discard_group): Define.
2383 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
2384 * coffcode.h (coff_bfd_discard_group): Define.
2385 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
2386 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
2387 * i386msdos.c (msdos_bfd_discard_group): Define.
2388 * i386os9k.c (os9k_bfd_discard_group): Define.
2389 * ieee.c (ieee_bfd_discard_group): Define.
2390 * ihex.c (ihex_bfd_discard_group): Define.
2391 * mmo.c (mmo_bfd_discard_group): Define.
2392 * nlm-target.h (nlm_bfd_discard_group): Define.
2393 * oasys.c (oasys_bfd_discard_group): Define.
2394 * ppcboot.c (ppcboot_bfd_discard_group): Define.
2395 * som.c (som_bfd_discard_group): Define.
2396 * srec.c (srec_bfd_discard_group): Define.
2397 * tekhex.c (tekhex_bfd_discard_group): Define.
2398 * versados.c (versados_bfd_discard_group): Define.
2399 * vms.c (vms_bfd_discard_group): Define.
2400 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
2401 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
2402 (aix5coff64_vec): Likewise.
2403 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
2404
9cba27b2
JT
24052002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
2406
2407 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
2408 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
2409 (elf32-sh64-com.lo): New dependency list.
2410 * Makefile.in: Regenerate.
2411 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
2412 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
2413 elf32-sh64-com.lo.
2414 * configure: Regenerate.
2415 * elf32-sh64.c (sh64_address_in_cranges)
2416 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
2417 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
2418 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
2419 * elf32-sh64-com.c: ...here. New file.
2420
8d2c33be
AM
24212002-06-04 Alan Modra <amodra@bigpond.net.au>
2422
2423 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
2424 ATTRIBUTE_UNUSED on used params.
2425 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
2426 before calling bfd_section_from_elf_index on local syms.
2427 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
2428
5b0e55b6
JT
24292002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
2430
2431 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
2432 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
2433 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
2434 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
2435 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
2436 * Makefile.in: Regenerate.
2437 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
2438 (sh64-*-netbsd*): New targets.
2439 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
2440 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
2441 * configure: Regenerate.
2442 * elf32-sh64-nbsd.c: New file.
2443 * elf64-sh64-nbsd.c: New file.
2444 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
2445 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
2446 bfd_elf64_sh64lnbsd_vec.
2447
b885599b
AM
24482002-06-04 Alan Modra <amodra@bigpond.net.au>
2449
2450 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
2451 (bfd_section_from_shdr): Likewise. Set section name of group
2452 sections from signature.
2453 (group_signature): Split out from setup_group. Ensure symbol table
2454 is available.
2455 (bfd_elf_discard_group): New function.
2456 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
2457 .gnu.linkonce* sections if they are members of a group.
2458 (set_group_contents): Set GRP_COMDAT flag.
2459 * section.c (bfd_discard_group): New function.
2460 * bfd-in.h (bfd_elf_discard_group): Declare.
2461 * bfd-in2.h: Regenerate.
2462 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
2463 (elf_linkonce_p): Define.
2464
90937f86
AM
24652002-06-04 Alan Modra <amodra@bigpond.net.au>
2466
2467 * elf.c (bfd_section_from_shdr): Make "name" const.
2468 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
2469 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
2470 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
2471 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
2472 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
2473 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
2474 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
2475 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
2476 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
2477 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
2478 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
2479
cf6fb9ce
MR
24802002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2481
2482 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
2483 ABI.
2484
cedb70c5
KH
24852002-06-02 Kazu Hirata <kazu@cs.umass.edu>
2486
2487 * elf32-arc.c: Fix formatting.
2488 * elf32-arm.h: Likewise.
2489 * elf32-cris.c: Likewise.
2490 * elf32-dlx.c: Likewise.
2491 * elf32-hppa.c: Likewise.
2492 * elf32-i386.c: Likewise.
2493 * elf32-i386qnx.c: Likewise.
2494 * elf32-or32.c: Likewise.
2495 * elf32-s390.c: Likewise.
2496 * elf32-sh64.c: Likewise.
2497 * elf32-vax.c: Likewise.
2498 * elf32-xstormy16.c: Likewise.
2499 * elf64-alpha.c: Likewise.
2500 * elf64-mmix.c: Likewise.
2501 * elf64-ppc.c: Likewise.
2502 * elf64-s390.c: Likewise.
2503 * elf64-sh64.c: Likewise.
2504 * elf64-x86-64.c: Likewise.
2505
048d873d
RH
25062002-06-02 Richard Henderson <rth@redhat.com>
2507
2508 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
2509 null when there are no got entries for a symbol.
2510 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
2511 uninitialized variable warning.
2512
4a67a098
RH
25132002-06-01 Richard Henderson <rth@redhat.com>
2514
2515 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
2516 undefined symbols here.
2517 (elf64_alpha_relax_section): Do it here. Also test for not
2518 defined in the current module.
2519 (elf64_alpha_relocate_section_r): Split out of ...
2520 (elf64_alpha_relocate_section): ... here. Don't dereference
2521 NULL when looking up local got entries.
2522
f44f99a5
RH
25232002-06-01 Richard Henderson <rth@redhat.com>
2524
2525 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
2526 symbols from JSR relaxation.
2527 (elf64_alpha_size_plt_section_1): New.
2528 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
2529 (elf64_alpha_size_rela_got_1): ... here.
2530 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
2531 (elf64_alpha_size_rela_got_section): ... here.
2532 (elf64_alpha_size_plt_section): New.
2533 (elf64_alpha_relax_section): Call them.
2534 (elf64_alpha_size_got_sections): Remove output_bfd arg.
2535 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
2536
9e756d64
RH
25372002-06-01 Richard Henderson <rth@redhat.com>
2538
2539 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
2540 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
2541 in shared libraries. Fix DTPRELHI and TPRELHI value.
2542 (INSN_ADDQ, INSN_RDUNIQ): New.
2543 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
2544 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
2545 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
2546 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
2547 Handle GOTDTPREL and GOTTPREL relocations.
2548 (elf64_alpha_relax_gprelhilo): New.
2549 (elf64_alpha_relax_tls_get_addr): New.
2550 (elf64_alpha_relax_find_tls_segment): New.
2551 (elf64_alpha_relax_section): Handle TLS relocations.
2552 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
2553 (elf64_alpha_check_relocs): Set it.
2554
c853d7f6
RH
25552002-06-01 Richard Henderson <rth@redhat.com>
2556
b646261c
RH
2557 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
2558
c853d7f6
RH
2559 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
2560 check; don't suppress dynamic relocs for non-allocated sections.
2561
d7e41a96
RH
2562 * elf64-alpha.c: Remove dead code.
2563
5f333394
AM
25642002-05-31 Alan Modra <amodra@bigpond.net.au>
2565
08e0ee05
AM
2566 * bfd-in2.h: Regenerate.
2567 * libbfd.h: Regenerate.
2568 * po/SRC-POTFILES.in: Regenerate.
2569
5f333394
AM
2570 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
2571 space for bss .plt.
2572
caf47ea6
AM
25732002-05-31 Graeme Peterson <gp@qnx.com>
2574
2575 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
2576 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
2577 Run "make dep-am".
2578 * Makefile.in: Regenerate.
2579 * config.bfd: Add i[3456]86-*-nto-qnx* support.
2580 * configure.in: Add bfd_elf32_i386qnx_vec support.
2581 * configure: Regenerate.
2582 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
2583 is_contained_by_filepos, and copy_private_bfd_data_p.
2584 * elf.c (assign_file_positions_for_segments): Call backend
2585 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
2586 (IS_CONTAINED_BY_FILEPOS): Define.
2587 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
2588 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
2589 Fix non-K&R call to _bfd_error_handler.
2590 (_bfd_elf_copy_private_section_data): Use backend
2591 copy_private_bfd_data_p.
2592 * elf32-i386.c: Don't include elfxx-target.h when
2593 ELF32_I386_C_INCLUDED is defined.
2594 * elf32-i386qnx.c: New QNX elf backend file.
2595 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
2596 elf_backend_is_contained_by_filepos, and
2597 elf_backend_do_copy_private_bfd_data.
2598 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
2599
5bc56484
AM
26002002-05-31 Alan Modra <amodra@bigpond.net.au>
2601
2602 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
2603 Move other similar defines to start of file.
2604
1b164155
TR
26052002-05-30 Tom Rix <trix@redhat.com>
2606
2607 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
2608 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
2609
3765b1be
RH
26102002-05-30 Richard Henderson <rth@redhat.com>
2611
2612 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
2613 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
2614 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
2615 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
2616 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
2617 (struct alpha_elf_obj_tdata): Rename total_got_entries and
2618 n_local_got_entries to total_got_size and local_got_size.
2619 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
2620 (alpha_got_entry_size): New.
2621 (elf64_alpha_relax_with_lituse): Use it.
2622 (elf64_alpha_relax_without_lituse): Likewise.
2623 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
2624 (get_got_entry): New.
2625 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
2626 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
2627 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
2628 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
2629 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
2630 (elf64_alpha_calc_got_offsets): Likewise.
2631 (alpha_dynamic_entries_for_reloc): New.
2632 (elf64_alpha_calc_dynrel_sizes): Use it.
2633 (elf64_alpha_size_dynamic_sections): Likewise.
2634 (elf64_alpha_relocate_section): Handle TLS relocations.
2635 * reloc.c: Add Alpha TLS relocations.
2636 * bfd-in2.h, libbfd.h: Rebuild.
2637
5e226794
NC
26382002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2639
2640 * peXXigen.c (pe_print_idata): Remove double printed
2641 import table lines; add Bound-To comment.
2642
90ace9e9
JT
26432002-05-29 Matt Thomas <matt@3am-software.com>
2644
2645 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
2646 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
2647 (elf32-vax.lo): New rule.
2648 * Makefile.in: Regenerate.
2649 * configure.in (bfd_elf32_vax_vec)
2650 (vaxnetbsd_vec): New vectors.
2651 * configure: Regenerate.
2652 * config.bfd (vax-*-netbsdelf*)
2653 (vax-*-netbsdaout*)
2654 (vax-*-netbsd*): New targets.
2655 * elf32-vax.c: New file.
2656 * reloc.c: Add VAX relocations.
2657 * bfd-in2.h: Regenerate.
2658 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
2659
4a253e81
JT
26602002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
2661
2662 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
2663 and bfd_elf32_bigarm_vec to targ_selvecs.
2664
6e7c73dd
CF
26652002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
2666
2667 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
2668 with auto-imported symbols.
2669
8afb0e02
NC
26702002-05-29 Adam Nemet <anemet@lnxw.com>
2671
2672 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
2673 sections only record bfd.
9bab7074 2674 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 2675 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 2676 * bfd-in2.h: Regenerate.
8afb0e02 2677
a95653f5
NC
26782002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
2679
2680 * syms.c (_bfd_stab_section_find_nearest_line): Move
2681 declaration and initialisation of saw_line and saw_func out of
2682 for loop.
2683
7cdc5bba
AM
26842002-05-29 Alan Modra <amodra@bigpond.net.au>
2685
2686 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
2687 (bfd_elf64_get_symbol_info): Define.
2688 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
2689
4c7aad1c
AM
26902002-05-29 Andrey Volkov <avolkov@transas.com>
2691
2692 * cpu-h8300.c: Make default h8300 machine first in machine list.
2693
d172d4ba
NC
26942002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
2695
2696 * config.bfd: Added DLX configuraton.
2697 * Makefile.am: Added DLX configuraton.
2698 * configure.in: Added DLX configuraton.
2699 * archures.c: Add DLX architecure.
2700 * reloc.c: Add DLX relocs.
2701 * targets.c: Added DLX target vector.
2702 * configure: Regenerate.
2703 * Makefile.in: Regenreate.
2704 * bfd-in2.h: Regenreate.
2705 * elf32-dlx.c: New file: Support DLX target.
2706 * cpu-dlx.c: New file: Support DLX target.
2707
d1329ca3
AM
27082002-05-25 Alan Modra <amodra@bigpond.net.au>
2709
428d0de3
AM
2710 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
2711
d1329ca3
AM
2712 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
2713 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
2714 strings to point inside function code sym string.
2715 (func_desc_adjust): Likewise.
2716 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
2717
3bab7989
ML
27182002-05-24 Michal Ludvig <mludvig@suse.cz>
2719
2720 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
2721 (elf64_x86_64_grok_psinfo): Added.
2722
436e8db0
NC
27232002-05-24 TAMURA Kent <kent@netbsd.org>
2724
2725 * config.bfd: Add a target for i386-netbsdpe.
2726
ea1e4b0d
AM
27272002-05-24 Alan Modra <amodra@bigpond.net.au>
2728
2729 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
2730 and is_func_descriptor.
2731 (func_desc_adjust): Hide function code sym in shared libs unless
2732 there is a matching exported function descriptor sym.
2733
13ae64f3
JJ
27342002-05-23 Jakub Jelinek <jakub@redhat.com>
2735
2736 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
2737 for symbols from SHF_TLS section.
2738 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
2739 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
2740 (map_sections_to_segments): Build PT_TLS segment if necessary.
2741 (assign_file_positions_for_segments): Likewise.
2742 (get_program_header_size): Account for PT_TLS segment.
2743 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
2744 SEC_THREAD_LOCAL sections to STT_TLS.
2745 * reloc.c: Add 386 and IA-64 TLS relocs.
2746 * section.c (SEC_THREAD_LOCAL): Define.
2747 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
2748 Remove.
2749 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
2750 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
2751 unconditionally.
2752 (struct elf_final_link_info): Add first_tls_sec.
2753 (elf_bfd_final_link): Set first_tls_sec.
2754 Compute elf_hash_table (info)->tls_segment.
2755 (elf_link_output_extsym): Handle STT_TLS symbols.
2756 (elf_link_input_bfd): Likewise.
2757 * syms.c (BSF_THREAD_LOCAL): Define.
2758 * bfd-in2.h: Rebuilt.
2759 * libbfd.h: Rebuilt.
2760 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
2761 elf_i386_mkobject, elf_i386_object_p): New functions.
2762 (elf_howto_table): Add TLS relocs.
2763 (elf_i386_reloc_type_lookup): Support TLS relocs.
2764 (elf_i386_info_to_howto_rel): Likewise.
2765 (struct elf_i386_link_hash_entry): Add tls_type.
2766 (struct elf_i386_obj_tdata): New.
2767 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
2768 New macros.
2769 (struct elf_i386_link_hash_table): Add tls_ldm_got.
2770 (link_hash_newfunc): Clear tls_type.
2771 (elf_i386_check_relocs): Support TLS relocs.
2772 (elf_i386_gc_sweep_hook): Likewise.
2773 (allocate_dynrelocs): Likewise.
2774 (elf_i386_size_dynamic_sections): Likewise.
2775 (elf_i386_relocate_section): Likewise.
2776 (elf_i386_finish_dynamic_symbol): Likewise.
2777 (bfd_elf32_mkobject, elf_backend_object_p): Define.
2778 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
2779 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
2780 want_tprel, want_dtpmod, want_dtprel.
2781 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
2782 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
2783 R_IA64_LTOFF_TPREL22.
2784 (elf_code_to_howto_index): Add TLS relocs.
2785 (elfNN_ia64_check_relocs): Support TLS relocs.
2786 (allocate_global_data_got): Account for TLS .got data.
2787 (allocate_dynrel_entries): Account for TLS dynamic relocations.
2788 (elfNN_ia64_install_value): Supprt TLS relocs.
2789 (set_got_entry): Support TLS relocs.
2790 (elfNN_ia64_relocate_section): Likewise.
2791
c62e1cc3
NC
27922002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2793
2794 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
2795 BLX reloc round the relocation up rather than down.
2796 * coff-arm.c (coff_arm_relocate_section): Likewise.
2797
c5a43a5d
L
27982002-05-21 H.J. Lu (hjl@gnu.org)
2799
2800 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
2801 definition.
2802
afbe61cf
AM
28032002-05-22 Alan Modra <amodra@bigpond.net.au>
2804
2805 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
2806 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
2807
9c07fe7c
AM
28082002-05-22 Alan Modra <amodra@bigpond.net.au>
2809
2810 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
2811 unresolved relocs.
2812 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
2813
21611032
TS
28142002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2815
c5cd6d62 2816 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
2817 non-ELF targets.
2818
41241523
TS
28192002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2820
2821 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
2822 an error value.
2823 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
2824 return with false on error.
2825 (elf_link_input_bfd): Check reloc_emitter return value.
2826
658f2588
JT
28272002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
2828
2829 * config.bfd (armeb-*-netbsdelf*): New target.
2830
c862ae31
AM
28312002-05-20 Alan Modra <amodra@bigpond.net.au>
2832
2833 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
2834 at the plt call stub.
2835
6dd14845
TS
28362002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2837
2838 * cpu-mips.c (mips_compatible): Don't try to check machine
2839 compatibility.
2840
a58d9c34
TR
28412002-05-18 Tom Rix <trix@redhat.com>
2842
2843 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2844
ef60b7ff
AM
28452002-05-17 Alan Modra <amodra@bigpond.net.au>
2846
2847 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
2848 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
2849 we've already warned about an undefined symbol. Report more
2850 detail on reloc errors.
2851
a703a6ea
AM
28522002-05-17 Alan Modra <amodra@bigpond.net.au>
2853
2854 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
2855 * configure.in: Invoke AM_INSTALL_LIBBFD.
2856 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
2857 (install_libbfd): .. New target.
2858 (uninstall_libbfd): Likewise.
2859 (install-bfdlibLTLIBRARIES): Likewise.
2860 (uninstall-bfdlibLTLIBRARIES): Likewise.
2861 (bfdlibdir): New.
2862 (bfdincludedir): New.
2863 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
2864 * aclocal.m4: Regenerate.
2865 * configure: Regenerate.
2866 * Makefile.in: Regenerate.
2867
2c13d98b
NC
28682002-05-17 Stuart Balfour <sbalfour@cisco.com>
2869
2870 * hash.c (bfd_hash_lookup): Remove computation of len from inside
2871 hash loop.
2872
629936c5
NC
28732002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
2874
2875 * config.bfd: Add targets for sh64-linux (little endian and
2876 big endian).
2877
e4cf60a8
NC
28782002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
2879
2880 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
2881 is located in the same section as the import table. Instead
2882 check, and if necessary load the section containing the thunk.
2883
d1e66cd4
NC
28842002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
2885
2886 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
2887 bfd_bread.
2888 (xcoff64_core_file_matches_executable_p): Replace bfd_read
2889 with bfd_bread.
d1e66cd4 2890
2d653fc7
AM
28912002-05-15 Alan Modra <amodra@bigpond.net.au>
2892
2893 * aix5ppc-core.c: Warning fixes.
2894 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
2895 * aout-target.h (MY_bfd_link_just_syms): Define.
2896 * aout-tic30.c (MY_bfd_link_just_syms): Define.
2897 * bfd.c (bfd_link_just_syms): Define.
2898 * binary.c (binary_bfd_link_just_syms): Define.
2899 * bout.c (b_out_bfd_link_just_syms): Define.
2900 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
2901 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2902 * coffcode.h (coff_bfd_link_just_syms): Define.
2903 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
2904 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
2905 (_bfd_elf_link_just_syms): Declare.
2906 * elf.c (_bfd_elf_link_just_syms): New function.
2907 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
2908 sections haven't already been discarded by the linker.
2909 * elflink.h (elf_link_add_object_symbols): Likewise for stab
2910 sections and SEC_MERGE sections.
2911 (elf_bfd_discard_info): Similarly here.
2912 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
2913 * i386msdos.c (msdos_bfd_link_just_syms): Define.
2914 * i386os9k.c (os9k_bfd_link_just_syms): Define.
2915 * ieee.c (ieee_bfd_link_just_syms): Define.
2916 * ihex.c (ihex_bfd_link_just_syms): Define.
2917 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
2918 (_bfd_generic_link_just_syms): Declare.
2919 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
2920 * linker.c (_bfd_generic_link_just_syms): New function.
2921 * mmo.c (mmo_bfd_link_just_syms): Define.
2922 * nlm-target.h (nlm_bfd_link_just_syms): Define.
2923 * oasys.c (oasys_bfd_link_just_syms): Define.
2924 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
2925 * som.c (som_bfd_link_just_syms): Define.
2926 * srec.c (srec_bfd_link_just_syms): Define.
2927 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
2928 (BFD_JUMP_TABLE_LINK): And here.
2929 * tekhex.c (tekhex_bfd_link_just_syms): Define.
2930 * versados.c (versados_bfd_link_just_syms): Define.
2931 * vms.c (vms_bfd_link_just_syms): Define.
2932 * libbfd.h: Regenerate.
2933 * bfd-in2.h: Regenerate.
2934
cb7394f2
TS
29352002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2936
2937 * elf32-mips.c: Remove superfluous definitions copied from
2938 elfxx-mips.c.
2939 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
2940 SGIish vectors to check the special case.
2941 (mips_elf_hi16_reloc): Fix comment.
2942 (mips_elf_got16_reloc): Likewise.
2943 (_bfd_mips_elf32_gprel16_reloc): Likewise.
2944 (elf_reloc_map): Code cleanup.
2945 (mips_reloc_map): Add comment.
2946 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
2947 (mips_elf32_rtype_to_howto): Likewise.
2948 (mips_elf32_discard_info): Likewise.
2949 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
2950 lead to IRIX compatibility now.
2951
8dc1a139
TS
29522002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2953
2954 * elfxx-mips.c: Call it IRIX, not Irix in comments.
2955
2051e1b5
JT
29562002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
2957
2958 * config.bfd (shle-*-netbsdelf*): Add target which includes
2959 sh64 support.
2960
83954261
AM
29612002-05-13 David Edelsohn <edelsohn@gnu.org>
2962
2963 * configure.in: Revert 2002-04-07. Instead, auto-configure
2964 HAVE_ST_C_IMPL.
2965 * configure: Regenerate.
2966 * config.in: Regenerate.
2967 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
2968 or AIX_5_CORE.
2969
a9bf1154
NC
29702002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2971
2972 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
2973 corefiles as well.2
2974 * configure: Regenerate.
2975
3129eb7a
AM
29762002-05-13 Alan Modra <amodra@bigpond.net.au>
2977
2978 * Makefile.am (install-data-local): Install headers to
2979 $(exec_prefix)/include.
2980 * Makefile.in: Regenerate.
2981
a9a32010
DJ
29822002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2983 Daniel Jacobowitz <drow@mvista.com>
2984
2985 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
2986 map BFD_RELOC_RVA.
2987
29882002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
2989
2990 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
2991 hppa*-*-openbsd*): New targets.
2992 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2993 * configure: Regenerate.
2994
f1f0d9ab
TR
29952002-05-10 Tom Rix <trix@redhat.com>
2996
ea1e4b0d 2997 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
2998 xcoff64_ppc_relocate_section.
2999 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
3000 * libxcoff.h: Common xcoff_reloc_type function declaration.
3001
c432ba1a
AM
30022002-05-10 Alan Modra <amodra@bigpond.net.au>
3003
16a10388 3004 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 3005 added in 2002-05-09 commit.
16a10388 3006
c432ba1a
AM
3007 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
3008 don't look for stubs on all undefined syms.
3009
4a335f3d
AM
30102002-05-09 Alan Modra <amodra@bigpond.net.au>
3011
8fc39d5d
AM
3012 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
3013 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
3014 pcrel_offset.
3015
4a335f3d
AM
3016 * elf32-i386.c (elf_howto_table): Comments.
3017 (elf_i386_relocate_section): Handle more relocs for relocatable
3018 linking and against SEC_MERGE sections.
3019
41fcb14e
AM
30202002-05-08 Alan Modra <amodra@bigpond.net.au>
3021
3022 * elf32-ppc.c (ppc_elf_create_got): New function.
3023 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 3024 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
3025 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
3026 _bfd_elf_create_got_section.
3027
b491616a
AM
30282002-05-07 Alan Modra <amodra@bigpond.net.au>
3029
3030 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
3031 * elfxx-target.h (elf_backend_rela_normal): Define.
3032 (elfNN_bed): Init rela_normal.
3033 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
3034 for section symbols here if rela_normal. Simplify abs section test.
3035 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
3036 return immediately. Remove code handling relocatable linking.
3037 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3038 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3039 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3040 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3041 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3042 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3043 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3044 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3045 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3046 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3047 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3048 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3049 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3050 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3051 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
3052 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3053 * elf-m10200.c (elf_backend_rela_normal): Define.
3054 * elf-m10300.c (elf_backend_rela_normal): Define.
3055 * elf32-fr30.c (elf_backend_rela_normal): Define.
3056 * elf32-i370.c (elf_backend_rela_normal): Define.
3057 * elf32-i860.c (elf_backend_rela_normal): Define.
3058 * elf32-m68k.c (elf_backend_rela_normal): Define.
3059 * elf32-mcore.c (elf_backend_rela_normal): Define.
3060 * elf32-openrisc.c (elf_backend_rela_normal): Define.
3061 * elf32-ppc.c (elf_backend_rela_normal): Define.
3062 * elf32-s390.c (elf_backend_rela_normal): Define.
3063 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
3064 * elf64-ppc.c (elf_backend_rela_normal): Define.
3065 * elf64-s390.c (elf_backend_rela_normal): Define.
3066 * elf64-x86-64.c (elf_backend_rela_normal): Define.
3067 * elfxx-ia64.c (elf_backend_rela_normal): Define.
3068 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
3069 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
3070
df212a7e
NC
30712002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
3072
3073 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
3074 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
3075
3decf53c
AM
30762002-05-06 Alan Modra <amodra@bigpond.net.au>
3077
3078 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
3079 when not relocatable. Fix reloc_emitter call for K&R.
3080
f46c2da6
AM
30812002-05-04 Alan Modra <amodra@bigpond.net.au>
3082
3083 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
3084 reloading local sym addend mistakenly removed in 2002-05-01 change.
3085
3086 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
3087 (read_abbrevs): Change "offset" param to bfd_vma.
3088 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
3089 Change "abbrev_offset" to bfd_vma.
3090 (read_indirect_string): Use correct conversion chars in error
3091 message format string, cast bfd_vma's to unsigned long.
3092 (read_abbrevs): Likewise.
3093 (read_attribute_value): Likewise.
3094 (decode_line_info): Likewise.
3095 (scan_unit_for_functions): Likewise.
3096 (parse_comp_unit): Likewise.
3097
59862849
TR
30982002-05-04 Tom Rix <trix@redhat.com>
3099
3100 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
3101 (coff_swap_reloc_out): Same.
3102 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
3103 (xcoff_swap_reloc_out): Same.
3104 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
3105 case some 16 bit relocs. Add reloc value to output.
3106 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 3107 R_RBR. Improve names.
59862849
TR
3108 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
3109 (bfd_xcoff_backend_data): Update with new reloc swap names.
3110 (bfd_pmac_xcoff_backend_data) : Same.
3111 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
3112 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 3113 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 3114 R_POS. Add reloc value to output.
ea1e4b0d
AM
3115 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
3116 bit R_RBR. Improve names, masks.
59862849
TR
3117 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
3118 (bfd_xcoff_backend_data): Update with new reloc swap names.
3119 (bfd_xcoff_aix5_backend_data) : Same.
3120
b4655ea9
AM
31212002-05-04 Alan Modra <amodra@bigpond.net.au>
3122
3123 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
3124 bfd_count top_index, input_list, all_local_syms.
3125 (elf32_hppa_setup_section_lists): New function, split from
3126 elf32_hppa_size_stubs.
3127 (elf32_hppa_next_input_section): Likewise.
3128 (group_sections): Likewise.
3129 (get_local_syms): Likewise.
3130 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
3131 stubs on undefined syms too.
3132 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 3133 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
3134 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
3135 (elf32_hppa_next_input_section): Declare.
3136
301e3139
AM
31372002-05-04 Bob Byrnes <byrnes@curl.com>
3138
3139 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
3140 _bfd_new_bfd.
3141
7c5fcef7
L
31422002-05-03 H.J. Lu (hjl@gnu.org)
3143
3144 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
3145 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
3146 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
3147 to hide a global symbol.
3148 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 3149 forced_local to true.
7c5fcef7 3150
84de6048
RH
31512002-05-02 Richard Henderson <rth@redhat.com>
3152
3153 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
3154 vs SHN_UNDEF to zero.
3155
805fc799
AM
31562002-05-02 Alan Modra <amodra@bigpond.net.au>
3157
c061c2d8
AM
3158 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
3159 16 bit reloc.
3160 <R_PPC64_SECTOFF_DS>: Likewise.
3161 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3162 SECTOFF reloc.
3163 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
3164 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
3165 SECTOFF reloc.
3166
805fc799
AM
3167 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
3168 (ppc64_elf_ha_reloc): New function.
3169 (ppc64_elf_brtaken_reloc): New function.
3170 (ppc64_elf_sectoff_reloc): New function.
3171 (ppc64_elf_sectoff_ha_reloc): New function.
3172 (ppc64_elf_toc_reloc): New function.
3173 (ppc64_elf_toc_ha_reloc): New function.
3174 (ppc64_elf_toc64_reloc): New function.
3175 (ppc64_elf_unhandled_reloc): New function.
3176 (ppc64_elf_howto_raw): Use the above.
3177 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
3178 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
3179 <R_PPC64_SECTOFF_DS>: Likewise.
3180 (IS_ABSOLUTE_RELOC): Update.
3181 (struct ppc_link_hash_table): Add have_undefweak.
3182 (ppc64_elf_link_hash_table_create): Init.
3183 (func_desc_adjust): Set have_undefweak.
3184 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
3185 add the .sfpr blr when have_undefweak.
3186 (ppc64_elf_setup_section_lists): Check hash table flavour.
3187 (ppc64_elf_next_input_section): Move output_section->owner test to
3188 ppc64elf.em.
3189 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
3190 and relocatable test. Return TOCstart and don't set elf_gp.
3191 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
3192 offset calculation. Add assert on weak sym branch tweaks.
3193 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
3194 (ppc64_elf_toc): Declare.
3195 (ppc64_elf_next_input_section): Update.
ea1e4b0d 3196
818c39a3
AM
31972002-05-01 Alan Modra <amodra@bigpond.net.au>
3198
3199 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
3200 file_name.
3201
721956f4
AM
32022002-05-01 Alan Modra <amodra@bigpond.net.au>
3203
3204 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
3205 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
3206 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
3207 call branches. Correct undefined weak destination.
3208 (ppc64_elf_func_desc_adjust): Always create at least one blr in
3209 .sfpr, and correct case where either only savef* or restf* is
3210 needed.
3211
3212 Long branch stubs, multiple stub sections.
3213 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
3214 (ppc64_elf_next_input_section): Declare.
3215 * elf64-ppc.c: Move linker-only prototypes.
3216 (STUB_SUFFIX): Define.
3217 (enum ppc_stub_type): New.
3218 (struct ppc_stub_hash_entry): New.
3219 (struct ppc_branch_hash_entry): New.
3220 (struct ppc_link_hash_entry): Add stub_cache, oh.
3221 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
3222 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
3223 Rename plt_overflow to stub_error.
3224 (ppc_stub_hash_lookup): Define.
3225 (ppc_branch_hash_lookup): Define.
3226 (stub_hash_newfunc): New function.
3227 (branch_hash_newfunc): New function.
3228 (link_hash_newfunc): Init new fields.
3229 (ppc64_elf_link_hash_table_create): Likewise.
3230 (ppc64_elf_link_hash_table_free): New function.
3231 (ppc_stub_name): New function.
3232 (ppc_get_stub_entry): New function.
3233 (ppc_add_stub): New function.
3234 (create_linkage_sections): Use bfd_make_section_anyway. Create
3235 .branch_lt and .rela.branch_lt sections. Don't create .stub.
3236 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
3237 and set up for plt call stubs. Link func and func desc syms.
3238 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
3239 (func_desc_adjust): Avoid hash lookup when func desc sym available
3240 via shortcut, and set links when processing.
3241 (ppc64_elf_hide_symbol): Likewise.
3242 (allocate_dynrelocs): Don't allocate stub section here.
3243 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
3244 Remove sstub code.
3245 (ppc_type_of_stub): New function.
3246 (build_one_stub): Delete.
3247 (ppc_build_one_stub): New function.
3248 (ppc_size_one_stub): New function.
3249 (ppc64_elf_setup_section_lists): New function.
3250 (ppc64_elf_next_input_section): New function.
3251 (group_sections): New function.
3252 (get_local_syms): New function.
3253 (ppc64_elf_size_stubs): Rewrite.
3254 (ppc64_elf_build_stubs): Rewrite.
3255 (ppc64_elf_relocate_section): Look up stub entry for REL24
3256 relocs. Don't propagate REL14* to dynamic objects. Look for long
3257 branch stubs if REL14* or REL24 relocs won't reach.
3258 (bfd_elf64_bfd_link_hash_table_free): Define.
3259
09c2219b
MM
32602002-04-30 Mark Mitchell <mark@codesourcery.com>
3261
c5cd6d62 3262 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 3263
07b678c0
TR
32642002-04-30 Tom Rix <trix@redhat.com>
3265
3266 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
3267 symbol names into the hash table.
3268
dbe341c6
TR
32692002-04-28 Tom Rix <trix@redhat.com>
3270
3271 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 3272 calulating relocations.
dbe341c6 3273 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
3274 (xcoff_ppc_relocate_section): Use relocation and complain function
3275 tables.
3276 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
3277 (xcoff_complain_overflow_signed_func): Same.
3278 (xcoff_complain_overflow_bitfield_func): Same.
3279 (xcoff_complain_overflow_dont_func): Same.
3280 (xcoff_reloc_type_crel): New recot function.
3281 (xcoff_reloc_type_br): Same.
3282 (xcoff_reloc_type_ba): Same.
3283 (xcoff_reloc_type_toc): Same.
3284 (xcoff_reloc_type_rel): Same.
3285 (xcoff_reloc_type_neg): Same.
3286 (xcoff_reloc_type_pos): Same.
3287 (xcoff_reloc_type_fail): Same.
3288 (xcoff_reloc_type_noop): Same.
3289 * libxcoff.h : Declare common parts for xcoff64.
3290 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 3291 and complain function tables.
dbe341c6 3292
985142a4
AM
32932002-04-28 Alan Modra <amodra@bigpond.net.au>
3294
3295 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
3296 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
3297
eba91044
AM
32982002-04-26 Alan Modra <amodra@bigpond.net.au>
3299
e54fdaa5
AM
3300 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
3301 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
3302
a50c1845
AM
3303 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
3304 same as the output before calling elf_link_input_bfd.
3305
eba91044
AM
3306 * coffcode.h (coff_compute_section_file_positions): Set
3307 section_tail after shuffling section list.
3308
3c25c5f6
NC
33092002-04-24 Christian Groessler <chris@groessler.org>
3310
3311 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
3312 addresses are 23bit with a special layout, not plain 32bit
3313 values. Prevent relocation of immediate values.
3314
40d32fc6
CD
33152002-04-24 Chris G. Demetriou <cgd@broadcom.com>
3316
3317 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
3318 MIPS-16 ASE flags are set, print something to indicate that.
3319
067fa4a6
AM
33202002-04-23 Alan Modra <amodra@bigpond.net.au>
3321
3322 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
3323 under which a plt call stub is used.
3324 (final_link_relocate): Similarly.
3325 (allocate_plt_static): Clear h-plabel except when plt entry is
3326 exclusively used for a plabel.
3327 (allocate_dynrelocs): Use the above to simplify plt sizing.
3328 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
3329 (elf32_hppa_link_hash_table_create): Init.
3330 (BL22_RP): Define.
3331 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
3332 (elf32_hppa_check_relocs): Set has_22bit_branch.
3333
3334 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
3335 (final_link_relocate): Likewise.
3336
af40ce3c
JJ
33372002-04-22 Jakub Jelinek <jakub@redhat.com>
3338
3339 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
3340 search table if some FDE is DW_EH_PE_aligned encoded either.
3341 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
3342
09ae86c2
JJ
33432002-04-22 Richard Smith <richard@ex-parrot.com>
3344 Jakub Jelinek <jakub@redhat.com>
3345
3346 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
3347 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
3348 encoded personality.
3349 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
3350 for CIE/FDE removal.
3351
deeb2cd7
TR
33522002-04-20 Tom Rix <trix@redhat.com>
3353
3354 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
3355
99dc0092
AM
33562002-04-20 Alan Modra <amodra@bigpond.net.au>
3357
aa3d5824
AM
3358 * archures.c (bfd_lookup_arch): Move the list order comment..
3359 (struct bfd_arch_info): ..to where it belongs.
3360 * bfd-in2.h: Regenerate.
3361
99dc0092
AM
3362 * archures.c (bfd_lookup_arch): Add comment on list order.
3363 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
3364 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
3365 is always at head of list.
3366
7831a775
NC
33672002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
3368
3369 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
3370 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
3371 definition of these functions for ARM_WINCE builds as they are
3372 not used.
ea1e4b0d 3373 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
3374 for ARM_WINCE builds.
3375
33762002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
3377
ea1e4b0d 3378 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
3379
33802002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
3381
3382 * cpu-sh.c (scan_mach): Delete.
3383 (arch_info_struct): Replace scan_mach with bfd_default_scan.
3384 (bfd_sh_arch): Likewise.
3385
3d8dbe36
NC
33862002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
3387
3388 * ihex.c (ihex_write_object_contents): Fix check for records
3389 crossing 64K boundaries.
3390
4ab82700
AM
33912002-04-16 Alan Modra <amodra@bigpond.net.au>
3392
3393 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
3394 type rather than just assuming entries are ELF.
3395 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3396 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3397 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
3398 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
3399 rather than elf_link_hash_entry.
3400
036fe0fe
RH
34012002-04-15 Richard Henderson <rth@redhat.com>
3402
3403 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
3404 n32 binaries.
3405
c4f3d130
NC
34062002-04-15 Michael Snyder <msnyder@redhat.com>
3407
3408 * opncls.c (bfd_close): Write contents if writeable.
3409 Minor formatting tidy-ups.
3410
4ab82700 34112002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
3412
3413 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
3414
0c04d169
MS
34152002-04-12 Michael Snyder <msnyder@redhat.com>
3416
3417 * bfd-in.h (bfd_get_section_lma): New access macro.
3418 Minor white-space fix-up.
3419
89d4966f
AM
34202002-04-12 Alan Modra <amodra@bigpond.net.au>
3421
3422 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
3423 header pad.
3424
8d0da3c2
DD
34252002-04-09 DJ Delorie <dj@redhat.com>
3426
3427 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
3428
05793179
NC
34292002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
3430
3431 * coffcode.h (coff_read_word): New.
3432 (coff_compute_checksum): New.
3433 (coff_apply_checksum): New.
3434 (coff_write_object_contents): Call coff_apply_checksum () to
3435 apply checksum to PE image.
3436
46fe4e66
AM
34372002-04-08 Randolph Chung <tausq@debian.org>
3438
3439 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
3440 (elf32_hppa_final_link): Split out sorting logic to..
3441 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
3442 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
3443
3b5b409c
AC
34442002-04-07 Andrew Cagney <ac131313@redhat.com>
3445
3446 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
3447 pattern.
3448 * configure: Re-generate.
3449
ac7b6ceb
AC
34502002-04-07 Andrew Cagney <ac131313@redhat.com>
3451
3452 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
3453 is greater or equal to 4.3.3.
3454 * configure: Regenerate.
3455 Fix PR gdb/344.
3456
44aa49bb
HPN
34572002-04-05 Hans-Peter Nilsson <hp@axis.com>
3458
3459 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
3460 R_CRIS_32_PCREL>: Fix typo in name.
3461 (cris_elf_check_relocs): Always create .rela.got here when
3462 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
3463 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
3464 assume it's created.
3465
e2d34d7d
DJ
34662002-04-04 Daniel Jacobowitz <drow@mvista.com>
3467
3468 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
3469 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
3470 define.
3471 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
3472 * bfd.c (bfd_link_hash_table_free): Define.
3473 * binary.c (binary_bfd_link_hash_table_free): Define.
3474 * bout.c (b_out_bfd_link_hash_table_free): Define.
3475 * coff-rs6000.c (rs6000coff_vec): Include
3476 _bfd_generic_link_hash_table_free.
3477 (pmac_xcoff_vec): Likewise.
3478 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3479 (aix5coff64_vec): Likewise.
3480 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
3481 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
3482 (bfd_elf32_bfd_link_hash_table_free): Define.
3483 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
3484 (bfd_elf32_bfd_link_hash_table_free): Define.
3485 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
3486 define.
3487 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
3488 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
3489 * ieee.c (ieee_bfd_link_hash_table_free): Define.
3490 * ihex.c (ihex_bfd_link_hash_table_free): Define.
3491 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
3492 (_bfd_generic_link_hash_table_free): Add prototype.
3493 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
3494 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
3495 * linker.c (_bfd_generic_link_hash_table_free): New function.
3496 * mmo.c (mmo_bfd_link_hash_table_free): Define.
3497 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
3498 * oasys.c (oasys_bfd_link_hash_table_free): Define.
3499 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
3500 * som.c (som_bfd_link_hash_table_free): Define.
3501 * srec.c (srec_bfd_link_hash_table_free): Define.
3502 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
3503 * versados.c (versados_bfd_link_hash_table_free): Define.
3504 * vms.c (vms_bfd_link_hash_table_free): New function.
3505 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
3506
3507 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
3508 instead of bfd_alloc.
3509 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
3510 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
3511 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
3512 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
3513 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
3514 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
3515 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
3516 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
3517 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
3518 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
3519 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
3520 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
3521 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
3522 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
3523 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
3524 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
3525 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
3526 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
3527 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
3528 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
3529 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
3530 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
3531 * m68klinux.c (linux_link_hash_table_create): Likewise.
3532 * sparclinux.c (linux_link_hash_table_create): Likewise.
3533 * sunos.c (sunos_link_hash_table_create): Likewise.
3534 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
3535
3536 * targets.c: Add _bfd_link_hash_table_free to xvec.
3537
3538 * bfd-in2.h: Regenerate.
3539 * libbfd.h: Regenerate.
3540 * libcoff.h: Regenerate.
3541
830629ab
AM
35422002-04-04 Alan Modra <amodra@bigpond.net.au>
3543
3544 * dep-in.sed: Cope with absolute paths.
3545 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
3546 Run "make dep-am".
3547 * Makefile.in: Regenerate.
3548 * coff-arm.c: Fix copyright date.
3549 * cpu-h8300.c: Likewise.
3550 * cpu-i370.c: Likewise.
3551 * cpu-s390.c: Likewise.
3552 * cpu-mips.c: Likewise.
3553 * po/SRC-POTFILES.in: Regenerate.
3554
c6e90b02
TS
35552002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3556
3557 * Makefile.am: Add elfxx-mips.c to the known backends.
3558 (elf32-mips.lo): remove dependency to coff/external.h.
3559 * Makefile.in: Regenerate.
3560 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
3561 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
3562 accordingly.
3563 * configure: Regenerate.
3564 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
3565 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
3566 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
3567 MIPS specific backend functions.
3568 * elf32-mips.c: Moved most code to elfxx-mips.c.
3569 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
3570 static.
3571 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
3572 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
3573 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
3574 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
3575 interface to allow selection of the right REL or RELA howto table.
3576 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
3577 static. Let it refuse n32 objects.
3578 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
3579 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
3580 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
3581 (elf32_mips_ignore_discarded_relocs): Rename from
3582 _bfd_elf32_mips_ignore_discarded_relocs.
3583 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
3584 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
3585 (elf_mips_howto_table_rela): Remove.
3586 * elf64-mips.c: Moved most code to elfxx-mips.c.
3587 (bfd_elf64_bfd_reloc_type_lookup): Make static.
3588 (mips_elf64_rtype_to_howto): New function.
3589 (mips_elf64_object_p): Likewise.
3590 (elf64_mips_irix_compat): Likewise.
3591 * elfxx-mips.c: New file containing common code merged together from
3592 elf32-mips.c and elf64-mips.c.
3593 * elfxx-mips.h: New file containing MIPS specific prototypes from
3594 elf-bfd.h.
3595 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
3596 elf_backend_mips_rtype_to_howto.
3597
d8dce692
AM
35982002-04-04 Alan Modra <amodra@bigpond.net.au>
3599
3600 * srec.c (MAXCHUNK, Chunk): Revise comments.
3601 (srec_write_record): Correct buffer size.
3602 (srec_write_header): Do without intermediate buffer.
3603 (srec_write_section): Validate Chunk.
3604 (srec_write_terminator): Pass NULL instead of dummy buffer.
3605 (srec_write_symbols): Pass file and symbol names directly to
3606 bfd_bwrite so sprintf won't overflow buffer.
3607
b88a866a
JJ
36082002-04-03 Jakub Jelinek <jakub@redhat.com>
3609
3610 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
3611 PC relative relocs against hidden symbols.
3612 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3613
d7866f04
AM
36142002-04-03 Alan Modra <amodra@bigpond.net.au>
3615
3616 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
3617 LMAs, loop over segments until p_vaddr and p_memsz specify an
3618 extent enclosing the section.
3619
9e81ee67
NC
36202002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
3621
3622 * ihex.c (ihex_write_object_contents): Do not allow records to
3623 cross a 64K boundary - wrap if necessary.
3624
d2b64500
JT
36252002-04-01 Nathan Williams <nathanw@wasabisystems.com>
3626
3627 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
3628 which caused the returned LWP ID to always be 0.
3629
e36f7d53
RH
36302002-04-01 Richard Henderson <rth@redhat.com>
3631
3632 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3633 (elf32_sparc_relocate_section): Use it to figure out when to
3634 initialize .got entries.
3635 * elf64-sparc.c: Similarly.
3636
e92d460e
AM
36372002-03-28 Alan Modra <amodra@bigpond.net.au>
3638
3639 * linker.c (link_action): Ignore duplicate warning syms.
3640 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
3641 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
3642 (elf_adjust_dynamic_symbol): Likewise.
3643 (elf_export_symbol): Likewise.
3644 (elf_link_find_version_dependencies): Likewise.
3645 (elf_link_assign_sym_version): Likewise.
3646 (elf_link_sec_merge_syms): Likewise.
3647 (elf_link_output_extsym): Likewise.
3648 (elf_gc_sweep_symbol): Likewise.
3649 (elf_gc_propagate_vtable_entries_used): Likewise.
3650 (elf_gc_smash_unused_vtentry_relocs): Likewise.
3651 (elf_gc_allocate_got_offsets): Likewise.
3652 (elf_collect_hash_codes): Likewise.
3653 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
3654 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
3655 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
3656 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
3657 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
3658 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
3659 (elf_cris_discard_excess_dso_dynamics): Likewise.
3660 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
3661 (mark_PIC_calls): Likewise.
3662 (allocate_plt_static): Likewise.
3663 (allocate_dynrelocs): Likewise.
3664 (readonly_dynrelocs): Likewise.
3665 * elf32-i386.c (allocate_dynrelocs): Likewise.
3666 (readonly_dynrelocs): Likewise.
3667 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
3668 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
3669 * elf32-mips.c (mips_elf_output_extsym): Likewise.
3670 (mips_elf_sort_hash_table_f): Likewise.
3671 (mips_elf_check_mips16_stubs): Likewise.
3672 * elf32-s390.c (allocate_dynrelocs): Likewise.
3673 (readonly_dynrelocs): Likewise.
3674 * elf32-sh.c (sh_elf_discard_copies): Likewise.
3675 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
3676 (xstormy16_relax_plt_realloc): Likewise.
3677 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
3678 (elf64_alpha_output_extsym): Likewise.
3679 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
3680 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
3681 (mips_elf64_check_mips16_stubs): Likewise.
3682 (mips_elf64_output_extsym): Likewise.
3683 * elf64-ppc.c (func_desc_adjust): Likewise.
3684 (allocate_dynrelocs): Likewise.
3685 (readonly_dynrelocs): Likewise.
3686 * elf64-s390.c (allocate_dynrelocs): Likewise.
3687 (readonly_dynrelocs): Likewise.
3688 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
3689 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3690 (readonly_dynrelocs): Likewise.
3691 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
3692 * aoutx.h (aout_link_write_other_symbol): Likewise.
3693 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
3694 (_bfd_coff_write_global_sym): Likewise.
3695 * i386linux.c (linux_tally_symbols): Likewise.
3696 * m68klinux.c (linux_tally_symbols): Likewise.
3697 * sparclinux.c (linux_tally_symbols): Likewise.
3698 * pdp11.c (aout_link_write_other_symbol): Likewise.
3699 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
3700 * xcofflink.c (xcoff_build_ldsyms): Likewise.
3701 (xcoff_write_global_symbol): Likewise.
3702
3703 * cofflink.c (_bfd_coff_final_link): Formatting.
3704 * cpu-mips.c (mips_compatible): Make static, prototype.
3705 * elf32-i386.c (elf_i386_check_relocs): Formatting.
3706 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
3707 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
3708 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
3709 (mips_elf64_final_link): Likewise.
3710 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
3711 prototype.
3712
2106126f
NC
37132002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
3714
3715 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
3716 (SWAP_OUT_RELOC_OFFSET): Define.
3717
b99d1833
AM
37182002-03-27 Gregory Steuck <greg@nest.cx>
3719
3720 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
3721 terminating NULL if empty symbol table.
3722 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
3723
ad43ed4c
L
37242002-03-26 H.J. Lu (hjl@gnu.org)
3725
3726 * elflink.h (elf_link_input_bfd): Revert the last change since
3727 the gcc exception handling isn't fixed yet.
3728
3851fca4
L
37292002-03-26 H.J. Lu (hjl@gnu.org)
3730
3731 * elflink.h (elf_link_input_bfd): Complain about relocations
3732 against local symbols in discarded sections.
3733
b91afed7
AM
37342002-03-26 Alan Modra <amodra@bigpond.net.au>
3735
3736 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
3737
dba143ef
AM
37382002-03-23 Alan Modra <amodra@bigpond.net.au>
3739
3740 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3741 section file offset for !SEC_LOAD sections.
3742
ee29b9fb
RE
37432002-03-21 Richard Earnshaw <rearnsha@arm.com>
3744
830629ab
AM
3745 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
3746 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 3747
54327882
AM
37482002-03-21 Alan Modra <amodra@bigpond.net.au>
3749
3750 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
3751 Whitespace changes.
3752 * archive.c: Update copyright date.
3753 * bfd-in2.h: Regenerate.
3754 * libbfd.h: Regenerate.
3755 * Makefile.am: Run "make dep-am"
3756 * Makefile.in: Regenerate.
3757 * po/SRC-POTFILES.in: Regenerate.
3758
1ee24f27
DJ
37592002-03-20 Daniel Jacobowitz <drow@mvista.com>
3760
3761 * dwarf2.c (struct funcinfo): Move up.
3762 (lookup_address_in_function_table): New argument function_ptr.
3763 Set it.
3764 (lookup_address_in_line_table): New argument function. If function
3765 is non-NULL, use it to handle ``addr'' before the first line note of
3766 the function.
3767 (comp_unit_find_nearest_line): Update and swap calls to
3768 lookup_address_in_function_table and lookup_address_in_line_table.
3769 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
3770 N_SLINE encountered if we see an N_FUN before any N_SLINE.
3771
51b9608c
TR
37722002-03-20 Tom Rix <trix@redhat.com>
3773
ea1e4b0d 3774 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 3775 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 3776 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 3777
789c90aa
TR
37782002-03-19 Tom Rix <trix@redhat.com>
3779
ea1e4b0d 3780 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
3781 dynamic objects in archives.
3782
1da54d81
HPN
37832002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
3784
3785 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
3786 STT_NOTYPE symbols to STT_OBJECT.
3787
7831a775 37882002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
3789
3790 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
3791
eb1e0e80
NC
37922002-03-18 Tom Rix <trix@redhat.com>
3793
3794 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
3795 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
3796 * coff-rs6000 (do_pad) : New function for archive padding.
3797 (do_copy) : New function for object file copying in archives.
3798 (do_shared_object_padding) : New function for padding shared
3799 objects to their text section alignment in archives.
3800 (bfd_xcoff_ar_achive_set_magic) : Stub.
3801 (xcoff_write_armap_big) : Use do_copy and do_pad.
3802 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
3803 do_copy and do_pad.
3804 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 3805 bfd_xcoff_magic_number.
eb1e0e80
NC
3806 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
3807 fop.
3808 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
3809 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
3810 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
3811 * rs6000-core.c : Update copyright date.
ea1e4b0d 3812 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
3813 csectpp.
3814 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
3815 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
3816 (coff_set_flags) : Use bfd_xcoff_magic_number.
3817 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
3818 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
3819 * Makefile.am : Same.
3820 * config.bfd : Same.
3821 * targets.c : Same.
3822 * configure : Regnerate.
3823 * Makefile.in : Same.
3824 * bfd-in2.h : Same.
3825
a1c259a1
NC
38262002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
3827
3828 * po/fr.po: Updated version.
3829
4dae1ae7
AM
38302002-03-18 Alan Modra <amodra@bigpond.net.au>
3831
3832 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
3833 * libbfd.h: Regenerate.
3834 * archive.c (coff_write_armap): Pass on failures from
3835 bfd_write_bigendian_4byte_int.
3836
36b4f6e7
L
38372002-03-14 H.J. Lu <hjl@gnu.org>
3838
3839 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
3840 error to bfd_error_nonrepresentable_section for reinit_array
3841 section in DSO.
3842
a1aefc76
NC
38432002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3844
a181be0a
NC
3845 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
3846 OR it in rather than replacing previously selected flags.
3847
a1aefc76
NC
3848 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
3849 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
3850
c119f9b8
AM
38512002-03-14 Alan Modra <amodra@bigpond.net.au>
3852
3853 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
3854 (N): Use the above.
3855 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
3856 ensure reloc size matches before calling elf_link_input_bfd.
3857 Add an assert to check reloc size when counting output relocs.
3858
c295a511
NC
38592002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3860
3861 * mmo.c (mmo_get_loc): Return NULL rather than false.
3862
9ce88e60
NC
38632002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
3864
3865 * po/fr.po: Updated version.
3866
4ddafab0
AM
38672002-03-13 Alan Modra <amodra@bigpond.net.au>
3868
b74fa2cd
AM
3869 * archures.c (bfd_default_compatible): Test bits_per_word.
3870 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
3871 bfd_default_compatible.
3872 * cpu-i370.c (i370_compatible): Likewise.
3873 * cpu-sparc.c (sparc_compatible): Likewise.
3874 * cpu-h8300.c (compatible): Test in->arch == out->arch.
3875
40b829d4
AM
3876 * elflink.h: Formatting fixes.
3877 (elf_link_output_extsym): Merge undefined and undef weak cases.
3878
4ddafab0
AM
3879 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
3880 when word size of input matches output word size.
3881
dd53c801
AJ
38822002-03-12 Andreas Jaeger <aj@suse.de>
3883
3884 * cpu-i386.c (i386_compatible): New. Use it instead of
3885 bfd_default_compatible.
3886
aa066ac8
L
38872002-03-07 H.J. Lu (hjl@gnu.org)
3888
3889 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
3890 as the type for bfd_reloc_val.
3891
1bf42538
JL
38922002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
3893
3894 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
3895 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
3896 (elf_hppa_final_link_relocate): Correct relocations for indirect
3897 references to local data through the DLT. Fix .opd creation for
3898 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
3899 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
3900 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
3901 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3902 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
3903 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
3904 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3905
86eaf01e
JJ
39062002-03-05 Jakub Jelinek <jakub@redhat.com>
3907
3908 * merge.c (_bfd_merge_sections): Don't segfault if there
3909 is nothing to merge due to GC.
3910
c44233aa
AM
39112002-03-05 Alan Modra <amodra@bigpond.net.au>
3912
039cc25f
AM
3913 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
3914 symbols that have been forced local.
3915
c44233aa
AM
3916 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
3917 to output forced local syms for non-shared link.
3918 (elf_link_output_extsym): Tweak condition for calling backend
3919 adjust_dynamic_symbol so that previous behaviour is kept.
3920 Whitespace changes throughout file.
3921
25e27870
L
39222002-03-04 H.J. Lu <hjl@gnu.org>
3923
3924 * elf.c (bfd_section_from_shdr): Handle special sections,
3925 .init_array, .fini_array and .preinit_array.
3926 (elf_fake_sections): Likewise.
3927
3928 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
3929 DT entry only if the section is in output for .init_array,
3930 .fini_array and .preinit_array. Complain about .preinit_array
3931 section in DSO.
3932 (elf_bfd_final_link): Warn zero size for .init_array,
3933 .fini_array and .preinit_array sections.
3934
3935 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
3936 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
3937 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
3938 .preinit_array.
3939
bb2a49f2
AM
39402002-03-04 Alan Modra <amodra@bigpond.net.au>
3941
3942 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
3943 * configure: Regenerate.
3944
38487e5e
TR
39452002-03-02 Tom Rix <trix@redhat.com>
3946
c44233aa
AM
3947 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
3948 symbolic equiv.
38487e5e
TR
3949 * coff-rs6000.c (xcoff_howto_table): Same.
3950
30831527
RH
39512002-03-01 David Mosberger <davidm@hpl.hp.com>
3952
3953 * elflink.h (size_dynamic_sections): If section named
3954 ".preinit_array" exists, create DT_PREINIT_ARRAY and
3955 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
3956 ".init_array" and ".fini_array".
3957 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
3958 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
3959 DT_FINI_ARRAY.
3960
c8e5ddc8
AM
39612002-02-26 Andrew Macleod <amacleod@cygnus.com>
3962
3963 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
3964 dynsyms.
3965
96e0dda4
AM
39662002-02-25 Alan Modra <amodra@bigpond.net.au>
3967
1c5b6bf8
AM
3968 * elf64-hppa.h: Update copyright date.
3969
96e0dda4
AM
3970 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
3971 (ppc64_elf_relocate_section): Don't generate power4 style branch
3972 hints for *_BRTAKEN and *_BRNTAKEN relocs.
3973
0fb19cbc
JJ
39742002-02-22 Jakub Jelinek <jakub@redhat.com>
3975
3976 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
3977 last patch.
3978 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3979
c434dee6
AJ
39802002-02-21 Andreas Jaeger <aj@suse.de>
3981
3982 * elf64-x86-64.c: Major rework that introduces all recent changes
3983 to the x86-64 backend. Get a closer match to elf32-i386.
3984 (struct elf64_x86_64_dyn_relocs): Rename from
3985 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
3986 all users.
3987 (struct elf64_x86_64_link_hash_table): Add short cuts to some
3988 sections.
3989 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
3990 remove casts, initialize new hash members.
3991 (create_got_section): New.
3992 (elf64_x86_64_create_dynamic_sections): New.
3993 (elf64_x86_64_copy_indirect_symbol): New.
3994 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3995 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3996 Reference count possible .plt and .got entries. Don't test input
3997 section SEC_READONLY here to try to avoid copy relocs, and keep
3998 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3999 DF_TEXTREL here. Delay setting of variables until needed. Cache
4000 pointer to "sreloc" section in elf_section_data. Tweak condition
4001 under which .got created. Report files with bad relocation
4002 section names.
4003 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
4004 Reference count possible .plt entries. Don't deallocate .got and
4005 .relgot space here.
4006 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
4007 do copy reloc processing for weakdefs. Remove redundant casts and
4008 aborts. Delay setting of vars until needed. Move creation of
4009 dynamic symbols and allocation of .plt and .rela.plt to
4010 allocate_dynrelocs. Replace BFD_ASSERT with abort.
4011 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4012 (allocate_dynrelocs): New.
4013 (readonly_dynrelocs): New.
4014 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
4015 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
4016 Zero out the dynamic allocated content space.
4017 (elf64_x86_64_discard_copies): Removed.
4018 (elf64_x86_64_relocate_section): Make use of dynamic section
4019 short-cuts. Localise vars, and delay setting. Better error
4020 reporting, replace BFD_ASSERT with abort. Check
4021 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
4022 regular object file and tread the weak definition as the normal
4023 one. Don't discard relocs for undefweak or undefined symbols and
4024 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
4025 relocs.
4026 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
4027 symbols that have been forced local. Use same test to decide if
4028 we can use a relative reloc for got as relocate_section. Expand
4029 SHN_UNDEF comment. Move expressions out of function calls.
4030 Replace BFD_ASSERT with abort.
4031 (bfd_elf64_bfd_final_link): Removed.
4032 (elf_backend_copy_indirect_symbol): Define.
4033
ff3a6ee3
TR
40342002-02-20 Tom Rix <trix@redhat.com>
4035
4036 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
4037 (_bfd_xcoff_reloc_type_lookup): Use it.
4038 * coff64-rs6000.c (xcoff64_howto_table): Same.
4039 (xcoff64_reloc_type_lookup): Same.
c434dee6 4040
a68d41fb
AM
40412002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
4042
4043 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
4044 little endian.
4045
befc3abb
MS
40462002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
4047
4048 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
4049 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
4050 * bfd-in2.h: Regenerate.
4051 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
4052 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
4053 with "s390:64-bit".
4054 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
4055 (elf_s390_reloc_type_lookup): Likewise.
4056 (elf_s390_check_relocs): Likewise.
4057 (elf_s390_gc_sweep_hook): Likewise.
4058 (elf_s390_relocate_section): Likewise.
4059 (elf_s390_object_p): Use renamed architecture define.
4060 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
4061
6eeeec9b
FCE
40622002-02-19 Frank Ch. Eigler <fche@redhat.com>
4063
4064 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
4065
0bb2d96a
JJ
40662002-02-19 Jakub Jelinek <jakub@redhat.com>
4067
4068 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
4069 absptr -> pcrel optimization for shared libs.
4070 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
4071 library cannot be converted to pcrel.
4072 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
4073 relative.
4074 * elf32-i386.c (elf_i386_relocate_section): If
4075 _bfd_elf_section_offset returned -2, skip, but make sure the
4076 relocation is installed.
4077 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
4078 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4079 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4080 * elf32-i370.c (i370_elf_relocate_section): Likewise.
4081 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
4082 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
4083 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4084 * elf32-sh.c (sh_elf_relocate_section): Likewise.
4085 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4086 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4087 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4088 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4089 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4090 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4091 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
4092 _bfd_elf_section_offset returning -2 the same way as -1.
4093 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
4094 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
4095 and BFD_ASSERT.
4096 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
4097
69f284c7
TR
40982002-02-18 Tom Rix <trix@redhat.com>
4099
4100 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
4101 (bfd_xcoff_size_dynamic_sections): Same.
4102 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
4103 (bfd_xcoff_size_dynamic_sections): Same.
4104 * coff-rs6000.c (xcoff_generate_rtinit): Same.
4105 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
4106 * libxcoff.h (struct xcoff_backend_data_rec): Same.
4107 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
4108 * bfd-in2.h: Regenerate.
4109
82bd7b59
AM
41102002-02-18 Alan Modra <amodra@bigpond.net.au>
4111
4112 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
4113 (struct ppc_link_hash_table): Add sfpr.
4114 (ppc64_elf_link_hash_table_create): Init it.
4115 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
4116 .glink out to..
4117 (create_linkage_sections): ..here. Make .sfpr too.
4118 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
4119 dynobj early.
4120 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
4121 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
4122 ._restf* functions, and create as needed.
4123 (func_desc_adjust): Only force_local for shared libs.
4124
ef1355e8
NC
41252002-02-18 David O'Brien <obrien@FreeBSD.org>
4126
4127 * configure.in: Bump version number post 2.12 branching.
4128 * configure: Regenerate.
4129
dfa36a69
HPN
41302002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
4131
4132 * mmo.c: Correct and improve comments.
4133 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
4134 zero-pad. Use input to fill up non-empty bfd buffer.
4135 (mmo_flush_chunk): New function.
4136 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
4137 changed. Don't emit location specifier if VMA is same as
4138 *LAST_VMAP after omitting leading zero contents. Call
4139 mmo_flush_chunk before emitting location specifier.
4140 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
4141 with mmo_write_loc_chunk calls.
4142 (mmo_internal_write_section): Call mmo_flush_chunk after
4143 mmo_write_chunk.
4144 (mmo_write_symbols_and_terminator): Move :Main to first position
4145 in symbol array. Add faked one if it does not exist if there are
4146 other symbols. Don't add it if there are no symbols at all. Move
4147 out test for value of :Main from symbol loop. Rename table
4148 fakemain to maintable and variable mainsym to fakemain.
4149
ccf00ab6
RH
41502002-02-15 Richard Henderson <rth@redhat.com>
4151
4152 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
4153 section with no got matches any got. Simplify error generaion.
4154
88eaccc2
AM
41552002-02-15 Alan Modra <amodra@bigpond.net.au>
4156
fd96f80f
AM
4157 Support arbitrary length fill patterns.
4158 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
4159 (_bfd_default_link_order): Remove bfd_fill_link_order code.
4160 Call default_data_link_order.
4161 (default_fill_link_order): Delete.
4162 (default_data_link_order): New function.
4163 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
4164 of bfd_fill_link_order with bfd_data_link_order.
4165 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
4166 * elf64-mips.c (mips_elf64_final_link): Likewise.
4167
88eaccc2
AM
4168 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
4169 Correct value returned in "end" for "0x<non-hex>".
4170
e2fd756b
NC
41712002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
4172
4173 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
4174 (scan): Test against 'mach' field in info structure.
4175
edd29cf9
AM
41762002-02-14 Alan Modra <amodra@bigpond.net.au>
4177
4178 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
4179
1e30956e 41802002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
4181
4182 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
4183 EF_M68000.
4184
bf36db18
NC
41852002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
4186
4187 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
4188 non-zero physical addresses when adjusting the LMAs of new
4189 sections.
bf36db18 4190
189c6563
AM
41912002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
4192
4193 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
4194 from _bfd_elf_hppa_gen_reloc_type.
4195 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
4196 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
4197 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
4198 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
4199
e948afaf
AO
42002002-02-12 Alexandre Oliva <aoliva@redhat.com>
4201
4202 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
4203 loading its contents if there's nothing to do in it.
4204
19397422
AM
42052002-02-12 Alan Modra <amodra@bigpond.net.au>
4206
0ad3a73b
AM
4207 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
4208 64k boundary.
4209
19397422
AM
4210 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
4211 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
4212 (ppc64_elf_finish_dynamic_sections): Set values for them.
4213
51316059
MS
42142002-02-11 Michael Snyder <msnyder@redhat.com>
4215
4216 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
4217 * elf.c (elfcore_grok_pstatus): Add prototype.
4218 (elfcore_grok_lwpstatus): Add prototype.
4219 (elfcore_write_lwpstatus): New function.
4220 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
4221
518313c3
AO
42222002-02-11 Alexandre Oliva <aoliva@redhat.com>
4223
4224 * elf32-sh.c: Added missing prototypes.
4225 * elf32-sh64.c: Likewise.
4226 (sh_elf_align_loads): Mark unused args as such.
4227 * elf64-sh64.c: Added missing prototypes.
4228 (struct elf_sh64_link_hash_entry): Fix typo.
4229 (sh_elf64_relocate_section): Fix info argument passed to
4230 _bfd_elf_section_offset.
4231
2c73f9d8
AM
42322002-02-11 Alan Modra <amodra@bigpond.net.au>
4233
4234 * Makefile.am: "make dep-am".
4235 * Makefile.in: Regenerate.
4236 * aclocal.m4: Regenerate.
4237 * config.in: Regenerate.
4238 * configure: Regenerate.
4239
d426c6b0
DJ
42402002-02-10 Daniel Jacobowitz <drow@mvista.com>
4241
4242 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
4243 variable warnings.
4244 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
4245 comparison warning.
4246 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
4247 cast warnings for the common case.
4248
e58ee0cd
HPN
42492002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
4250
4251 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
4252 vectors.
4253 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
4254 vectors.
4255
7793f4d0
RH
42562002-02-09 Richard Henderson <rth@redhat.com>
4257
4258 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
4259 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
4260 (elf64_alpha_relocate_section): Likewise.
4261 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
4262 * bfd-in2.h, libbfd.h: Rebuild.
4263
7e799044
HPN
42642002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
4265
4266 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
4267 that base-plus-offset reloc accounting is consistent.
4268 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
4269 up to date for undefined symbols.
4270
027d73eb
EC
42712002-02-08 Eric Christopher <echristo@redhat.com>
4272
4273 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
4274
4275 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
4276 sections for the O32 ABI.
4277
517662d4
CD
42782002-02-08 Chris Demetriou <cgd@broadcom.com>
4279
4280 * elf32-arm.h: Fix formatting of _("...").
4281 * elf32-d10v.c: Likewise.
4282 * elf32-m68k.c: Likewise.
4283 * elf32-mips.c: Likewise.
4284
5e37cc46
NC
42852002-02-08 Ivan Guzvinec <ivang@opencores.org>
4286
4287 * coff-or32.c: Fix compile time warning messages.
4288
fbca6ad9
AO
42892002-02-08 Alexandre Oliva <aoliva@redhat.com>
4290
4291 Contribute sh64-elf.
4292 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
4293 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
4294 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
4295 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
4296 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
4297 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
4298 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
4299 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
4300 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
4301 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
4302 New relocs.
4303 * libbfd.h, bfd-in2.h: Rebuilt.
4304 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
4305 (sh_reloc_map): Map them.
4306 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
4307 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
4308 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
4309 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
4310 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
4311 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
4312 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
4313 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
4314 datalabel_got_offset.
4315 (sh_elf_link_hash_newfunc): Initialize it.
4316 (sh_elf_relocate_section): Augment the scope of
4317 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
4318 GOT and GOTOFF handling to new SHmedia relocation types. Support
4319 GOT_BIAS.
4320 (sh_elf_check_relocs): Likewise.
4321 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
4322 PLT entries using movi_shori_putval. Support GOT_BIAS.
4323 (sh_elf_finish_dynamic_sections): Likewise.
4324 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
4325 relocation, it's now done by the caller.
4326 (GOT_BIAS): New.
4327 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
4328 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
4329 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
4330 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
4331 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
4332 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
4333 sh64_elf64_hash_table): New.
4334 (sh_elf64_howto_table): Introduce new relocs.
4335 (sh_elf64_info_to_howto): Accept new PIC relocs.
4336 (sh_elf64_relocate_section): Augment the scope of
4337 seen_stt_datalabel. Support new PIC relocs.
4338 (sh_elf64_check_relocs): Support new PIC relocs.
4339 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
4340 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
4341 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
4342 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
4343 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
4344 movi_shori_putval, movi_3shori_putval,
4345 sh64_elf64_create_dynamic_sections,
4346 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
4347 sh64_elf64_size_dynamic_sections,
4348 sh64_elf64_finish_dynamic_symbol,
4349 sh64_elf64_finish_dynamic_sections): New.
4350 (elf_backend_create_dynamic-sections,
4351 bfd_elf64_bfd_link_hash_table_create,
4352 elf_backend_adjust_dynamic_symbol,
4353 elf_backend_size_dynamic_sections,
4354 elf_backend_finish_dynamic_symbol,
4355 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
4356 elf_backend_plt_readonly, elf_backend_want_plt_sym,
4357 elf_backend_got_header_size, elf_backend_plt_header_size):
4358 Define.
4359 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
4360 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
4361 match official numbers and names; moved unmaching ones to the
4362 range 0xf2-0xff.
4363 * elf32-sh64.c, elf64-sh64.c: Likewise.
4364 2001-03-12 DJ Delorie <dj@redhat.com>
4365 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
4366 sections.
4367 2001-03-12 DJ Delorie <dj@redhat.com>
4368 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
4369 be aligned.
4370 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
4371 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
4372 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
4373 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
4374 .cranges section with SEC_SORT_ENTRIES set.
4375 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
4376 incoming sorted .cranges section.
4377 (sh64_bfd_elf_copy_private_section_data): New.
4378 (sh64_elf_final_write_processing): Only sort .cranges and modify
4379 start address if called by linker.
4380 2001-01-08 Ben Elliston <bje@redhat.com>
4381 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
4382 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
4383 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
4384 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
4385 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
4386 line. Add comments before all entries.
4387 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
4388 comment.
4389 (sh_elf64_reloc): Correct head comment.
4390 (sh_elf64_relocate_section): Correct spacing.
4391 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
4392 instead call reloc_dangerous callback.
4393 <case R_SH_SHMEDIA_CODE>: New case.
4394 (sh_elf64_gc_mark_hook): Correct spacing.
4395 (sh_elf64_check_relocs): Ditto.
4396 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
4397 New case.
4398 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
4399 functions.
4400 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
4401 clarify describing comment. Add comments before all entries.
4402 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
4403 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
4404 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
4405 Sort .cranges section in final link. Prepare to set bit 0 on
4406 entry address.
4407 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
4408 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
4409 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
4410 .cranges section.
4411 (sh64_backend_section_from_shdr): New, to recognize
4412 SHT_SH5_CR_SORTED on incoming .cranges section.
4413 (elf_backend_section_from_shdr): Define.
4414 (sh64_elf_final_write_processing): Sort outgoing .cranges
4415 section. (New, temporarily disabled:) Set bit 0 on entry address
4416 according to ISA type.
4417 (sh64_find_section_for_address): New.
4418 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
4419 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
4420 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
4421 bfd_malloc, not xmalloc.
4422 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
4423 global.
4424 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
4425 temporarily disabled) setting bit 0 on entry address.
4426 (elf_backend_final_write_processing): Define.
4427 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
4428 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
4429 be a proper relocation for PTA and PTB rather than a marker.
4430 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
4431 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
4432 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
4433 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
4434 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
4435 Zero src_mask.
4436 * elf64-sh64.c: Ditto.
4437 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
4438 * elf32-sh64.c: Include opcodes/sh64-opc.h
4439 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
4440 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
4441 parameters. No unused parameters. Caller changed.
4442 <case R_SH_PT_16>: New case.
4443 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
4444 * Makefile.in: Regenerate.
4445 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
4446 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
4447 all code sections.
4448 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4449 (sh64_elf_merge_private_data): Ditto.
4450 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
4451 to access stored section flags.
4452 (sh64_elf_final_write_processing): Return immediately unless
4453 called by linker. Use sh64_elf_section_data (cranges) to get size
4454 of linker-generated cranges entries.
4455 (sh64_elf_copy_private_data): Add missing "return true".
4456 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
4457 (sh_elf64_merge_private_data): Ditto.
4458 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
4459 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
4460 elf64-sh64.c:sh64_elf_fake_sections.
4461 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
4462 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
4463 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
4464 (sh64_elf_final_write_processing): New.
4465 (elf_backend_final_write_processing): Define.
4466 (sh64_elf_fake_sections): Get header flags from tdata field.
4467 (sh64_elf_copy_private_data): Do not call
4468 sh64_elf_copy_private_data_internal, just copy e_flags field.
4469 (sh64_elf_merge_private_data): Do not call
4470 sh64_elf_copy_private_data_internal.
4471 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
4472 Remove EF_SH64_ABI64, let ELF size make difference.
4473 Remove SH64-specific BFD section flag.
4474 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
4475 containing SHmedia through elf_section_data (asect)->tdata
4476 non-zero, not using a BFD section flag.
4477 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
4478 (sh64_elf_merge_private_data): Similar.
4479 (elf_backend_section_flags): Don't define.
4480 (sh64_elf_backend_section_flags): Delete.
4481 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
4482 not EF_SH64_ABI64.
4483 (sh_elf64_merge_private_data): Similar.
4484 * section.c (Section flags definitions): Don't define
4485 SEC_SH_ISA_SHMEDIA.
4486 (bfd-in2.h): Regenerate.
4487 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
4488 Make DataLabel references work with partial linking.
4489 * elf32-sh64.c: Fix formatting.
4490 (sh64_elf_link_output_symbol_hook): New.
4491 (elf_backend_link_output_symbol_hook): Define to
4492 sh64_elf_link_output_symbol_hook.
4493 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
4494 undefined if partial linking. Adjust sanity check.
4495 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
4496 (elf_backend_link_output_symbol_hook): Define to
4497 sh64_elf64_link_output_symbol_hook.
4498 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
4499 undefined if partial linking. Adjust sanity check.
4500 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
4501 Implement semantics for inter-file DataLabel references.
4502 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
4503 (sh64_elf64_add_symbol_hook): New.
4504 (sh_elf64_relocate_section): If passing an indirect symbol with
4505 st_type STT_DATALABEL on the way to a symbol with st_other
4506 STO_SH5_ISA32, do not bitor 1 to the relocation.
4507 (elf_backend_add_symbol_hook): Define to
4508 sh64_elf64_add_symbol_hook.
4509 * elf64-sh32.c: Tweak comments.
4510 (DATALABEL_SUFFIX): Define.
4511 (sh64_elf_add_symbol_hook): New.
4512 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
4513 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
4514 symbol with st_type STT_DATALABEL on the way to a symbol with
4515 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
4516 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
4517 Pass through STT_DATALABEL.
4518 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
4519 (elf_backend_get_symbol_type): Define.
4520 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
4521 (elf_backend_get_symbol_type): Define.
4522 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
4523 * elf32-sh64.c: Tweak comments.
4524 (sh64_elf_copy_private_data_internal): Add prototype.
4525 (bfd_elf32_bfd_set_private_flags): Define.
4526 (sh64_elf_copy_private_data_internal): Compare machine name, not
4527 textual BFD target name, to check whether to copy section flag
4528 SHF_SH5_ISA32.
4529 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
4530 Tweak section-contents-type-mismatch message.
4531 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
4532 Validize reloc-types.
4533 * elf64-sh64.c: New file.
4534 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
4535 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
4536 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
4537 Regenerate dependencies.
4538 * Makefile.in: Regenerate.
4539 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
4540 bfd_elf64_sh64l_vec.
4541 * configure.in: Handle bfd_elf64_sh64_vec and
4542 bfd_elf64_sh64l_vec.
4543 * configure: Regenerate.
4544 * po/POTFILES.in: Regenerate.
4545 * po/bfd.pot: Regenerate.
4546 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
4547 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
4548 anything else but EF_SH64 and EF_SH64_ABI64.
4549 (sh64_elf_merge_private_data): Emit error for anything else but
4550 EF_SH64 and EF_SH64_ABI64.
4551 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
4552 from targ_selvecs.
4553 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
4554 bfd_elf32_sh64l_vec as a temporary measure.
4555 * configure: Regenerate.
4556 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
4557 * cpu-sh.c (arch_info_struct): Include sh5 item
4558 unconditionalized.
4559 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
4560 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
4561 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
4562 * elf32-sh64.c: Tweak comments.
4563 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
4564 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
4565 (sh64_elf_copy_private_data_internal): Wrap long line.
4566 (sh64_elf_merge_private_data): Rewrite to allow objects from
4567 SH64 subsets to be linked together.
4568 (INCLUDE_SHMEDIA): Define.
4569 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
4570 Parenthesize plus-expression inside or-expression.
4571 <global symbol>: Ditto.
4572 (sh_elf_set_mach_from_flags): Remove code refusing
4573 deleted EF_SH64_32BIT_ABI flag.
4574 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
4575 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
4576 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
4577 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
4578 (sh_elf_relocate_section) <local symbol>: Or 1 in
4579 calculation of relocation if sym->st_other & STO_SH5_ISA32.
4580 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
4581 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
4582 relocation.
4583 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
4584 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
4585 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
4586 Regenerate dependencies.
4587 * Makefile.in: Regenerate.
4588 * archures.c: Add bfd_mach_sh5.
4589 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
4590 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
4591 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
4592 * configure: Regenerate.
4593 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
4594 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
4595 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
4596 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
4597 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
4598 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
4599 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
4600 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
4601 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
4602 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
4603 in item for SH5.
4604 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
4605 for SHmedia relocs.
4606 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
4607 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
4608 shmedia_prepare_reloc, goto final_link_relocate if it returns
4609 non-zero, else fail as before.
4610 (sh_elf_set_mach_from_flags): Provide function only if not defined
4611 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
4612 (sh_elf_set_private_flags): Provide function only if not defined
4613 as a macro.
4614 (sh_elf_copy_private_data): Similar.
4615 (sh_elf_merge_private_data): Similar.
4616 * section.c (SEC_SH_ISA_SHMEDIA): New.
4617 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
4618 * elf32-sh64.c: New file.
4619 * libbfd.h: Regenerate.
4620 * bfd-in2.h: Regenerate.
4621 * po/POTFILES.in: Regenerate.
4622 * po/bfd.pot: Regenerate.
4623 * bfd-in2.h: Regenerate.
4624 * libbfd.h: Regenerate.
4625
e108f470
DJ
46262002-02-07 Daniel Jacobowitz <drow@mvista.com>
4627
4628 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
4629 been included, not drag it in.
4630 * bfd-in2.h: Regenerate.
4631
259d18a3
L
46322002-02-06 H.J. Lu (hjl@gnu.org)
4633
4634 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
4635 the mach and ISA fields if necessary.
4636
f13b834e
NC
46372002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
4638
4639 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
4640 ARM architecture when an F_ARM_5 flag is detected, since we cannot
4641 be sure exactly which architecture this represents.
4642
82f6addb
NC
46432002-02-05 Nick Clifton <nickc@redhat.com>
4644
4645 * po/tr.po: Updated translation.
4646
899f54f5
AM
46472002-02-05 Alan Modra <amodra@bigpond.net.au>
4648
4649 From Jimi X <jimix@watson.ibm.com>
4650 * archures (bfd_mach_ppc64): Define.
4651 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
4652 (bfd_powerpc_arch): Define.
4653 * bfd-in2.h: Regenerate.
4654 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
4655 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
4656 (bfd_powerpc_archs): Add default powerpc64 arch.
4657
248866a8
AM
46582002-02-05 Alan Modra <amodra@bigpond.net.au>
4659
4660 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
4661 against section syms in readonly sections. Don't do the global
4662 sym check if we find one.
4663 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
4664 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 4665 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
4666 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
4667 (elf_s390_grok_prstatus): Add missing prototype.
4668
4fa5c2a8
HPN
46692002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
4670
4671 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
4672 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
4673 Call bfd_get_section_by_name only once. Initialize
4674 bpodata->n_bpo_relocs_this_section.
4675 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
4676 referring to DSOs.
4677 (bpo_reloc_request_sort_fn): Don't use difference of values as
4678 return-value.
4679
537c972e
DB
46802002-02-02 David O'Brien <obrien@FreeBSD>
4681
4682 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
4683 version 4.5 and later the same as 5-CURRENT.
4684 * configure: Re-generate.
4685
006336b8
JT
46862002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
4687
4688 * config.bfd (hppa*-*-netbsd*): New target.
4689
6c571f00
PT
46902002-01-31 Philipp Thomas <pthomas@suse.de>
4691
19397422
AM
4692 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
4693 to front of message. Unify messages with elf32-arm.h. Use
4694 commas where neccessary.
4695 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
4696 ERROR in messages. Unify messages with coff-arm.c. Correct
4697 VFP/FPA error message.
4698 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
4699 APCS-32 for translation.
6c571f00 4700
930b4cb2
HPN
47012002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
4702
4703 Perform on-demand global register allocation from
4704 R_MMIX_BASE_PLUS_OFFSET relocs.
4705 * elf64-mmix.c (struct bpo_reloc_section_info, struct
4706 bpo_reloc_request, struct bpo_greg_section_info): New.
4707 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
4708 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
4709 _bfd_mmix_check_all_relocs,
4710 _bfd_mmix_prepare_linker_allocated_gregs,
4711 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
4712 (elf_mmix_howto_table): Correct src_mask for most relocs.
4713 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
4714 case.
4715 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
4716 case. Fix typo in comment. New label do_mmix_reloc.
4717 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
4718 store first object file with a base-plus-offset reloc. Call
4719 mmix_elf_check_common_relocs for the part common with mmo.
4720 (mmix_elf_final_link): Write out linker-allocated register
4721 contents section.
4722 (elf_backend_gc_sweep_hook): Define.
4723 (bfd_elf64_bfd_relax_section): Define.
4724
4725 * mmo.c: Don't include <ctype.h>
4726 (mmo_init): Correct init-once logic.
4727
3e36d993
TR
47282002-02-01 Tom Rix <trix@redhat.com>
4729
4730 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
4731
ba323545
AM
47322002-02-01 Alan Modra <amodra@bigpond.net.au>
4733
4734 * Makefile.am: Run "make dep-am"
4735 * Makefile.in: Regenerate.
4736
012884d6
DB
47372002-01-31 David O'Brien <obrien@FreeBSD>
4738
4739 * configure.in: Recognize the differences in core files from FreeBSD
4740 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
4741 5-CURRENT.
4742 * configure: Regenerate.
4743
3b16e843
NC
47442002-01-31 Ivan Guzvinec <ivang@opencores.org>
4745
4746 * coff-or32.c: New file.
4747 * cpu-or32.c: New file.
4748 * elf32-or32.c: New file.
4749 * archures.c: Add support for or32.
4750 * targets.c: Add support for or32.
4751 * bfd-in2.h: Regenerate.
7dc0ab31 4752 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
4753 coff_write_object_contents): Add support for or32.
4754 * config.bfd: Add target.
4755 * configure.in: Add support for or32.
4756 * configure: Regenerate.
4757 * Makefile.am: Add support for or32.
4758 * Makefile.in: Regenerate.
3b16e843
NC
4759 * po/SRC-POTFILES.in: Add or32 files.
4760 * po/bfd.pot: Regenerate.
7dc0ab31 4761
caf8ca8e
NC
47622002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
4763 Don Lindsay <lindsayd@cisco.com>
4764
4765 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
4766 false' with a return of a bfd_reloc_ error code.
4767
e5dfef09
HPN
47682002-01-31 Hans-Peter Nilsson <hp@axis.com>
4769
4770 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4771 unexport unreferenced symbols when --export-dynamic. Call
4772 _bfd_elf_strtab_delref when unexporting.
4773
4e4770d0
DJ
47742002-01-30 Daniel Jacobowitz <drow@mvista.com>
4775
4776 * bfd-in.h: Include <stdbool.h> if it is available.
4777 * bfd-in2.h: Regenerated.
4778
e1fa50e7
AM
47792002-01-31 Alan Modra <amodra@bigpond.net.au>
4780
4781 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
4782 not go via the plt.
4783
b5f79c76
NC
47842002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4785
b5f79c76
NC
4786 * archures.c: Tidy up formatting of embedded comments.
4787 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 4788 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
4789 * reloc.c: Tidy up formatting of ordinary & embedded comments.
4790 * section.c: Tidy up formatting of embedded comments.
4791 * syms.c: Tidy up formatting of embedded comments.
4792 * targets.c: Tidy up formatting of embedded comments.
4793
4794 * bfd-in2.h: Regenerate.
4795
ca09e32b
NC
47962002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4797
4798 * vms-tir.c (cmd_name): New function.
4799 (tir_cmd_name): New function.
4800 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
4801 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
4802 Fix formatting.
7dc0ab31 4803
ca09e32b
NC
4804 * peXXigen.c (pe_print_idata): Rearrange message to aid in
4805 translation.
4806 (pe_print_pdata): Rearrange message to aid in translation.
4807
4808 * libbfd.c (warn_deprecated): Rearrange error message to aid in
4809 translation.
4810
4811 * ihex.c (ihex_write_object_contents): Fix spelling typo.
4812
4813 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
4814
4815 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
4816 message to aid in translation.
4817
4818 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
4819 to aid in translation.
4820
4821 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
4822
7dc0ab31 48232002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
4824
4825 * coff-arm.c, elf32-elf.h: Unify messages.
4826
05f64ac6
NC
48272002-01-30 Nick Clifton <nickc@redhat.com>
4828
4829 * po/sv.po: Updated translation.
4830
f5a3e38a
NC
48312002-01-30 Philipp Thomas <pthomas@suse.de>
4832
4833 * dwarf2.c (read_abbrev): Use full section name in error message.
4834 (decode_line_info): Likewise.
661a3fd4
NC
4835
4836 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
4837 message.
4838
d926e03d
AM
48392002-01-30 Alan Modra <amodra@bigpond.net.au>
4840
4841 * elf64-ppc.c (func_desc_adjust): Only provide missing function
4842 descriptor symbols for undefined function code syms. Clear
4843 ELF_LINK_NON_ELF so that they can stay weak.
4844
030d18fb 48452002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 4846 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
4847
4848 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
4849 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
4850 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
4851 generation.
4852 * bfd-in2.h: Regenerate.
4853
fcc76bea
CD
48542002-01-29 Chris Demetriou <cgd@broadcom.com>
4855
4856 * elf32-mips.c: Add additional comments about HI16 relocation
4857 processing.
4858 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
4859 pc-relative relocations. (Reverts change made on 2001-10-31.)
4860 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
4861 for pc-relative relocations.
4862 (mips_elf_calculate_relocation): Add a comment about a kludge
4863 in the R_MIPS_GNU_REL_HI16 handling.
4864 (_bfd_mips_elf_relocate_section): Implement that kludge;
4865 adjust pc-relative HI16 relocation for difference in HI16 and
4866 LO16 addresses, since it can't easily be done in
4867 mips_elf_calculate_relocation.
4868
f9cd9119
MS
48692002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
4870
4871 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
4872 relocations with PC32 relocations for undefined or weak symbols.
4873 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
4874 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
4875
702248bb
JT
48762002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
4877
4878 * elfcore.h (elf_core_file_p): Improve comment for last change.
4879
4867be41
DJ
48802002-01-27 Daniel Jacobowitz <drow@mvista.com>
4881
4882 * configure: Regenerated.
4883
a94cef6a
JT
48842002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
4885
4886 * elfcore.h (elf_core_file_p): Set the machine architecture
4887 before processing the program headers.
4888
7562a296
HPN
48892002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
4890
966abd70
HPN
4891 * configure.in <64-bit configuration>: If using gcc, check and
4892 emit error for egcs-1.1.2.
4893 * configure: Regenerate.
4894
e8eab623
NC
48952002-01-26 Egor Duda <deo@logos-m.ru>
4896
4897 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
4898 as possible to avoid stack corruption.
4899
73896efb
RH
49002002-01-26 Richard Henderson <rth@redhat.com>
4901
4902 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
4903 for non-allocated sections.
4904
49052002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
4906
4907 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
4908 prstat.pr_reg even if it is a struct.
4909
73896efb 49102002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 4911
c5cd6d62 4912 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 4913
3d66c4f7
NC
49142002-01-25 Philipp Thomas <pthomas@suse.de>
4915
4916 * coffgen.c (coff_print_symbol): Don't mark info message
4917 for translation.
4918
9460ecda
NC
49192002-01-25 Nick Clifton <nickc@redhat.com>
4920
4921 * po/fr.po: Updated translation.
4922 * po/es.po: Updated translation.
4923
cc9ff76a
AM
49242002-01-25 Philipp Thomas <pthomas@suse.de>
4925
4926 * coff-alpha.c (alpha_relocate_section): Unify warning message
4927 for GP relative relocations without GP defined.
4928 * coff-mips.c (mips_relocate_section): Likewise.
4929
c68836a9
AM
49302002-01-25 Alan Modra <amodra@bigpond.net.au>
4931
4932 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
4933 unsigned overflow when new_offset < old_offset.
4934
e8eab623 49352002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
4936
4937 * bfd.c (_bfd_abort): Fix typo.
4938
8ba89f17
RH
49392002-01-23 Richard Henderson <rth@redhat.com>
4940
4941 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
4942 plt entries for undefweak symbols.
4943
c6953948
NC
49442002-01-23 Steve Ellcey <sje@cup.hp.com>
4945
c5cd6d62 4946 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
4947 (bfd_elf64_ia64_hpux_big_vec): Ditto.
4948 (bfd_elf32_h8300_vec): Ditto.
4949
41bd81ab
AM
49502002-01-23 Alan Modra <amodra@bigpond.net.au>
4951
4952 * elf64-ppc.c: Remove stale part of ABI comment.
4953 (NO_OPD_RELOCS): Define.
4954 (ppc64_elf_check_relocs): Use it.
4955 (ppc64_elf_relocate_section): Here too.
4956 (build_one_stub): Don't point function syms at the stub. Instead,
4957 hijack plt.offset.
4958 (ppc64_elf_relocate_section): Check whether REL24 relocs should
4959 really go to the stub. Make all dynamic relocs in opd against
4960 locals.
4961 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
4962 plt.offset.
4963
f304919d
RH
49642002-01-22 Richard Henderson <rth@redhat.com>
4965
4966 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
4967
c0ef99a7
AM
49682002-01-22 Alan Modra <amodra@bigpond.net.au>
4969
60ee0d4a
AM
4970 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
4971 TOC_BASE_OFF adjustment.
4972
c0ef99a7
AM
4973 * Makefile.am: Run "make dep-am".
4974 * Makefile.in: Regenerate.
4975 * po/SRC-POTFILES.in: Regenerate.
4976
64328b46
AM
49772002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
4978
4979 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
4980 host defines.
4981
59953665 49822002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
4983
4984 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
4985 Check for and emit error if sgot is NULL at this point.
4986
9596feea
JT
49872002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
4988
4989 * config.bfd (ia64*-*-netbsd*): New target.
4990
7b45c6e1
AM
49912002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4992
4993 * som.c (som_write_space_strings): Comment typo fix.
4994
e5094212
AM
49952002-01-21 Alan Modra <amodra@bigpond.net.au>
4996
e86ce104
AM
4997 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4998 is_func_descriptor fields.
4999 (link_hash_newfunc): Init them.
5000 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
5001 dot are candidates for plt entries. When processing .opd relocs,
5002 set function descriptor strings to point inside function code
5003 string, and set new ppc_link_hash_entry fields.
5004 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
5005 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
5006 function descriptors. It's now done in..
5007 (func_desc_adjust): New.
5008 (ppc64_elf_func_desc_adjust): New.
5009 (define elf_backend_always_size_sections): Define.
5010 (ppc64_elf_hide_symbol): New.
5011 (define elf_backend_hide_symbol): Define.
5012 (allocate_dynrelocs): Remove code looking up function descriptors
5013 as that has been done earlier.
5014 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
5015 table.
5016 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
5017 up function descriptor.
5018 (build_one_stub): Look up the function code sym. Check for
5019 invalid plt offsets.
5020 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
5021 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
5022
e5094212
AM
5023 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
5024 boolean param.
5025 (_bfd_elf_link_hash_hide_symbol): Likewise.
5026 * elflink.h (elf_link_add_object_symbols): Adjust call to
5027 elf_backend_hide_symbol.
5028 (elf_fix_symbol_flags): Likewise.
5029 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
5030 than bfd_alloc.
5031 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
5032 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
5033 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
5034 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
5035 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
5036 and adjust to suit.
5037 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
5038 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
5039 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
5040
40b8271b
AM
50412002-01-18 Alan Modra <amodra@bigpond.net.au>
5042
5043 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
5044 dynamic function descriptor symbol, not the associated function
5045 symbol.
5046
55baa95b
EC
50472002-01-17 Eric Christopher <echristo@redhat.com>
5048
5049 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
5050
328577ad
NC
50512002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
5052
5053 * po/bfd.pot: Regenerate.
5054 * po/fr.po: Regenerate.
5055
af746e92
AM
50562002-01-17 Alan Modra <amodra@bigpond.net.au>
5057
5058 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
5059 Remove "Elf_Internal_Shdr *" param.
5060 (_bfd_mips_elf_section_from_bfd_section): Ditto.
5061 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
5062 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
5063 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
5064 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
5065 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
5066 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
5067 function to override special sections. Remove hdr arg from
5068 backend call, and don't loop.
5069
175e9962
EC
50702002-01-16 Eric Christopher <echristo@redhat.com>
5071
5072 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
5073 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
5074 relocations requiring gp0 and gp.
5075
96a846ea
RE
50762002-01-16 Richard Earnshaw <rearnsha@arm.com>
5077
175e9962 5078 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
5079 EF_ARM_VFP_FLOAT.
5080 (elf32_arm_print_private_bfd_data): Likewise.
5081
af3ae48d
NC
50822002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
5083
5084 * po/tr.po: Import new version.
5085
10ed1bba
AM
50862002-01-16 Alan Modra <amodra@bigpond.net.au>
5087
5088 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
5089 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
5090 (ORI_R0_R0_0): Correct.
5091
5d1634d7
AM
50922002-01-16 Alan Modra <amodra@bigpond.net.au>
5093
5094 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
5095 when plt_not_loaded.
5096 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
5097 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
5098 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
5099 (ppc64_elf_glink_code): Delete.
5100 (PPC64_ELF_GLINK_SIZE): Delete.
5101 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
5102 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
5103 ORI_R0_R0_0): Define.
5104 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
5105 (struct ppc_link_hash_table): Add sstub and plt_overflow.
5106 (ppc64_elf_link_hash_table_create): Init them.
5107 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
5108 Don't copy to shared lib.
5109 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
5110 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
5111 (allocate_dynrelocs <plt>): Don't change function sym here. Make
5112 room for .stub and .glink code.
5113 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
5114 DT_PPC64_GLINK.
5115 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
5116 bfd_elf64_bfd_final_link.
5117 (bfd_elf64_bfd_final_link): Don't define.
5118 (ppc64_elf_size_stubs): New.
5119 (build_plt_stub): New.
5120 (build_one_stub): New.
5121 (ppc64_elf_build_stubs): New.
5122 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
5123 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
5124 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
5125 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
5126 case output sections not separate. Adjust DT_RELASZ to not
5127 include plt relocs. Set reserved got entry. Set got and plt
5128 entry size.
5129 (elf_backend_got_header_size): Set to 8.
5130 * elf64-ppc.h: New file.
5131
c601ffdb
AM
51322002-01-16 Alan Modra <amodra@bigpond.net.au>
5133
5134 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
5135 sections, use bfd_section_list_remove.
5136 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
5137 * elflink.h (elf_link_add_object_symbols): When removing all
5138 sections, use bfd_section_list_clear.
5139
8fb4cb7f
NC
51402002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5141
5142 * po/sv.po: New file: Swedish translation.
5143 * configure.in (ALL_LINGUAS): Add sv.
5144 * configure: Regenerate.
5145
d3c456e9
JJ
51462002-01-15 Jakub Jelinek <jakub@redhat.com>
5147
5148 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
5149 * elf.c (merge_sections_remove_hook): New function.
5150 (_bfd_elf_merge_sections): Pass it as 3rd argument to
5151 _bfd_merge_sections.
5152 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
5153 * libbfd.h: Rebuilt.
5154 * merge.c (_bfd_merge_sections): Add remove_hook argument.
5155 Call remove_hook if a SEC_EXCLUDE section is encountered.
5156
1f7fd478
NC
51572002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
5158
5159 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
5160 (xstormy16_reloc_map): Initialise new field with correct howto
5161 table.
5162 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
5163 howto entry.
5164
b87011e9
MS
51652002-01-10 Michael Snyder <msnyder@redhat.com>
5166
5167 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
5168 (elfcore_write_pstatus): Use long instead of pid_t;
5169 * elf-bfd.h: Change prototypes to use long instead of pid_t;
5170
175e9962 51712002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
5172
5173 * elf.c: Update copyright years.
5174 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
5175 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
5176
7c76fa91
MS
51772002-01-08 Michael Snyder <msnyder@redhat.com>
5178
5179 Add capability to write corefile note sections, for gdb.
5180 * elf.c (elfcore_write_note): New function.
5181 (elfcore_write_prpsinfo): New function.
5182 (elfcore_write_prstatus): New function.
5183 (elfcore_write_pstatus): New function.
5184 (elfcore_write_prfpreg): New function.
5185 (elfcore_write_prxfpreg): New function.
97996af6 5186 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 5187
e1fddb6b
AO
51882002-01-08 Alexandre Oliva <aoliva@redhat.com>
5189
5190 * elf.c (elf_fake_sections): Propagate errors from
5191 elf_backend_fake_section.
5192
8d05742f
JT
51932002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
5194
5195 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
5196 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
5197 (elf32-sh-nbsd.lo): New rule.
5198 * Makefile.in: Regenerate.
5199 * config.bfd (sh*le-*-netbsdelf*): New target.
5200 (sh*-*-netbsdelf*): New target.
5201 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
5202 (bfd_elf32_shnbsd_vec): New vector.
5203 (bfd_elf32_shlnbsd_vec): New vector.
5204 * configure: Regenerate.
5205 * elf32-sh-nbsd.c: New file.
5206 * targets.c: Update copyright years.
175e9962 5207 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
5208 bfd_elf32_shnbsd_vec.
5209
1dba4cb4
AH
52102002-01-07 Aldy Hernandez <aldyh@redhat.com>
5211
5212 * coff-rs6000.c (READ20): Use bfd_scan_vma.
5213
47b22aef
GK
52142002-01-07 Geoffrey Keating <geoffk@redhat.com>
5215
5216 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
5217 of a symbol in a section that will be deleted.
5218
be2d1673
NC
52192002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
5220
5221 * po/es.po: New file: Spanish translation.
5222 * configure.in (ALL_LINGUAS): Add es.
5223 * configure: Regenerate.
5224
d9cf1b54
AM
52252002-01-06 Steve Ellcey <sje@cup.hp.com>
5226
5227 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
5228 argument so we can handle HP-UX specially.
5229 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
5230 (elfNN_hpux_backend_section_from_bfd_section): New for support
5231 of SHN_IA_64_ANSI_COMMON.
5232 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
5233 (is_unwind_section_name): Add special HP-UX support.
5234 (elfNN_ia64_section_from_shdr): Add support for more sections.
5235 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
5236 add support for more sections.
5237 (elfNN_ia64_additional_program_headers): Modify
5238 is_unwind_section_name call.
5239 (elfNN_ia64_modify_segment_map): Remove assumption that there is
5240 only one unwind section in segment.
5241
3f3c5c34
AM
52422002-01-06 Alan Modra <amodra@bigpond.net.au>
5243
5244 * syms.c (_bfd_generic_make_empty_symbol): New function.
5245 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
5246 _bfd_generic_make_empty_symbol.
5247 * libbfd.h: Regenerate.
5248 * bfd-in2.h: Regenerate.
5249 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
5250 (hppabsd_core_get_symtab_upper_bound): Don't define.
5251 (hppabsd_core_get_symtab): Likewise.
5252 (hppabsd_core_print_symbol): Likewise.
5253 (hppabsd_core_get_symbol_info): Likewise.
5254 (hppabsd_core_bfd_is_local_label_name): Likewise.
5255 (hppabsd_core_get_lineno): Likewise.
5256 (hppabsd_core_find_nearest_line): Likewise.
5257 (hppabsd_core_bfd_make_debug_symbol): Likewise.
5258 (hppabsd_core_read_minisymbols): Likewise.
5259 (hppabsd_core_minisymbol_to_symbol): Likewise.
5260 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
5261 Formatting fixes.
5262 * hpux-core.c: Similarly.
5263 * irix-core.c: Similarly.
5264 * osf-core.c: Similarly.
5265 * sco5-core.c: Similarly.
5266 * binary.c (binary_make_empty_symbol): Remove function, define as
5267 _bfd_generic_make_empty_symbol.
5268 * ihex.c (ihex_make_empty_symbol): Likewise.
5269 * mmo.c (mmo_make_empty_symbol): Likewise.
5270 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
5271 * srec.c (srec_make_empty_symbol): Likewise.
5272 * versados.c (versados_make_empty_symbol): Likewise.
5273 * vms.c (_bfd_vms_make_empty_symbol): Remove.
5274 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
5275 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
5276 rather than _bfd_vms_make_empty_symbol.
5277 * vms-misc.c (new_symbol): Likewise.
5278
3f0a7f7f
AM
52792002-01-05 Alan Modra <amodra@bigpond.net.au>
5280
9e7b37b3
AM
5281 * section.c (bfd_section_init): Remove unnecessary initialisations.
5282 (bfd_section_list_clear): New function.
5283 (bfd_section_list_remove, bfd_section_list_insert): New macros.
5284 (_bfd_strip_section_from_output): Use them.
5285 * coffcode.h (coff_set_alignment_hook): Likewise.
5286 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
5287 * elf64-mips.c (mips_elf64_final_link): Likewise.
5288 * elf64-mmix.c (mmix_elf_final_link): Likewise.
5289 * sunos.c (sunos_add_dynamic_symbols): Likewise.
5290 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
5291 * bfd-in2.h: Regenerate.
5292
5293 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
5294 rather than doing our own section handling. Clean up after errors
5295 with bfd_release and bfd_section_list_clear. Handle unexpected
5296 flags.
5297 * aoutf1.h (sunos4_core_file_p): Likewise.
5298 * aix386-core.c (aix386_core_file_p): Likewise.
5299 * cisco-core.c (cisco_core_file_validate): Likewise.
5300 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
5301 * trad-core.c (trad_unix_core_file_p): Likewise.
5302
5303 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
5304 with bfd_release and bfd_section_list_clear.
5305 * hpux-core.c (hpux_core_core_file_p): Likewise.
5306 * irix-core.c (irix_core_core_file_p): Likewise.
5307 * lynx-core.c (lynx_core_file_p): Likewise.
5308 * osf-core.c (osf_core_core_file_p): Likewise.
5309 * rs6000-core.c (rs6000coff_core_p): Likewise.
5310 * sco5-core.c (sco5_core_file_p): Likewise.
5311
3f0a7f7f
AM
5312 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
5313 sign extension adjustments without conditionals.
5314
a3aa38ee
JJ
53152002-01-04 Jakub Jelinek <jakub@redhat.com>
5316
5317 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
5318 CIE at .eh_frame start is removed due to no FDEs referencing it.
5319
8a8b2d4b
AJ
53202002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
5321
5322 * config.bfd (x86_64-*-netbsd*): New target.
5323 * configure.in (x86_64-*-netbsd*): Set COREFILE
5324 to netbsd-core.lo.
5325 * configure: Regenerated.
5326
04b5af89
TR
53272002-01-03 Tom Rix <trix@redhat.com>
5328
5329 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
5330 for recent bfd_make_section_anyway change.
5331
51c5503b
NC
53322002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
5333
5334 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
5335 R_ARM_THM_PC11 reloc.
5336
07f7c046
NC
53372002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
5338
5339 * configure.in (LINGUAS): Add ja.
5340 * configure: Regenerate.
5341 * po/ja.po: Import from translation project's web site.
5342
5eefb65f
NC
53432002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
5344
5345 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
5346 messages to ease translation into other languages.
5347
39e90f10 5348For older changes see ChangeLog-0001
56882138
AM
5349\f
5350Local Variables:
5351mode: change-log
5352left-margin: 8
5353fill-column: 74
5354version-control: never
5355End: