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