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