* elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
1e370bd2
AM
12001-10-15 Alan Modra <amodra@bigpond.net.au>
2
3 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
4 rather than ind->weakdef.
5 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
7 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
8 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
9 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
10
bbd7ec4a
AM
112001-10-15 Alan Modra <amodra@bigpond.net.au>
12 H.J. Lu <hjl@gnu.org>
13
14 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
15 counts for aliases instead of aborting.
16 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
17 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
18
19 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
20 to -1 for non-function symbols.
21 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
22 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
23 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
24 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
25 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
26 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
27 plt.offset instead of plt.refcount when setting to -1.
28
6a360bf4
NC
292001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
30
31 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
32 like R_ARM_PC24. Include reloc number in error message about
33 unresolvable relocs.
34
290394d6
JJ
352001-10-10 Jakub Jelinek <jakub@redhat.com>
36
37 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
38 relocations against the same symbol in .rel{,a}.dyn section.
39
08da05b0
KH
402001-10-10 Kazu Hirata <kazu@hxi.com>
41
42 * aout-encap.c: Fix comment typos.
43 * aoutx.h: Likewise.
44 * archive.c: Likewise.
45 * bout.c: Likewise.
46 * coff64-rs6000.c: Likewise.
47 * coffcode.h: Likewise.
48 * coffgen.c: Likewise.
49 * cofflink.c: Likewise.
50 * coff-mips.c: Likewise.
51 * ecoff.c: Likewise.
52 * elf32-m32r.c: Likewise.
53 * libcoff-in.h: Likewise.
54 * libecoff.h: Likewise.
55 * libxcoff.h: Likewise.
56 * nlm32-i386.c: Likewise.
57 * pdp11.c: Likewise.
58 * section.c: Likewise.
59 * som.c: Likewise.
60 * som.h: Likewise.
61 * bfd-in2.h: Regenerate.
62 * libcoff.h: Likewise.
63
079e9a2f
AM
642001-10-10 Alan Modra <amodra@bigpond.net.au>
65
66 * elf.c (elf_map_symbols): Don't create new section symbols; Use
67 existing section syms. Update comments.
68 (copy_private_bfd_data): Formatting fixes.
69 (elfcore_grok_win32pstatus): Likewise.
70 (swap_out_syms): Likewise. Remove unnecessary level of braces.
71
945906ff
AM
722001-10-09 Alan Modra <amodra@bigpond.net.au>
73
74 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
75 "group_name".
76 (elf_group_name): Define.
77 (elf_next_in_group): Define.
78 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
79 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
80 first member section; Instead use elf_next_in_group.
81 (bfd_section_from_shdr): Likewise.
82 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
83
dbb410c3
AM
842001-10-09 Alan Modra <amodra@bigpond.net.au>
85
86 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
87 "next_in_group". Fix gp and gp_size comments.
88 * elf.c (union elf_internal_group): New.
89 (setup_group): New function.
90 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
91 Call setup_group for SHF_GROUP sections.
92 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
93 (elf_fake_sections): Set header type for SEC_GROUP, and header
94 flags for sections in a group.
95 (set_group_contents): New function.
96 (_bfd_elf_compute_section_file_positions): Call it.
97 (assign_section_numbers): Set sh_link for SHT_GROUP.
945906ff 98
dbb410c3
AM
99 * elflink.h (gc_mark_hook): Handle section groups.
100 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
101 * section.c (SEC_GROUP): Define.
102 (struct sec): Comment fixes.
103 * bfd-in2.h: Regenerate.
104
105 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
106 out of function args.
107 (_bfd_elf_canonicalize_reloc): Similarly.
108 (_bfd_elf_get_symtab): Here too.
109 (_bfd_elf_canonicalize_dynamic_symtab): And here.
110 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
111 bfd_bread, and remove unnecessary cast.
112
24c603fa
AH
1132001-10-08 Aldy Hernandez <aldyh@redhat.com>
114
bbd7ec4a 115 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
24c603fa 116
3f5864e1
SC
1172001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
118
119 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
120 compilation unit.
121
fb9ceeac
AM
1222001-10-06 Alan Modra <amodra@bigpond.net.au>
123
aec2f561
AM
124 * bfd.c (bfd_assert): Report bfd version.
125 (_bfd_abort): Likewise.
126
50b4d486
AM
127 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
128 section sym values. Instead replace any relocs against them with
129 relocs against STN_UNDEF, which has a zero value.
130
fb9ceeac
AM
131 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
132 relocs.
133
17617495
JL
1342001-10-05 Jeff Law <law@redhat.com>
135
136 * som.h (som_exec_data): New field "version_id".
137 * som.c (som_object_setup): Record the version_id if it
138 exists.
139 (som_prep_headers): Do not initialize version_id here.
140 (som_finish_writing): Initialize version_id here.
141
1422000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7e766c3b
TS
143
144 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
145 according to the MIPS/SGI ELF64 ABI Draft.
146 (mips_elf_sort_hash_table): Typo.
147
58e3d09d
AM
1482001-10-04 Alan Modra <amodra@bigpond.net.au>
149
8ea52284
AM
150 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
151
58e3d09d
AM
152 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
153 copying flags if this is a weakdef.
154
b13c7b49
AM
1552001-10-04 Alan Modra <amodra@bigpond.net.au>
156
a90b9fca
AM
157 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
158 packing.
159
bbd7ec4a 160 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
3a6b8597
AM
161 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
162 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
163
b13c7b49
AM
164 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
165 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
166 backends we configure. Run "make dep-am".
167 (install-data-local): Install symcat.h.
168 * dep-in.sed: Remove symcat.h from dependencies.
169 * Makefile.in: Regenerate.
170
8bd621d8
AM
1712001-10-03 Vassili Karpov <malc@pulsesoft.com>
172
173 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
174
1e2be829
TS
1752001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
176
177 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
178 (elf_backend_default_use_rela_p): New define.
179
0a991dfe
AM
1802001-10-03 Alan Modra <amodra@bigpond.net.au>
181
57c7194e
AM
182 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
183 change.
184
87b632fc
AM
185 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
186 * configure: Regenerate.
187 * Makefile.am (BFD_H_FILES): Add version.h.
188 * Makefile.in: Regenerate.
189 * po/SRC-POTFILES.in: Regenerate.
190
0a991dfe
AM
191 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
192 elf_backend_copy_indirect_symbol so that backend has a chance to
193 copy other necessary fields.
194 * elf-bfd.h (struct elf_backend_data): Update description of
195 elf_backend_copy_indirect_symbol.
196 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
197 copying flags if this is a weakdef.
198 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
199 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
200 than bfd_link_hash_lookup.
bbd7ec4a 201 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
0a991dfe
AM
202 reloc processing for weakdefs.
203 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
204 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
205
a33d1f77
AM
2062001-10-02 Alan Modra <amodra@bigpond.net.au>
207
208 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
209 result of ELF64_R_TYPE to enum before using in a switch.
210 (ppc64_elf_gc_mark_hook): Likewise.
211 (ppc64_elf_gc_sweep_hook): Likewise.
212 (ppc64_elf_reloc_type_class): Likewise.
213
e43d48cc
AM
2142001-10-02 Alan Modra <amodra@bigpond.net.au>
215
216 * version.h: New file.
217 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
218 (BFD_VERSION_DATE): Define.
219 (BFD_VERSION_STRING): Define.
220 * configure.in: AC_SUBST bfd_version, bfd_version_date and
221 bfd_version_string.
222 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
223 * bfd-in2.h: Regenerate.
224 * configure: Regenerate.
225 * Makefile.am: Run "make dep-am".
226 * Makefile.in: Regenerate.
227
228 * bfd-in.h: Include "symcat.h".
229 (CONCAT4): Redefine as for old CAT4.
230 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
231 Add warning regarding whitespace.
232 * aout-cris.c: Likewise.
233 * aout-ns32k.c: Likewise.
234 * aout-sparcle.c: Likewise.
235 * aout-tic30.c: Likewise.
236 * aout0.c: Likewise.
237 * armnetbsd.c: Likewise.
238 * demo64.c: Likewise.
239 * elf-bfd.h: Likewise.
240 * gen-aout.c: Likewise.
241 * host-aout.c: Likewise.
242 * hp300bsd.c: Likewise.
243 * hp300hpux.c: Likewise.
244 * i386aout.c: Likewise.
245 * i386bsd.c: Likewise.
246 * i386dynix.c: Likewise.
247 * i386freebsd.c: Likewise.
248 * i386linux.c: Likewise.
249 * i386lynx.c: Likewise.
250 * i386mach3.c: Likewise.
251 * i386netbsd.c: Likewise.
252 * libaout.h: Likewise.
253 * m68k4knetbsd.c: Likewise.
254 * m68klinux.c: Likewise.
255 * m68klynx.c: Likewise.
256 * m68knetbsd.c: Likewise.
257 * m88kmach3.c: Likewise.
258 * mipsbsd.c: Likewise.
259 * newsos3.c: Likewise.
260 * ns32knetbsd.c: Likewise.
261 * pc532-mach.c: Likewise.
262 * pdp11.c: Likewise.
263 * riscix.c: Likewise.
264 * sparclinux.c: Likewise.
265 * sparclynx.c: Likewise.
266 * sparcnetbsd.c: Likewise.
267 * sunos.c: Likewise.
268 * targets.c: Likewise.
269 * vaxnetbsd.c: Likewise.
270 * vms-hdr.c: Likewise.
271
4eef72c7
AM
2722001-10-01 Alan Modra <amodra@bigpond.net.au>
273
274 * bfd-in.h: Remove comments regarding generated files.
275 * libbfd-in.h: Likewise.
276 * libcoff-in.h: Likewise.
277 * bfd-in2.h: Regenerate.
278 * libbfd.h: Likewise.
279 * libcoff.h: Likewise.
280
146be91a 2812001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
bbd7ec4a 282 Hans-Peter Nilsson <hp@bitrange.com>
146be91a
HPN
283
284 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
285 partial_inplace, matching assembler output. Set src_mask to
286 all ones.
287 (sh_elf_relocate_section): Delete misplaced comment.
288 For relocatable linking against section symbol, call
289 _bfd_relocate_contents for partial_inplace relocs and adjust
290 rel->r_addend for others.
291 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
292 bfd_get_32, not at rel->r_addend.
293
3c3e9281
AM
2942001-09-30 Alan Modra <amodra@bigpond.net.au>
295
296 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
297 the old dir refcount, so we indirectly set them to init_refcount.
298 Short-circuit asserts when we've just verified they are true.
299
862517b6
AM
3002001-09-29 Alan Modra <amodra@bigpond.net.au>
301
302 * section.c (struct sec): Remove kept_section.
303 (STD_SECTION): Remove kept_section initialisation.
304 (bfd_make_section_anyway): Here too.
305 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
306 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
307 * elflink.h (elf_link_input_bfd): Set discarded link-once section
308 symbols to zero, and remove all code involved with kept_section
309 and tracking section symbol values.
310 * bfd-in2.h: Regenerate.
311 * configure.in: Bump version number.
312 * configure: Regenerate.
313
65f38f15
AM
3142001-09-29 Alan Modra <amodra@bigpond.net.au>
315
316 * elf64-ppc.c (struct ppc_dyn_relocs): New.
317 (IS_ABSOLUTE_RELOC): Define.
318 (struct ppc_link_hash_entry): New.
319 (struct ppc_link_hash_table): New.
320 (ppc_hash_table): Define.
321 (link_hash_newfunc): New function.
322 (ppc64_elf_link_hash_table_create): New function.
323 (create_got_section): New function.
324 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
325 pointers to our dynamic sections in hash table.
326 (ppc64_elf_copy_indirect_symbol): New function.
327 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
328 dynamic sections. Localise vars. Modify code for refcounts
329 starting from zero. Don't allocate here, or force symbols dynamic.
330 Don't copy all relocs if shared, select ones we need. Add code
331 to track possible copy relocs for non-shared link.
332 (ppc64_elf_gc_mark_hook): Update comment.
333 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
334 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
335 code for reference counting garbage collection. Don't create .plt
336 entries for functions that don't comply with ABI naming convention,
337 and don't allocate .plt space here. Use short-cuts to dynamic
338 sections. If possible, keep dynamic relocations instead of using
339 copy relocs. Remove confused comments.
340 (ppc_adjust_dynindx): Delete.
341 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
342 (allocate_dynrelocs): New function.
343 (readonly_dynrelocs): New function.
344 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
345 space here, and call allocate_dynrelocs to allocate space for
346 global .plt, .got and reloc sections. Use short-cuts to dynamic
347 sections. Call readonly_dynrelocs to determine whether we need
348 DT_TEXTREL. Don't generate section symbols here, the generic
349 ELF linker code does it for us.
350 (ppc64_elf_final_link): Call regular ELF backend linker rather than
351 gc variety, since we do our own .got handling.
352 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
353 dynamic section short-cuts. Localise vars, and delay setting.
354 Handle unknown relocs in main switch statement. Replace ugly
355 complicated tests for unresolvable relocs with a simple direct
356 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
357 before allowing an undefined sym in a shared lib. Do R_*_DS tests
358 after main switch, when we've set addend. Do non-addend insn
359 tweaks before main swithc. Ignore input_section->vma when
360 calculating reloc offsets as it's always zero. Rewrite dynamic
361 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
362 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
363 of dynamic section short-cuts. Reorganise .plt handling code.
364 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
365 Move expressions out of swap_reloca_out function calls.
366 (ppc64_elf_reloc_type_class): New function.
367 (ppc64_elf_info_to_howto): Move common expression to local var.
368 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
369 of dynamic section short-cuts. Don't fiddle with section syms
370 here as the ELF linker does it for us.
371 (elf_backend_can_refcount): Define.
372 (bfd_elf64_bfd_link_hash_table_create): Define.
373 (elf_backend_copy_indirect_symbol): Define.
374 (elf_backend_reloc_type_class): Define.
375 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
376
21d17a58
AM
3772001-09-29 Alan Modra <amodra@bigpond.net.au>
378
51b64d56
AM
379 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
380 (struct elf_backend_data): Add can_refcount.
381 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
382 got.refcount and plt.refcount from init_refcount.
383 (_bfd_elf_link_hash_table_init): Set up init_refcount.
384 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
385 rather than got/plt.offset, and test for <= 0 rather than -1.
386 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
387 * elfxx-target.h (elf_backend_can_refcount): Define.
388 (elfNN_bed): Init can_refcount.
389 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
390 (_bfd_generic_link_hash_newfunc): Likewise.
391 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
392 starting from zero.
393 (elf_backend_can_refcount): Define.
394 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
395 starting from zero.
396 (elf32_hppa_copy_indirect_symbol): Make static to agree with
397 prototype.
398 (elf_backend_can_refcount): Define.
399 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
400 starting from zero.
401 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
402 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
403 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
404 (elf_backend_can_refcount): Define.
405 (elf_i386_copy_indirect_symbol): Make static to agree with
406 prototype. Formatting fix.
407 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
408 starting from zero.
409 (elf_backend_can_refcount): Define.
410 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
411 starting from zero.
412 (elf_backend_can_refcount): Define.
413 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
414 starting from zero.
415 (elf_backend_can_refcount): Define.
416 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
417 starting from zero.
418 (elf_backend_can_refcount): Define.
419 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
420 starting from zero.
421 (elf_backend_can_refcount): Define.
422
21d17a58
AM
423 * som.c (som_write_symbol_strings): Cast current_offset in
424 bfd_seek call to match param type.
425
78ae4cb9
JB
4262001-09-28 J. Brobecker <brobecker@gnat.com>
427
428 * som.c (som_write_symbol_strings): Fix incorrect type of
429 current_offset to match the function definition. Fixes a build
430 failure on HPUX-11.00.
431
65db3b0d
RH
4322001-09-28 Richard Henderson <rth@redhat.com>
433
e0aae569
RH
434 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
435 SEC_MERGE, SEC_STRINGS.
436
65db3b0d
RH
437 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
438 * bfd-in2.h: Rebuild.
439
ced53ee5
AM
4402001-09-28 Alan Modra <amodra@bigpond.net.au>
441
ffaef159
AM
442 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
443 reloc code using x86_64_reloc_map.
444
3ac8354b
AM
445 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
446 no longer allocate here. Localise some vars to blocks where they
447 are used.
448 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
449 setting of vars until needed.
450 (allocate_dynrelocs): Don't create a .plt entry without a reloc
451 when symbol visibilty makes a function local.
452 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
453 swap_reloca_out function calls.
454 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
455 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
456 switch statement.
457
0ac8d2ca
AM
458 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
459 no longer allocate here. Localise some vars to blocks where they
460 are used. Remove separate switch stmt for creating .got sec.
461 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
462 redundant casts and aborts. Delay setting of vars until needed.
463 (allocate_dynrelocs): Remove redundant casts and aborts.
464 (elf_i386_size_dynamic_sections): Move comment.
465 (elf_i386_finish_dynamic_symbol): Move expressions out of function
466 calls.
467 (elf_i386_relocate_section): Likewise. Comment typo fix.
468 (elf_i386_finish_dynamic_sections): Migrate common code out of
469 switch statement.
470 (elf_backend_* defines): Sort.
471
ced53ee5
AM
472 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
473 without a reloc when symbol visibilty makes a function local.
474
63b0f745
NC
4752001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
476
06317a27
NC
477 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
478 conflicting float flags.
63b0f745 479
ebe50bae
AM
4802001-09-26 Alan Modra <amodra@bigpond.net.au>
481
482 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
483 (elf_backend_copy_indirect_symbol): Define.
484 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
485 (struct elf_i386_link_hash_table): Likewise.
486 (link_hash_newfunc): Get rid of unnecessary casts.
487 (elf_i386_link_hash_table_create): Likewise.
488 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
489 Don't test input section SEC_READONLY here to try to avoid copy
490 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
491 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
492 here to properly test whether we need copy relocs. Do so for weak
493 syms too.
494
495 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
496 (elf_backend_copy_indirect_symbol): Define.
497 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
498 (stub_hash_newfunc): Get rid of unnecessary casts.
499 (hppa_link_hash_newfunc): Likewise.
500 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
501 Don't test input section SEC_READONLY here to try to avoid copy
502 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
503 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
504 here to properly test whether we need copy relocs. Do so for weak
505 syms too.
506
af6166c0
AM
5072001-09-26 Alan Modra <amodra@bigpond.net.au>
508
509 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
510 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
511 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
512
e62de969
JJ
5132001-09-25 Jakub Jelinek <jakub@redhat.com>
514
515 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
516 computation.
517
09c1cc88
L
5182001-09-25 H.J. Lu <hjl@gnu.org>
519
520 * bfd-in2.h: Regenerated.
521
38701953
AM
5222001-09-25 Alan Modra <amodra@bigpond.net.au>
523
524 * elf32-i386.c: Add comment re linker function names and ordering.
525 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
526 (elf_i386_grok_prstatus): Move before linker functions.
527 (elf_i386_grok_psinfo): Likewise.
528 (elf_i386_fake_sections): Move so that functions are ordered.
529 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
530
98ceb8ce
AM
5312001-09-25 Alan Modra <amodra@bigpond.net.au>
532
0ac8d2ca 533 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
83c81bfe
AM
534 throughout file.
535
98ceb8ce
AM
536 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
537 code handling this option.
538 (LONG_BRANCH_VIA_PLT): Likewise.
539 (RELATIVE_DYNRELOCS): Define as zero.
540 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
541 "pc_count" fields. Remove "section" field.
542 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
543 (elf32_hppa_check_relocs): Don't allocate space for dynamic
544 relocs here. Instead, record all needed dynamic relocs via
545 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
546 in elf_section_data.
547 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
548 (allocate_plt_and_got_and_discard_relocs): Rename to
549 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
550 (readonly_dynrelocs): New function.
551 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
552 Call readonly_dynrelocs to determine need for DT_TEXTREL.
553 Rename "i" to "ibfd". Allocate space for local dyn relocs.
554 (elf32_hppa_relocate_section): Make use of cached sreloc.
555 (elf32_hppa_reloc_type_class): New function.
556 (elf_backend_reloc_type_class): Define.
557
0c715baa
AM
5582001-09-25 Alan Modra <amodra@bigpond.net.au>
559
560 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
561 and "sreloc" fields.
562 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
563 "pc_count" fields. Remove "section" field.
564 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
565 allocate space for dynamic relocs here. Instead, record all
566 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
567 pointer to "sreloc" section in elf_section_data.
568 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
569 (allocate_plt_and_got_and_discard_relocs): Rename to
570 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
571 (readonly_dynrelocs): New function.
572 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
573 Rename "i" to "ibfd". Allocate space for local dyn relocs.
574 (elf_i386_relocate_section): Make use of cached sreloc.
575
f51e552e
AM
5762001-09-24 Alan Modra <amodra@bigpond.net.au>
577
578 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
579 reloc rather than just the type.
580 (_bfd_elf_reloc_type_class): Likewise.
581 * elf.c (_bfd_elf_reloc_type_class): Likewise.
582 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
583 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
584 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
585 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
586 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
587 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
588 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
589 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
590 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
591 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
592 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
593 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
594 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
595 * elflink.h: Formatting fixes.
596 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
597 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
598 o->contents to PTR. Update call to elf_backend_reloc_type_class.
599
0c35f01a
AM
6002001-09-22 John Reiser <jreiser@BitWagon.com>
601
602 * elfcode.h (elf_object_p): Allow for no section header at all in
603 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
604
1e738b87
NC
6052001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
606
607 * elfxx-ia64.c: Fix compile time warning messages.
09c1cc88
L
608 * coff-mcore.c: Fix compile time warning messages.
609 * coff-ppc.c: Fix compile time warning messages.
610 * coffcode.h: Fix compile time warning messages.
611 * elf32-mips.c: Fix compile time warning messages.
612 * elf64-alpha.c: Fix compile time warning messages.
613 * libbfd.c: Fix compile time warning messages.
614 * bfd-in2.h: Regenerate.
1e738b87 615
923f08ff
AM
6162001-09-21 Alan Modra <amodra@bigpond.net.au>
617
618 * Makefile.am: Run "make dep-am".
619 * Makefile.in: Regenerate.
620
621 * aoutx.h: Formatting fixes.
622 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
623
624 * linker.c: Replace bfd_get_filename with bfd_archive_filename
625 in error message.
626
8f615d07
AM
6272001-09-21 Alan Modra <amodra@bigpond.net.au>
628
629 * bfd.c (bfd_archive_filename): New function.
630 * bfd-in2.h: Regenerate.
631 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
632 in error messages where the bfd is an input bfd.
633 * aout-cris.c: Likewise.
634 * coff-arm.c: Likewise.
635 * coff-mcore.c: Likewise.
636 * coff-ppc.c: Likewise.
637 * coff-rs6000.c: Likewise.
638 * coff-sh.c: Likewise.
639 * coff-tic54x.c: Likewise.
640 * coff-tic80.c: Likewise.
641 * coff64-rs6000.c: Likewise.
642 * coffcode.h: Likewise.
643 * coffgen.c: Likewise.
644 * cofflink.c: Likewise.
645 * ecofflink.c: Likewise.
646 * elf-hppa.h: Likewise.
647 * elf.c: Likewise.
648 * elf32-arm.h: Likewise.
649 * elf32-cris.c: Likewise.
650 * elf32-gen.c: Likewise.
651 * elf32-hppa.c: Likewise.
652 * elf32-i370.c: Likewise.
653 * elf32-i386.c: Likewise.
654 * elf32-m32r.c: Likewise.
655 * elf32-mcore.c: Likewise.
656 * elf32-mips.c: Likewise.
657 * elf32-ppc.c: Likewise.
658 * elf32-s390.c: Likewise.
659 * elf32-sh.c: Likewise.
660 * elf32-sparc.c: Likewise.
661 * elf32-v850.c: Likewise.
662 * elf64-alpha.c: Likewise.
663 * elf64-gen.c: Likewise.
664 * elf64-ppc.c: Likewise.
665 * elf64-s390.c: Likewise.
666 * elf64-sparc.c: Likewise.
667 * elf64-x86-64.c: Likewise.
668 * elflink.h: Likewise.
669 * elfxx-ia64.c: Likewise.
670 * ieee.c: Likewise.
671 * ihex.c: Likewise.
672 * libbfd.c: Likewise.
673 * pdp11.c: Likewise.
674 * pe-mips.c: Likewise.
675 * peicode.h: Likewise.
676 * srec.c: Likewise.
677 * xcofflink.c: Likewise.
678
679 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
680
681 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
682 error message.
683
684 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
685 error message.
686
687 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
688 Consolidate error messages, and split long messages to two lines.
689
671bae9c 6902001-09-20 John Reiser <jreiser@BitWagon.com>
83c81bfe 691
f51e552e
AM
692 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
693 and info->allow_shlib_undefined.
694 * elf32-cris.c: Likewise.
695 * elf32-hppa.c: Likewise.
696 * elf32-m68k.c: Likewise.
697 * elf32-mips.c: Likewise.
698 * elf32-ppc.c: Likewise.
699 * elf32-s390.c: Likewise.
700 * elf32-sh.c: Likewise.
701 * elf32-sparc.c: Likewise.
702 * elf64-alpha.c: Likewise.
703 * elf64-hppa.c: Likewise.
704 * elf64-ppc.c: Likewise.
705 * elf64-s390.c: Likewise.
706 * elf64-sparc.c: Likewise.
707 * elf64-x86-64.c: Likewise.
708 * elfxx-ia64.c: Likewise.
671bae9c 709
3882b010
L
7102001-09-18 Bruno Haible <haible@clisp.cons.org>
711
712 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
713 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
714 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
715 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
716 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
717 (bfd_default_scan): Use ISDIGIT instead of isdigit.
718 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
719 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
720 isxdigit/isdigit/islower.
721 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
722 (mangle_name): Use ISALNUM instead of isalnum.
723 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
724 (scan): Use ISDIGIT instead of isdigit.
725 * hosts/alphavms.h: Don't include <ctype.h>.
726 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
727 (ieee_object_p): Use TOUPPER instead of toupper.
728 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
729 (ihex_bad_byte): Use ISPRINT instead of isprint.
730 * merge.c: Don't include <ctype.h>.
731 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
732 (oasys_write_sections): Use ISDIGIT instead of isdigit.
733 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
734 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
735 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
736 (mangle_name): Use ISALNUM instead of isalnum.
737 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
738 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
739 isupper/islower/isdigit.
740 (som_decode_symclass): Use TOUPPER instead of toupper.
741 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
742 (srec_bad_byte): Use ISPRINT instead of isprint.
743 (srec_scan): Use ISSPACE instead of isspace.
744 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
745 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
746 * syms.c: Include "safe-ctype.h"
747 (islower, toupper): Remove macro definitions.
748 (bfd_decode_symclass): Use TOUPPER instead of toupper.
749 * vms-gsd.c: Don't include <ctype.h>.
750 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
751 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
752 islower/toupper.
753 * vms-tir.c: Don't include <ctype.h>.
754
dc810e39
AM
7552001-09-18 Alan Modra <amodra@bigpond.net.au>
756
757 * libbfd.c (bfd_bread): New function replacing bfd_read without
758 redundant params. Allow reads up to (size_t) -2 in length.
759 (bfd_bwrite): Similarly for bfd_write.
760 (real_read): Return a size_t.
761 (bfd_read): Call bfd_bread.
762 (bfd_write): Call bfd_bwrite.
763 (warn_deprecated): New function to annoy everybody.
764 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
765 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
766 (bfd_read, bfd_write): Define as macro.
767 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
768 likewise for bfd_write. Ensure function args are correct size by
769 using casts or local vars. In some cases, remove unnecessary
770 casts. Formatting fixes, in some cases removing a large expression
771 from function args by using a local var. Replace CONST with const.
772 Modify variable types to avoid warings. Use casts to avoid
773 warnings when using negative numbers in unsigned expressions.
774 * aout-adobe.c: Likewise.
775 * aout-arm.c: Likewise.
776 * aout-cris.c: Likewise.
777 * aout-encap.c: Likewise.
778 * aout-ns32k.c: Likewise.
779 * aout-target.h: Likewise.
780 * aout-tic30.c: Likewise.
781 * aoutf1.h: Likewise.
782 * aoutx.h: Likewise.
783 * archive.c: Likewise.
784 * archures.c: Likewise.
785 * bfd-in.h: Likewise.
786 * bfd.c: Likewise.
787 * binary.c: Likewise.
788 * bout.c: Likewise.
789 * cache.c: Likewise.
790 * cisco-core.c: Likewise.
791 * coff-a29k.c: Likewise.
792 * coff-alpha.c: Likewise.
793 * coff-arm.c: Likewise.
794 * coff-h8300.c: Likewise.
795 * coff-h8500.c: Likewise.
796 * coff-i386.c: Likewise.
797 * coff-i860.c: Likewise.
798 * coff-i960.c: Likewise.
799 * coff-ia64.c: Likewise.
800 * coff-m68k.c: Likewise.
801 * coff-m88k.c: Likewise.
802 * coff-mcore.c: Likewise.
803 * coff-mips.c: Likewise.
804 * coff-ppc.c: Likewise.
805 * coff-rs6000.c: Likewise.
806 * coff-sh.c: Likewise.
807 * coff-sparc.c: Likewise.
808 * coff-stgo32.c: Likewise.
809 * coff-tic30.c: Likewise.
810 * coff-tic54x.c: Likewise.
811 * coff-tic80.c: Likewise.
812 * coff-w65.c: Likewise.
813 * coff-z8k.c: Likewise.
814 * coff64-rs6000.c: Likewise.
815 * coffcode.h: Likewise.
816 * coffgen.c: Likewise.
817 * cofflink.c: Likewise.
818 * coffswap.h: Likewise.
819 * corefile.c: Likewise.
820 * cpu-arc.c: Likewise.
821 * cpu-h8300.c: Likewise.
822 * cpu-h8500.c: Likewise.
823 * cpu-i960.c: Likewise.
824 * cpu-ia64-opc.c: Likewise.
825 * cpu-ns32k.c: Likewise.
826 * cpu-pdp11.c: Likewise.
827 * cpu-pj.c: Likewise.
828 * cpu-sh.c: Likewise.
829 * cpu-w65.c: Likewise.
830 * cpu-z8k.c: Likewise.
831 * dwarf1.c: Likewise.
832 * dwarf2.c: Likewise.
833 * ecoff.c: Likewise.
834 * ecofflink.c: Likewise.
835 * ecoffswap.h: Likewise.
836 * elf-bfd.h: Likewise.
837 * elf-hppa.h: Likewise.
838 * elf-m10200.c: Likewise.
839 * elf-m10300.c: Likewise.
840 * elf.c: Likewise.
841 * elf32-arc.c: Likewise.
842 * elf32-arm.h: Likewise.
843 * elf32-avr.c: Likewise.
844 * elf32-cris.c: Likewise.
845 * elf32-fr30.c: Likewise.
846 * elf32-gen.c: Likewise.
847 * elf32-h8300.c: Likewise.
848 * elf32-hppa.c: Likewise.
849 * elf32-i370.c: Likewise.
850 * elf32-i386.c: Likewise.
851 * elf32-i860.c: Likewise.
852 * elf32-m32r.c: Likewise.
853 * elf32-m68k.c: Likewise.
854 * elf32-mcore.c: Likewise.
855 * elf32-mips.c: Likewise.
856 * elf32-openrisc.c: Likewise.
857 * elf32-pj.c: Likewise.
858 * elf32-ppc.c: Likewise.
859 * elf32-s390.c: Likewise.
860 * elf32-sh-lin.c: Likewise.
861 * elf32-sh.c: Likewise.
862 * elf32-sparc.c: Likewise.
863 * elf32-v850.c: Likewise.
864 * elf64-alpha.c: Likewise.
865 * elf64-hppa.c: Likewise.
866 * elf64-mips.c: Likewise.
867 * elf64-ppc.c: Likewise.
868 * elf64-s390.c: Likewise.
869 * elf64-sparc.c: Likewise.
870 * elf64-x86-64.c: Likewise.
871 * elfarm-nabi.c: Likewise.
872 * elfcode.h: Likewise.
873 * elfcore.h: Likewise.
874 * elflink.c: Likewise.
875 * elflink.h: Likewise.
876 * elfxx-ia64.c: Likewise.
877 * elfxx-target.h: Likewise.
878 * format.c: Likewise.
879 * hash.c: Likewise.
880 * hp300hpux.c: Likewise.
881 * hppabsd-core.c: Likewise.
882 * hpux-core.c: Likewise.
883 * i386aout.c: Likewise.
884 * i386dynix.c: Likewise.
885 * i386linux.c: Likewise.
886 * i386lynx.c: Likewise.
887 * i386mach3.c: Likewise.
888 * i386msdos.c: Likewise.
889 * i386os9k.c: Likewise.
890 * ieee.c: Likewise.
891 * ihex.c: Likewise.
892 * irix-core.c: Likewise.
893 * libaout.h: Likewise.
894 * libbfd-in.h: Likewise.
895 * libbfd.c: Likewise.
896 * libcoff-in.h: Likewise.
897 * libecoff.h: Likewise.
898 * libieee.h: Likewise.
899 * libnlm.h: Likewise.
900 * libpei.h: Likewise.
901 * libxcoff.h: Likewise.
902 * linker.c: Likewise.
903 * lynx-core.c: Likewise.
904 * m68klinux.c: Likewise.
905 * merge.c: Likewise.
906 * mipsbsd.c: Likewise.
907 * netbsd-core.c: Likewise.
908 * nlm.c: Likewise.
909 * nlm32-alpha.c: Likewise.
910 * nlm32-i386.c: Likewise.
911 * nlm32-ppc.c: Likewise.
912 * nlm32-sparc.c: Likewise.
913 * nlmcode.h: Likewise.
914 * nlmswap.h: Likewise.
915 * ns32k.h: Likewise.
916 * oasys.c: Likewise.
917 * opncls.c: Likewise.
918 * osf-core.c: Likewise.
919 * pc532-mach.c: Likewise.
920 * pdp11.c: Likewise.
921 * pe-mips.c: Likewise.
922 * peXXigen.c: Likewise.
923 * peicode.h: Likewise.
924 * ppcboot.c: Likewise.
925 * ptrace-core.c: Likewise.
926 * reloc.c: Likewise.
927 * reloc16.c: Likewise.
928 * riscix.c: Likewise.
929 * rs6000-core.c: Likewise.
930 * sco5-core.c: Likewise.
931 * section.c: Likewise.
932 * som.c: Likewise.
933 * sparclinux.c: Likewise.
934 * sparclynx.c: Likewise.
935 * srec.c: Likewise.
936 * stabs.c: Likewise.
937 * sunos.c: Likewise.
938 * syms.c: Likewise.
939 * targets.c: Likewise.
940 * tekhex.c: Likewise.
941 * trad-core.c: Likewise.
942 * versados.c: Likewise.
943 * vms-gsd.c: Likewise.
944 * vms-hdr.c: Likewise.
945 * vms-misc.c: Likewise.
946 * vms-tir.c: Likewise.
947 * vms.c: Likewise.
948 * vms.h: Likewise.
949 * xcofflink.c: Likewise.
950 * bfd-in2.h: Regenerate.
951 * libbfd.h: Regenerate.
952 * libcoff.h: Regenerate.
953
954 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
955 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
956 (ufile_ptr): Define.
957 (bfd_tell): Return a ufile_ptr.
958 * libbfd.c (bfd_tell): Likewise.
959 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
960 unnecessarily.
961 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
962 * aoutf1.h: Likewise.
963 * som.c: Likewise.
964 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
965 larger than unsigned long can represent.
966
967 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
968 size overflows size_t.
969 (bfd_realloc): Likewise.
970 (bfd_zmalloc): Likewise.
971 * opncls.c (bfd_alloc): Likewise.
972 (bfd_zalloc): Likewise.
973 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
974 (bfd_alloc, bfd_zalloc): Update.
975
976 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
977 8 bits.
978 (bfd_get_signed_8): Likewise.
979 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
980 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
981 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
982 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
983 * libaout.h: Likewise define and use here.
984 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
985 * aout-arm.c: Likewise.
986 * aout-encap.c: Likewise.
987 * aout-ns32k.c: Likewise.
988 * aout-tic30.c: Likewise.
989 * aoutf1.h: Likewise.
990 * aoutx.h: Likewise.
991 * bout.c: Likewise.
992 * coff-alpha.c: Likewise.
993 * coff-h8300.c: Likewise.
994 * coff-h8500.c: Likewise.
995 * coff-i960.c: Likewise.
996 * coff-ia64.c: Likewise.
997 * coff-m88k.c: Likewise.
998 * coff-mips.c: Likewise.
999 * coff-ppc.c: Likewise.
1000 * coff-rs6000.c: Likewise.
1001 * coff-sh.c: Likewise.
1002 * coff-sparc.c: Likewise.
1003 * coff-stgo32.c: Likewise.
1004 * coff-tic30.c: Likewise.
1005 * coff-tic80.c: Likewise.
1006 * coff-w65.c: Likewise.
1007 * coff-z8k.c: Likewise.
1008 * coff64-rs6000.c: Likewise.
1009 * coffgen.c: Likewise.
1010 * cofflink.c: Likewise.
1011 * coffswap.h: Likewise.
1012 * ecoff.c: Likewise.
1013 * ecoffswap.h: Likewise.
1014 * elf.c: Likewise.
1015 * elf32-mips.c: Likewise.
1016 * elf64-mips.c: Likewise.
1017 * hp300hpux.c: Likewise.
1018 * i386dynix.c: Likewise.
1019 * i386lynx.c: Likewise.
1020 * i386msdos.c: Likewise.
1021 * i386os9k.c: Likewise.
1022 * libpei.h: Likewise.
1023 * nlm32-alpha.c: Likewise.
1024 * nlm32-i386.c: Likewise.
1025 * nlm32-ppc.c: Likewise.
1026 * nlmcode.h: Likewise.
1027 * nlmswap.h: Likewise.
1028 * oasys.c: Likewise.
1029 * pdp11.c: Likewise.
1030 * pe-mips.c: Likewise.
1031 * peXXigen.c: Likewise.
1032 * peicode.h: Likewise.
1033 * riscix.c: Likewise.
1034 * sunos.c: Likewise.
1035 * xcofflink.c: Likewise.
1036 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1037 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1038 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1039 equivalent H_PUT_* macro instead.
1040 (GETWORD, GETHALF, GETBYTE): Similarly.
1041 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1042 (GETWORD, GETHALF, GETBYTE): Likewise.
1043 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1044
1045 * bfd-in.h (struct orl): Change "pos" to a union.
1046 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1047 (bsd_write_armap): Here too.
1048 (coff_write_armap): And here.
1049 * coff-rs6000.c (xcoff_write_armap_old): And here.
1050 (xcoff_write_one_armap_big): And here.
1051 (xcoff_write_armap_big): And here.
1052 * ecoff.c (_bfd_ecoff_write_armap): And here.
1053 * elf64-mips.c (mips_elf64_write_armap): And here.
1054
1055 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1056 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1057 * elf32-h8300.c (elf32_h8_mach): Likewise.
1058 * elf32-mips.c (elf_mips_mach): Likewise.
1059 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1060
1061 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1062 calls.
1063 (aix386_core_vec): Typo fix.
1064
1065 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1066 etc. to avoid redefined macro warning.
1067 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1068 (MY(fix_pcrel_26)): Likewise.
1069 * aout-ns32k.c (MY(put_reloc)): Likewise.
1070 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1071 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1072 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1073
1074 * aout-encap.c: Include "file", not <file> for binutils headers.
1075 (encap_object_p): Half baked attempt to fix compile errors in
1076 code dealing with "magic".
1077
1078 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1079 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1080 bfd_vma's rather than longs.
1081 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1082 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1083 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1084 remove case 3.
1085 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1086 Use unsigned comparisons.
1087 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1088 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1089 (_bfd_do_ns32k_reloc_contents): Likewise.
1090 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1091 (_bfd_ns32k_get_immediate): Likewise.
1092 (_bfd_ns32k_put_displacement): Likewise.
1093 (_bfd_ns32k_put_immediate): Likewise.
1094 (bfd_reloc_status_type): Likewise.
1095
1096 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1097 to avoid shadowing.
1098 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1099 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1100 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1101 avoid shadowing.
1102 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1103 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1104 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1105 shadow warning.
1106 (_bfd_elfcore_strndup): Likewise for "dup".
1107 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1108 "name" to avoid shadowing.
1109 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1110 definition of "off".
1111 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1112 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1113 definition of "s".
1114 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1115 "secpp".
1116 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1117 to avoid shadowing.
1118 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1119 to avoid shadowing.
1120 (elf_link_input_bfd): Likewise.
1121 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1122 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1123 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1124 "input_section".
1125 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1126 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1127 (sunos_write_dynamic_symbol): Remove unused vars.
1128 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1129 innermost "directory_name" and "file_name" vars.
1130 * tekhex.c (first_phase): Rename local var "type" to "stype".
1131 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1132 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1133 doing comparison at caller.
1134 (vms_esecflag_by_name): Likewise.
1135 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1136 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1137 (xcoff_write_global_symbol): Rename "p" param to "inf".
1138
1139 * cisco-core.c: Add missing prototypes.
1140 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1141 (cisco_core_file_failing_signal): Likewise.
1142 (cisco_core_file_matches_executable_p): Likewise.
1143 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1144 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1145 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1146 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1147
1148 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1149 thumb_glue_size and arm_glue_size.
1150 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1151
1152 * coff64-rs6000.c: Group prototypes together.
1153
1154 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1155 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1156
1157 * cpu-arc.c: Add missing prototypes.
1158 * cpu-h8500.c: Likewise.
1159 * cpu-i960.c: Likewise.
1160 * cpu-pj.c: Likewise.
1161 * cpu-sh.c: Likewise.
1162 * cpu-w65.c: Likewise.
1163 * cpu-z8k.c: Likewise.
1164 * elf32-fr30.c: Likewise.
1165 * elf32-h8300.c: Likewise.
1166 * elf32-i370.c: Likewise.
1167 * hpux-core.c: Likewise.
1168 * versados.c: Likewise.
1169
1170 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1171 * cpu-h8500.c: Likewise.
1172 * cpu-i960.c: Likewise.
1173 * cpu-z8k.c: Likewise.
1174
1175 * cpu-ia64-opc.c: Correct comment.
1176
1177 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1178
1179 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1180 to unsigned.
1181 (bfd_elf32_write_out_phdrs): Likewise.
1182 (bfd_elf64_write_out_phdrs): Likewise.
1183 (elf_linker_section_pointers): Change addend to bfd_vma.
1184 (_bfd_elf_find_pointer_linker_section): Likewise.
1185 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1186 filepos to unsigned file_ptr.
1187 (_bfd_elfcore_strndup): Change max param to size_t.
1188 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1189 (_bfd_elfcore_strndup): Likewise.
1190 (_bfd_elf_find_pointer_linker_section): Likewise.
1191
1192 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1193 insn and sym_value to ints.
1194
1195 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1196 bfd_size_type.
1197 (elfcore_read_notes): Likewise.
1198
1199 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1200 param from unsigned char to int.
1201 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1202 for info_to_howto call.
1203 (add_dynamic_entry): Define macro.
1204 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1205
1206 * elf32-cris.c (add_dynamic_entry): Define macro.
1207 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1208
1209 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1210 (elf32_h8_object_p): Likewise.
1211 (elf32_h8_merge_private_bfd_data): Likewise.
1212 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1213
1214 * elf32-hppa.c (add_dynamic_entry): Define macro.
1215 (elf32_hppa_size_dynamic_sections): Use it.
1216 * elf32-i370.c (add_dynamic_entry): Define macro.
1217 (i370_elf_size_dynamic_sections): Use it.
1218 (i370_noop): Make static.
1219 * elf32-i386.c (add_dynamic_entry): Define macro.
1220 (elf_i386_size_dynamic_sections): Use it.
1221 * elf32-m68k.c (add_dynamic_entry): Define macro.
1222 (elf_m68k_size_dynamic_sections): Use it.
1223 * elf32-ppc.c (add_dynamic_entry): Define macro.
1224 (ppc_elf_size_dynamic_sections): Use it.
1225 * elf32-s390.c (add_dynamic_entry): Define macro.
1226 (elf_s390_size_dynamic_sections): Use it.
1227 * elf64-alpha.c (add_dynamic_entry): Define macro.
1228 (elf64_alpha_size_dynamic_sections): Use it.
1229 * elf64-hppa.c (add_dynamic_entry): Define macro.
1230 (elf64_hppa_size_dynamic_sections): Use it.
1231 * elf64-ppc.c (add_dynamic_entry): Define macro.
1232 (ppc64_elf_size_dynamic_sections): Use it.
1233 * elf64-s390.c (add_dynamic_entry): Define macro.
1234 (elf_s390_size_dynamic_sections): Use it.
1235 * elf64-sparc.c (add_dynamic_entry): Define macro.
1236 (sparc64_elf_size_dynamic_sections): Use it.
1237 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1238 (elf64_x86_64_size_dynamic_sections): Use it.
1239 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1240 (elfNN_ia64_size_dynamic_sections): Use it.
1241
1242 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1243 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1244
1245 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1246 false if the first malloc fails rather than going via error_return.
1247
1248 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1249 "index" param.
1250 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1251
1252 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1253
1254 * elfxx-ia64.c (global_sym_index): Return a long.
1255
1256 * ieee.c (get_symbol): Use int rather than char param.
1257 (ieee_slurp_sections): Move "section" var to inner blocks.
1258 (copy_expression): Don't init "value" to zero or worry about
1259 clearing to zero after using.
1260 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1261 shadowing.
1262
1263 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1264 unsigned int.
1265
1266 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1267 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1268
1269 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1270
1271 * pc532-mach.c (MYNSX): Delete.
1272 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1273 (write_object_contents): Correct prototype.
1274
1275 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1276 than unsigned short.
1277
1278 * section.c (bfd_set_section_contents): Remove redundant
1279 "offset < 0" test. Check that "count" doesn't overflow size_t.
1280 (bfd_get_section_contents): Likewise.
1281
1282 * som.c (som_fixup_formats): Add missing braces.
1283 (som_reloc_addend): Pass a bfd_vma for "addend".
1284
1285 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1286 (srec_write_symbols): Remove an unnecessary var.
1287
1288 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1289 to match.
1290 * configure.in: Sort to match. Bump version number.
1291 * configure: Regenerate.
1292
1293 * tekhex.c (move_section_contents): Assert offset == 0.
1294
1295 * versados.c (new_symbol_string): Constify arg.
1296 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1297 (versados_get_symbol_info): Make static.
1298 (versados_print_symbol): Likewise.
1299 (versados_get_reloc_upper_bound): Likewise.
1300 (versados_canonicalize_reloc): Likewise.
1301
417412a2
NC
13022001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1303
1304 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1305
bb731fb6
L
13062001-09-17 H.J. Lu <hjl@gnu.org>
1307
1308 * dwarf1.c (parse_die): Take a new arg for the end of the
1309 section. Return false if die is beyond the section.
1310 (parse_functions_in_unit): Pass the end of the section to
1311 parse_die ().
1312 (_bfd_dwarf1_find_nearest_line): Likewise.
1313
841989d6
NC
13142001-09-14 Michael Rauch <mrauch@netbsd.org>
1315
1316 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1317 just like R_SPARC_32.
1318
056a1d49
NC
13192001-09-14 Kevin Lo <kevlo@openbsd.org>
1320
1321 * configure.bfd: Add arm-openbsd target.
1322
4008bd9b
TS
13232001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1324
1325 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1326 Add support for mips64.
1327
c11cc227
AO
13282001-09-13 Alexandre Oliva <aoliva@redhat.com>
1329
1330 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1331
aa4f99bb
AO
13322001-09-12 Alexandre Oliva <aoliva@redhat.com>
1333
1334 * elf.c (prep_headers): Get the machine code from the elf
1335 backend data.
1336 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1337 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1338 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1339 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1340 * elf-arc.c (arc_elf_final_write_processing): Don't override
1341 e_machine, it's now properly set in prep_headers.
1342 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1343 EM_AVR_OLD.
1344 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1345 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1346 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1347 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1348 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1349 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1350 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1351 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1352 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1353 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1354 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1355 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1356
204692d7
RH
13572001-09-11 Richard Henderson <rth@redhat.com>
1358
1359 * elf64-alpha.c (elf64_alpha_section_flags): New.
1360 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1361
f94952df
RH
13622001-09-11 Richard Henderson <rth@redhat.com>
1363
1364 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1365 apply HINT relocations against dynamic symbols.
1366
146f1a87
L
13672001-09-11 H.J. Lu <hjl@gnu.org>
1368
f94952df 1369 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 1370
1cd6895c
RH
13712001-09-09 Richard Henderson <rth@redhat.com>
1372
96e2734b
RH
1373 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1374
1cd6895c
RH
1375 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1376 following a call to a near function.
1377
f16fbd61
RH
13782001-09-08 Richard Henderson <rth@redhat.com>
1379
1380 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1381 relocation errors. Fail gp-relative relocations against
1382 dynamic symbols.
1383
56882138
AM
13842001-09-08 Alan Modra <amodra@bigpond.net.au>
1385
1386 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1387 as well as DEF_DYNAMIC in test for avoided copy relocs.
1388 (allocate_plt_and_got_and_discard_relocs): Likewise.
1389 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1390 (allocate_plt_and_got_and_discard_relocs): Likewise.
1391
cb56d3d3
TS
13922001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1393
1394 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1395 of R_MIPS_PC16.
56882138
AM
1396
13972001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1398
1399 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1400 definitions.
1401 (mips_elf64_howto_table_rel): Likewise.
1402
14032001-09-05 Tom Rix <trix@redhat.com>
1404
1405 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1406 and syscall symbols.
1407 (write_global_symbol) : Same.
1408 (bfd_xcoff_export_symbol): Remove unused syscall param.
1409 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1410 bfd_xcoff_import_symbol.
1411 * bfd-in.h: Same.
1412 * bfd-in2.h : Regenerate.
1413
14142001-09-04 Richard Henderson <rth@redhat.com>
1415
1416 * elf64-alpha.c (SKIP_HOWTO): New.
1417 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1418 Fix sizes of 16-bit mem format relocs.
1419 (elf64_alpha_reloc_map): Update to match.
1420 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1421 (elf64_alpha_relax_without_lituse): Likewise.
1422 (elf64_alpha_check_relocs): Handle GPREL16.
1423 (elf64_alpha_relocate_section): Likewise.
1424 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1425 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1426 * bfd-in2.h, libbfd.h: Rebuild.
1427
14282001-09-04 Jeff Law <law@redhat.com>
1429
1430 * elf32-h8300.c (elf32_h8_relax_section): New function.
1431 (elf32_h8_relax_delete_bytes): Likewise.
1432 (elf32_h8_symbol_address_p): Likewise.
1433 (elf32_h8_get_relocated_section_contents): Likewise.
1434 (bfd_elf32_bfd_relax_section): Define.
1435 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1436
1437 * elf32-h8300.c (special): New function.
1438 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1439 all relocations.
1440 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1441 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1442 Fix minor problems with 8bit and 16bit PC relative relocations.
1443
14442001-09-01 Andreas Jaeger <aj@suse.de>
1445
1446 * vms-tir.c: Add missing prototypes.
1447 * vms-hdr.c: Likewise.
1448 * vms-gsd.c: Likewise.
1449 * vms-misc.c: Likewise.
1450
14512001-08-31 H.J. Lu <hjl@gnu.org>
1452
1453 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1454 with bad relocation.
1455
14562001-08-31 Eric Christopher <echristo@redhat.com>
1457 Jason Eckhardt <jle@redhat.com>
1458
1459 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1460 mips32_4k and mips64.
1461 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1462 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1463 * bfd/cpu-mips.c: Ditto.
1464 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1465 * bfd/bfd-in2.h: Regenerate.
1466
14672001-08-31 Jakub Jelinek <jakub@redhat.com>
1468
1469 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1470 value into R_ALPHA_RELATIVE's addend.
1471 (elf64_alpha_finish_dynamic_symbol): Likewise.
1472
14732001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1474
1475 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1476 recomputed addend during relocatable link if not USE_REL.
1477
1478 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1479 error.
1480
14812001-08-30 H.J. Lu <hjl@gnu.org>
1482
1483 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1484 2 changes.
1485 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1486 relocations for weak definitions.
1487
14882001-08-30 H.J. Lu <hjl@gnu.org>
1489
1490 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1491 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1492 * Makefile.in: Rebuild.
1493
14942001-08-30 H.J. Lu <hjl@gnu.org>
1495
1496 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1497 dynamic relocation for undefined weak symbols when creating
1498 executables. Check h->root.root.type, instead of h->root.type.
1499
15002001-08-29 Joel Sherrill <joel@OARcorp.com>
1501
1502 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1503 default from coff to elf.
1504
15052001-08-29 Jeff Law <law@redhat.com>
1506
1507 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1508 relocations.
1509 (h8_reloc_map): Similarly.
1510 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1511 Add support for PC relative relocations.
1512
1513 * elf32-h8300.c: Put all prototypes together.
1514 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1515 (elf32_h8_final_link_relocate): New function for linker.
1516 (elf32_h8_relocate_section): Similarly.
1517 (elf_backend_relocate_section): Define.
1518
1519 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1520 (h8300_scan): Handle architecture:machine encodings typically
1521 found in linker scripts.
1522 * elf.c (prep_headers): Do not try to do H8 machine recognition
1523 here.
1524 * elf32-h8300.c: Add some missing prototypes.
1525 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1526 (elf32_h8_object_p): Similarly.
1527
15282001-08-29 Tom Rix <trix@redhat.com>
1529
1530 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1531 does not follow a XTY_SD.
1532
15332001-08-29 Alan Modra <amodra@bigpond.net.au>
1534
1535 * targmatch.sed: Delete case statements.
1536 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1537 aix4.3 and above.
1538
1539Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1540
1541 * Makefile.am (elf32-h8300.lo): New target.
1542 * config.bfd (h8300*-*-elf): New case.
1543 * configure.in (bfd_elf32_h8300_vec): New case.
1544 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1545 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1546 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1547 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1548 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1549 * elf32-h8300.c: New file.
1550 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1551
15522001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1553
1554 * sparclynx.c: Add missing prototypes.
1555 * coff-mcore.c: Add missing prototypes.
1556 * elf32-pj.c: Add missing prototypes.
1557 * nlm32-sparc.c: Add missing prototypes.
1558 * oasys.c: Add missing prototypes.
1559 * pdp11.c: Add missing prototypes.
1560 * pe-mips.c: Add missing prototypes.
1561 * riscix.c: Add missing prototypes.
1562
15632001-08-27 Daniel Jacobowitz <drow@mvista.com>
1564
1565 * elf32-i386.c: Add missing prototypes.
1566 * elf32-ppc.c: Likewise.
1567 * elf32-sh-lin.c: Likewise.
1568 * elfarm-nabi.c: Likewise.
1569
15702001-08-27 Daniel Jacobowitz <drow@mvista.com>
1571
1572 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1573 (elf_i386_grok_psinfo): New function.
1574 (elf_backend_grok_prstatus): Define.
1575 (elf_backend_grok_psinfo): Likewise.
1576 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1577 (ppc_elf_grok_psinfo): New function.
1578 (elf_backend_grok_prstatus): Define.
1579 (elf_backend_grok_psinfo): Likewise.
1580 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1581 (elf32_shlin_grok_psinfo): New function.
1582 (elf_backend_grok_prstatus): Define.
1583 (elf_backend_grok_psinfo): Likewise.
1584 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1585 (elf32_arm_nabi_grok_psinfo): New function.
1586 (elf_backend_grok_prstatus): Define.
1587 (elf_backend_grok_psinfo): Likewise.
1588
15892001-08-27 H.J. Lu <hjl@gnu.org>
1590
1591 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1592 sanity check.
1593 (mips_elf_calculate_relocation): Create dynamic relocation for
1594 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1595 bit is not set.
1596
15972001-08-27 H.J. Lu <hjl@gnu.org>
1598
1599 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1600 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1601 (_bfd_elf32_mips_grok_prstatus): Likewise.
1602 (_bfd_elf32_mips_grok_psinfo): Likewise.
1603 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1604 `struct mips_elf_link_hash_entry *'.
1605 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1606
16072001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1608
1609 * mipsbsd.c: Add missing prototypes.
1610 * hp300hpux.c: Add missing prototypes.
1611 * i386aout.c: Add missing prototypes.
1612 * i386lynx.c: Add missing prototypes.
1613 * i386mach3.c: Add missing prototypes.
1614 * i386msdos.c: Add missing prototypes.
1615 * i386os9k.c: Add missing prototypes.
1616
16172001-08-27 Linus Nordberg <linus@swox.se>
1618 Torbjorn Granlund <tege@swox.com>
1619 Staffan Ulfberg <staffanu@swox.se>
1620 Alan Modra <amodra@bigpond.net.au>
1621
1622 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1623 targ64_selvecs for 32 bit powerpc targets.
1624 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1625 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1626 Run "make dep-am".
1627 * Makefile.in: Regenerate.
1628 * configure.in: Add elf64_powerpc vecs.
1629 * configure: Regenerate.
1630 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1631 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1632 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1633 * elf64-ppc.c: New file.
1634 * reloc.c: Add powerpc64 relocs.
1635 * libbfd.h: Regenerate.
1636 * bfd-in2.h: Regenerate.
1637
16382001-08-27 Andreas Schwab <schwab@suse.de>
1639
1640 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1641 reloc is against read-only section.
1642 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1643 looking up section names for DT_TEXTREL.
1644 (elf32_m68k_reloc_type_class): New function.
1645 (elf_backend_reloc_type_class): Define.
1646
16472001-08-27 Andreas Jaeger <aj@suse.de>
1648
1649 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1650 reloc is against read-only section.
1651 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1652 looking up section names for DT_TEXTREL.
1653 (elf_s390_reloc_type_class): New.
1654 (elf_backend_reloc_type_class): Define.
1655
1656 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1657 reloc is against read-only section.
1658 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1659 looking up section names for DT_TEXTREL.
1660 (elf_s390_reloc_type_class): New.
1661 (elf_backend_reloc_type_class): Define.
1662
1663 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1664 is against read-only section.
1665 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1666 looking up section names for DT_TEXTREL.
1667 (ppc_elf_reloc_type_class): New.
1668 (elf_backend_reloc_type_class): Define.
1669
16702001-08-26 Andreas Jaeger <aj@suse.de>
1671
1672 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1673 reloc is against read-only section.
1674 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1675 looking up section names for DT_TEXTREL.
1676 (elf_cris_reloc_type_class): New.
1677 (elf_backend_reloc_type_class): Define.
1678
1679 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1680 against read-only section.
1681 (elf_backend_reloc_type_class): Define.
1682 (sh_elf_reloc_type_class): New.
1683 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1684 looking up section names for DT_TEXTREL.
1685
1686 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1687 reloc is against read-only section.
1688 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1689 looking up section names for DT_TEXTREL.
1690 (elf32_arm_reloc_type_class): New.
1691 (elf_backend_reloc_type_class): Define.
1692
16932001-08-25 Andreas Jaeger <aj@suse.de>
1694
1695 * oasys.c: Add missing prototypes.
1696
1697 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1698 attribute for parameter.
1699 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1700
1701 * versados.c (get_4): Make static.
1702 (get_10): Make static.
1703 Add missing prototypes.
1704 (process_esd): Fix call to versados_new_symbol.
1705
17062001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1707
1708 * coff-a29k.c: Add missing prototypes.
1709 * coff-apollo.c: Add missing prototypes.
1710 * coff-arm.c: Add missing prototypes.
1711 * coff-i860.c: Add missing prototypes.
1712 * coff-rs6000.c: Add missing prototypes.
1713 * coff-tic80.c: Add missing prototypes.
1714 * elf-m10200.c: Add missing prototypes.
1715 * elf-m10300.c: Add missing prototypes.
1716 * elf32-arm.h: Add missing prototypes.
1717 * elf32-d10v.c: Add missing prototypes.
1718 * elf32-m32r.c: Add missing prototypes.
1719 * elf32-mcore.c: Add missing prototypes.
1720 * elf32-openrisc.c: Add missing prototypes.
1721 * elf32-sh.c: Add missing prototypes.
1722 * elf32-sparc.c: Add missing prototypes.
1723 * elf32-v850.c: Add missing prototypes.
1724 * elfarm-nabi.c: Add missing prototypes.
1725 * elfarm-oabi.c: Add missing prototypes.
1726
17272001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1728
1729 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1730 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1731
17322001-08-24 H.J. Lu <hjl@gnu.org>
1733
1734 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1735 hash structure.
1736
17372001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1738
1739 * elf-bfd.h (elf_hash_table): Revert definition.
1740 (is_elf_hash_table): New macro.
1741 * elflink.h (elf_link_add_object_symbols): Test
1742 is_elf_hash_table before accessing ELF only fields in hash
1743 structure.
1744 (elf_link_create_dynamic_sections): Fail if not using an ELF
1745 hash structure.
1746 (elf_add_dynamic_entry): Fail if not using an ELF hash
1747 structure.
1748 (elf_link_record_local_dynamic_symbol): Fail if not using an
1749 ELF hash structure.
1750 (size_dynamic_sections): Fail if not using an ELF hash
1751 structure.
1752 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1753 hash structure.
1754 (elf_bfd_final_link): Fail if not using an ELF hash
1755 structure.
1756
17572001-08-24 H.J. Lu <hjl@gnu.org>
1758
1759 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1760 table is not an ELF linker hash table.
1761
1762 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1763 table type to bfd_link_elf_hash_table.
1764
1765 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1766 the last change.
1767
1768 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1769 table type to bfd_link_generic_hash_table.
1770
17712001-08-24 Alexandre Oliva <aoliva@redhat.com>
1772
1773 * bfd.c (bfd_alt_mach_code): New function.
1774 * bfd-in2.h: Rebuilt.
1775
17762001-08-24 Alexandre Oliva <aoliva@redhat.com>
1777
1778 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1779 `type' field in the hash entry when deciding whether to follow a
1780 link.
1781
17822001-08-24 Jakub Jelinek <jakub@redhat.com>
1783
1784 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1785 last.
1786 (elf_link_sort_relocs): Adjust accordingly.
1787
1788 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
1789 (elf64_alpha_check_relocs): Set it if section this reloc is against
1790 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
1791 read-only section.
1792 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
1793 is is against read-only section.
1794 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
1795 check section names.
1796 (elf64_alpha_reloc_type_class): New.
1797 (elf_backend_reloc_type_class): Define.
1798
17992001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1800
1801 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1802 by bfd_malloc().
1803
18042001-08-23 Andreas Jaeger <aj@suse.de>
1805
1806 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
1807 the reloc is against read-only section.
1808 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
1809 of looking up section names for DT_TEXTREL.
1810 (elf64_x86_64_reloc_type_class): New.
1811 (elf_backend_reloc_type_class): Define.
1812
18132001-08-23 H.J. Lu <hjl@gnu.org>
1814
1815 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1816 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
1817
1818 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
1819 bfd_print_symbol_vandf.
1820 * coffgen.c (coff_print_symbol): Likewise.
1821 * elf.c (bfd_elf_print_symbol): Likewise.
1822 * ieee.c (ieee_print_symbol): Likewise.
1823 * nlmcode.h (nlm_print_symbol): Likewise.
1824 * oasys.c (oasys_print_symbol): Likewise.
1825 * pdp11.c (NAME(aout,print_symbol)): Likewise.
1826 * som.c (som_print_symbol): Likewise.
1827 * srec.c (srec_print_symbol): Likewise.
1828 * tekhex.c (tekhex_print_symbol): Likewise.
1829 * versados.c (versados_print_symbol): Likewise.
1830 * vms.c (vms_print_symbol): Likewise.
1831
1832 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
1833 with bfd_fprintf_vma.
1834 (bfd_elf_print_symbol): Likewise.
1835 * syms.c (bfd_print_symbol_vandf): Likewise.
1836
18372001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1838
1839 * aoutf1.h (sunos_write_object_contents): Silence compile time
1840 warning.
1841 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
1842
1843 * bout.c: Add missing function prototypes. Fix formatting.
1844 * coff-z8k.c: Add missing function prototypes. Fix formatting.
1845 * coff-w65.c: Add missing function prototypes. Fix formatting.
1846 * coff-h8500.c: Add missing function prototypes. Fix formatting.
1847 * coff-h8300.c: Add missing function prototypes. Fix formatting.
1848 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
1849 * coff-tic30.c: Add missing function prototypes. Fix formatting.
1850 * coff-m68k.c: Add missing function prototypes. Fix formatting.
1851 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
1852 * coff-sh.c: Add missing function prototypes. Fix formatting.
1853
18542001-08-23 Jakub Jelinek <jakub@redhat.com>
1855
1856 * elf-bfd.h (enum elf_reloc_type_class): New.
1857 (struct elf_backend_data): Add elf_backend_reloc_type_class.
1858 (_bfd_elf_reloc_type_class): New.
1859 * elfxx-target.h (elf_backend_reloc_type_class): Define.
1860 (elfNN_bed): Add elf_backend_reloc_type_class.
1861 * elf.c (_bfd_elf_reloc_type_class): New.
1862 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
1863 is against read-only section.
1864 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
1865 looking up section names for DT_TEXTREL.
1866 (elf_i386_reloc_type_class): New.
1867 (elf_backend_reloc_type_class): Define.
1868 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
1869 reloc is against read-only section.
1870 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
1871 looking up section names for DT_TEXTREL.
1872 (elf32_sparc_reloc_type_class): New.
1873 (elf_backend_reloc_type_class): Define.
1874 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
1875 reloc is against read-only section.
1876 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1877 looking up section names for DT_TEXTREL.
1878 (sparc64_elf_reloc_type_class): New.
1879 (elf_backend_reloc_type_class): Define.
1880 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
1881 (elfNN_ia64_hash_table_create): Clear ia64_info.
1882 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
1883 section.
1884 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
1885 instead of looking up section names for DT_TEXTREL.
1886 (elfNN_ia64_reloc_type_class): New.
1887 (elf_backend_reloc_type_class): Define.
1888 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
1889 (struct elf_link_sort_rela): New.
1890 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
1891 (elf_bfd_final_link): Call elf_link_sort_relocs.
1892 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
1893 necessary.
1894
18952001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1896
1897 * configure.in (x86-bsdi): No corefile support.
1898 * configure: Regenerate.
1899
19002001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
1901
1902 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
1903 comma.
1904
19052001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
1906
1907 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
1908 the alignment of dwarf2 linkonce sections to 0.
1909 * coff-sto32.c: Likewise.
1910
19112001-08-20 Andreas Jaeger <aj@suse.de>
1912
1913 * coff-sparc.c: Add missing prototypes.
1914 * elf32-s390.c: Likewise.
1915 * elf32-i960.c: Likewise.
1916 * aout-target.h: Likewise.
1917
19182001-08-20 H.J. Lu <hjl@gnu.org>
1919
1920 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
1921 (elf_num_section_syms): New for num_section_syms.
1922
1923 * elf.c (elf_map_symbols): Set num_section_syms.
1924 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
1925 the section symbol index.
1926
19272001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
1928
1929 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
1930 select the generic has table creator. All elf backends need elf
1931 specific fields in the hash table.
1932
19332001-08-20 Alan Modra <amodra@bigpond.net.au>
1934
1935 * archive.c (offsetof): Remove define.
1936 * elf.c: Likewise.
1937 * oasys.c: Likewise
1938 * sysdep.h (offsetof): Define.
1939
19402001-08-17 Alan Modra <amodra@bigpond.net.au>
1941
1942 * bfd.c (bfd_get_gp_size): Return an unsigned int.
1943 (bfd_set_gp_size): Make param unsigned.
1944 * bfd-in2.h: Regenerate.
1945 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
1946 than calling bfd_get_gp_size.
1947 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1948 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1949
19502001-08-17 Alan Modra <amodra@bigpond.net.au>
1951
1952 * linker.c (default_fill_link_order): Handle four byte fill value.
1953
19542001-08-17 Alan Modra <amodra@bigpond.net.au>
1955
1956 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
1957 prototype.
1958 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
1959
1960 * elf64-mips.c (UNUSED_RELOC): Define.
1961 (mips_elf64_howto_table_rel): Use it.
1962 (mips_elf64_howto_table_rela): Here too.
1963 (mips_elf64_write_relocs): Fix signed/unsigned warning.
1964
1965 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
1966 silence warning.
1967 * coffgen.c (coff_print_symbol): Fix warnings.
1968 (coff_find_nearest_line): Likewise.
1969 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1970 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
1971 * format.c (bfd_check_format_matches): Likewise.
1972 (bfd_set_format): Likewise.
1973 * coff-ia64.c: Add missing prototypes.
1974 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
1975 signed to silence warnings.
1976 (elf64_alpha_relocate_section): Likewise.
1977 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
1978 (elf64_alpha_add_symbol_hook): Likewise.
1979 (elf64_alpha_final_link): Likewise.
1980 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
1981 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
1982 (elf64_alpha_size_got_sections): Likewise.
1983 * elfxx-ia64.c: Add missing prototypes.
1984 (elfNN_ia64_relocate_section): Fix warning.
1985 (elfNN_ia64_unwind_entry_compare): Make params const.
1986
19872001-08-17 Alan Modra <amodra@bigpond.net.au>
1988
1989 * config.bfd (targ64_selvecs): New.
1990 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
1991
1992 * bfd-in.h (BFD_VERSION): Remove wrong comment.
1993 (BFD_DEFAULT_TARGET_SIZE): New.
1994 (BFD_ARCH_SIZE): Comment.
1995 * configure.in (target_size): New. Set instead of target64 in
1996 selvecs case statement. Set target64 from it.
1997 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
1998 * bfd-in2.h: Regenerate.
1999 * configure: Regenerate.
2000
20012001-08-17 Alan Modra <amodra@bigpond.net.au>
2002
2003 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2004 (bfd_errmsgs): Add corresponding message.
2005 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2006 finding an archive that contains different format object files.
2007 Return bfd_error_wrong_object_format for this case.
2008 * format.c: Formatting fixes. s/CONST/const/.
2009 (bfd_check_format_matches): Accept archives that give
2010 bfd_error_wrong_object_format if no full match is found. Tidy
2011 code handling matching_vector. Don't return a pointer to freed
2012 memory in `matching'. Handle ambiguous matches as for partial
2013 archive matches.
2014 * bfd-in2.h: Regenerate.
2015
20162001-08-15 Alan Modra <amodra@bigpond.net.au>
2017
2018 * libieee.h (common_header_type): Add last_byte field.
2019
2020 * ieee.c: Add missing prototypes. Some format fixes.
2021 (struct output_buffer_struct): Move for availability to prototypes.
2022 (ieee_part_after): New function.
2023 (ieee_slurp_debug): Use it here.
2024 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2025 ieee_part_after to set last_byte to one past end of current part.
2026 Update callers.
2027 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2028 Update callers.
2029 (parse_expression): Don't go beyond the end of the current part.
2030 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2031 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2032 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2033 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2034 ieee_set_section_contents, ieee_write_object_contents,
2035 ieee_make_empty_symbol): Make static.
2036 (ieee_archive_p): Correct comments regarding bfd_read.
2037 (ieee_object_p): Similarly.
2038 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2039 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2040 input_bfd, output_bfd, output_buffer.
2041 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2042 do_with_relocs, ie. as a symbol for relocatable files.
2043 (ieee_vec): Add comments showing functions referenced by macros.
2044
20452001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2046
2047 * aout-tic30.c: Add missing prototypes. Fix formatting.
2048 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2049 * peXXigen.c: Add missining prototypes. Fix formatting.
2050 * aout-adobe.c: Add missining prototypes. Fix formatting.
2051
20522001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2053
2054 * elf32-v850.c: Add missing function prototypes.
2055 Fix some formatting.
2056
2057 * cpu-v850.c: Add missing function prototype.
2058 Fix some formatting.
2059
20602001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2061
2062 * elf-bfd.h (struct elf_backend_data): Add new fields
2063 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2064 (bfd_elf_sprintf_vma): Rename function prototype to
2065 '_bfd_elf_sprintf_vma'.
2066 (bfd_elf_fprintf_vma): Rename function prototype to
2067 '_bfd_elf_fprintf_vma'.
2068 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2069 directly, instead indirect via the elf_backend_data structure.
2070 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2071 instead indirect via the elf_backend_data structure.
2072 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2073 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2074 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2075 already defined.
2076 (elf_backend_fprintf_vma): Initialise if not already defined.
2077 (struct elf_backend_data): Initialise the
2078 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2079
20802001-08-10 Andreas Jaeger <aj@suse.de>
2081
2082 * elf64-sparc.c: Add missing prototypes.
2083 * elf32-cris.c: Likewise.
2084 * elf32-i370.c: Likewise.
2085 * elf64-hppa.c: Likewise.
2086 * elf64-s390.c: Likewise.
2087
20882001-08-10 Andreas Jaeger <aj@suse.de>
2089
2090 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2091 Add prototypes where needed.
2092
20932001-08-10 H.J. Lu <hjl@gnu.org>
2094
2095 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2096 (bfd_fprintf_vma): Likewise.
2097
20982001-08-10 H.J. Lu <hjl@gnu.org>
2099
2100 * bfd.c (bfd_sprintf_vma): Don't return void.
2101 (bfd_fprintf_vma): Likewise.
2102
21032001-08-10 Andreas Jaeger <aj@suse.de>
2104
2105 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2106 to build warnings.
2107 * configure: Regenerate.
2108
21092001-08-10 Alan Modra <amodra@bigpond.net.au>
2110
2111 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2112 warning if not BFD64. Add braces so emacs auto format works.
2113 (bfd_elf_fprintf_vma): Likewise.
2114
2115 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2116 of _xcoff_swap_ld*.
2117 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2118 param to agree with libxcoff.h.
2119 (xcoff_swap_ldhdr_out): Likewise.
2120 (xcoff_swap_ldsym_in): Likewise.
2121 (xcoff_swap_ldsym_out): Likewise.
2122 (xcoff_swap_ldrel_in): Likewise.
2123 (xcoff_swap_ldrel_out): Likewise.
2124 (xcoff_create_csect_from_smclas): Likewise.
2125 * coff64-rs6000.c: Add missing prototypes.
2126 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2127 with libxcoff.h.
2128 (xcoff64_swap_ldhdr_out): Likewise.
2129 (xcoff64_swap_ldsym_in): Likewise.
2130 (xcoff64_swap_ldsym_out): Likewise.
2131 (xcoff64_swap_ldrel_in): Likewise.
2132 (xcoff64_swap_ldrel_out): Likewise.
2133 (xcoff64_ppc_relocate_section): Make static.
2134 (xcoff64_slurp_armap): Likewise.
2135 (xcoff64_archive_p): Likewise.
2136 (xcoff64_openr_next_archived_file): Likewise.
2137 (xcoff64_sizeof_headers): Likewise.
2138 (xcoff64_is_lineno_count_overflow): Likewise.
2139 (xcoff64_is_reloc_count_overflow): Likewise.
2140 (xcoff64_loader_symbol_offset): Likewise.
2141 (xcoff64_loader_reloc_offset): Likewise.
2142 * elf64-gen.c: Add missing prototypes.
2143
21442001-08-09 H.J. Lu <hjl@gnu.org>
2145
2146 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2147 (bfd_elf_fprintf_vma): Likewise.
2148
21492001-08-09 H.J. Lu <hjl@gnu.org>
2150
2151 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2152 to ...
2153 * elf-bfd.h: Here.
2154 * bfd-in2.h: Regenerated.
2155
21562001-08-09 H.J. Lu <hjl@gnu.org>
2157
2158 * bfd-in.h (bfd_sprintf_vma): New prototype.
2159 (bfd_fprintf_vma): Likewise.
2160 (bfd_elf_sprintf_vma): Likewise.
2161 (bfd_elf_fprintf_vma): Likewise.
2162 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2163 * bfd-in2.h: Regenerated.
2164
2165 * bfd.c (bfd_sprintf_vma): New. Defined.
2166 (bfd_fprintf_vma): Likewise.
2167
2168 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2169 (bfd_elf_fprintf_vma): Likewise.
2170
21712001-08-09 Alan Modra <amodra@bigpond.net.au>
2172
2173 * coff-rs6000.c: Add missing prototypes.
2174 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2175 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2176 xcoff_loader_reloc_offset): Make static.
2177 * dwarf1.c: Add missing prototypes.
2178 * dwarf2.c: Add missing prototypes.
2179 (struct abbrev_info): Move definition.
2180 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2181 * elf.c: Add missing prototypes.
2182 * elf32-gen.c: Likewise.
2183 * elf32-i386.c: Likewise.
2184 * elf32-ppc.c: Likewise.
2185 (ppc_elf_sort_rela): Use PTR instead of "void *".
2186 * elflink.h: Add missing prototypes. Formatting fixes.
2187 * merge.c: Add missing prototypes.
2188 (last4_eq): Use PTR instead of "void *".
2189 (last_eq): Likewise.
2190 * syms.c: Add missing prototypes.
2191
21922001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2193
2194 * bfd.c: Fix formatting.
2195 * bfd-in2.h: Regenerate.
2196
21972001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2198
2199 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2200 true (this target uses REL relocations) and 'pcrel_offset' to
2201 false (the PC is implied, not stored in the offset).
2202
22032001-08-08 Alan Modra <amodra@bigpond.net.au>
2204
2205 1999-10-19 Linus Nordberg <linus@swox.se>
2206 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2207 * elfxx-target.h (elf_backend_want_got_sym): Define.
2208 (elfNN_bed): Add elf_backend_want_got_sym.
2209 * elflink.c (_bfd_elf_create_got_section): Define
2210 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2211
22122001-08-08 Alexandre Oliva <aoliva@redhat.com>
2213
2214 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2215 (find_rela_addend): New function.
2216 (parse_comp_unit): Call it to find the abbrev offset addend.
2217 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2218 members of dwarf2_debug as debugging information is read.
2219
22202001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2221
2222 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2223 targets as well as sh-pe.
2224
22252001-08-03 Ben Harris <bjh21@netbsd.org>
2226
2227 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2228 reloc from start of section when computing value for R_ARM_REL32
2229 reloc.
2230
22312001-08-03 Alan Modra <amodra@bigpond.net.au>
2232
2233 From H.J. Lu <hjl@gnu.org>
2234 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2235 keep relocs for undefined syms if there are no dynamic sections in
2236 executable.
2237 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2238
22392001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2240
2241 * cofflink.c (coff_link_check_ar_symbols): also search for
2242 __imp__symbol as well as _symbol.
2243 * linker.c (_bfd_generic_link_add_archive_symbols): also
2244 search for __imp__symbol as well as _symbol.
2245
22462001-08-01 Adam Nemet <anemet@lnxw.com>
2247
2248 * elf.c (elf_sort_sections): Return zero only as the last step.
2249
22502001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2251
2252 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2253 ARM_COFF_BUGFIX.
2254 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2255 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2256 ARM_COFF_BUGFIX.
2257
22582001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2259
2260 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2261 to match corresponding bfd_coff_backend data member.
2262
22632001-07-24 Alan Modra <amodra@bigpond.net.au>
2264
2265 * Makefile.am: Update dependencies with "make dep-am".
2266 * Makefile.in: Regenerate
2267
22682001-07-15 H.J. Lu <hjl@gnu.org>
2269
2270 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2271 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2272 * Makefile.in: Regenerate.
2273
22742001-07-11 H.J. Lu <hjl@gnu.org>
2275
2276 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2277 flags when creating the reloc section if the ALLOC flag in the
2278 source section is set.
2279
22802001-07-11 Steve Ellcey <sje@cup.hp.com>
2281
2282 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2283 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2284 * bfd-in2.h: Regenerate.
2285 * libbfd.h: Regenerate.
2286 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2287 new relocations.
2288 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2289 (elfNN_ia64_check_relocs): Likewise.
2290 (elfNN_ia64_install_value): Likewise.
2291 (elfNN_ia64_relocate_section): Likewise.
2292
22932001-07-11 Jakub Jelinek <jakub@redhat.com>
2294
2295 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2296 R_SPARC_UA64.
2297 (elf32_sparc_check_relocs): Likewise.
2298 Only create .rela section for alloced sections in shared libraries.
2299 (elf32_sparc_relocate_section): Likewise.
2300 Remove redundant check.
2301 Optimize unaligned reloc usage.
2302 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2303 check.
2304
23052001-07-11 H.J. Lu <hjl@gnu.org>
2306
2307 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2308 ALLOC|LOAD flags as the source section for debugging sections
2309 when creating the reloc section.
2310
23112001-07-05 Jim Wilson <wilson@redhat.com>
2312
2313 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2314 the section of the bigger symbol.
2315
2316 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2317
23182001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2319
2320 * peicode.h (coff_swap_scnhdr_in): For sections containing
2321 uninitialised data, only set their size to s_paddr if this does
2322 not reset their size to zero. MS's latest compilers will set
2323 s_paddr to zero.
2324
23252001-07-04 H.J. Lu <hjl@gnu.org>
2326
2327 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2328 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2329 bfd_mach_mips5000.
2330
23312001-07-03 Mark Elbrecht <snowball3@softhome.net>
2332
2333 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2334
2335 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2336 sections being discarded.
2337
23382001-06-30 Alan Modra <amodra@bigpond.net.au>
2339
2340 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2341 instead of _bfd_elfcore_section_from_phdr.
2342 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2343 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2344 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2345 (elfcore_grok_prstatus): Likewise.
2346 (elfcore_grok_lwpstatus): Likewise.
2347 (bfd_get_elf_phdr_upper_bound): Likewise.
2348 (elfcore_make_note_pseudosection): Formatting.
2349 (_bfd_elfcore_strndup): Formatting.
2350 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2351 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2352
23532001-06-29 Daniel Jacobowitz <drow@mvista.com>
2354
2355 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2356 and _bfd_elfcore_strndup.
2357 (struct elf_backend_data): Add elf_backend_grok_prstatus
2358 and elf_backend_grok_psinfo.
2359 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2360 (elfcore_grok_prstatus): Use it.
2361 (elfcore_make_note_pseudosection): Likewise.
2362 (elfcore_strndup): Rename to...
2363 (_bfd_elfcore_strndup): Here, and make global.
2364 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2365 (elfcore_grok_note): Call elf_backend_grok_prstatus
2366 and elf_backend_grok_psinfo if available.
2367 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2368 (_bfd_elf32_mips_grok_psinfo): New function.
2369 (elf_backend_grok_prstatus): Define.
2370 (elf_backend_grok_psinfo): Define.
2371 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2372 (elf_backend_grok_psinfo): Likewise.
2373 (elfNN_bed): Include elf_backend_grok_prstatus and
2374 elf_backend_grok_psinfo.
2375
23762001-06-29 H.J. Lu <hjl@gnu.org>
2377
2378 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2379 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2380 is NULL before filling PLT.
2381
23822001-06-29 Alan Modra <amodra@bigpond.net.au>
2383
2384 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2385
23862001-06-27 Alan Modra <amodra@bigpond.net.au>
2387
2388 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2389 here..
2390 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2391 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2392 after gc has run.
2393
2394 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2395 (IS_ABSOLUTE_RELOC): Define.
2396 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2397 (hppa_link_hash_newfunc): Always init it.
2398 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2399 create COPY relocs only when the reloc is in a read-only section.
2400 Instead, allocate space for a dynamic reloc to reference the
2401 library symbol directly. Keep track of space we allocate using
2402 relocs_entries.
2403 (hppa_discard_copies): Delete, and move code to..
2404 (allocate_plt_and_got): ..here. Rename to
2405 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2406 relocs for non-shared link.
2407 (elf32_hppa_size_dynamic_sections): Update calls to above.
2408 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2409 in lieu of COPY relocs.
2410
2411 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2412 here..
2413 (elf_i386_adjust_dynamic_symbol): ..nor here..
2414 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2415 after gc has run.
2416 (elf_i386_size_dynamic_sections): Fix a comment.
2417 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2418 involved in writing reloc out.
2419
24202001-06-25 Alan Modra <amodra@bigpond.net.au>
2421
2422 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2423 Ensure syms are dynamic if we might be emitting a reloc.
2424 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2425 for undefweak or undefined syms..
2426 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2427
2428 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2429 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2430 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2431 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2432
24332001-06-24 H.J. Lu <hjl@gnu.org>
2434
2435 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2436 strncasecmp/strcasecmp instead of strncmp/strcmp.
2437
24382001-06-23 H.J. Lu <hjl@gnu.org>
2439
2440 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2441 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2442 in the regular object file and treat the weak definition as
2443 the normal one.
2444
24452001-06-23 Alan Modra <amodra@bigpond.net.au>
2446
2447 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2448 unresolved_reloc test to exclude cases where we use "relocation"
2449 before setting it to point into the .got. Reinstate fudge for
2450 unresolved relocs in debugging sections.
2451
2452 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2453 complicated tests for unresolvable relocs with a simple direct
2454 scheme using "unresolved_reloc" var.
2455
2456 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2457 elf_i386_dyn_relocs. Update comment.
2458 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2459 dyn_relocs.
2460 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2461 others to aborts.
2462 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2463 abort.
2464 (elf_i386_size_dynamic_sections): Likewise.
2465 (elf_i386_finish_dynamic_symbol): Likewise.
2466 (elf_i386_finish_dynamic_sections): Likewise.
2467 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2468 handling code.
2469
2470 Avoid creating COPY relocs if possible.
2471 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2472 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2473 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2474 reloc is in a read-only section. Instead, allocate space for a
2475 dynamic reloc to reference the library symbol directly. Keep
2476 track of space we allocate using pcrel_relocs_copied.
2477 (discard_copies): Delete, and move code to ..
2478 (allocate_plt_and_got): ..here. Rename to
2479 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2480 relocs for non-shared link.
2481 (elf_i386_size_dynamic_sections): Update calls to above functions.
2482 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2483 more ugly logic to avoid "unresolvable relocation" error. Use
2484 htab shortcut in place of elf_hash_table macro.
2485 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2486 not always be created now.
2487
24882001-06-20 Bo Thorsen <bo@suse.co.uk>
2489
2490 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2491 shared libraries.
2492
24932001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2494
2495 * configure.host (mips64-*-linux): Reformat.
2496
24972001-06-21 Alan Modra <amodra@bigpond.net.au>
2498
2499 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2500 allocate local .got space. Use shortcuts from hash table for .got
2501 and .plt rather than comparing section names.
2502 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2503 adjusting index into local_got_refcounts to document what we are
2504 really doing.
2505 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2506 Tidy .got and .plt error checking.
2507
25082001-06-20 Catherine Moore <clm@redhat.com>
2509
2510 * elf-bfd.h (struct elf_backend_data):
2511 elf_backend_emit_relocs: New field: Function for emitting
2512 relocs.
2513 elf_backend_count_relocs: New field: Function for determining
2514 the number of relocs to be emitted.
2515 * elfxx-target.h: Provide default (NULL) values for
2516 elf_backend_emit_relocs and elf_backend_count_relocs.
2517 * elflink.h (elf_link_size_reloc_section): Make the hash table
2518 big enough to hold the relocs counted by either reloc_count or
2519 o->reloc_count.
2520 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2521 should be emitted, either because of a command line option
2522 stored in the info structure or because the target provides a
2523 special reloc emitting function.
2524 If the target provides a reloc counting function use it,
2525 unless performing a relocatable link or emitting all relocs.
2526 Also set the SEC_RELOC flag on any output section which will
2527 contain relocs.
2528 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2529 should be emitted, either because of a command line option
2530 stored in the info structure or because the target provides a
2531 special reloc emitting function.
2532 If the target provides a reloc emitting function, use it,
2533 unless performing a relocatable link or emitting all relocs.
2534
25352001-06-20 H.J. Lu <hjl@gnu.org>
2536
2537 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2538 allocate local .got space.
2539
25402001-06-19 Andreas Jaeger <aj@suse.de>
2541
2542 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2543 dynamic symbols.
2544
25452001-06-18 Hans-Peter Nilsson <hp@axis.com>
2546
2547 * elflink.h (struct elf_assign_sym_version_info): Remove member
2548 export_dynamic. All users changed to use info member.
2549 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2550 export_dynamic, instead use member in parameter info.
2551 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2552 bfd_elf64_size_dynamic_sections): Update prototype.
2553 * bfd-in2.h: Regenerate.
2554
25552001-06-18 H.J. Lu <hjl@gnu.org>
2556
2557 * elflink.h (elf_info_failed): Add a new field, verdefs.
2558 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2559 elf_export_symbol.
2560 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2561 should be exported.
2562
25632001-06-17 H.J. Lu <hjl@gnu.org>
2564
2565 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2566 readonly_reloc, to record if a relocation in the .rel.dyn
2567 section is against a read-only section.
2568 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2569 field to false.
2570 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2571 in the .rel.dyn section against a read-only section by setting
2572 DF_TEXTREL or readonly_reloc.
2573 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2574 it is true.
2575 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2576 there is a relocation in the .rel.dyn section against a
2577 read-only section.
2578 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2579 DF_TEXTREL is set.
2580
25812001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2582
2583 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2584 function. Move flagword result into parameter list. Remove
2585 comment about setting bfd_error_handler to intercept failure
2586 results.
2587 * coffgen.c (make_a_section_from_file): Examine result of
2588 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2589 caller.
2590 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2591 function. Move flagword result into parameter list.
2592 * libcoff.h: Regenerate.
2593 * libecoff.h: Regenerate.
2594
25952001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2596
2597 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2598 section is going to follow it.
2599
26002001-06-12 Catherine Moore <clm@redhat.com>
2601
2602 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2603 with the file_align entry from elf_backend_data.
2604 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2605 (elf_gc_record_vtentry): Likewise.
2606
26072001-06-10 Alan Modra <amodra@bigpond.net.au>
2608
2609 * elflink.h: Whitespace changes.
2610 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2611 rather than "unsigned char".
2612 (elf_link_output_relocs): Likewise.
2613 (elf_link_input_bfd): Likewise.
2614 (elf_reloc_link_order): LIkewise.
2615 * elf.c: s/CONST/const/. Whitespace changes.
2616 * elf32-mips.c: Formatting fix.
2617
2618 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2619 * Makefile.in: Regenerate.
2620 * po/Make-in: Remove trailing tab.
2621
26222001-06-09 Philip Blundell <philb@gnu.org>
2623
2624 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2625 change.
2626 (elf32_arm_plt_entry): Likewise.
2627
26282001-06-08 H.J. Lu <hjl@gnu.org>
2629
2630 * elf.c (swap_out_syms): Keep names for global section symbols.
2631
26322001-06-07 H.J. Lu <hjl@gnu.org>
2633
2634 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2635 MIPS-based machines need it.
2636
26372001-06-07 H.J. Lu <hjl@gnu.org>
2638
2639 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2640 for SGI only.
2641
2642 * config.bfd: Remove ecoff from Linux/mips.
2643
26442001-06-07 Andreas Jaeger <aj@suse.de>
2645
2646 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2647 assertion.
2648 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2649 alignment of 8 for .rela sections; handle further relocations.
2650
26512001-06-06 Christian Groessler <cpg@aladdin.de>
2652
2653 * coff-z8k.c: Fix formatting.
2654 Fix howtos: howto->size was always 1.
2655
26562001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2657
2658 * configure.host (mips64*-*-linux*): Define.
2659
26602001-06-05 Alan Modra <amodra@bigpond.net.au>
2661
2662 * elf32-i386.c (elf_i386_discard_copies): Rename to
2663 discard_copies, and use elf_link_hash_entry arg rather than
2664 elf_i386_link_hash_entry.
2665 (elf_i386_link_hash_traverse): Delete.
2666 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2667 Tidy sizing of dynamic sections.
2668 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2669 possible .plt entries.
2670 (elf_i386_gc_sweep_hook): Likewise.
2671 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2672 everything with plt.refcount <= 0.
2673
2674 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2675 .relgot space here.
2676 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2677 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2678 .rel.plt here..
2679 (allocate_plt_and_got): ..instead do it all here. New function.
2680 (elf_i386_size_dynamic_sections): Allocate local .got space and
2681 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2682 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2683 rather than gc variety).
2684 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2685 (elf_i386_relocate_section): Use it here and correct handling of
2686 R_386_GOT32. Provide section and offset for "unresolvable
2687 relocation" error message.
2688 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2689
2690 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2691 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2692 (elf_i386_link_hash_table_create): Init them.
2693 (create_got_section): New function.
2694 (elf_i386_create_dynamic_sections): New function.
2695 (elf_backend_create_dynamic_sections): Set to above.
2696 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2697 calling bfd_get_section_by_name.
2698 (elf_i386_gc_sweep_hook): Likewise.
2699 (elf_i386_adjust_dynamic_symbol): Likewise.
2700 (elf_i386_size_dynamic_sections): Likewise.
2701 (elf_i386_relocate_section): Likewise.
2702 (elf_i386_finish_dynamic_sections): Likewise.
2703
2704 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2705
27062001-06-02 H.J. Lu <hjl@gnu.org>
2707
2708 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2709 and ELFOSABI_HPUX.
2710 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2711
27122001-06-02 H.J. Lu <hjl@gnu.org>
2713
2714 * aout-cris.c (MACHTYPE_OK): New. Defined.
2715
27162001-06-02 Hans-Peter Nilsson <hp@axis.com>
2717
2718 * section.c (_bfd_strip_section_from_output): Handle NULL
2719 output_section.
2720
27212001-06-02 H.J. Lu <hjl@gnu.org>
2722
2723 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2724 rs6000coff64_vec only if BFD64 is defined.
2725 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2726
27272001-06-02 H.J. Lu <hjl@gnu.org>
2728
2729 * coff-ia64.c (ia64coff_object_p): Rewrite with
2730 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2731
27322001-06-01 Andreas Jaeger <aj@suse.de>
2733
2734 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2735 relocation, small reformatting.
2736
27372001-05-29 Andreas Jaeger <aj@suse.de>
2738
2739 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2740 (elf64_x86_64_relocate_section): Likewise.
2741
27422001-05-30 Alan Modra <amodra@one.net.au>
2743
2744 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2745 millicode. Don't allocate .got and .rela.got space here..
2746 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2747 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2748 .rela.plt here..
2749 (hppa_handle_PIC_calls): ..nor here..
2750 (allocate_plt_and_got): ..instead do it all here. New function.
2751 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2752 call allocate_plt_and_got. No need to zap .got if not dynamic.
2753 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2754 gc_common_final_link.
2755 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2756 (elf32_hppa_relocate_section): Use it here.
2757 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2758 dynamic_sections_created.
2759 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2760
27612001-05-28 Andreas Jaeger <aj@suse.de>
2762
2763 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2764 generic version since we want a hashsize of 4.
2765 (elf_backend_size_info): Likewise.
2766
27672001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2768
2769 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2770 a zeroing loop.
2771 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2772 (elf_link_input_bfd): Likewise.
2773 (elf_reloc_link_order): Likewise.
2774 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2775 relocations correctly.
2776
27772001-05-28 Nicolas Pitre <nico@cam.org>
2778
2779 * elf32-arm.h: fix PLT generation for big endian ARM
2780
27812001-05-28 Alan Modra <amodra@one.net.au>
2782
2783 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2784 for symbols forced local that need plabels.
2785 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2786 .plt.rela for local syms if non-shared.
2787 (hppa_build_one_stub): Mask lsb of plt.offset.
2788 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
2789 (clobber_millicode_symbols): Correct comment.
2790 (elf32_hppa_relocate_section): Likewise.
2791 (elf32_hppa_finish_dynamic_symbol): Likewise.
2792
27932001-05-28 Jeff Sturm <jsturm@one-point.com>
2794
2795 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
2796 * bfd-in2.h: Regenerate.
2797 * libbfd.h: Regenerate.
2798 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
2799 and BFD_RELOC_SPARC_UA64 mapping
2800 * elf64-sparc.c: Likewise.
2801
28022001-05-25 H.J. Lu <hjl@gnu.org>
2803
2804 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
2805 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
2806 (coff-rs6000.lo): Remove the old dependency.
2807 * Makefile.in: Rebuild.
2808
2809 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2810 coff-rs6000.lo.
2811
28122001-05-25 H.J. Lu <hjl@gnu.org>
2813
2814 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
2815 rs6000coff_core_file_matches_executable_p,
2816 rs6000coff_core_file_failing_command and
2817 rs6000coff_core_file_failing_signal only if AIX_CORE is
2818 defined.
2819 (pmac_xcoff_vec): Likewise.
2820 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2821
28222001-05-25 Timothy Wall <twall@redhat.com>
2823
2824 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2825 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2826
28272001-05-25 H.J. Lu <hjl@gnu.org>
2828
2829 * bfd-in2.h: Regenerated.
2830 * libcoff.h: Likewise.
2831
28322001-05-25 Alan Modra <amodra@one.net.au>
2833
2834 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
2835 undefined millicode syms in shared libs.
2836 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
2837 (elf32_hppa_check_relocs): Likewise.
2838 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2839 (elf32_hppa_size_dynamic_sections): Likewise.
2840 (elf32_hppa_relocate_section): Likewise.
2841 (elf32_hppa_finish_dynamic_symbol): Likewise.
2842 (elf32_hppa_finish_dynamic_sections): Likewise.
2843
28442001-05-24 Tom Rix <trix@redhat.com>
2845
2846 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
2847 xcoff-target.h not used to define rs6000 or ppc bfd.
2848 * Makefile.in same
2849
2850 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
2851 to 64 bit.
2852
2853 * coff-rs6000.c : Many changes for 64 bit support. Move common
2854 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
2855 and pmac_xcoff_vec
2856
2857 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
2858 linker now supported. Explictly define the rs6000coff64_vec.
2859
2860 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
2861 (coff_print_aux) same
2862 (coff_write_object_contents) same
2863 (coff_slurp_line_table) same
2864
2865 * coffgen.c : (coff_fix_symbol_name) formatting
2866 (coff_mangle_symbols) xcoff 64 bit support
2867 (coff_write_symbol) same
2868 (coff_write_alien_symbol) same
2869 (coff_write_native_symbol) same
2870 (coff_write_symbols) same
2871 (coff_get_symbol_info) same
2872 (bfd_coff_get_syment) same
2873 (coff_print_symbol) same
2874
2875 * config.bfd : add powerpc64-*-aix* target
2876
2877 * libcoff-in.h : formatting
2878
2879 * libcoff.h : move xcoff extern declarations to libxcoff.h
2880
2881 * libxcoff.h : New file
2882
2883 * xcofflink.c : Many changes for xcoff64 support. Move common
2884 structures to include/coff/xcoff.h. Move specific structure to
2885 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
2886 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
2887
2888 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
2889 aix4.2+ -binitfini.
2890
2891 (xcoff_build_ldsyms) : handle special __rtinit symbol.
2892
28932001-05-23 Alexandre Oliva <aoliva@redhat.com>
2894
2895 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
2896 s/ENTIRES/ENTRIES/.
2897
28982001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2899
2900 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
2901 * libbfd.h: Regenerate.
2902 * bfd-in2.h: Regenerate.
2903
2904 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
2905 * archures.c (bfd_mach_mips12000): Define.
2906 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
2907 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
2908 support.
2909 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
2910 * bfd-in2.h: Regenerate.
2911 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
2912
29132001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
2914
2915 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
2916 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
2917 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
2918 that is used by GCC.
2919
29202001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2921
2922 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
2923 of entries in a structured section.
2924 * elf.c: Use new macro.
2925 * elf32-i386.c: Use new macro.
2926 * elf32-mips.c: Use new macro.
2927 * elf64-alpha.c: Use new macro.
2928 * elf64-sparc.c: Use new macro.
2929 * elfcode.h: Use new macro.
2930 * elflink.h: Use new macro.
2931
29322001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2933
2934 * bfdint.texi: Replace -oformat with --oformat.
2935
29362001-05-21 Andreas Jaeger <aj@suse.de>
2937
2938 * dwarf2.c (decode_line_info): Fix error message.
2939 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
2940 adjust error message.
2941
29422001-05-18 H.J. Lu <hjl@gnu.org>
2943
2944 * elflink.h (elf_link_add_object_symbols): Revert the last
2945 change.
2946
29472001-05-17 Alan Modra <amodra@one.net.au>
2948
2949 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
2950 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
2951 (hppa_build_one_stub): Add an assert to check plt.offset.
2952
29532001-05-17 H.J. Lu <hjl@gnu.org>
2954
2955 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
2956 version definition to basename of the output filename.
2957
29582001-05-17 H.J. Lu <hjl@gnu.org>
2959
2960 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
2961 basename of the bfd filename.
2962
29632001-05-16 Alan Modra <amodra@one.net.au>
2964
2965 * section.c (asection): Add linker_has_input field.
2966 (STD_SECTION): Adjust initialization to suit.
2967 * ecoff.c (bfd_debug_section): Likewise.
2968 * bfd-in2.h: Regenerate.
2969
29702001-05-15 Alexandre Oliva <aoliva@redhat.com>
2971
2972 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
2973 negative 32-bit operands to 16 operands when the operand is
2974 going to be zero-extended by the modified opcode.
2975
29762001-05-12 Peter Targett <peter.targett@arccores.com>
2977
2978 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
2979 name for 'arc5' core versions.
2980 (bfd_arc_arch): Make bfd_mach_arc_6 default.
2981
2982 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
2983 architecture.
2984 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
2985
29862001-05-11 Jakub Jelinek <jakub@redhat.com>
2987
2988 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
2989 sections as well.
2990 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
2991 to .gnu.linkonce.t.FOO text section.
2992
29932001-05-11 Jakub Jelinek <jakub@redhat.com>
2994
2995 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
2996 fields, change sec into secinfo.
2997 (struct sec_merge_info): Add chain, remove last fields.
2998 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
2999 (sec_merge_hash_lookup): If lookup could not use a string only
3000 because it has bad alignment, mark the old string for deletion.
3001 (sec_merge_add): Add secinfo argument. Don't compute entry's
3002 position, instead record the section.
3003 (sec_merge_emit): Update for the sec into secinfo change in
3004 struct sec_merge_hash_entry.
3005 (_bfd_merge_section): Only record the section for merging, defer
3006 putting strings into the hash table.
3007 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3008 _bfd_merge_sections): New functions.
3009 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3010 changes.
3011 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3012 (_bfd_nolink_bfd_merge_sections): Define.
3013 * libbfd.h: Likewise.
3014 (bfd_generic_merge_sections): Add prototype.
3015 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3016 (struct bfd_target): Likewise.
3017 * bfd.c (bfd_merge_sections): Define.
3018 * bfd-in2.h: Rebuilt.
3019 * elf.c (_bfd_elf_merge_sections): New function.
3020 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3021 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3022 * reloc.c (bfd_generic_merge_sections): New function.
3023 * vms.c (vms_bfd_merge_sections): New function.
3024 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3025 * aout-target.h (MY_bfd_merge_sections): Define.
3026 * aout-tic30.c (MY_bfd_merge_sections): Define.
3027 * binary.c (binary_bfd_merge_sections): Define.
3028 * bout.c (b_out_bfd_merge_sections): Define.
3029 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3030 * coffcode.c (coff_bfd_merge_sections): Define.
3031 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3032 * i386msdos.c (msdos_bfd_merge_sections): Define.
3033 * i386os9k.c (os9k_bfd_merge_sections): Define.
3034 * ieee.c (ieee_bfd_merge_sections): Define.
3035 * ihex.c (ihex_bfd_merge_sections): Define.
3036 * nlm-target.h (nlm_bfd_merge_sections): Define.
3037 * oasys.c (oasys_bfd_merge_sections): Define.
3038 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3039 * som.c (som_bfd_merge_sections): Define.
3040 * srec.c (srec_bfd_merge_sections): Define.
3041 * tekhex.c (tekhex_bfd_merge_sections): Define.
3042 * versados.c (versados_bfd_merge_sections): Define.
3043 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3044
30452001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3046
3047 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3048 to be unsigned long, in order to match its use.
3049
30502001-05-10 H.J. Lu <hjl@gnu.org>
3051
3052 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3053 indirect symbols.
3054
30552001-05-09 H.J. Lu <hjl@gnu.org>
3056
3057 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3058 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3059 Remove the unused veriable `dynver'.
3060
30612001-05-08 Ian Lance Taylor <ian@zembu.com>
3062
3063 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3064 NULL or is not COFF.
3065 (coff_i386_rtype_to_howto): Don't dump core if output section
3066 owner is not COFF.
3067
30682001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3069
3070 * ecoff.c (bfd_debug_section): Fix initialization.
3071 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3072 is always a positive integer. Cast away sign mismatch.
3073 * elf32-mips.c: Fix misleading comment and typo.
3074 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3075 correct data type.
3076 * elflink.c: Fix typo.
3077 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3078 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3079
30802001-05-04 Richard Henderson <rth@redhat.com>
3081
3082 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3083
30842001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3085
3086 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3087 EF_ARM_HASENTRY if the start address is set.
3088
30892001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3090
3091 * targets.c (_bfd_target_vector_entries): Compute value based on
3092 the size of the _bfd_target_vector and not bfd_target_vector.
3093
30942001-05-03 H.J. Lu <hjl@gnu.org>
3095
3096 * elfcode.h: Include "libiberty.h".
3097
3098 * elflink.h (elf_link_add_object_symbols): Set
3099 elf_dt_name (abfd) to basename of the bfd filename.
3100 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3101 of the bfd filename.
3102
31032001-05-03 Andreas Jaeger <aj@suse.de>
3104
3105 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3106 (elf_generic_info_to_howto_rel): Likewise.
3107 * coff-alpha.c (reloc_nil): Likewise.
3108 (alpha_ecoff_bad_format_hook): Likewise.
3109 (alpha_adjust_reloc_out): Likewise.
3110 (alpha_bfd_reloc_type_lookup): Likewise.
3111 (alpha_convert_external_reloc): Likewise.
3112 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3113 (elf64_alpha_reloc_bad): Likewise.
3114 (elf64_alpha_reloc_gpdisp): Likewise.
3115 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3116 (elf64_alpha_info_to_howto): Likewise.
3117 (elf64_alpha_add_symbol_hook): Likewise.
3118 (elf64_alpha_create_got_section): Likewise.
3119 (elf64_alpha_is_local_label_name): Likewise.
3120 (elf64_alpha_merge_ind_symbols): Likewise.
3121 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3122 (mips_elf64_get_reloc_upper_bound): Likewise.
3123 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3124 (nlm_alpha_get_public_offset): Likewise.
3125
31262001-05-02 Johan Rydberg <jrydberg@opencores.org>
3127
3128 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3129 about overflow in R_OPENRISC_LO_16_IN_INSN and
3130 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3131
31322001-04-30 H.J. Lu <hjl@gnu.org>
3133
3134 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3135 only for ELF_LINK_FORCED_LOCAL.
3136 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3137 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3138 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3139
3140 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3141 if the symbol has hidden or internal visibility.
3142
31432001-04-30 Alan Modra <amodra@one.net.au>
3144
3145 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3146 calls to undefined weak symbols.
3147
31482001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3149
3150 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3151 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3152
31532001-04-27 Andreas Jaeger <aj@suse.de>
3154
3155 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3156 out handled entries.
3157 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3158 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3159 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3160 GOT32.
3161
31622001-04-27 Sean McNeil <sean@mcneil.com>
3163
3164 * config.bfd: Add arm-vxworks target.
3165 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3166 addend (fro VXworks targets).
3167
31682001-04-26 H.J. Lu <hjl@gnu.org>
3169
3170 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3171 valid.
3172
31732001-04-25 Frank Ch. Eigler <fche@redhat.com>
3174
3175 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3176 * bfd-in2.h: Regenerated.
3177
31782001-04-24 Jakub Jelinek <jakub@redhat.com>
3179
3180 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3181 (struct sec_merge_hash): Remove alignment_power.
3182 (sec_merge_hash_newfunc): Clear alignment.
3183 (sec_merge_hash_lookup): Pass alignment as argument.
3184 Use hashp->root.next, not hashp->next to walk the hash chain.
3185 If a string already in the hashtable does not have required
3186 alignment, create a new hashtable entry.
3187 (sec_merge_init): Remove alignment_power argument.
3188 (sec_merge_add): Add alignment argument.
3189 (sec_merge_emit): Alignment is now a per-entity thing, not per
3190 section.
3191 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3192 for proper alignment.
3193 Pass alignment information to sec_merge_add.
3194
31952001-04-24 Christian Groessler <cpg@aladdin.de>
3196
3197 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3198 and R_REL16 reloc types; accept odd values for R_REL16 type
3199
32002001-04-24 Johan Rydberg <jrydberg@opencores.org>
3201
3202 * cpu-openrisc.c: New file.
3203 * elf32-openrisc.c: Likewise.
3204
3205 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3206 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3207 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3208 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3209 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3210 * Makefile.in: Regenerated.
3211 * config.bfd: (openrisc-*-elf): New target.
3212 * configure.in (bfd_elf32_openrisc_vec): New vector.
3213 * configure: Regenerated.
3214 * libbfd.h: Regenerated.
3215 * bfd-in2.h: Regenerated.
3216 * reloc.c: Add OpenRISC relocations.
3217 * targets.c (bfd_elf32_openrisc_vec): Declare.
3218 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3219 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3220 (bfd_openrisc_arch): Declare.
3221 (bfd_archures_list): Add bfd_openrisc_arch.
3222 * elf.c (prep_headers): Add bfd_arch_openrisc.
3223
32242001-04-23 Bo Thorsen <bo@suse.de>
3225
3226 * elf64-x86-64.c: Add c++ vtable hack.
3227 Small whitespace and comment changes.
3228
32292001-04-19 Andreas Jaeger <aj@suse.de>
3230
3231 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3232 (elf64_x86_64_plt_entry): Likewise.
3233 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3234 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3235
32362001-04-17 Hans-Peter Nilsson <hp@axis.com>
3237
3238 * elf32-cris.c: Tweak comments related to dynamic linking.
3239 (cris_elf_relocate_section): When not creating shared object, fill
3240 in the .got table for any symbol not in the dynamic symbol table.
3241 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3242 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3243 table.
3244 (cris_elf_check_relocs): Use variable r_type in all places rather
3245 than the original expression. Add default case in switch for
3246 reloc types.
3247 (elf_cris_size_dynamic_sections): Iterate over
3248 elf_cris_discard_excess_program_dynamics when not creating shared
3249 library.
3250 (elf_cris_discard_excess_dso_dynamics): Renamed from
3251 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3252 (elf_cris_discard_excess_program_dynamics): New.
3253
32542001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3255
3256 * coffcode.h (coff_write_object_contents): Use
3257 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3258
32592001-04-14 H.J. Lu <hjl@gnu.org>
3260
3261 * bfd-in2.h: Regenerate.
3262
32632001-04-14 Jakub Jelinek <jakub@redhat.com>
3264
3265 * section.c (STD_SECTION): Add entsize.
3266
32672001-04-13 H.J. Lu <hjl@gnu.org>
3268
3269 * section.c (SEC_MERGE): Define new flag for merging.
3270 (SEC_STRINGS): Likewise.
3271 (entsize): New field.
3272
32732001-04-13 Roger Sayle <roger@metaphorics.com>
3274
3275 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3276 flag on pe-i386 targets.
3277
32782001-04-13 Jakub Jelinek <jakub@redhat.com>
3279
3280 * libbfd-in.h (_bfd_merge_section): New.
3281 (_bfd_write_merged_section): New.
3282 (_bfd_merged_section_offset): New.
3283 * libbfd.h: Rebuilt.
3284 * linker.c (_bfd_generic_link_output_symbols): Handle
3285 discard_sec_merge.
3286 * aoutx.h (aout_link_write_symbols): Likewise.
3287 * pdp11.c (aout_link_write_symbols): Likewise.
3288 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3289 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3290 sections.
3291 (elf_link_sec_merge_syms): New.
3292 (elf_link_input_bfd): Call _bfd_merged_section_offset
3293 and _bfd_write_merged_section.
3294 Handle discard_sec_merge.
3295 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3296 field.
3297 (struct bfd_elf_section_data): Likewise.
3298 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3299 SEC_STRINGS section flags and entsize from their ELF counterparts.
3300 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3301 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3302 from their BFD counterparts.
3303 * merge.c: New file.
3304 * Makefile.am: Add strtab.lo.
3305 * Makefile.in: Rebuilt.
3306
33072001-04-09 Hans-Peter Nilsson <hp@axis.com>
3308
3309 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3310 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3311
33122001-04-05 Steven J. Hill <sjhill@cotw.com>
3313
3314 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3315 endian MIPS ELF target.
3316 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3317 MIPS ELF target.
3318
3319 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3320 64bit big endian MIPS ELF target.
3321 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3322 endian MIPS ELF target.
3323 * configure: Regenerated.
3324
3325 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3326 little endian targets.
3327 (mips_elf_sym_is_global): Handle traditional targets.
3328
3329 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3330 64bit big endian MIPS ELF target.
3331 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3332 endian MIPS ELF target.
3333
3334 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3335 and bfd_elf64_tradlittlemips_vec.
3336
33372001-04-05 David Mosberger <davidm@hpl.hp.com>
3338
3339 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3340 ordinary "progbits" section.
3341
33422001-04-04 Alan Modra <alan@linuxcare.com.au>
3343
3344 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3345 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3346
33472001-04-03 David Mosberger <davidm@hpl.hp.com>
3348
3349 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3350
33512001-03-30 H.J. Lu <hjl@gnu.org>
3352
3353 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3354 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3355
33562001-03-26 H.J. Lu <hjl@gnu.org>
3357
3358 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3359 if there are any relocations for generic ELF.
3360 (bfd_elf32_bfd_link_add_symbols): Defined to
3361 elf32_generic_link_add_symbols.
3362 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3363 if there are any relocations for generic ELF.
3364 (bfd_elf64_bfd_link_add_symbols): Defined to
3365 elf64_generic_link_add_symbols.
3366
33672001-03-23 Nick Clifton <nickc@redhat.com>
3368
3369 * Makefile.am (BUILD_CFILES): New variable: List of C source
3370 files created in build directory.
3371 (BUILD_HFILES): New variable: List of header files created in
3372 build directory.
3373 (POTFILES): Delete.
3374 (po/POTFILES.in): Replace rule with empty entry.
3375 (po/SRC-POTFILES.in): New rule: Create a list of source files
3376 in the source directory.
3377 (po/BLD-POTFILES.in): New rule: Create a list of source files
3378 in the build directory.
3379 (MOSTLYCLEAN): Do not delete source files created in build
3380 directory.
3381 * Makefile.in: Regenerate.
3382 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3383 into po/Makefile.
3384 * configure: Regenerate.
3385
3386 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3387 and BLD_POTFILES.
3388 Add .. to the search path when building bfd.pot.
3389 Delete POTFILES when performing distclean.
3390 Add comment describing why distclean is broken in maintainer mode.
3391 * po/POTFILES.in: Delete.
3392 * po/SRC-POTFILES.in: New file.
3393 * po/BLD-POTFILES.in: New file.
3394 * po/bfd.pot: Regenerate.
3395
33962001-03-22 Hans-Peter Nilsson <hp@axis.com>
3397
3398 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3399 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3400 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3401 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3402 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3403 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3404 functions.
3405 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3406 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3407 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3408 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3409 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3410 New HOWTO members for new relocs.
3411 (cris_reloc_map): Map new relocs.
3412 (ELF_DYNAMIC_INTERPRETER): Define.
3413 (PLT_ENTRY_SIZE): Define.
3414 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3415 elf_cris_pic_plt_entry): New, PLT templates.
3416 (struct elf_cris_pcrel_relocs_copied, struct
3417 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3418 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3419 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3420 positive values. Adjust PCREL relocs to be relative to location
3421 after relocation.
3422 (cris_elf_relocate_section): Handle relocations to dynamic
3423 objects. Handle new relocations. Call error handler when seeing
3424 non-PIC relocation for read-only sections while generating shared
3425 object.
3426 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3427 entries.
3428 (bfd_elf32_bfd_link_hash_table_create,
3429 elf_backend_adjust_dynamic_symbol,
3430 elf_backend_size_dynamic_sections,
3431 elf_backend_finish_dynamic_symbol,
3432 elf_backend_finish_dynamic_sections,
3433 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3434 elf_backend_hide_symbol, elf_backend_want_got_plt,
3435 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3436 elf_backend_got_header_size, elf_backend_plt_header_size):
3437 Define.
3438
3439 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3440 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3441 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3442 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3443 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3444 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3445 * bfd-in2.h, libbfd.h: Regenerate.
3446
34472001-03-21 Diego Novillo <dnovillo@redhat.com>
3448
3449 (_bfd_mips_elf_relocate_section): Give a better error message when
3450 a relocation is not recognized.
3451
34522001-03-21 Alan Modra <alan@linuxcare.com.au>
3453
3454 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3455 non-NULL before attempting to dereference.
3456
34572001-03-20 H.J. Lu <hjl@gnu.org>
3458
3459 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3460 * configure: Rebuild.
3461
34622001-03-20 Andreas Schwab <schwab@suse.de>
3463
3464 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3465 relocation value when resolving a reference from a debugging
3466 section.
3467
34682001-03-16 Scott Thomason <SThomaso@hii.com>
3469
3470 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3471 (xcoff64_swap_sym_out): Fix syntax errors.
3472
34732001-03-16 Richard Sandiford <rsandifo@redhat.com>
3474
3475 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3476
34772001-03-15 Alan Modra <alan@linuxcare.com.au>
3478
3479 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3480 (hppa_link_hash_newfunc): Init it.
3481 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3482 section appears to be non-PIC.
3483 (final_link_relocate): Likewise.
3484 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3485 possible candidate function, and set pic_call for those that will
3486 only have a .plt entry for the PIC call stub.
3487 (hppa_handle_PIC_calls): Set maybe_pic_call.
3488
34892001-03-12 DJ Delorie <dj@redhat.com>
3490
3491 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3492 R_SH_DIR8WP* relocs if they're against external symbols, else
3493 they're just for relaxing. Validate the reloc values.
3494
34952001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3496
3497 * binary.c (bfd_external_binary_architecture): Declare.
3498 (binary_object_p): If bfd_external_binary_architecture is defined,
3499 set the architecture to this string.
3500
35012001-03-11 Philip Blundell <philb@gnu.org>
3502
3503 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3504 entries that could serve as a definition for a weak symbol.
3505
35062001-03-08 Nick Clifton <nickc@redhat.com>
3507
3508 * Most files: Update copyright notices using Perl script created
3509 by Kevin Buettner <kevinb@redhat.com>.
3510
35112001-03-07 Nick Clifton <nickc@redhat.com>
3512
3513 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3514 prior patch on ! defined OLD_ARM_ABI.
3515
35162001-03-07 Andreas Jaeger <aj@suse.de>
3517
3518 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3519 some relocation values.
3520
35212001-03-06 Nick Clifton <nickc@redhat.com>
3522
3523 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3524 of offset in BLX(1) instruction.
3525 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3526 offset in BLX(1) instruction.
3527 Fix formatting.
3528
35292001-03-06 Nick Clifton <nickc@redhat.com>
3530
3531 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3532 BFD_RELOC_THUMB_PCREL_BLX.
3533
35342001-03-06 Igor Shevlyakov <igor@windriver.com>
3535
3536 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3537 * bfd-in2.h: Regenerate.
3538 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3539 * ieee.c (ieee_write_processor): Set proper id for
3540 Coldfire CPUs.
3541
35422001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3543
3544 * configure.in: Add s390 target.
3545 * configure: Regenerate.
3546
35472001-02-28 Andreas Jaeger <aj@suse.de>
3548
3549 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3550 to addend.
3551
35522001-02-28 Philip Blundell <pb@futuretv.com>
3553
3554 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3555 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3556
35572001-02-27 H.J. Lu <hjl@gnu.org>
3558
3559 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3560 abfd->tdata.aout_data == NULL.
3561
35622001-02-27 Alan Modra <alan@linuxcare.com.au>
3563
3564 * elf32-hppa.c: Correct field selector in stub comments.
3565 (clobber_millicode_symbols): Formatting fix.
3566
3567 * configure.in: Bump version to 2.11.90.
3568 * configure: Regenerate.
3569 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3570 (CFILES): $SOURCE_CFILES + generated C files.
3571 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3572 Run "make dep-am"
3573 * Makefile.in: Regenerate.
3574 * doc/Makefile.in: This too.
3575
35762001-02-26 Timothy Wall <twall@cygnus.com>
3577
3578 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3579 comments.
3580
35812001-02-26 Nick Clifton <nickc@redhat.com>
3582
3583 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3584 up, replacing multiple if statements with a switch.
3585 (handle_COMDAT): New function.
3586
35872001-02-26 H.J. Lu <hjl@gnu.org>
3588
3589 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3590 a warning for section flags we do not handle instead of
3591 aborting.
3592
35932001-02-26 Andreas Jaeger <aj@suse.de>
3594
3595 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3596
35972001-02-22 Timothy Wall <twall@cygnus.com>
3598
3599 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3600 * configure.in: Add objects for elf64_ia64_aix vectors.
3601 * configure: Regenerated.
3602 * configure.host: Recognize ia64-*-aix*.
3603 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3604 for AIX. AIX5 requires most relocations to be dynamic (*all*
3605 binaries are somewhat similar to shared libraries).
3606 * targets.c: Add elf64_ia64_aix vectors.
3607
36082001-02-21 David Mosberger <davidm@hpl.hp.com>
3609
3610 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3611 C8 said "1" instead of "8". Clarify error string for IMM22:
3612 "signed integer" instead of just "integer".
3613
36142001-02-20 Andreas Jaeger <aj@suse.de>
3615
3616 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3617 PLT entries that could serve as a definition for a weak symbol.
3618
36192001-02-19 Jakub Jelinek <jakub@redhat.com>
3620
3621 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3622 entries that could serve as a definition for a weak symbol.
3623 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3624
36252001-02-18 David O'Brien <obrien@FreeBSD>
3626
3627 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3628 FreeBSD/i386-CURRENT differently until I can figure out the needed
3629 corefile changes.
3630 * configure: Regenerate.
3631 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3632 FreeBSD/PowerPC, and FreeBSD/sparc64.
3633
36342001-02-18 lars brinkhoff <lars@nocrew.org>
3635
3636 * Makefile.am: Add PDP-11 a.out target.
3637 * config.bfd: Likewise.
3638 * configure.in: Likewise.
3639 * targets.c: Likewise.
3640 * archures.c: Likewise.
3641 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3642 * libbfd.h: Add PDP-11 relocations.
3643 * reloc.c: Likewise.
3644 * cpu-pdp11.c: New file.
3645 * pdp11.c: New file.
3646
3647 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3648 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3649 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3650 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3651 (GET_MAGIC): New macro.
3652 (PUT_MAGIC): Likewise.
3653 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3654
36552001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3656
3657 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3658 multiarch needs it).
3659
36602001-02-18 H.J. Lu <hjl@gnu.org>
3661
3662 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3663 index.
3664
36652001-02-18 Kazu Hirata <kazu@hxi.com>
3666
3667 * vms-misc.c: Fix formatting.
3668
36692001-02-16 Kazu Hirata <kazu@hxi.com>
3670
3671 * vms.c: Fix formatting.
3672
36732001-02-14 H.J. Lu <hjl@gnu.org>
3674
3675 * elf.c (elf_find_function): New function.
3676 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3677 the file name and function name.
3678
36792001-02-14 Nick Clifton <nickc@redhat.com>
3680
3681 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3682 asection structure.
3683
3684 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3685 (BFD64_BACKENDS): Add pepigen.c
3686 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3687
3688 * Makefile.in: Regenerate.
3689 * configure: Regenerate.
3690 * po/POTFILES.in: Regenerate.
3691 * po/bfd.pot: Regenerate.
3692
36932001-02-14 H.J. Lu <hjl@gnu.org>
3694
3695 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3696 force_minimum_alignment.
3697
36982001-02-14 Bo Thorsen <bo@suse.de>
3699
3700 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3701 (elf64_86_64_size_info): Struct added to fix a problem
3702 with the hashtable string entries.
3703 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3704 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3705 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3706 remove the FIXME for this.
3707 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3708 section. Also removed the FIXME for it.
3709 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3710 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3711 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3712
37132001-02-13 Richard Henderson <rth@redhat.com>
3714
3715 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3716 and not user provided.
3717
37182001-02-13 Kazu Hirata <kazu@hxi.com>
3719
3720 * vms.c (vms_print_symbol): Remove unreachable code.
3721
3722 * rs6000-core.c: Fix formatting.
3723
37242001-02-13 David Mosberger <davidm@hpl.hp.com>
3725
3726 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3727 as _bfd_XXi_only_swap_filehdr_out.
3728 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3729 pe->force_minimum_alignment to TRUE.
3730 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3731 PEI_TARGET_SUBSYSTEM.
3732 (pe_print_private_bfd_data): Call
3733 _bfd_XX_print_private_bfd_data_common() instead of
3734 _bfd_pe_print_private_bfd_data_common().
3735 (pe_bfd_copy_private_bfd_data): Call
3736 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3737 _bfd_pe_bfd_copy_private_bfd_data_common().
3738 (coff_bfd_copy_private_section_data): Define as
3739 _bfd_XX_bfd_copy_private_section_data instead of
3740 _bfd_pe_bfd_copy_private_section_data.
3741 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3742 of a _bfd_pe_get_symbol_info.
3743
3744 * peigen.c: Delete.
3745
3746 * peXXigen.c: Renamed from peigen.c.
3747 (COFF_WITH_XX): Define this macro (will get expanded into
3748 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3749 compiled as peigen.c or pepigen.c.
3750 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3751 define the canonical PEP structures and definitions.
3752 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3753 effect, enforce minimum file and section alignments. If
3754 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3755 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3756 so, by default, this is a no-op).
3757
3758 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3759 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3760 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3761 _bfd_pefoo if it's not defined. Use these macros to define
3762 coff swap macros.
3763
3764 * libcoff.h (pe_tdata): Add members target_subsystem and
3765 force_minimum_alignment.
3766
3767 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3768 COFF_WITH_pep.
3769 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3770
3771 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3772 peigen.lo.
3773
3774 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3775 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3776 PEPAOUTHDR.
3777
3778 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3779 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3780 (peigen.c): Add rule to generate from peXXigen.c.
3781 (pepigen.c): Ditto.
3782 (pepigen.lo): List dependencies for pepigen.lo.
3783
37842001-02-13 Alan Modra <alan@linuxcare.com.au>
3785
3786 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3787 $global$ referenced but not defined, set its value here.
3788
37892001-02-09 Bo Thorsen <bo@suse.de>
3790
3791 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3792 alignment to 3.
3793 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
3794 and relocation.
3795 (elf64_x86_64_relocate_section): Fix formatting.
3796 (elf64_x86_64_relocate_section): Fix addend for relocation of
3797 R_X86_64_(8|16|32|PC8|PC16|PC32).
3798
37992001-02-12 Jan Hubicka <jh@suse.cz>
3800
3801 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3802
38032001-02-11 H.J. Lu <hjl@gnu.org>
3804
3805 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3806 alignment.
3807
38082001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3809
3810 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
3811 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
3812 relocations against dynsym symbols.
3813
3814 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
3815 the R_MIPS_26 relocation.
3816 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
3817 the R_MIPS_26 relocation.
3818 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
3819 relocation.
3820 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
3821 the R_MIPS_26 relocation.
3822 (mips_elf64_howto_table_rela): Likewise.
3823
3824 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
3825 member to mark symbols that have non-CALL relocations against
3826 them.
3827 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3828 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
3829 R_MIPS_GOT16.
3830 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
3831 non-CALL relocation against it is encountered.
3832 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
3833 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
3834 no_fn_stub is not set.
3835
3836 * elf32-mips.c (mips_elf_output_extsym): Get the output section
3837 information from the real symbol for indirect ones.
3838 Check no_fn_stub to find out if a symbol has a function stub
3839 indeed.
3840
38412001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
3842
3843 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
3844 * Makefile.in: Regenerate.
3845
38462001-02-09 David Mosberger <davidm@hpl.hp.com>
3847
3848 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
3849 true if section name is an unwind table section name.
3850 (elfNN_ia64_additional_program_headers): Count each unwind section
3851 separately.
3852 (elfNN_ia64_modify_segment_map): Install one unwind program header
3853 for each unwind separate section. Note: normally the linker
3854 script merges the unwind sections that go into a single segment,
3855 so this still generates at most one unwind program header per
3856 segment.
3857
3858 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
3859 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
3860 (elfNN_ia64_fake_sections): Mark sections with names that start
3861 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
3862 unwind section.
3863
3864 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
3865 Use it to make sh_info in unwind section point to the text section
3866 it applies to.
3867
38682001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3869
3870 * Makefile.am: Add linux target for S/390.
3871 * archures.c: Likewise.
3872 * bfd-in2.h: Likewise.
3873 * config.bfd: Likewise.
3874 * configure.in: Likewise.
3875 * elf.c: Likewise.
3876 * libbfd.h: Likewise.
3877 * targets.c: Likewise.
3878 * cpu-s390.c: New file.
3879 * elf32-s390.c: New file.
3880 * elf64-s390.c: New file.
3881
38822001-02-09 Nick Clifton <nickc@redhat.com>
3883
3884 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
3885 ImageBase. This has already been done by coff_swap_hdr_in.
3886
38872001-02-09 Jakub Jelinek <jakub@redhat.com>
3888
3889 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
3890
38912001-02-09 Jakub Jelinek <jakub@redhat.com>
3892
3893 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
3894 (sparc64_elf_relocate_section): Likewise.
3895
38962001-02-09 Mark Kettenis <kettenis@gnu.org>
3897
3898 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
3899 similar to R_SPARC_32.
3900 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3901
39022001-02-08 H.J. Lu <hjl@gnu.org>
3903
3904 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
3905 relocation entries for weak definitions when building DSO with
3906 -Bsymbolic.
3907
39082001-02-08 Richard Henderson <rth@redhat.com>
3909
3910 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
3911 before visibility. Locally defined protected symbols are not
3912 dynamic.
3913
39142001-02-08 Geoffrey Keating <geoffk@redhat.com>
3915
3916 * config.bfd: Enable coff64 for rs6000-*. Patch from
3917 <hzoli@austin.ibm.com>.
3918
39192001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
3920
3921 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
3922 found, do not attempt to find dwarf2 info before returning.
3923
39242001-02-07 Jakub Jelinek <jakub@redhat.com>
3925
3926 * elflink.h (is_global_symbol_definition): Rename to
3927 is_global_data_symbol_definition and have it reject function
3928 symbols.
3929 (elf_link_is_defined_archive_symbol): Use renamed function.
3930
39312001-02-07 Todd Vierling <tv@wasabisystems.com>
3932
3933 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
3934 * libbfd.h (bfd_target_vector): Likewise.
3935 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
3936 make static; create pointer reference named bfd_target_vector.
3937 (_bfd_target_vector_entries): Calculate this based on the array
3938 typed _bfd_target_vector.
3939
39402001-02-06 H.J. Lu <hjl@gnu.org>
3941
3942 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
3943 internal symbols are not dynamic.
3944 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
3945
39462001-02-06 Nick Clifton <nickc@redhat.com>
3947
3948 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
3949 that it will not be pulled into the list of files that make up
3950 po/POTFILES.in.
3951 * Makefile.in: Regenerate.
3952 * po/bfd.pot: Regenerate.
3953
39542001-02-06 H.J. Lu <hjl@gnu.org>
3955
3956 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
3957 checking.
3958 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
3959 external_PEI_IMAGE_hdr.
3960
39612001-02-06 Kazu Hirata <kazu@hxi.com>
3962
3963 * elf-m10200.c: Fix formatting.
3964
39652001-02-04 Nick Clifton <nickc@redhat.com>
3966
3967 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
3968 rel, it will be handled later on.
3969
39702001-02-02 Fred Fish <fnf@ninemoons.com>
3971
3972 * Makefile.in: Fix typo.
3973
39742001-02-01 Kazu Hirata <kazu@hxi.com>
3975
3976 * elf-m10300.c: Fix formatting.
3977
39782001-01-30 Alan Modra <alan@linuxcare.com.au>
3979
3980 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
3981 (elf_backend_get_symbol_type): Define.
3982 (elf64_hppa_object_p): Set architecture and machine from elf
3983 header flags.
3984
39852001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
3986
3987 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
3988 before mdebug.
3989
39902001-01-26 Richard Henderson <rth@redhat.com>
3991
3992 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
3993 for non-default visibility.
3994 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
3995 delete ugly macro and replace with pretty function.
3996
39972001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
3998
3999 * coff-go32.c: Update copyright.
4000 * coff-stgo32.c: Likewise.
4001 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4002 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4003 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4004 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4005
40062001-01-25 Kazu Hirata <kazu@hxi.com>
4007
4008 * bfd-in2.h: Rebuild.
4009 * libbfd.h: Likewise.
4010
40112001-01-23 H.J. Lu <hjl@gnu.org>
4012
4013 * bfd-in2.h: Rebuild.
4014
40152001-01-23 H.J. Lu <hjl@gnu.org>
4016
4017 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4018 is NULL or PRIV(vms_rec) is outside of the buffer.
4019
40202001-01-23 Kazu Hirata <kazu@hxi.com>
4021
4022 * coff64-rs6000.c: Fix formatting.
4023 * coff-arm.c: Likewise.
4024 * coffgen.c: Likewise.
4025 * cofflink.c: Likewise.
4026 * coff-mcore.c: Likewise.
4027 * coff-mips.c: Likewise.
4028 * coff-pmac.c: Likewise.
4029 * coff-ppc.c: Likewise.
4030 * coff-rs6000.c: Likewise.
4031 * elf32.c: Likewise.
4032 * elf32-fr30.c: Likewise.
4033 * elf32-i370.c: Likewise.
4034 * elf32-i860.c: Likewise.
4035 * elf32-m32r.c: Likewise.
4036 * elf32-m68k.c: Likewise.
4037 * elf32-mcore.c: Likewise.
4038 * elf32-ppc.c: Likewise.
4039 * elf32-sh.c: Likewise.
4040 * elf32-v850.c: Likewise.
4041 * elf64-alpha.c: Likewise.
4042 * elf64-sparc.c: Likewise.
4043 * elflink.c: Likewise.
4044 * elflink.h: Likewise.
4045 * elf-m10200.c: Likewise.
4046 * elf-m10300.c: Likewise.
4047 * elfxx-ia64.c: Likewise.
4048
4049 * aoutx.h: Fix formatting.
4050 * bfd.c: Likewise.
4051 * bfd-in2.h: Likewise.
4052 * bfd-in.h: Likewise.
4053 * cpu-i386.c: Likewise.
4054 * cpu-m68hc11.c: Likewise.
4055 * dwarf2.c: Likewise.
4056 * elf64-x86-64.c: Likewise.
4057 * format.c: Likewise.
4058 * freebsd.h: Likewise.
4059 * hash.c: Likewise.
4060 * hp300hpux.c: Likewise.
4061 * hppabsd-core.c: Likewise.
4062 * hpux-core.c: Likewise.
4063
40642001-01-22 Bo Thorsen <bo@suse.de>
4065
4066 * elf64-x86-64.c: Added PIC support for X86-64.
4067 (elf64_x86_64_link_hash_newfunc): Function added.
4068 (elf64_x86_64_link_hash_table_create): Likewise.
4069 (elf64_x86_64_check_relocs): Likewise.
4070 (elf64_x86_64_gc_mark_hook): Likewise.
4071 (elf64_x86_64_gc_sweep_hook): Likewise.
4072 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4073 (elf64_x86_64_size_dynamic_sections): Likewise.
4074 (elf64_x86_64_discard_copies): Likewise.
4075 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4076 (elf64_x86_64_finish_dynamic_sections): Likewise.
4077 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4078
40792001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4080
4081 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4082 * Makefile.in: Regenerate.
4083
40842001-01-21 Kazu Hirata <kazu@hxi.com>
4085
4086 * coff-a29k.c: Fix formatting.
4087
40882001-01-19 H.J. Lu <hjl@gnu.org>
4089
4090 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4091 relocation section names.
4092 (elf_i386_relocate_section): Report files with bad relocation
4093 section names and return false.
4094
40952001-01-17 Bo Thorsen <bo@suse.de>
4096
4097 * targets.c: Alphabetize list of xvecs.
4098
40992001-01-14 Alan Modra <alan@linuxcare.com.au>
4100
4101 * config.bfd: Add linux target variant for elfxx-hppa.
4102 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4103 bfd_elf64_hppa_linux_vec.
4104 * configure: Regenerate.
4105 * elf64-hppa.c: Include elf64-target.h again to support linux
4106 target variant.
4107 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4108 * elf32-hppa.c: Include elf32-target.h again to support linux
4109 target variant.
4110 (elf32_hppa_post_process_headers): New function.
4111 (elf_backend_post_process_headers): Define.
4112 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4113 bfd_elf32_hppa_linux_vec.
4114
4115 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4116 and data_segment_base fields.
4117 (elf32_hppa_link_hash_table_create ): Init them.
4118 (elf32_hppa_check_relocs): Update comments.
4119 (hppa_record_segment_addr): New function.
4120 (elf32_hppa_relocate_section): Call it.
4121 (final_link_relocate): Handle R_PARISC_SEGREL32.
4122 (elf32_hppa_final_link): New function.
4123 (bfd_elf32_bfd_final_link): Define to call it.
4124 (hppa_unwind_entry_compare): New function.
4125 * cache.c (bfd_open_file): Create files in write+read mode.
4126
4127 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4128 SEGREL32 and numerous other relocs. Change duplicate
4129 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4130
4131 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4132 O_ACCMODE.
4133
4134 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4135 .plt entries for DT_INIT and DT_FINI.
4136 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4137 DT_INIT and DT_FINI.
4138
4139 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4140 offsets for stub .plt access if wide mode. Check offset in range.
4141
41422001-01-13 Nick Clifton <nickc@redhat.com>
4143
4144 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4145 line.
4146
4147 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4148 line.
4149
41502001-01-12 Alan Modra <alan@linuxcare.com.au>
4151
4152 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4153 * configure: Regenerate.
4154
41552001-01-11 Peter Targett <peter.targett@arccores.com>
4156
4157 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4158 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4159 * cpu-arc.c (arch_info_struct): Add entries for variants.
4160 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4161 (arc_get_mach) Don't assume machine names prefixed arc- before
4162 testing.
4163 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4164 selections.
4165 (arc_elf_final_write_processing) Likewise.
4166 (ELF_MACHINE_CODE) Use EM_ARC.
4167
41682001-01-10 Nick Clifton <nickc@redhat.com>
4169
4170 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4171
41722001-01-07 Philip Blundell <philb@gnu.org>
4173
4174 * README: Replace `bug-gnu-utils@gnu.org' with
4175 `bug-binutils@gnu.org'.
4176
41772001-01-04 Kazu Hirata <kazu@hxi.com>
4178
4179 * som.c: Fix formatting.
4180
41812001-01-03 Kazu Hirata <kazu@hxi.com>
4182
4183 * ecoffswap.h: Fix formatting.
4184 * elf-bfd.h: Likewise.
4185 * elfarm-nabi.c: Likewise.
4186 * elfarm-oabi.c: Likewise.
4187 * elfcode.h: Likewise.
4188 * elfcore.h: Likewise.
4189 * elflink.c: Likewise.
4190 * elflink.h: Likewise.
4191 * elfxx-ia64.c: Likewise.
4192 * elfxx-target.h: Likewise.
4193 * libbfd.c: Likewise
4194 * linker.c: Likewise.
4195 * lynx-core.c: Likewise.
4196
41972001-01-02 Kazu Hirata <kazu@hxi.com>
4198
4199 * pc532-mach.c: Fix formatting.
4200 * pe-arm.c: Likewise.
4201 * pe-i386.c: Likewise.
4202 * pe-mips.c: Likewise.
4203 * pe-ppc.c: Likewise.
4204 * pe-sh.c: Likewise.
4205 * pei-mips.c: Likewise.
4206 * pei-sh.c: Likewise.
4207 * peicode.h: Likewise.
4208 * ppcboot.c: Likewise.
4209 * ptrace-core.c: Likewise.
4210
42112001-01-01 Kazu Hirata <kazu@hxi.com>
4212
4213 * reloc.c: Fix formatting.
4214 * riscix.c: Likewise.
4215 * rs6000-core.c: Likewise.
4216 * xcoff-target.h: Likewise.
4217
42182000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4219
4220 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4221 error, by calling bfd_default_set_arch_mach with incoming
4222 values.
4223
42242000-12-26 Kazu Hirata <kazu@hxi.com>
4225
4226 * vaxnetbsd.c: Fix formatting.
4227 * versados.c: Likewise.
4228 * vms-gsd.c: Likewise.
4229 * vms-hdr.c: Likewise.
4230 * vms-misc.c: Likewise.
4231
42322000-12-25 Alexandre Oliva <aoliva@redhat.com>
4233
4234 * archive.c (coff_write_armap): Don't write more than symbol_count
4235 `archive_member_file_ptr's.
4236
42372000-12-25 Kazu Hirata <kazu@hxi.com>
4238
4239 * vms-tir.c: Fix formatting.
4240
42412000-12-23 Kazu Hirata <kazu@hxi.com>
4242
4243 * vms.c: Fix formatting.
4244 * vms.h: Likewise.
4245
42462000-12-21 Santeri Paavolainen <santtu@ssh.com>
4247
4248 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4249
4250 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4251
4252 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4253 arithmetic.
4254
4255 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4256
4257 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4258
42592000-12-21 Richard Sandiford <rsandifo@redhat.com>
4260
4261 * libbfd.c (bfd_get_bits): Added
4262 (bfd_put_bits): Likewise
4263 * bfd-in.h: Declared the above.
4264 * bfd-in2.h: Regenerated.
4265
42662000-12-20 Kazu Hirata <kazu@hxi.com>
4267
4268 * targets.c: Fix formatting.
4269 * tekhex.c: Likewise.
4270 * trad-core.c: Likewise.
4271
42722000-12-19 Kazu Hirata <kazu@hxi.com>
4273
4274 * sco5-core.c: Fix formatting.
4275 * section.c: Likewise.
4276 * sparclinux.c: Likewise.
4277 * sparclynx.c: Likewise.
4278 * sparcnetbsd.c: Likewise.
4279 * srec.c: Likewise.
4280 * stabs.c: Likewise.
4281 * stab-syms.c: Likewise.
4282 * sunos.c: Likewise.
4283 * syms.c: Likewise.
4284 * sysdep.h: Likewise.
4285
42862000-12-18 Nick Clifton <nickc@redhat.com>
4287
4288 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4289 defined.
4290 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4291 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4292
42932000-12-18 Nick Clifton <nickc@redhat.com>
4294
4295 * vms-misc.c (_bfd_vms_get_record): Add default case to
4296 file_format switch.
4297
42982000-12-15 Miloslav Trmac <mitr@volny.cz>
4299
4300 * elfcore.h (elf_core_file_p): Move to the start of the program
4301 headers before attempting to read them.
4302
43032000-12-14 Kazu Hirata <kazu@hxi.com>
4304
4305 * peigen.c: Fix formatting.
4306 * som.c: Likewise.
4307 * som.h: Likewise.
4308
43092000-12-13 Kazu Hirata <kazu@hxi.com>
4310
4311 * peigen.c: Fix formatting.
4312
43132000-12-12 Jim Wilson <wilson@redhat.com>
4314
4315 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4316
43172000-12-08 Mark Salter <msalter@redhat.com>
4318
4319 * binary.c (binary_set_section_contents): Ignore sections
4320 with zero size.
4321
43222000-12-12 Kazu Hirata <kazu@hxi.com>
4323
4324 * m68klinux.c: Fix formatting.
4325 * m68knetbsd.c: Likewise.
4326 * mipsbsd.c: Likewise.
4327 * netbsd-core.c: Likewise.
4328 * netbsd.h: Likewise.
4329 * newsos3.c: Likewise.
4330 * nlm32-alpha.c: Likewise.
4331 * nlm32-i386.c: Likewise.
4332 * nlm32-ppc.c: Likewise.
4333 * nlm32-sparc.c: Likewise.
4334 * nlmcode.h: Likewise.
4335 * nlmswap.h: Likewise.
4336 * nlm-target.h: Likewise.
4337 * ns32knetbsd.c: Likewise.
4338
43392000-12-10 Fred Fish <fnf@be.com>
4340
4341 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4342 symbols in shared objects if allow_shlib_undefined is true.
4343
43442000-12-12 Nick Clifton <nickc@redhat.com>
4345
4346 * cpu-sh.c: Fix formattng.
4347 * elf.c: Fix formattng.
4348 * elf32-mips.c: Fix formattng.
4349 * elf32-sh.c: Fix formattng.
4350 * elf64-alpha.c: Fix formattng.
4351
43522000-12-09 Nick Clifton <nickc@redhat.com>
4353
4354 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4355 dwarf2_find_line_info as last parameter to invocation of
4356 _bfd_dwarf2_find_nearest_line.
4357 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4358 dwarf2_find_line_info as last parameter to invocation of
4359 _bfd_dwarf2_find_nearest_line.
4360
43612000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4362
4363 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4364 (BFD_LIBS): ...to here.
4365 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4366 (BFD_LIBS_CFILES): ...to here.
4367 * Makefile.in: Regenerate.
4368 * configure.in: Remove dwarf.lo from the elf shell variable.
4369 * configure: Regenerate.
4370 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4371 * libcoff.h: Regenerate.
4372 * coffgen.c (coff_find_nearest_line): Call
4373 _bfd_dwarf2_find_nearest_line.
4374 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4375 accordingly.
4376 (read_abbrevs): Likewise
4377 (decode_line_info): Likewise.
4378 (parse_comp_unit): Likewise.
4379 (comp_unit_find_nearest_line): Likewise.
4380 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4381 * libbfd.h: Regenerate.
4382 * elf.c (_bfd_elf_find_nearest_line): Update call.
4383 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4384 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4385 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4386 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4387 (styp_to_sec_flags): Handle DWARF2 sections.
4388 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4389 to _bfd_find_nearest_line.
4390 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4391 call to _bfd_find_nearest_line.
4392
43932000-12-08 Kazu Hirata <kazu@hxi.com>
4394
4395 * coffgen.c: Fix formatting.
4396 * elf-m10300.c: Likewise.
4397 * elf32-i386.c: Likewise.
4398 * elf32-i960.c: Likewise.
4399 * elf32-m68k.c: Likewise.
4400 * elf32-mcore.c: Likewise.
4401 * elf32-ppc.c: Likewise.
4402 * elf32-sh.c: Likewise.
4403 * elf32-sparc.c: Likewise.
4404 * elf32-v850.c: Likewise.
4405 * elf64-alpha.c: Likewise.
4406 * elf64-hppa.c: Likewise.
4407 * elf64-mips.c: Likewise.
4408 * elf64-sparc.c: Likewise.
4409
44102000-12-07 Kazu Hirata <kazu@hxi.com>
4411
4412 * elf32-ppc.c: Fix formatting.
4413 * elf64-x86-64.c: Likewise.
4414
44152000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4416
4417 From Ralf Baechle <ralf@gnu.org>
4418
4419 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4420 BFDs containing no sections or empty .text, .data or .bss sections
4421 to be merged, regardless of their flags.
4422
44232000-12-06 Kazu Hirata <kazu@hxi.com>
4424
4425 * elf32-m32r.c: Fix formatting.
4426 * elf32-m68hc11.c: Likewise.
4427 * elf32-m68hc12.c: Likewise.
4428 * elf32-m68k.c: Likewise.
4429 * elf32-mcore.c: Likewise.
4430 * elf32-pj.c: Likewise.
4431 * elf32-ppc.c: Likewise.
4432
44332000-12-05 Kazu Hirata <kazu@hxi.com>
4434
4435 * elf32-fr30.c: Fix formatting.
4436 * elf32-hppa.c: Likewise.
4437 * elf32-i370.c: Likewise.
4438 * elf32-i386.c: Likewise.
4439 * elf32-i860.c: Likewise.
4440 * elf32-i960.c: Likewise.
4441
44422000-12-03 Kazu Hirata <kazu@hxi.com>
4443
4444 * elf32-arm.h: Fix formatting.
4445 * elf32-avr.c: Likewise.
4446 * elf32-cris.c: Likewise.
4447 * elf32-d10v.c: Likewise.
4448 * elf32-d30v.c: Likewise.
4449 * elf-hppa.h: Likewise.
4450 * elf-m10200.c: Likewise.
4451 * elf-m10300.c: Likewise.
4452
44532000-12-01 Chris Demetriou <cgd@sibyte.com>
4454
4455 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4456 bfd_mach_mips32_4k. Update FIXME comment.
4457 * archures.c (bfd_mach_mips32): New constant.
4458 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4459 the latter, renumber it.
4460 * bfd-in2.h (bfd_mach_mips32): New constant.
4461 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4462 the latter, renumber it.
4463 * cpu-mips.c (I_mips32): New constant.
4464 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4465 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4466 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4467 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4468 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4469 with E_MIPS_MACH_MIPS32_4K.
4470 (_bfd_mips_elf_final_write_processing): Replace
4471 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4472 bfd_mach_mips32 case.
4473 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4474 comparison with support for MIPS32.
4475 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4476 MIPS32.
4477
4478 * aoutx.h (NAME(aout,machine_type)): Add cases for
4479 bfd_mach_mips5 and bfd_mach_mips64.
4480 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4481 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4482 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4483 (arch_info_struct): Add entries for bfd_mach_mips5 and
4484 bfd_mach_mips64.
4485 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4486 _bfd_mips_elf_print_private_bfd_data): Add cases for
4487 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4488 (_bfd_mips_elf_final_write_processing): Add cases for
4489 bfd_mach_mips5 and bfd_mach_mips64.
4490
4491 * aoutx.h (NAME(aout,machine_type)): Add a
4492 bfd_mach_mips_sb1 case.
4493 * archures.c (bfd_mach_mips_sb1): New constant.
4494 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4495 * cpu-mips.c (I_sb1): New constant.
4496 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4497 * elf32-mips.c (elf_mips_mach): Add case for
4498 E_MIPS_MACH_SB1.
4499 (_bfd_mips_elf_final_write_processing): Add case for
4500 bfd_mach_mips_sb1.
4501
45022000-12-01 Joel Sherrill <joel@OARcorp.com>
4503
4504 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4505 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4506 (sparc*-*-rtems*): Switched from a.out to ELF.
4507
45082000-11-30 Jan Hubicka <jh@suse.cz>
4509
4510 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4511 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4512 (elf64-x86-64.lo): Add dependencies.
4513 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4514 bfd_mach_x86_64_intel_syntax.
4515 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4516 * config.bfd (x86_64): Add.
4517 * configure.in: Add support for bfd_elf64_x86_64_vec.
4518 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4519 (bfd_i386_arch, i8086_ar): Link in.
4520 * elf64-x86-64.c: New file.
4521 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4522 * targets.c (bfd_elf64_x86_64_vec): Add.
4523 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4524
45252000-11-30 Kazu Hirata <kazu@hxi.com>
4526
4527 * xcofflink.c: Fix formatting.
4528
45292000-11-28 Kazu Hirata <kazu@hxi.com>
4530
4531 * aoutx.h: Fix formatting.
4532 * bfd-in.h: Likewise.
4533 * bfd-in2.h: Likewise.
4534 * cache.c: Likewise.
4535 * cisco-core.c: Likewise.
4536 * coff64-rs6000.c: Likewise.
4537 * coffcode.h: Likewise.
4538 * coffswap.h: Likewise.
4539 * corefile.c: Likewise.
4540 * elf32-mips.c: Likewise.
4541
45422000-11-27 Kazu Hirata <kazu@hxi.com>
4543
4544 * aout-adobe.c: Fix formatting.
4545 * coff64-rs6000.c: Likewise.
4546 * coffgen.c: Likewise.
4547 * cofflink.c: Likewise.
4548
45492000-11-27 Philip Blundell <pb@futuretv.com>
4550
4551 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4552 (obj_coff_strings_written): New accessor macro for above.
4553 * libcoff.h: Regenerate.
4554 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4555 strings.
4556 * coffcode.h (coff_write_object_contents): No need to write out
4557 the string table if it's already been done.
4558
45592000-11-22 Philip Blundell <pb@futuretv.com>
4560
4561 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4562 weak undefined symbols.
4563
45642000-11-24 Nick Clifton <nickc@redhat.com>
4565
4566 * archures.c (bfd_mach_arm_5TE): Define.
4567 (bfd_mach_arm+XScale): Define.
4568 * bfd-in2.h: Regenerate.
4569
4570 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4571 BFD_RELOC_ARM_PCREL_BLX.
4572
4573 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4574 XScale machine numbers.
4575
4576 * config.bfd (xscale-elf): Add target.
4577 (xscale-coff): Add target.
4578
4579 * cpu-arm.c: Add xscale machine name.
4580 Add v5t, v5te and XScale machine numbers.
4581
45822000-11-23 Kazu Hirata <kazu@hxi.com>
4583
4584 * aix386-core.c: Fix formatting.
4585
45862000-11-22 Jim Wilson <wilson@redhat.com>
4587
4588 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4589 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4590 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4591 (ins_imms_scaled): Initialize sign_bit at function entry.
4592 (elf64_ia64_operands): Add missing initializers.
4593 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4594 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4595 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4596 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4597 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4598 parameters.
4599 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4600 and free_extsyms at function entry.
4601 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4602 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4603 (get_got): Delete unused local srel.
4604 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4605 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4606
46072000-11-21 Kazu Hirata <kazu@hxi.com>
4608
4609 * coff-a29k.c: Fix formatting.
4610 * coff-h8500.c: Likewise.
4611 * coff-i960.c: Likewise.
4612 * coff-ppc.c: Likewise.
4613 * coff-rs6000.c: Likewise.
4614 * coff-stgo32.c: Likewise.
4615 * coff-tic54x.c: Likewise.
4616 * coff-w65.c: Likewise.
4617 * cpu-h8500.c: Likewise.
4618 * cpu-hppa.c: Likewise.
4619 * cpu-ns32k.c: Likewise.
4620 * ecoff.c: Likewise.
4621 * ecofflink.c: Likewise.
4622
46232000-11-21 Nick Clifton <nickc@redhat.com>
4624
4625 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4626 remove possibility of infinite loop.
4627
46282000-11-20 Kazu Hirata <kazu@hxi.com>
4629
4630 * aix386-core.c: Fix formatting.
4631 * aout-adobe.c: Likewise.
4632 * aout-arm.c: Likewise.
4633 * aout-encap.c: Likewise.
4634 * aout-ns32k.c: Likewise.
4635 * aout-target.h: Likewise.
4636 * aout-tic30.c: Likewise.
4637 * aoutf1.h: Likewise.
4638 * aoutx.h: Likewise.
4639 * archive.c: Likewise.
4640 * bfd-in.h: Likewise.
4641 * bfd-in2.h: Likewise.
4642 * bfd.c: Likewise.
4643 * bout.c: Likewise.
4644
46452000-11-17 H.J. Lu <hjl@gnu.org>
4646
4647 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4648 pltoff entries for DT_INIT and DT_FINI.
4649 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4650 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4651 entries.
4652
46532000-11-16 Richard Henderson <rth@redhat.com>
4654
4655 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4656 (allocate_dynrel_entries): Likewise.
4657 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4658 (set_pltoff_entry): Likewise.
4659 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4660 (elfNN_ia64_reloc_type_lookup): Likewise.
4661 (elfNN_ia64_install_value): Likewise.
4662 (elfNN_ia64_relocate_section): Likewise.
4663 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4664 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4665
46662000-11-16 Kazu Hirata <kazu@hxi.com>
4667
4668 * cpu-a29k.c: Fix formatting.
4669 * cpu-alpha.c: Likewise.
4670 * cpu-arm.c: Likewise.
4671 * cpu-avr.c: Likewise.
4672 * cpu-d10v.c: Likewise.
4673 * cpu-h8500.c: Likewise.
4674 * cpu-hppa.c: Likewise.
4675 * cpu-i370.c: Likewise.
4676 * cpu-i386.c: Likewise.
4677 * cpu-i960.c: Likewise.
4678 * cpu-ia64-opc.c: Likewise.
4679 * cpu-ia64.c: Likewise.
4680 * cpu-m32r.c: Likewise.
4681 * cpu-m68hc11.c: Likewise.
4682 * cpu-m68hc12.c: Likewise.
4683 * cpu-m68k.c: Likewise.
4684 * cpu-m88k.c: Likewise.
4685 * cpu-mips.c: Likewise.
4686 * cpu-ns32k.c: Likewise.
4687 * cpu-pj.c: Likewise.
4688 * cpu-powerpc.c: Likewise.
4689 * cpu-sh.c: Likewise.
4690 * cpu-sparc.c: Likewise.
4691 * cpu-tic54x.c: Likewise.
4692 * cpu-v850.c: Likewise.
4693 * cpu-vax.c: Likewise.
4694 * cpu-w65.c: Likewise.
4695 * cpu-we32k.c: Likewise.
4696 * cpu-z8k.c: Likewise.
4697 * dwarf1.c: Likewise.
4698 * dwarf2.c: Likewise.
4699
47002000-11-15 Kazu Hirata <kazu@hxi.com>
4701
4702 * coff-arm.c: Fix formatting.
4703 * coff-ppc.c: Likewise.
4704 * coff-rs6000.c: Likewise.
4705 * coff-sh.c: Likewise.
4706 * coff-sparc.c: Likewise.
4707 * coff-tic30.c: Likewise.
4708 * coff-tic54x.c: Likewise.
4709 * coff-tic80.c: Likewise.
4710 * coff-w65.c: Likewise.
4711 * coff-we32k.c: Likewise.
4712 * coff-z8k.c: Likewise.
4713
47142000-11-15 Richard Henderson <rth@redhat.com>
4715
4716 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4717 section with the same ALLOC|LOAD flags as the source section.
4718
47192000-11-14 Jakub Jelinek <jakub@redhat.com>
4720
4721 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4722 by STO_ALPHA constants.
4723
47242000-11-14 Kazu Hirata <kazu@hxi.com>
4725
4726 * coff-pmac.c: Fix formatting.
4727 * coff-ppc.c: Likewise.
4728
47292000-11-13 H.J. Lu <hjl@gnu.org>
4730
4731 * elflink.h (elf_link_add_object_symbols): Also add indirect
4732 symbols for common symbols with the default version.
4733
47342000-11-09 Philip Blundell <pb@futuretv.com>
4735
4736 * section.c (STD_SECTION): Set gc_mark flag.
4737
47382000-11-11 Kazu Hirata <kazu@hxi.com>
4739
4740 * coff-i960.c: Likewise.
4741 * coff-m68k.c: Likewise.
4742 * coff-m88k.c: Likewise.
4743 * coff-mcore.c: Likewise.
4744 * coff-mips.c: Likewise.
4745
47462000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4747
4748 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4749
47502000-11-10 Kazu Hirata <kazu@hxi.com>
4751
4752 * coff-h8300.c: Fix formatting.
4753 * coff-h8500.c: Likewise.
4754 * coff-i386.c: Likewise.
4755 * coff-i860.c: Likewise.
4756 * coff-i960.c: Likewise.
4757 * coff-ia64.c: Likewise.
4758
47592000-11-09 Kazu Hirata <kazu@hxi.com>
4760
4761 * archive.c: Fix formatting.
4762 * archures.c: Likewise.
4763
47642000-11-07 Richard Henderson <rth@redhat.com>
4765
4766 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4767 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4768 * section.c (bfd_set_section_contents): Call memcpy if
4769 section->contents set and location not equal to contents plus offset.
4770
47712000-11-08 Kazu Hirata <kazu@hxi.com>
4772
4773 * bfd-in.h: Fix formatting.
4774 * bfd-in2.h: Likewise.
4775 * bfd.c: Likewise.
4776 * binary.c: Likewise.
4777 * bout.c: Likewise.
4778 * coff-a29k.c: Likewise.
4779 * coff-alpha.c: Likewise.
4780 * coff-apollo.c: Likewise.
4781 * coff-aux.c: Likewise.
4782
47832000-11-07 Kazu Hirata <kazu@hxi.com>
4784
4785 * aix386-core.c: Fix formatting.
4786 * aoutf1.h: Likewise.
4787 * aoutx.h: Likewise.
4788 * archures.c: Likewise.
4789 * armnetbsd.c: Likewise.
4790
47912000-11-07 Alan Modra <alan@linuxcare.com.au>
4792
4793 * coff-h8300.c (special): Adjust reloc address.
4794
47952000-11-06 Steve Ellcey <sje@cup.hp.com>
4796
4797 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
4798 to differentiate elf32 and elf64 on ia64.
4799 * bfd-in2.h: Regenerate.
4800 * config.bfd: Add target for "ia64*-*-hpux*".
4801 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
4802 * configure: Regenerate.
4803 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
4804 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
4805
4806 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
4807 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
4808 * Makefile.in: Regnerate.
4809 * elf64-ia64.c: Deleted.
4810 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
4811
48122000-11-06 Kazu Hirata <kazu@hxi.com>
4813
4814 * aout-adobe.c: Fix formatting.
4815 * aout-arm.c: Likewise.
4816 * aout-cris.c: Likewise.
4817 * aout-encap.c: Likewise.
4818 * aout-ns32k.c: Likewise.
4819 * aout-target.h: Likewise.
4820 * aout-tic30.c: Likewise.
4821
48222000-11-05 Philip Blundell <philb@gnu.org>
4823
4824 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4825 BFDs containing no sections to be merged, regardless of their flags.
4826
48272000-11-04 Philip Blundell <philb@gnu.org>
4828
4829 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4830 if a relocation for an undefined symbol also results in an
4831 overflow.
4832
48332000-11-06 Christopher Faylor <cgf@cygnus.com>
4834
4835 * config.bfd: Add support for Sun Chorus.
4836
48372000-11-05 David O'Brien <obrien@FreeBSD.org>
4838
4839 * configure.in: Recognize alpha-*-freebsd*.
4840 * configure: Regenerate.
4841
48422000-11-02 Luciano Gemme <ishitawa@yahoo.com>
4843
4844 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
4845 (Chunk): New global variable set by a parameter in objcopy.c.
4846 (S3Forced): New global variable set by a parameter in
4847 objcopy.c.
4848 (srec_set_section_contents): If S3Forced is true, always generate
4849 S3 records.
4850 (srec_write_section): Use 'Chunk' to limit maximum length of S
4851 records.
4852
48532000-11-02 Per Lundberg <plundis@chaosdev.org>
4854
4855 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
4856 * Makefile.in: Regenerate.
4857 * bfd-in2.h: Regenerate.
4858 * po/bfd.pot: Regenerate.
4859
48602000-10-31 Philip Blundell <philb@gnu.org>
4861
4862 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
4863 EF_SOFT_FLOAT if it is defined.
4864
48652000-10-27 Philip Blundell <philb@gnu.org>
4866
4867 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
4868 attempts to mix PIC code with non-PIC, just mark the output as
4869 being position dependent.
4870 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
4871 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
4872 all mismatches, not just the first one.
4873
48742000-10-25 Chris Demetriou <cgd@sibyte.com>
4875
4876 * ieee.c (ieee_archive_p): Plug one of many possible
4877 memory leaks in error handling.
4878
48792000-10-20 Jakub Jelinek <jakub@redhat.com>
4880
4881 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
4882 elf32_sparc_object_p, elf32_sparc_final_write_processing):
4883 Support v8plusb.
4884 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
4885 sparc64_elf_object_p): Support v9b.
4886 * archures.c: Declare v8plusb and v9b machines.
4887 * bfd-in2.h: Ditto.
4888 * cpu-sparc.c: Ditto.
4889
48902000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4891
4892 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
4893 of a GOT reloc.
4894
4895 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
4896 (SYMBOL_CALLS_LOCAL): New macro.
4897 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
4898 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
4899 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
4900 (ppc_elf_relocate_section): Use flag variable to determine
4901 whether the relocation refers to a local symbol.
4902 Test whether a PLTREL24 reloc will produce a reloc by looking
4903 to see whether a PLT entry was made.
4904
49052000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4906
4907 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
4908 entries that could serve as a definition for a weak symbol.
4909
49102000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
4911
4912 From Ralf Baechle <ralf@gnu.org>
4913
4914 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
4915 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
4916 against local symbols.
4917 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
4918
49192000-10-12 Alan Modra <alan@linuxcare.com.au>
4920
4921 * section.c (struct sec): Add kept_section.
4922 (struct bfd_comdat_info): Remove sec, we can use above.
4923 (STD_SECTION): Add initializer.
4924 (bfd_make_section_anyway): Init here too.
4925
4926 * bfd-in2.h: Regenerate.
4927
4928 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
4929 zeroing of `flags'.
4930 (elf_link_input_bfd): Set all asection->symbol->value's here, and
4931 fudge values for discarded link-once section symbols.
4932
4933 * elf64-hppa.c: Include alloca-conf.h
4934
49352000-10-11 Alan Modra <alan@linuxcare.com.au>
4936
4937 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
4938
4939 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
4940
49412000-10-10 Alan Modra <alan@linuxcare.com.au>
4942
4943 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
4944
49452000-10-10 Tom Rix <trix@redhat.com>
4946
4947 * section.c (bfd_make_section_anyway): Release newsect ptr when
4948 newsect->symbol fails to alloc. Use bfd_release instead of free.
4949
49502000-10-09 Richard Henderson <rth@cygnus.com
4951
4952 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
4953 (elf64_ia64_unwind_entry_compare): New.
4954 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
4955
49562000-10-07 Alan Modra <alan@linuxcare.com.au>
4957
4958 * elflink.h (size_dynamic_sections): Don't create various tags if
4959 .dynstr is excluded from the link. Don't set first dynsym entry
4960 if dynsymcount is zero.
4961 (elf_bfd_final_link): Don't try to swap out dynamic syms if
4962 .dynsym excluded from the link. Don't try to write any dynamic
4963 sections excluded from the link.
4964
4965 * elf.c (swap_out_syms): Handle global section symbols.
4966
49672000-10-05 DJ Delorie <dj@redhat.com>
4968
4969 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
4970 * coffcode.h (coff_set_alignment_hook): read extended reloc count
4971 (coff_write_relocs): write extended reloc count
4972 (coff_write_object_contents): account for extended relocs
4973
49742000-10-05 Jim Wilson <wilson@cygnus.com>
4975
4976 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
4977 field.
4978 * elf.c (_bfd_elf_make_section_from_shdr): Call the
4979 elf_backend_section_flags function.
4980 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
4981 code.
4982 (elf64_ia64_section_flags): New function containing flag conversion
4983 code.
4984 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
4985 * elfxx-target.h (elf_backend_section_flags): Define.
4986 (elfNN_bed): Initialize elf_backend_section_flags field.
4987
49882000-10-02 Alan Modra <alan@linuxcare.com.au>
4989
4990 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
4991 _bfd_elf32_gc_record_vtable. Correct a comment.
4992
49932000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
4994
4995 From Ralf Baechle <ralf@gnu.org>
4996
4997 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
4998 produces binaries with got[1] = 0x80000001 to differenciate them
4999 for the dynamic linker from the broken binaries produced by old
5000 versions.
5001
50022000-09-30 Petr Sorfa <petrs@sco.com>
5003
5004 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5005 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5006 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5007 * configure: Regenerate.
5008
50092000-09-27 Hans-Peter Nilsson <hp@axis.com>
5010
5011 Define two bfd_targets for absence and presence of leading
5012 underscore on symbols. Make sure to only link same kind.
5013 * elf32-cris.c (cris_elf_object_p,
5014 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5015 cris_elf_merge_private_bfd_data): New.
5016 (elf_backend_object_p, elf_backend_final_write_processing,
5017 bfd_elf32_bfd_print_private_bfd_data,
5018 bfd_elf32_bfd_merge_private_bfd_data): Define.
5019 <Target vector definition>: Include elf32-target.h twice with
5020 different macro settings:
5021 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5022 bfd_elf32_us_cris_vec.
5023 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5024 (elf_symbol_leading_char): First as 0, then '_'.
5025 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5026 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5027 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5028 * configure: Regenerate.
5029 * targets.c: Declare bfd_elf32_us_cris_vec.
5030 * po/bfd.pot: Regenerate.
5031
50322000-09-29 Momchil Velikov <velco@fadata.bg>
5033
5034 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5035 R_ARM_THM_PC22 relocations.
5036
50372000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5038
5039 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5040
50412000-09-29 Momchil Velikov <velco@fadata.bg>
5042
5043 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5044 is has the SEC_HAS_CONTENTS flag set.
5045