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