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