If the LMA for a segment is known, use it for matching sections to segments.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2001-10-30 Richard Earnshaw (rearnsha@arm.com)
2
3 * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
4 p_paddr of the segment that contains it.
5 (copy_private_bfd_data): If the LMA for a segment is known, use it
6 for matching sections to segments.
7 (assign_file_positions_for_segments): Use the LMA when adjusting
8 for inter-section alignment padding.
9
10 2001-10-29 Kazu Hirata <kazu@hxi.com>
11
12 * README: Fix a typo.
13
14 2001-10-24 Richard Henderson <rth@redhat.com>
15
16 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
17 timestamp to time_t for ctime.
18
19 2001-10-24 Hans-Peter Nilsson <hp@axis.com>
20
21 * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
22 unsigned, increasing index.
23
24 2001-10-23 H.J. Lu <hjl@gnu.org>
25
26 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
27 m != NULL before accessing it.
28
29 2001-10-23 Alan Modra <amodra@bigpond.net.au>
30
31 * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
32 bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
33 doesn't accept BFD_RELOC_* on some targets, eg. hppa.
34
35 * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
36 (hppa_link_hash_newfunc): Likewise.
37 (elf32_hppa_finish_dynamic_symbol): Likewise.
38 (allocate_dynrelocs): Always allocate .got relocs if shared.
39 (elf32_hppa_relocate_section): Output them too. Similarly
40 consolidate .plt reloc code, and no longer initialise .plt
41 when a reloc is output.
42 (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
43 when no reloc is output.
44
45 From Herbert Xu <herbert@gondor.apana.org.au>
46 * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
47 unreachable branches.
48
49 2001-10-22 H.J. Lu <hjl@gnu.org>
50
51 * configure.in (WIN32LIBADD): Use -L../libiberty for
52 mips*-*-linux*.
53 * configure: Rebuild.
54
55 2001-10-21 H.J. Lu <hjl@gnu.org>
56
57 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
58 if shared library is enabled only for Linux hosts.
59 * configure: Rebuild.
60
61 2001-10-21 H.J. Lu <hjl@gnu.org>
62
63 * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
64 ../libiberty/Makefile instead of $enable_shared.
65 * configure: Rebuild.
66
67 2001-10-21 H.J. Lu <hjl@gnu.org>
68
69 * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
70 index 0.
71
72 2001-10-20 H.J. Lu <hjl@gnu.org>
73
74 * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
75 if shared library is enabled.
76 * configure: Rebuild.
77
78 2001-10-20 H.J. Lu <hjl@gnu.org>
79
80 * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
81
82 2001-10-19 H.J. Lu <hjl@gnu.org>
83
84 * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
85 size is empty.
86
87 2001-10-18 H.J. Lu <hjl@gnu.org>
88
89 * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
90 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
91
92 2001-10-18 Jakub Jelinek <jakub@redhat.com>
93
94 * section.c (_bfd_strip_section_from_output): Don't count
95 SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
96
97 2001-10-17 Alan Modra <amodra@bigpond.net.au>
98
99 * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
100 Elf_Internal_Shdr.contents now that it's no longer a PTR.
101 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
102 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
103 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
104 * elf32-sh.c (sh_elf_relax_section): Likewise.
105 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
106 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
107 * elf.c (setup_group): Warning fixes.
108 * elflink.h (elf_link_sort_relocs): Likewise.
109 * pdp11.c (slurp_reloc_table): Likewise.
110
111 2001-10-16 Jeff Holcomb <jeffh@redhat.com>
112
113 * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
114 casts.
115
116 2001-10-15 H.J. Lu <hjl@gnu.org>
117
118 * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
119 for relocations against discarded link-once section.
120
121 2001-10-15 Alan Modra <amodra@bigpond.net.au>
122
123 * elf32-i386.c (elf_i386_relocate_section): Report some detail on
124 bfd_reloc_outofrange and similar errors.
125
126 * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
127 rather than ind->weakdef.
128 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
129 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
130 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
131 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
132 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
133
134 2001-10-15 Alan Modra <amodra@bigpond.net.au>
135 H.J. Lu <hjl@gnu.org>
136
137 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
138 counts for aliases instead of aborting.
139 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
140 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
141
142 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
143 to -1 for non-function symbols.
144 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
145 * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
146 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
147 * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
148 * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
149 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
150 plt.offset instead of plt.refcount when setting to -1.
151
152 2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
153
154 * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
155 like R_ARM_PC24. Include reloc number in error message about
156 unresolvable relocs.
157
158 2001-10-10 Jakub Jelinek <jakub@redhat.com>
159
160 * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
161 relocations against the same symbol in .rel{,a}.dyn section.
162
163 2001-10-10 Kazu Hirata <kazu@hxi.com>
164
165 * aout-encap.c: Fix comment typos.
166 * aoutx.h: Likewise.
167 * archive.c: Likewise.
168 * bout.c: Likewise.
169 * coff64-rs6000.c: Likewise.
170 * coffcode.h: Likewise.
171 * coffgen.c: Likewise.
172 * cofflink.c: Likewise.
173 * coff-mips.c: Likewise.
174 * ecoff.c: Likewise.
175 * elf32-m32r.c: Likewise.
176 * libcoff-in.h: Likewise.
177 * libecoff.h: Likewise.
178 * libxcoff.h: Likewise.
179 * nlm32-i386.c: Likewise.
180 * pdp11.c: Likewise.
181 * section.c: Likewise.
182 * som.c: Likewise.
183 * som.h: Likewise.
184 * bfd-in2.h: Regenerate.
185 * libcoff.h: Likewise.
186
187 2001-10-10 Alan Modra <amodra@bigpond.net.au>
188
189 * elf.c (elf_map_symbols): Don't create new section symbols; Use
190 existing section syms. Update comments.
191 (copy_private_bfd_data): Formatting fixes.
192 (elfcore_grok_win32pstatus): Likewise.
193 (swap_out_syms): Likewise. Remove unnecessary level of braces.
194
195 2001-10-09 Alan Modra <amodra@bigpond.net.au>
196
197 * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
198 "group_name".
199 (elf_group_name): Define.
200 (elf_next_in_group): Define.
201 * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
202 (setup_group): Don't use sec->lineno for SHT_GROUP section to store
203 first member section; Instead use elf_next_in_group.
204 (bfd_section_from_shdr): Likewise.
205 (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
206
207 2001-10-09 Alan Modra <amodra@bigpond.net.au>
208
209 * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
210 "next_in_group". Fix gp and gp_size comments.
211 * elf.c (union elf_internal_group): New.
212 (setup_group): New function.
213 (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
214 Call setup_group for SHF_GROUP sections.
215 (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
216 (elf_fake_sections): Set header type for SEC_GROUP, and header
217 flags for sections in a group.
218 (set_group_contents): New function.
219 (_bfd_elf_compute_section_file_positions): Call it.
220 (assign_section_numbers): Set sh_link for SHT_GROUP.
221
222 * elflink.h (gc_mark_hook): Handle section groups.
223 * elfxx-target.h: Add SEC_GROUP to applicable_flags.
224 * section.c (SEC_GROUP): Define.
225 (struct sec): Comment fixes.
226 * bfd-in2.h: Regenerate.
227
228 * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
229 out of function args.
230 (_bfd_elf_canonicalize_reloc): Similarly.
231 (_bfd_elf_get_symtab): Here too.
232 (_bfd_elf_canonicalize_dynamic_symtab): And here.
233 * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
234 bfd_bread, and remove unnecessary cast.
235
236 2001-10-08 Aldy Hernandez <aldyh@redhat.com>
237
238 * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
239
240 2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
241
242 * dwarf2.c (comp_unit_find_nearest_line): Check for end of
243 compilation unit.
244
245 2001-10-06 Alan Modra <amodra@bigpond.net.au>
246
247 * bfd.c (bfd_assert): Report bfd version.
248 (_bfd_abort): Likewise.
249
250 * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
251 section sym values. Instead replace any relocs against them with
252 relocs against STN_UNDEF, which has a zero value.
253
254 * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
255 relocs.
256
257 2001-10-05 Jeff Law <law@redhat.com>
258
259 * som.h (som_exec_data): New field "version_id".
260 * som.c (som_object_setup): Record the version_id if it
261 exists.
262 (som_prep_headers): Do not initialize version_id here.
263 (som_finish_writing): Initialize version_id here.
264
265 2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
266
267 * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
268 according to the MIPS/SGI ELF64 ABI Draft.
269 (mips_elf_sort_hash_table): Typo.
270
271 2001-10-04 Alan Modra <amodra@bigpond.net.au>
272
273 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
274
275 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
276 copying flags if this is a weakdef.
277
278 2001-10-04 Alan Modra <amodra@bigpond.net.au>
279
280 * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
281 packing.
282
283 * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
284 to 1 rather than 0 to avoid confusing copy_indirect_symbol.
285 (mips_elf_sort_hash_table_f): Compare got.offset against 1.
286
287 * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
288 depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
289 backends we configure. Run "make dep-am".
290 (install-data-local): Install symcat.h.
291 * dep-in.sed: Remove symcat.h from dependencies.
292 * Makefile.in: Regenerate.
293
294 2001-10-03 Vassili Karpov <malc@pulsesoft.com>
295
296 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
297
298 2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
299
300 * elf64-mips.c (elf_backend_may_use_rela_p): New define.
301 (elf_backend_default_use_rela_p): New define.
302
303 2001-10-03 Alan Modra <amodra@bigpond.net.au>
304
305 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
306 change.
307
308 * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
309 * configure: Regenerate.
310 * Makefile.am (BFD_H_FILES): Add version.h.
311 * Makefile.in: Regenerate.
312 * po/SRC-POTFILES.in: Regenerate.
313
314 * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
315 elf_backend_copy_indirect_symbol so that backend has a chance to
316 copy other necessary fields.
317 * elf-bfd.h (struct elf_backend_data): Update description of
318 elf_backend_copy_indirect_symbol.
319 * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
320 copying flags if this is a weakdef.
321 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
322 (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
323 than bfd_link_hash_lookup.
324 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
325 reloc processing for weakdefs.
326 * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
327 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
328
329 2001-10-02 Alan Modra <amodra@bigpond.net.au>
330
331 * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
332 result of ELF64_R_TYPE to enum before using in a switch.
333 (ppc64_elf_gc_mark_hook): Likewise.
334 (ppc64_elf_gc_sweep_hook): Likewise.
335 (ppc64_elf_reloc_type_class): Likewise.
336
337 2001-10-02 Alan Modra <amodra@bigpond.net.au>
338
339 * version.h: New file.
340 * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
341 (BFD_VERSION_DATE): Define.
342 (BFD_VERSION_STRING): Define.
343 * configure.in: AC_SUBST bfd_version, bfd_version_date and
344 bfd_version_string.
345 (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
346 * bfd-in2.h: Regenerate.
347 * configure: Regenerate.
348 * Makefile.am: Run "make dep-am".
349 * Makefile.in: Regenerate.
350
351 * bfd-in.h: Include "symcat.h".
352 (CONCAT4): Redefine as for old CAT4.
353 * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
354 Add warning regarding whitespace.
355 * aout-cris.c: Likewise.
356 * aout-ns32k.c: Likewise.
357 * aout-sparcle.c: Likewise.
358 * aout-tic30.c: Likewise.
359 * aout0.c: Likewise.
360 * armnetbsd.c: Likewise.
361 * demo64.c: Likewise.
362 * elf-bfd.h: Likewise.
363 * gen-aout.c: Likewise.
364 * host-aout.c: Likewise.
365 * hp300bsd.c: Likewise.
366 * hp300hpux.c: Likewise.
367 * i386aout.c: Likewise.
368 * i386bsd.c: Likewise.
369 * i386dynix.c: Likewise.
370 * i386freebsd.c: Likewise.
371 * i386linux.c: Likewise.
372 * i386lynx.c: Likewise.
373 * i386mach3.c: Likewise.
374 * i386netbsd.c: Likewise.
375 * libaout.h: Likewise.
376 * m68k4knetbsd.c: Likewise.
377 * m68klinux.c: Likewise.
378 * m68klynx.c: Likewise.
379 * m68knetbsd.c: Likewise.
380 * m88kmach3.c: Likewise.
381 * mipsbsd.c: Likewise.
382 * newsos3.c: Likewise.
383 * ns32knetbsd.c: Likewise.
384 * pc532-mach.c: Likewise.
385 * pdp11.c: Likewise.
386 * riscix.c: Likewise.
387 * sparclinux.c: Likewise.
388 * sparclynx.c: Likewise.
389 * sparcnetbsd.c: Likewise.
390 * sunos.c: Likewise.
391 * targets.c: Likewise.
392 * vaxnetbsd.c: Likewise.
393 * vms-hdr.c: Likewise.
394
395 2001-10-01 Alan Modra <amodra@bigpond.net.au>
396
397 * bfd-in.h: Remove comments regarding generated files.
398 * libbfd-in.h: Likewise.
399 * libcoff-in.h: Likewise.
400 * bfd-in2.h: Regenerate.
401 * libbfd.h: Likewise.
402 * libcoff.h: Likewise.
403
404 2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
405 Hans-Peter Nilsson <hp@bitrange.com>
406
407 * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
408 partial_inplace, matching assembler output. Set src_mask to
409 all ones.
410 (sh_elf_relocate_section): Delete misplaced comment.
411 For relocatable linking against section symbol, call
412 _bfd_relocate_contents for partial_inplace relocs and adjust
413 rel->r_addend for others.
414 <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
415 bfd_get_32, not at rel->r_addend.
416
417 2001-09-30 Alan Modra <amodra@bigpond.net.au>
418
419 * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
420 the old dir refcount, so we indirectly set them to init_refcount.
421 Short-circuit asserts when we've just verified they are true.
422
423 2001-09-29 Alan Modra <amodra@bigpond.net.au>
424
425 * section.c (struct sec): Remove kept_section.
426 (STD_SECTION): Remove kept_section initialisation.
427 (bfd_make_section_anyway): Here too.
428 * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
429 * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
430 * elflink.h (elf_link_input_bfd): Set discarded link-once section
431 symbols to zero, and remove all code involved with kept_section
432 and tracking section symbol values.
433 * bfd-in2.h: Regenerate.
434 * configure.in: Bump version number.
435 * configure: Regenerate.
436
437 2001-09-29 Alan Modra <amodra@bigpond.net.au>
438
439 * elf64-ppc.c (struct ppc_dyn_relocs): New.
440 (IS_ABSOLUTE_RELOC): Define.
441 (struct ppc_link_hash_entry): New.
442 (struct ppc_link_hash_table): New.
443 (ppc_hash_table): Define.
444 (link_hash_newfunc): New function.
445 (ppc64_elf_link_hash_table_create): New function.
446 (create_got_section): New function.
447 (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
448 pointers to our dynamic sections in hash table.
449 (ppc64_elf_copy_indirect_symbol): New function.
450 (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
451 dynamic sections. Localise vars. Modify code for refcounts
452 starting from zero. Don't allocate here, or force symbols dynamic.
453 Don't copy all relocs if shared, select ones we need. Add code
454 to track possible copy relocs for non-shared link.
455 (ppc64_elf_gc_mark_hook): Update comment.
456 (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
457 (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
458 code for reference counting garbage collection. Don't create .plt
459 entries for functions that don't comply with ABI naming convention,
460 and don't allocate .plt space here. Use short-cuts to dynamic
461 sections. If possible, keep dynamic relocations instead of using
462 copy relocs. Remove confused comments.
463 (ppc_adjust_dynindx): Delete.
464 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
465 (allocate_dynrelocs): New function.
466 (readonly_dynrelocs): New function.
467 (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
468 space here, and call allocate_dynrelocs to allocate space for
469 global .plt, .got and reloc sections. Use short-cuts to dynamic
470 sections. Call readonly_dynrelocs to determine whether we need
471 DT_TEXTREL. Don't generate section symbols here, the generic
472 ELF linker code does it for us.
473 (ppc64_elf_final_link): Call regular ELF backend linker rather than
474 gc variety, since we do our own .got handling.
475 (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
476 dynamic section short-cuts. Localise vars, and delay setting.
477 Handle unknown relocs in main switch statement. Replace ugly
478 complicated tests for unresolvable relocs with a simple direct
479 scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
480 before allowing an undefined sym in a shared lib. Do R_*_DS tests
481 after main switch, when we've set addend. Do non-addend insn
482 tweaks before main swithc. Ignore input_section->vma when
483 calculating reloc offsets as it's always zero. Rewrite dynamic
484 reloc handling. Consolidate R_*_HA handling. Handle more relocs.
485 (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
486 of dynamic section short-cuts. Reorganise .plt handling code.
487 Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
488 Move expressions out of swap_reloca_out function calls.
489 (ppc64_elf_reloc_type_class): New function.
490 (ppc64_elf_info_to_howto): Move common expression to local var.
491 (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
492 of dynamic section short-cuts. Don't fiddle with section syms
493 here as the ELF linker does it for us.
494 (elf_backend_can_refcount): Define.
495 (bfd_elf64_bfd_link_hash_table_create): Define.
496 (elf_backend_copy_indirect_symbol): Define.
497 (elf_backend_reloc_type_class): Define.
498 (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
499
500 2001-09-29 Alan Modra <amodra@bigpond.net.au>
501
502 * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
503 (struct elf_backend_data): Add can_refcount.
504 * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
505 got.refcount and plt.refcount from init_refcount.
506 (_bfd_elf_link_hash_table_init): Set up init_refcount.
507 (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
508 rather than got/plt.offset, and test for <= 0 rather than -1.
509 * elflink.h (size_dynamic_sections): Set init_refcount to -1.
510 * elfxx-target.h (elf_backend_can_refcount): Define.
511 (elfNN_bed): Init can_refcount.
512 * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
513 (_bfd_generic_link_hash_newfunc): Likewise.
514 * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
515 starting from zero.
516 (elf_backend_can_refcount): Define.
517 * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
518 starting from zero.
519 (elf32_hppa_copy_indirect_symbol): Make static to agree with
520 prototype.
521 (elf_backend_can_refcount): Define.
522 * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
523 starting from zero.
524 (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
525 (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
526 (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
527 (elf_backend_can_refcount): Define.
528 (elf_i386_copy_indirect_symbol): Make static to agree with
529 prototype. Formatting fix.
530 * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
531 starting from zero.
532 (elf_backend_can_refcount): Define.
533 * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
534 starting from zero.
535 (elf_backend_can_refcount): Define.
536 * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
537 starting from zero.
538 (elf_backend_can_refcount): Define.
539 * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
540 starting from zero.
541 (elf_backend_can_refcount): Define.
542 * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
543 starting from zero.
544 (elf_backend_can_refcount): Define.
545
546 * som.c (som_write_symbol_strings): Cast current_offset in
547 bfd_seek call to match param type.
548
549 2001-09-28 J. Brobecker <brobecker@gnat.com>
550
551 * som.c (som_write_symbol_strings): Fix incorrect type of
552 current_offset to match the function definition. Fixes a build
553 failure on HPUX-11.00.
554
555 2001-09-28 Richard Henderson <rth@redhat.com>
556
557 * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
558 SEC_MERGE, SEC_STRINGS.
559
560 * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
561 * bfd-in2.h: Rebuild.
562
563 2001-09-28 Alan Modra <amodra@bigpond.net.au>
564
565 * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
566 reloc code using x86_64_reloc_map.
567
568 * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
569 no longer allocate here. Localise some vars to blocks where they
570 are used.
571 (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
572 setting of vars until needed.
573 (allocate_dynrelocs): Don't create a .plt entry without a reloc
574 when symbol visibilty makes a function local.
575 (elf32_hppa_finish_dynamic_symbol): Move expressions out of
576 swap_reloca_out function calls.
577 (elf32_hppa_relocate_section): Likewies. Comment typo fix.
578 (elf32_hppa_finish_dynamic_sections): Migrate common code out of
579 switch statement.
580
581 * elf32-i386.c (elf_i386_check_relocs): Update comment since we
582 no longer allocate here. Localise some vars to blocks where they
583 are used. Remove separate switch stmt for creating .got sec.
584 (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
585 redundant casts and aborts. Delay setting of vars until needed.
586 (allocate_dynrelocs): Remove redundant casts and aborts.
587 (elf_i386_size_dynamic_sections): Move comment.
588 (elf_i386_finish_dynamic_symbol): Move expressions out of function
589 calls.
590 (elf_i386_relocate_section): Likewise. Comment typo fix.
591 (elf_i386_finish_dynamic_sections): Migrate common code out of
592 switch statement.
593 (elf_backend_* defines): Sort.
594
595 * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
596 without a reloc when symbol visibilty makes a function local.
597
598 2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
599
600 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
601 conflicting float flags.
602
603 2001-09-26 Alan Modra <amodra@bigpond.net.au>
604
605 * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
606 (elf_backend_copy_indirect_symbol): Define.
607 (struct elf_i386_link_hash_entry): Rename "root" to "elf".
608 (struct elf_i386_link_hash_table): Likewise.
609 (link_hash_newfunc): Get rid of unnecessary casts.
610 (elf_i386_link_hash_table_create): Likewise.
611 (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
612 Don't test input section SEC_READONLY here to try to avoid copy
613 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
614 (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
615 here to properly test whether we need copy relocs. Do so for weak
616 syms too.
617
618 * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
619 (elf_backend_copy_indirect_symbol): Define.
620 (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
621 (stub_hash_newfunc): Get rid of unnecessary casts.
622 (hppa_link_hash_newfunc): Likewise.
623 (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
624 Don't test input section SEC_READONLY here to try to avoid copy
625 relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
626 (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
627 here to properly test whether we need copy relocs. Do so for weak
628 syms too.
629
630 2001-09-26 Alan Modra <amodra@bigpond.net.au>
631
632 * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
633 VA_OPEN, VA_FIXEDARG, VA_CLOSE.
634 (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
635
636 2001-09-25 Jakub Jelinek <jakub@redhat.com>
637
638 * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
639 computation.
640
641 2001-09-25 H.J. Lu <hjl@gnu.org>
642
643 * bfd-in2.h: Regenerated.
644
645 2001-09-25 Alan Modra <amodra@bigpond.net.au>
646
647 * elf32-i386.c: Add comment re linker function names and ordering.
648 (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
649 (elf_i386_grok_prstatus): Move before linker functions.
650 (elf_i386_grok_psinfo): Likewise.
651 (elf_i386_fake_sections): Move so that functions are ordered.
652 (elf_i386_reloc_type_class): Likewise. Comment function purpose.
653
654 2001-09-25 Alan Modra <amodra@bigpond.net.au>
655
656 * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
657 throughout file.
658
659 * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
660 code handling this option.
661 (LONG_BRANCH_VIA_PLT): Likewise.
662 (RELATIVE_DYNRELOCS): Define as zero.
663 (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
664 "pc_count" fields. Remove "section" field.
665 (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
666 (elf32_hppa_check_relocs): Don't allocate space for dynamic
667 relocs here. Instead, record all needed dynamic relocs via
668 dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
669 in elf_section_data.
670 (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
671 (allocate_plt_and_got_and_discard_relocs): Rename to
672 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
673 (readonly_dynrelocs): New function.
674 (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
675 Call readonly_dynrelocs to determine need for DT_TEXTREL.
676 Rename "i" to "ibfd". Allocate space for local dyn relocs.
677 (elf32_hppa_relocate_section): Make use of cached sreloc.
678 (elf32_hppa_reloc_type_class): New function.
679 (elf_backend_reloc_type_class): Define.
680
681 2001-09-25 Alan Modra <amodra@bigpond.net.au>
682
683 * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
684 and "sreloc" fields.
685 * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
686 "pc_count" fields. Remove "section" field.
687 (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
688 allocate space for dynamic relocs here. Instead, record all
689 needed dynamic relocs via dyn_relocs and local_dynrel. Cache
690 pointer to "sreloc" section in elf_section_data.
691 (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
692 (allocate_plt_and_got_and_discard_relocs): Rename to
693 allocate_dynrelocs. Allocate rather than discarding dyn relocs.
694 (readonly_dynrelocs): New function.
695 (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
696 Rename "i" to "ibfd". Allocate space for local dyn relocs.
697 (elf_i386_relocate_section): Make use of cached sreloc.
698
699 2001-09-24 Alan Modra <amodra@bigpond.net.au>
700
701 * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
702 reloc rather than just the type.
703 (_bfd_elf_reloc_type_class): Likewise.
704 * elf.c (_bfd_elf_reloc_type_class): Likewise.
705 * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
706 * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
707 * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
708 * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
709 * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
710 * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
711 * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
712 * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
713 * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
714 * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
715 * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
716 * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
717 * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
718 * elflink.h: Formatting fixes.
719 (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
720 Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
721 o->contents to PTR. Update call to elf_backend_reloc_type_class.
722
723 2001-09-22 John Reiser <jreiser@BitWagon.com>
724
725 * elfcode.h (elf_object_p): Allow for no section header at all in
726 non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
727
728 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
729
730 * elfxx-ia64.c: Fix compile time warning messages.
731 * coff-mcore.c: Fix compile time warning messages.
732 * coff-ppc.c: Fix compile time warning messages.
733 * coffcode.h: Fix compile time warning messages.
734 * elf32-mips.c: Fix compile time warning messages.
735 * elf64-alpha.c: Fix compile time warning messages.
736 * libbfd.c: Fix compile time warning messages.
737 * bfd-in2.h: Regenerate.
738
739 2001-09-21 Alan Modra <amodra@bigpond.net.au>
740
741 * Makefile.am: Run "make dep-am".
742 * Makefile.in: Regenerate.
743
744 * aoutx.h: Formatting fixes.
745 * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
746
747 * linker.c: Replace bfd_get_filename with bfd_archive_filename
748 in error message.
749
750 2001-09-21 Alan Modra <amodra@bigpond.net.au>
751
752 * bfd.c (bfd_archive_filename): New function.
753 * bfd-in2.h: Regenerate.
754 * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
755 in error messages where the bfd is an input bfd.
756 * aout-cris.c: Likewise.
757 * coff-arm.c: Likewise.
758 * coff-mcore.c: Likewise.
759 * coff-ppc.c: Likewise.
760 * coff-rs6000.c: Likewise.
761 * coff-sh.c: Likewise.
762 * coff-tic54x.c: Likewise.
763 * coff-tic80.c: Likewise.
764 * coff64-rs6000.c: Likewise.
765 * coffcode.h: Likewise.
766 * coffgen.c: Likewise.
767 * cofflink.c: Likewise.
768 * ecofflink.c: Likewise.
769 * elf-hppa.h: Likewise.
770 * elf.c: Likewise.
771 * elf32-arm.h: Likewise.
772 * elf32-cris.c: Likewise.
773 * elf32-gen.c: Likewise.
774 * elf32-hppa.c: Likewise.
775 * elf32-i370.c: Likewise.
776 * elf32-i386.c: Likewise.
777 * elf32-m32r.c: Likewise.
778 * elf32-mcore.c: Likewise.
779 * elf32-mips.c: Likewise.
780 * elf32-ppc.c: Likewise.
781 * elf32-s390.c: Likewise.
782 * elf32-sh.c: Likewise.
783 * elf32-sparc.c: Likewise.
784 * elf32-v850.c: Likewise.
785 * elf64-alpha.c: Likewise.
786 * elf64-gen.c: Likewise.
787 * elf64-ppc.c: Likewise.
788 * elf64-s390.c: Likewise.
789 * elf64-sparc.c: Likewise.
790 * elf64-x86-64.c: Likewise.
791 * elflink.h: Likewise.
792 * elfxx-ia64.c: Likewise.
793 * ieee.c: Likewise.
794 * ihex.c: Likewise.
795 * libbfd.c: Likewise.
796 * pdp11.c: Likewise.
797 * pe-mips.c: Likewise.
798 * peicode.h: Likewise.
799 * srec.c: Likewise.
800 * xcofflink.c: Likewise.
801
802 * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
803
804 * elflink.c (_bfd_elf_create_linker_section): Better grammar for
805 error message.
806
807 * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
808 error message.
809
810 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
811 Consolidate error messages, and split long messages to two lines.
812
813 2001-09-20 John Reiser <jreiser@BitWagon.com>
814
815 * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
816 and info->allow_shlib_undefined.
817 * elf32-cris.c: Likewise.
818 * elf32-hppa.c: Likewise.
819 * elf32-m68k.c: Likewise.
820 * elf32-mips.c: Likewise.
821 * elf32-ppc.c: Likewise.
822 * elf32-s390.c: Likewise.
823 * elf32-sh.c: Likewise.
824 * elf32-sparc.c: Likewise.
825 * elf64-alpha.c: Likewise.
826 * elf64-hppa.c: Likewise.
827 * elf64-ppc.c: Likewise.
828 * elf64-s390.c: Likewise.
829 * elf64-sparc.c: Likewise.
830 * elf64-x86-64.c: Likewise.
831 * elfxx-ia64.c: Likewise.
832
833 2001-09-18 Bruno Haible <haible@clisp.cons.org>
834
835 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
836 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
837 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
838 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
839 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
840 (bfd_default_scan): Use ISDIGIT instead of isdigit.
841 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
842 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
843 isxdigit/isdigit/islower.
844 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
845 (mangle_name): Use ISALNUM instead of isalnum.
846 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
847 (scan): Use ISDIGIT instead of isdigit.
848 * hosts/alphavms.h: Don't include <ctype.h>.
849 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
850 (ieee_object_p): Use TOUPPER instead of toupper.
851 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
852 (ihex_bad_byte): Use ISPRINT instead of isprint.
853 * merge.c: Don't include <ctype.h>.
854 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
855 (oasys_write_sections): Use ISDIGIT instead of isdigit.
856 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
857 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
858 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
859 (mangle_name): Use ISALNUM instead of isalnum.
860 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
861 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
862 isupper/islower/isdigit.
863 (som_decode_symclass): Use TOUPPER instead of toupper.
864 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
865 (srec_bad_byte): Use ISPRINT instead of isprint.
866 (srec_scan): Use ISSPACE instead of isspace.
867 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
868 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
869 * syms.c: Include "safe-ctype.h"
870 (islower, toupper): Remove macro definitions.
871 (bfd_decode_symclass): Use TOUPPER instead of toupper.
872 * vms-gsd.c: Don't include <ctype.h>.
873 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
874 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
875 islower/toupper.
876 * vms-tir.c: Don't include <ctype.h>.
877
878 2001-09-18 Alan Modra <amodra@bigpond.net.au>
879
880 * libbfd.c (bfd_bread): New function replacing bfd_read without
881 redundant params. Allow reads up to (size_t) -2 in length.
882 (bfd_bwrite): Similarly for bfd_write.
883 (real_read): Return a size_t.
884 (bfd_read): Call bfd_bread.
885 (bfd_write): Call bfd_bwrite.
886 (warn_deprecated): New function to annoy everybody.
887 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
888 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
889 (bfd_read, bfd_write): Define as macro.
890 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
891 likewise for bfd_write. Ensure function args are correct size by
892 using casts or local vars. In some cases, remove unnecessary
893 casts. Formatting fixes, in some cases removing a large expression
894 from function args by using a local var. Replace CONST with const.
895 Modify variable types to avoid warings. Use casts to avoid
896 warnings when using negative numbers in unsigned expressions.
897 * aout-adobe.c: Likewise.
898 * aout-arm.c: Likewise.
899 * aout-cris.c: Likewise.
900 * aout-encap.c: Likewise.
901 * aout-ns32k.c: Likewise.
902 * aout-target.h: Likewise.
903 * aout-tic30.c: Likewise.
904 * aoutf1.h: Likewise.
905 * aoutx.h: Likewise.
906 * archive.c: Likewise.
907 * archures.c: Likewise.
908 * bfd-in.h: Likewise.
909 * bfd.c: Likewise.
910 * binary.c: Likewise.
911 * bout.c: Likewise.
912 * cache.c: Likewise.
913 * cisco-core.c: Likewise.
914 * coff-a29k.c: Likewise.
915 * coff-alpha.c: Likewise.
916 * coff-arm.c: Likewise.
917 * coff-h8300.c: Likewise.
918 * coff-h8500.c: Likewise.
919 * coff-i386.c: Likewise.
920 * coff-i860.c: Likewise.
921 * coff-i960.c: Likewise.
922 * coff-ia64.c: Likewise.
923 * coff-m68k.c: Likewise.
924 * coff-m88k.c: Likewise.
925 * coff-mcore.c: Likewise.
926 * coff-mips.c: Likewise.
927 * coff-ppc.c: Likewise.
928 * coff-rs6000.c: Likewise.
929 * coff-sh.c: Likewise.
930 * coff-sparc.c: Likewise.
931 * coff-stgo32.c: Likewise.
932 * coff-tic30.c: Likewise.
933 * coff-tic54x.c: Likewise.
934 * coff-tic80.c: Likewise.
935 * coff-w65.c: Likewise.
936 * coff-z8k.c: Likewise.
937 * coff64-rs6000.c: Likewise.
938 * coffcode.h: Likewise.
939 * coffgen.c: Likewise.
940 * cofflink.c: Likewise.
941 * coffswap.h: Likewise.
942 * corefile.c: Likewise.
943 * cpu-arc.c: Likewise.
944 * cpu-h8300.c: Likewise.
945 * cpu-h8500.c: Likewise.
946 * cpu-i960.c: Likewise.
947 * cpu-ia64-opc.c: Likewise.
948 * cpu-ns32k.c: Likewise.
949 * cpu-pdp11.c: Likewise.
950 * cpu-pj.c: Likewise.
951 * cpu-sh.c: Likewise.
952 * cpu-w65.c: Likewise.
953 * cpu-z8k.c: Likewise.
954 * dwarf1.c: Likewise.
955 * dwarf2.c: Likewise.
956 * ecoff.c: Likewise.
957 * ecofflink.c: Likewise.
958 * ecoffswap.h: Likewise.
959 * elf-bfd.h: Likewise.
960 * elf-hppa.h: Likewise.
961 * elf-m10200.c: Likewise.
962 * elf-m10300.c: Likewise.
963 * elf.c: Likewise.
964 * elf32-arc.c: Likewise.
965 * elf32-arm.h: Likewise.
966 * elf32-avr.c: Likewise.
967 * elf32-cris.c: Likewise.
968 * elf32-fr30.c: Likewise.
969 * elf32-gen.c: Likewise.
970 * elf32-h8300.c: Likewise.
971 * elf32-hppa.c: Likewise.
972 * elf32-i370.c: Likewise.
973 * elf32-i386.c: Likewise.
974 * elf32-i860.c: Likewise.
975 * elf32-m32r.c: Likewise.
976 * elf32-m68k.c: Likewise.
977 * elf32-mcore.c: Likewise.
978 * elf32-mips.c: Likewise.
979 * elf32-openrisc.c: Likewise.
980 * elf32-pj.c: Likewise.
981 * elf32-ppc.c: Likewise.
982 * elf32-s390.c: Likewise.
983 * elf32-sh-lin.c: Likewise.
984 * elf32-sh.c: Likewise.
985 * elf32-sparc.c: Likewise.
986 * elf32-v850.c: Likewise.
987 * elf64-alpha.c: Likewise.
988 * elf64-hppa.c: Likewise.
989 * elf64-mips.c: Likewise.
990 * elf64-ppc.c: Likewise.
991 * elf64-s390.c: Likewise.
992 * elf64-sparc.c: Likewise.
993 * elf64-x86-64.c: Likewise.
994 * elfarm-nabi.c: Likewise.
995 * elfcode.h: Likewise.
996 * elfcore.h: Likewise.
997 * elflink.c: Likewise.
998 * elflink.h: Likewise.
999 * elfxx-ia64.c: Likewise.
1000 * elfxx-target.h: Likewise.
1001 * format.c: Likewise.
1002 * hash.c: Likewise.
1003 * hp300hpux.c: Likewise.
1004 * hppabsd-core.c: Likewise.
1005 * hpux-core.c: Likewise.
1006 * i386aout.c: Likewise.
1007 * i386dynix.c: Likewise.
1008 * i386linux.c: Likewise.
1009 * i386lynx.c: Likewise.
1010 * i386mach3.c: Likewise.
1011 * i386msdos.c: Likewise.
1012 * i386os9k.c: Likewise.
1013 * ieee.c: Likewise.
1014 * ihex.c: Likewise.
1015 * irix-core.c: Likewise.
1016 * libaout.h: Likewise.
1017 * libbfd-in.h: Likewise.
1018 * libbfd.c: Likewise.
1019 * libcoff-in.h: Likewise.
1020 * libecoff.h: Likewise.
1021 * libieee.h: Likewise.
1022 * libnlm.h: Likewise.
1023 * libpei.h: Likewise.
1024 * libxcoff.h: Likewise.
1025 * linker.c: Likewise.
1026 * lynx-core.c: Likewise.
1027 * m68klinux.c: Likewise.
1028 * merge.c: Likewise.
1029 * mipsbsd.c: Likewise.
1030 * netbsd-core.c: Likewise.
1031 * nlm.c: Likewise.
1032 * nlm32-alpha.c: Likewise.
1033 * nlm32-i386.c: Likewise.
1034 * nlm32-ppc.c: Likewise.
1035 * nlm32-sparc.c: Likewise.
1036 * nlmcode.h: Likewise.
1037 * nlmswap.h: Likewise.
1038 * ns32k.h: Likewise.
1039 * oasys.c: Likewise.
1040 * opncls.c: Likewise.
1041 * osf-core.c: Likewise.
1042 * pc532-mach.c: Likewise.
1043 * pdp11.c: Likewise.
1044 * pe-mips.c: Likewise.
1045 * peXXigen.c: Likewise.
1046 * peicode.h: Likewise.
1047 * ppcboot.c: Likewise.
1048 * ptrace-core.c: Likewise.
1049 * reloc.c: Likewise.
1050 * reloc16.c: Likewise.
1051 * riscix.c: Likewise.
1052 * rs6000-core.c: Likewise.
1053 * sco5-core.c: Likewise.
1054 * section.c: Likewise.
1055 * som.c: Likewise.
1056 * sparclinux.c: Likewise.
1057 * sparclynx.c: Likewise.
1058 * srec.c: Likewise.
1059 * stabs.c: Likewise.
1060 * sunos.c: Likewise.
1061 * syms.c: Likewise.
1062 * targets.c: Likewise.
1063 * tekhex.c: Likewise.
1064 * trad-core.c: Likewise.
1065 * versados.c: Likewise.
1066 * vms-gsd.c: Likewise.
1067 * vms-hdr.c: Likewise.
1068 * vms-misc.c: Likewise.
1069 * vms-tir.c: Likewise.
1070 * vms.c: Likewise.
1071 * vms.h: Likewise.
1072 * xcofflink.c: Likewise.
1073 * bfd-in2.h: Regenerate.
1074 * libbfd.h: Regenerate.
1075 * libcoff.h: Regenerate.
1076
1077 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
1078 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
1079 (ufile_ptr): Define.
1080 (bfd_tell): Return a ufile_ptr.
1081 * libbfd.c (bfd_tell): Likewise.
1082 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
1083 unnecessarily.
1084 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
1085 * aoutf1.h: Likewise.
1086 * som.c: Likewise.
1087 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
1088 larger than unsigned long can represent.
1089
1090 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
1091 size overflows size_t.
1092 (bfd_realloc): Likewise.
1093 (bfd_zmalloc): Likewise.
1094 * opncls.c (bfd_alloc): Likewise.
1095 (bfd_zalloc): Likewise.
1096 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
1097 (bfd_alloc, bfd_zalloc): Update.
1098
1099 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
1100 8 bits.
1101 (bfd_get_signed_8): Likewise.
1102 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
1103 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
1104 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
1105 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
1106 * libaout.h: Likewise define and use here.
1107 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
1108 * aout-arm.c: Likewise.
1109 * aout-encap.c: Likewise.
1110 * aout-ns32k.c: Likewise.
1111 * aout-tic30.c: Likewise.
1112 * aoutf1.h: Likewise.
1113 * aoutx.h: Likewise.
1114 * bout.c: Likewise.
1115 * coff-alpha.c: Likewise.
1116 * coff-h8300.c: Likewise.
1117 * coff-h8500.c: Likewise.
1118 * coff-i960.c: Likewise.
1119 * coff-ia64.c: Likewise.
1120 * coff-m88k.c: Likewise.
1121 * coff-mips.c: Likewise.
1122 * coff-ppc.c: Likewise.
1123 * coff-rs6000.c: Likewise.
1124 * coff-sh.c: Likewise.
1125 * coff-sparc.c: Likewise.
1126 * coff-stgo32.c: Likewise.
1127 * coff-tic30.c: Likewise.
1128 * coff-tic80.c: Likewise.
1129 * coff-w65.c: Likewise.
1130 * coff-z8k.c: Likewise.
1131 * coff64-rs6000.c: Likewise.
1132 * coffgen.c: Likewise.
1133 * cofflink.c: Likewise.
1134 * coffswap.h: Likewise.
1135 * ecoff.c: Likewise.
1136 * ecoffswap.h: Likewise.
1137 * elf.c: Likewise.
1138 * elf32-mips.c: Likewise.
1139 * elf64-mips.c: Likewise.
1140 * hp300hpux.c: Likewise.
1141 * i386dynix.c: Likewise.
1142 * i386lynx.c: Likewise.
1143 * i386msdos.c: Likewise.
1144 * i386os9k.c: Likewise.
1145 * libpei.h: Likewise.
1146 * nlm32-alpha.c: Likewise.
1147 * nlm32-i386.c: Likewise.
1148 * nlm32-ppc.c: Likewise.
1149 * nlmcode.h: Likewise.
1150 * nlmswap.h: Likewise.
1151 * oasys.c: Likewise.
1152 * pdp11.c: Likewise.
1153 * pe-mips.c: Likewise.
1154 * peXXigen.c: Likewise.
1155 * peicode.h: Likewise.
1156 * riscix.c: Likewise.
1157 * sunos.c: Likewise.
1158 * xcofflink.c: Likewise.
1159 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
1160 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
1161 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
1162 equivalent H_PUT_* macro instead.
1163 (GETWORD, GETHALF, GETBYTE): Similarly.
1164 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1165 (GETWORD, GETHALF, GETBYTE): Likewise.
1166 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
1167
1168 * bfd-in.h (struct orl): Change "pos" to a union.
1169 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
1170 (bsd_write_armap): Here too.
1171 (coff_write_armap): And here.
1172 * coff-rs6000.c (xcoff_write_armap_old): And here.
1173 (xcoff_write_one_armap_big): And here.
1174 (xcoff_write_armap_big): And here.
1175 * ecoff.c (_bfd_ecoff_write_armap): And here.
1176 * elf64-mips.c (mips_elf64_write_armap): And here.
1177
1178 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
1179 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
1180 * elf32-h8300.c (elf32_h8_mach): Likewise.
1181 * elf32-mips.c (elf_mips_mach): Likewise.
1182 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
1183
1184 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
1185 calls.
1186 (aix386_core_vec): Typo fix.
1187
1188 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
1189 etc. to avoid redefined macro warning.
1190 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
1191 (MY(fix_pcrel_26)): Likewise.
1192 * aout-ns32k.c (MY(put_reloc)): Likewise.
1193 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
1194 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
1195 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
1196
1197 * aout-encap.c: Include "file", not <file> for binutils headers.
1198 (encap_object_p): Half baked attempt to fix compile errors in
1199 code dealing with "magic".
1200
1201 * aout-ns32k.c: Include "file", not <file> for binutils headers.
1202 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
1203 bfd_vma's rather than longs.
1204 * cpu-ns32k.c (ns32k_sign_extend): Delete.
1205 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
1206 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
1207 remove case 3.
1208 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
1209 Use unsigned comparisons.
1210 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
1211 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
1212 (_bfd_do_ns32k_reloc_contents): Likewise.
1213 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
1214 (_bfd_ns32k_get_immediate): Likewise.
1215 (_bfd_ns32k_put_displacement): Likewise.
1216 (_bfd_ns32k_put_immediate): Likewise.
1217 (bfd_reloc_status_type): Likewise.
1218
1219 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
1220 to avoid shadowing.
1221 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
1222 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
1223 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
1224 avoid shadowing.
1225 (record_toc): Use a bfd_signed_vma for our_toc_offset.
1226 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
1227 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
1228 shadow warning.
1229 (_bfd_elfcore_strndup): Likewise for "dup".
1230 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
1231 "name" to avoid shadowing.
1232 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
1233 definition of "off".
1234 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1235 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
1236 definition of "s".
1237 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
1238 "secpp".
1239 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
1240 to avoid shadowing.
1241 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
1242 to avoid shadowing.
1243 (elf_link_input_bfd): Likewise.
1244 (elf_bfd_final_link): Remove duplicate innermost "off" var.
1245 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
1246 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
1247 "input_section".
1248 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
1249 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
1250 (sunos_write_dynamic_symbol): Remove unused vars.
1251 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
1252 innermost "directory_name" and "file_name" vars.
1253 * tekhex.c (first_phase): Rename local var "type" to "stype".
1254 (tekhex_write_object_contents): Rename innermost "s" to "sym".
1255 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
1256 doing comparison at caller.
1257 (vms_esecflag_by_name): Likewise.
1258 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
1259 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
1260 (xcoff_write_global_symbol): Rename "p" param to "inf".
1261
1262 * cisco-core.c: Add missing prototypes.
1263 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
1264 (cisco_core_file_failing_signal): Likewise.
1265 (cisco_core_file_matches_executable_p): Likewise.
1266 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
1267 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
1268 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
1269 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
1270
1271 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
1272 thumb_glue_size and arm_glue_size.
1273 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
1274
1275 * coff64-rs6000.c: Group prototypes together.
1276
1277 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
1278 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
1279
1280 * cpu-arc.c: Add missing prototypes.
1281 * cpu-h8500.c: Likewise.
1282 * cpu-i960.c: Likewise.
1283 * cpu-pj.c: Likewise.
1284 * cpu-sh.c: Likewise.
1285 * cpu-w65.c: Likewise.
1286 * cpu-z8k.c: Likewise.
1287 * elf32-fr30.c: Likewise.
1288 * elf32-h8300.c: Likewise.
1289 * elf32-i370.c: Likewise.
1290 * hpux-core.c: Likewise.
1291 * versados.c: Likewise.
1292
1293 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
1294 * cpu-h8500.c: Likewise.
1295 * cpu-i960.c: Likewise.
1296 * cpu-z8k.c: Likewise.
1297
1298 * cpu-ia64-opc.c: Correct comment.
1299
1300 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
1301
1302 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
1303 to unsigned.
1304 (bfd_elf32_write_out_phdrs): Likewise.
1305 (bfd_elf64_write_out_phdrs): Likewise.
1306 (elf_linker_section_pointers): Change addend to bfd_vma.
1307 (_bfd_elf_find_pointer_linker_section): Likewise.
1308 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
1309 filepos to unsigned file_ptr.
1310 (_bfd_elfcore_strndup): Change max param to size_t.
1311 * elf.c (_bfd_elfcore_make_pseudosection): As above.
1312 (_bfd_elfcore_strndup): Likewise.
1313 (_bfd_elf_find_pointer_linker_section): Likewise.
1314
1315 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
1316 insn and sym_value to ints.
1317
1318 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
1319 bfd_size_type.
1320 (elfcore_read_notes): Likewise.
1321
1322 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
1323 param from unsigned char to int.
1324 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
1325 for info_to_howto call.
1326 (add_dynamic_entry): Define macro.
1327 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
1328
1329 * elf32-cris.c (add_dynamic_entry): Define macro.
1330 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
1331
1332 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
1333 (elf32_h8_object_p): Likewise.
1334 (elf32_h8_merge_private_bfd_data): Likewise.
1335 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
1336
1337 * elf32-hppa.c (add_dynamic_entry): Define macro.
1338 (elf32_hppa_size_dynamic_sections): Use it.
1339 * elf32-i370.c (add_dynamic_entry): Define macro.
1340 (i370_elf_size_dynamic_sections): Use it.
1341 (i370_noop): Make static.
1342 * elf32-i386.c (add_dynamic_entry): Define macro.
1343 (elf_i386_size_dynamic_sections): Use it.
1344 * elf32-m68k.c (add_dynamic_entry): Define macro.
1345 (elf_m68k_size_dynamic_sections): Use it.
1346 * elf32-ppc.c (add_dynamic_entry): Define macro.
1347 (ppc_elf_size_dynamic_sections): Use it.
1348 * elf32-s390.c (add_dynamic_entry): Define macro.
1349 (elf_s390_size_dynamic_sections): Use it.
1350 * elf64-alpha.c (add_dynamic_entry): Define macro.
1351 (elf64_alpha_size_dynamic_sections): Use it.
1352 * elf64-hppa.c (add_dynamic_entry): Define macro.
1353 (elf64_hppa_size_dynamic_sections): Use it.
1354 * elf64-ppc.c (add_dynamic_entry): Define macro.
1355 (ppc64_elf_size_dynamic_sections): Use it.
1356 * elf64-s390.c (add_dynamic_entry): Define macro.
1357 (elf_s390_size_dynamic_sections): Use it.
1358 * elf64-sparc.c (add_dynamic_entry): Define macro.
1359 (sparc64_elf_size_dynamic_sections): Use it.
1360 * elf64-x86-64.c (add_dynamic_entry): Define macro.
1361 (elf64_x86_64_size_dynamic_sections): Use it.
1362 * elfxx-ia64.c (add_dynamic_entry): Define macro.
1363 (elfNN_ia64_size_dynamic_sections): Use it.
1364
1365 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
1366 (v850_elf_perform_relocation): Make "r_type" param unsigned.
1367
1368 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
1369 false if the first malloc fails rather than going via error_return.
1370
1371 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
1372 "index" param.
1373 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
1374
1375 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
1376
1377 * elfxx-ia64.c (global_sym_index): Return a long.
1378
1379 * ieee.c (get_symbol): Use int rather than char param.
1380 (ieee_slurp_sections): Move "section" var to inner blocks.
1381 (copy_expression): Don't init "value" to zero or worry about
1382 clearing to zero after using.
1383 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
1384 shadowing.
1385
1386 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
1387 unsigned int.
1388
1389 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
1390 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
1391
1392 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
1393
1394 * pc532-mach.c (MYNSX): Delete.
1395 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
1396 (write_object_contents): Correct prototype.
1397
1398 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
1399 than unsigned short.
1400
1401 * section.c (bfd_set_section_contents): Remove redundant
1402 "offset < 0" test. Check that "count" doesn't overflow size_t.
1403 (bfd_get_section_contents): Likewise.
1404
1405 * som.c (som_fixup_formats): Add missing braces.
1406 (som_reloc_addend): Pass a bfd_vma for "addend".
1407
1408 * srec.c (srec_write_record): Pass "type" as an unsigned int.
1409 (srec_write_symbols): Remove an unnecessary var.
1410
1411 * targets.c (_bfd_target_vector): Sort entries. Sort externs
1412 to match.
1413 * configure.in: Sort to match. Bump version number.
1414 * configure: Regenerate.
1415
1416 * tekhex.c (move_section_contents): Assert offset == 0.
1417
1418 * versados.c (new_symbol_string): Constify arg.
1419 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
1420 (versados_get_symbol_info): Make static.
1421 (versados_print_symbol): Likewise.
1422 (versados_get_reloc_upper_bound): Likewise.
1423 (versados_canonicalize_reloc): Likewise.
1424
1425 2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
1426
1427 * elflink.h (elf_link_input_bfd): Fix typo in error message.
1428
1429 2001-09-17 H.J. Lu <hjl@gnu.org>
1430
1431 * dwarf1.c (parse_die): Take a new arg for the end of the
1432 section. Return false if die is beyond the section.
1433 (parse_functions_in_unit): Pass the end of the section to
1434 parse_die ().
1435 (_bfd_dwarf1_find_nearest_line): Likewise.
1436
1437 2001-09-14 Michael Rauch <mrauch@netbsd.org>
1438
1439 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
1440 just like R_SPARC_32.
1441
1442 2001-09-14 Kevin Lo <kevlo@openbsd.org>
1443
1444 * configure.bfd: Add arm-openbsd target.
1445
1446 2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1447
1448 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
1449 Add support for mips64.
1450
1451 2001-09-13 Alexandre Oliva <aoliva@redhat.com>
1452
1453 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
1454
1455 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1456
1457 * elf.c (prep_headers): Get the machine code from the elf
1458 backend data.
1459 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
1460 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
1461 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1462 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1463 * elf-arc.c (arc_elf_final_write_processing): Don't override
1464 e_machine, it's now properly set in prep_headers.
1465 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
1466 EM_AVR_OLD.
1467 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
1468 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
1469 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
1470 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
1471 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
1472 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
1473 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
1474 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
1475 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
1476 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
1477 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
1478 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
1479
1480 2001-09-11 Richard Henderson <rth@redhat.com>
1481
1482 * elf64-alpha.c (elf64_alpha_section_flags): New.
1483 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
1484
1485 2001-09-11 Richard Henderson <rth@redhat.com>
1486
1487 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
1488 apply HINT relocations against dynamic symbols.
1489
1490 2001-09-11 H.J. Lu <hjl@gnu.org>
1491
1492 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
1493
1494 2001-09-09 Richard Henderson <rth@redhat.com>
1495
1496 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
1497
1498 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
1499 following a call to a near function.
1500
1501 2001-09-08 Richard Henderson <rth@redhat.com>
1502
1503 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
1504 relocation errors. Fail gp-relative relocations against
1505 dynamic symbols.
1506
1507 2001-09-08 Alan Modra <amodra@bigpond.net.au>
1508
1509 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
1510 as well as DEF_DYNAMIC in test for avoided copy relocs.
1511 (allocate_plt_and_got_and_discard_relocs): Likewise.
1512 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
1513 (allocate_plt_and_got_and_discard_relocs): Likewise.
1514
1515 2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1516
1517 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
1518 of R_MIPS_PC16.
1519
1520 2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1521
1522 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
1523 definitions.
1524 (mips_elf64_howto_table_rel): Likewise.
1525
1526 2001-09-05 Tom Rix <trix@redhat.com>
1527
1528 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
1529 and syscall symbols.
1530 (write_global_symbol) : Same.
1531 (bfd_xcoff_export_symbol): Remove unused syscall param.
1532 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
1533 bfd_xcoff_import_symbol.
1534 * bfd-in.h: Same.
1535 * bfd-in2.h : Regenerate.
1536
1537 2001-09-04 Richard Henderson <rth@redhat.com>
1538
1539 * elf64-alpha.c (SKIP_HOWTO): New.
1540 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
1541 Fix sizes of 16-bit mem format relocs.
1542 (elf64_alpha_reloc_map): Update to match.
1543 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
1544 (elf64_alpha_relax_without_lituse): Likewise.
1545 (elf64_alpha_check_relocs): Handle GPREL16.
1546 (elf64_alpha_relocate_section): Likewise.
1547 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
1548 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
1549 * bfd-in2.h, libbfd.h: Rebuild.
1550
1551 2001-09-04 Jeff Law <law@redhat.com>
1552
1553 * elf32-h8300.c (elf32_h8_relax_section): New function.
1554 (elf32_h8_relax_delete_bytes): Likewise.
1555 (elf32_h8_symbol_address_p): Likewise.
1556 (elf32_h8_get_relocated_section_contents): Likewise.
1557 (bfd_elf32_bfd_relax_section): Define.
1558 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
1559
1560 * elf32-h8300.c (special): New function.
1561 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
1562 all relocations.
1563 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
1564 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
1565 Fix minor problems with 8bit and 16bit PC relative relocations.
1566
1567 2001-09-01 Andreas Jaeger <aj@suse.de>
1568
1569 * vms-tir.c: Add missing prototypes.
1570 * vms-hdr.c: Likewise.
1571 * vms-gsd.c: Likewise.
1572 * vms-misc.c: Likewise.
1573
1574 2001-08-31 H.J. Lu <hjl@gnu.org>
1575
1576 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
1577 with bad relocation.
1578
1579 2001-08-31 Eric Christopher <echristo@redhat.com>
1580 Jason Eckhardt <jle@redhat.com>
1581
1582 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
1583 mips32_4k and mips64.
1584 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
1585 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
1586 * bfd/cpu-mips.c: Ditto.
1587 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
1588 * bfd/bfd-in2.h: Regenerate.
1589
1590 2001-08-31 Jakub Jelinek <jakub@redhat.com>
1591
1592 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
1593 value into R_ALPHA_RELATIVE's addend.
1594 (elf64_alpha_finish_dynamic_symbol): Likewise.
1595
1596 2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
1597
1598 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
1599 recomputed addend during relocatable link if not USE_REL.
1600
1601 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
1602 error.
1603
1604 2001-08-30 H.J. Lu <hjl@gnu.org>
1605
1606 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
1607 2 changes.
1608 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
1609 relocations for weak definitions.
1610
1611 2001-08-30 H.J. Lu <hjl@gnu.org>
1612
1613 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
1614 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
1615 * Makefile.in: Rebuild.
1616
1617 2001-08-30 H.J. Lu <hjl@gnu.org>
1618
1619 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
1620 dynamic relocation for undefined weak symbols when creating
1621 executables. Check h->root.root.type, instead of h->root.type.
1622
1623 2001-08-29 Joel Sherrill <joel@OARcorp.com>
1624
1625 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
1626 default from coff to elf.
1627
1628 2001-08-29 Jeff Law <law@redhat.com>
1629
1630 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
1631 relocations.
1632 (h8_reloc_map): Similarly.
1633 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
1634 Add support for PC relative relocations.
1635
1636 * elf32-h8300.c: Put all prototypes together.
1637 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
1638 (elf32_h8_final_link_relocate): New function for linker.
1639 (elf32_h8_relocate_section): Similarly.
1640 (elf_backend_relocate_section): Define.
1641
1642 * cpu-h8300.c (h8300_scan, compatible): Prototype.
1643 (h8300_scan): Handle architecture:machine encodings typically
1644 found in linker scripts.
1645 * elf.c (prep_headers): Do not try to do H8 machine recognition
1646 here.
1647 * elf32-h8300.c: Add some missing prototypes.
1648 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
1649 (elf32_h8_object_p): Similarly.
1650
1651 2001-08-29 Tom Rix <trix@redhat.com>
1652
1653 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
1654 does not follow a XTY_SD.
1655
1656 2001-08-29 Alan Modra <amodra@bigpond.net.au>
1657
1658 * targmatch.sed: Delete case statements.
1659 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
1660 aix4.3 and above.
1661
1662 Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
1663
1664 * Makefile.am (elf32-h8300.lo): New target.
1665 * config.bfd (h8300*-*-elf): New case.
1666 * configure.in (bfd_elf32_h8300_vec): New case.
1667 * elf.c (prep_headers): Add case for bfd_arch_h8300.
1668 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
1669 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
1670 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
1671 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
1672 * elf32-h8300.c: New file.
1673 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
1674
1675 2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
1676
1677 * sparclynx.c: Add missing prototypes.
1678 * coff-mcore.c: Add missing prototypes.
1679 * elf32-pj.c: Add missing prototypes.
1680 * nlm32-sparc.c: Add missing prototypes.
1681 * oasys.c: Add missing prototypes.
1682 * pdp11.c: Add missing prototypes.
1683 * pe-mips.c: Add missing prototypes.
1684 * riscix.c: Add missing prototypes.
1685
1686 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1687
1688 * elf32-i386.c: Add missing prototypes.
1689 * elf32-ppc.c: Likewise.
1690 * elf32-sh-lin.c: Likewise.
1691 * elfarm-nabi.c: Likewise.
1692
1693 2001-08-27 Daniel Jacobowitz <drow@mvista.com>
1694
1695 * elf32-i386.c (elf_i386_grok_prstatus): New function.
1696 (elf_i386_grok_psinfo): New function.
1697 (elf_backend_grok_prstatus): Define.
1698 (elf_backend_grok_psinfo): Likewise.
1699 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
1700 (ppc_elf_grok_psinfo): New function.
1701 (elf_backend_grok_prstatus): Define.
1702 (elf_backend_grok_psinfo): Likewise.
1703 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
1704 (elf32_shlin_grok_psinfo): New function.
1705 (elf_backend_grok_prstatus): Define.
1706 (elf_backend_grok_psinfo): Likewise.
1707 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
1708 (elf32_arm_nabi_grok_psinfo): New function.
1709 (elf_backend_grok_prstatus): Define.
1710 (elf_backend_grok_psinfo): Likewise.
1711
1712 2001-08-27 H.J. Lu <hjl@gnu.org>
1713
1714 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
1715 sanity check.
1716 (mips_elf_calculate_relocation): Create dynamic relocation for
1717 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
1718 bit is not set.
1719
1720 2001-08-27 H.J. Lu <hjl@gnu.org>
1721
1722 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
1723 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1724 (_bfd_elf32_mips_grok_prstatus): Likewise.
1725 (_bfd_elf32_mips_grok_psinfo): Likewise.
1726 (_bfd_mips_elf_hide_symbol): Make it static and cast to
1727 `struct mips_elf_link_hash_entry *'.
1728 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
1729
1730 2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
1731
1732 * mipsbsd.c: Add missing prototypes.
1733 * hp300hpux.c: Add missing prototypes.
1734 * i386aout.c: Add missing prototypes.
1735 * i386lynx.c: Add missing prototypes.
1736 * i386mach3.c: Add missing prototypes.
1737 * i386msdos.c: Add missing prototypes.
1738 * i386os9k.c: Add missing prototypes.
1739
1740 2001-08-27 Linus Nordberg <linus@swox.se>
1741 Torbjorn Granlund <tege@swox.com>
1742 Staffan Ulfberg <staffanu@swox.se>
1743 Alan Modra <amodra@bigpond.net.au>
1744
1745 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
1746 targ64_selvecs for 32 bit powerpc targets.
1747 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
1748 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
1749 Run "make dep-am".
1750 * Makefile.in: Regenerate.
1751 * configure.in: Add elf64_powerpc vecs.
1752 * configure: Regenerate.
1753 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
1754 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
1755 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
1756 * elf64-ppc.c: New file.
1757 * reloc.c: Add powerpc64 relocs.
1758 * libbfd.h: Regenerate.
1759 * bfd-in2.h: Regenerate.
1760
1761 2001-08-27 Andreas Schwab <schwab@suse.de>
1762
1763 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
1764 reloc is against read-only section.
1765 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
1766 looking up section names for DT_TEXTREL.
1767 (elf32_m68k_reloc_type_class): New function.
1768 (elf_backend_reloc_type_class): Define.
1769
1770 2001-08-27 Andreas Jaeger <aj@suse.de>
1771
1772 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1773 reloc is against read-only section.
1774 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1775 looking up section names for DT_TEXTREL.
1776 (elf_s390_reloc_type_class): New.
1777 (elf_backend_reloc_type_class): Define.
1778
1779 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
1780 reloc is against read-only section.
1781 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
1782 looking up section names for DT_TEXTREL.
1783 (elf_s390_reloc_type_class): New.
1784 (elf_backend_reloc_type_class): Define.
1785
1786 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
1787 is against read-only section.
1788 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1789 looking up section names for DT_TEXTREL.
1790 (ppc_elf_reloc_type_class): New.
1791 (elf_backend_reloc_type_class): Define.
1792
1793 2001-08-26 Andreas Jaeger <aj@suse.de>
1794
1795 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
1796 reloc is against read-only section.
1797 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
1798 looking up section names for DT_TEXTREL.
1799 (elf_cris_reloc_type_class): New.
1800 (elf_backend_reloc_type_class): Define.
1801
1802 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
1803 against read-only section.
1804 (elf_backend_reloc_type_class): Define.
1805 (sh_elf_reloc_type_class): New.
1806 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1807 looking up section names for DT_TEXTREL.
1808
1809 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
1810 reloc is against read-only section.
1811 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1812 looking up section names for DT_TEXTREL.
1813 (elf32_arm_reloc_type_class): New.
1814 (elf_backend_reloc_type_class): Define.
1815
1816 2001-08-25 Andreas Jaeger <aj@suse.de>
1817
1818 * oasys.c: Add missing prototypes.
1819
1820 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1821 attribute for parameter.
1822 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1823
1824 * versados.c (get_4): Make static.
1825 (get_10): Make static.
1826 Add missing prototypes.
1827 (process_esd): Fix call to versados_new_symbol.
1828
1829 2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1830
1831 * coff-a29k.c: Add missing prototypes.
1832 * coff-apollo.c: Add missing prototypes.
1833 * coff-arm.c: Add missing prototypes.
1834 * coff-i860.c: Add missing prototypes.
1835 * coff-rs6000.c: Add missing prototypes.
1836 * coff-tic80.c: Add missing prototypes.
1837 * elf-m10200.c: Add missing prototypes.
1838 * elf-m10300.c: Add missing prototypes.
1839 * elf32-arm.h: Add missing prototypes.
1840 * elf32-d10v.c: Add missing prototypes.
1841 * elf32-m32r.c: Add missing prototypes.
1842 * elf32-mcore.c: Add missing prototypes.
1843 * elf32-openrisc.c: Add missing prototypes.
1844 * elf32-sh.c: Add missing prototypes.
1845 * elf32-sparc.c: Add missing prototypes.
1846 * elf32-v850.c: Add missing prototypes.
1847 * elfarm-nabi.c: Add missing prototypes.
1848 * elfarm-oabi.c: Add missing prototypes.
1849
1850 2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1851
1852 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1853 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1854
1855 2001-08-24 H.J. Lu <hjl@gnu.org>
1856
1857 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1858 hash structure.
1859
1860 2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1861
1862 * elf-bfd.h (elf_hash_table): Revert definition.
1863 (is_elf_hash_table): New macro.
1864 * elflink.h (elf_link_add_object_symbols): Test
1865 is_elf_hash_table before accessing ELF only fields in hash
1866 structure.
1867 (elf_link_create_dynamic_sections): Fail if not using an ELF
1868 hash structure.
1869 (elf_add_dynamic_entry): Fail if not using an ELF hash
1870 structure.
1871 (elf_link_record_local_dynamic_symbol): Fail if not using an
1872 ELF hash structure.
1873 (size_dynamic_sections): Fail if not using an ELF hash
1874 structure.
1875 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1876 hash structure.
1877 (elf_bfd_final_link): Fail if not using an ELF hash
1878 structure.
1879
1880 2001-08-24 H.J. Lu <hjl@gnu.org>
1881
1882 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1883 table is not an ELF linker hash table.
1884
1885 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1886 table type to bfd_link_elf_hash_table.
1887
1888 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1889 the last change.
1890
1891 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1892 table type to bfd_link_generic_hash_table.
1893
1894 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1895
1896 * bfd.c (bfd_alt_mach_code): New function.
1897 * bfd-in2.h: Rebuilt.
1898
1899 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1900
1901 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1902 `type' field in the hash entry when deciding whether to follow a
1903 link.
1904
1905 2001-08-24 Jakub Jelinek <jakub@redhat.com>
1906
1907 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1908 last.
1909 (elf_link_sort_relocs): Adjust accordingly.
1910
1911 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
1912 (elf64_alpha_check_relocs): Set it if section this reloc is against
1913 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
1914 read-only section.
1915 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
1916 is is against read-only section.
1917 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
1918 check section names.
1919 (elf64_alpha_reloc_type_class): New.
1920 (elf_backend_reloc_type_class): Define.
1921
1922 2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1923
1924 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1925 by bfd_malloc().
1926
1927 2001-08-23 Andreas Jaeger <aj@suse.de>
1928
1929 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
1930 the reloc is against read-only section.
1931 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
1932 of looking up section names for DT_TEXTREL.
1933 (elf64_x86_64_reloc_type_class): New.
1934 (elf_backend_reloc_type_class): Define.
1935
1936 2001-08-23 H.J. Lu <hjl@gnu.org>
1937
1938 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1939 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
1940
1941 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
1942 bfd_print_symbol_vandf.
1943 * coffgen.c (coff_print_symbol): Likewise.
1944 * elf.c (bfd_elf_print_symbol): Likewise.
1945 * ieee.c (ieee_print_symbol): Likewise.
1946 * nlmcode.h (nlm_print_symbol): Likewise.
1947 * oasys.c (oasys_print_symbol): Likewise.
1948 * pdp11.c (NAME(aout,print_symbol)): Likewise.
1949 * som.c (som_print_symbol): Likewise.
1950 * srec.c (srec_print_symbol): Likewise.
1951 * tekhex.c (tekhex_print_symbol): Likewise.
1952 * versados.c (versados_print_symbol): Likewise.
1953 * vms.c (vms_print_symbol): Likewise.
1954
1955 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
1956 with bfd_fprintf_vma.
1957 (bfd_elf_print_symbol): Likewise.
1958 * syms.c (bfd_print_symbol_vandf): Likewise.
1959
1960 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1961
1962 * aoutf1.h (sunos_write_object_contents): Silence compile time
1963 warning.
1964 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
1965
1966 * bout.c: Add missing function prototypes. Fix formatting.
1967 * coff-z8k.c: Add missing function prototypes. Fix formatting.
1968 * coff-w65.c: Add missing function prototypes. Fix formatting.
1969 * coff-h8500.c: Add missing function prototypes. Fix formatting.
1970 * coff-h8300.c: Add missing function prototypes. Fix formatting.
1971 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
1972 * coff-tic30.c: Add missing function prototypes. Fix formatting.
1973 * coff-m68k.c: Add missing function prototypes. Fix formatting.
1974 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
1975 * coff-sh.c: Add missing function prototypes. Fix formatting.
1976
1977 2001-08-23 Jakub Jelinek <jakub@redhat.com>
1978
1979 * elf-bfd.h (enum elf_reloc_type_class): New.
1980 (struct elf_backend_data): Add elf_backend_reloc_type_class.
1981 (_bfd_elf_reloc_type_class): New.
1982 * elfxx-target.h (elf_backend_reloc_type_class): Define.
1983 (elfNN_bed): Add elf_backend_reloc_type_class.
1984 * elf.c (_bfd_elf_reloc_type_class): New.
1985 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
1986 is against read-only section.
1987 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
1988 looking up section names for DT_TEXTREL.
1989 (elf_i386_reloc_type_class): New.
1990 (elf_backend_reloc_type_class): Define.
1991 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
1992 reloc is against read-only section.
1993 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
1994 looking up section names for DT_TEXTREL.
1995 (elf32_sparc_reloc_type_class): New.
1996 (elf_backend_reloc_type_class): Define.
1997 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
1998 reloc is against read-only section.
1999 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
2000 looking up section names for DT_TEXTREL.
2001 (sparc64_elf_reloc_type_class): New.
2002 (elf_backend_reloc_type_class): Define.
2003 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
2004 (elfNN_ia64_hash_table_create): Clear ia64_info.
2005 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
2006 section.
2007 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
2008 instead of looking up section names for DT_TEXTREL.
2009 (elfNN_ia64_reloc_type_class): New.
2010 (elf_backend_reloc_type_class): Define.
2011 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
2012 (struct elf_link_sort_rela): New.
2013 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
2014 (elf_bfd_final_link): Call elf_link_sort_relocs.
2015 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
2016 necessary.
2017
2018 2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
2019
2020 * configure.in (x86-bsdi): No corefile support.
2021 * configure: Regenerate.
2022
2023 2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
2024
2025 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
2026 comma.
2027
2028 2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
2029
2030 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
2031 the alignment of dwarf2 linkonce sections to 0.
2032 * coff-sto32.c: Likewise.
2033
2034 2001-08-20 Andreas Jaeger <aj@suse.de>
2035
2036 * coff-sparc.c: Add missing prototypes.
2037 * elf32-s390.c: Likewise.
2038 * elf32-i960.c: Likewise.
2039 * aout-target.h: Likewise.
2040
2041 2001-08-20 H.J. Lu <hjl@gnu.org>
2042
2043 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
2044 (elf_num_section_syms): New for num_section_syms.
2045
2046 * elf.c (elf_map_symbols): Set num_section_syms.
2047 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
2048 the section symbol index.
2049
2050 2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
2051
2052 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
2053 select the generic has table creator. All elf backends need elf
2054 specific fields in the hash table.
2055
2056 2001-08-20 Alan Modra <amodra@bigpond.net.au>
2057
2058 * archive.c (offsetof): Remove define.
2059 * elf.c: Likewise.
2060 * oasys.c: Likewise
2061 * sysdep.h (offsetof): Define.
2062
2063 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2064
2065 * bfd.c (bfd_get_gp_size): Return an unsigned int.
2066 (bfd_set_gp_size): Make param unsigned.
2067 * bfd-in2.h: Regenerate.
2068 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
2069 than calling bfd_get_gp_size.
2070 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
2071 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
2072
2073 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2074
2075 * linker.c (default_fill_link_order): Handle four byte fill value.
2076
2077 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2078
2079 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
2080 prototype.
2081 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
2082
2083 * elf64-mips.c (UNUSED_RELOC): Define.
2084 (mips_elf64_howto_table_rel): Use it.
2085 (mips_elf64_howto_table_rela): Here too.
2086 (mips_elf64_write_relocs): Fix signed/unsigned warning.
2087
2088 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
2089 silence warning.
2090 * coffgen.c (coff_print_symbol): Fix warnings.
2091 (coff_find_nearest_line): Likewise.
2092 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
2093 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
2094 * format.c (bfd_check_format_matches): Likewise.
2095 (bfd_set_format): Likewise.
2096 * coff-ia64.c: Add missing prototypes.
2097 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
2098 signed to silence warnings.
2099 (elf64_alpha_relocate_section): Likewise.
2100 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
2101 (elf64_alpha_add_symbol_hook): Likewise.
2102 (elf64_alpha_final_link): Likewise.
2103 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
2104 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
2105 (elf64_alpha_size_got_sections): Likewise.
2106 * elfxx-ia64.c: Add missing prototypes.
2107 (elfNN_ia64_relocate_section): Fix warning.
2108 (elfNN_ia64_unwind_entry_compare): Make params const.
2109
2110 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2111
2112 * config.bfd (targ64_selvecs): New.
2113 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
2114
2115 * bfd-in.h (BFD_VERSION): Remove wrong comment.
2116 (BFD_DEFAULT_TARGET_SIZE): New.
2117 (BFD_ARCH_SIZE): Comment.
2118 * configure.in (target_size): New. Set instead of target64 in
2119 selvecs case statement. Set target64 from it.
2120 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
2121 * bfd-in2.h: Regenerate.
2122 * configure: Regenerate.
2123
2124 2001-08-17 Alan Modra <amodra@bigpond.net.au>
2125
2126 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
2127 (bfd_errmsgs): Add corresponding message.
2128 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
2129 finding an archive that contains different format object files.
2130 Return bfd_error_wrong_object_format for this case.
2131 * format.c: Formatting fixes. s/CONST/const/.
2132 (bfd_check_format_matches): Accept archives that give
2133 bfd_error_wrong_object_format if no full match is found. Tidy
2134 code handling matching_vector. Don't return a pointer to freed
2135 memory in `matching'. Handle ambiguous matches as for partial
2136 archive matches.
2137 * bfd-in2.h: Regenerate.
2138
2139 2001-08-15 Alan Modra <amodra@bigpond.net.au>
2140
2141 * libieee.h (common_header_type): Add last_byte field.
2142
2143 * ieee.c: Add missing prototypes. Some format fixes.
2144 (struct output_buffer_struct): Move for availability to prototypes.
2145 (ieee_part_after): New function.
2146 (ieee_slurp_debug): Use it here.
2147 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
2148 ieee_part_after to set last_byte to one past end of current part.
2149 Update callers.
2150 (ieee_pos): Pass in ieee_data_struct rather than bfd.
2151 Update callers.
2152 (parse_expression): Don't go beyond the end of the current part.
2153 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
2154 (ieee_get_symtab_upper_bound, ieee_get_symtab,
2155 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
2156 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
2157 ieee_set_section_contents, ieee_write_object_contents,
2158 ieee_make_empty_symbol): Make static.
2159 (ieee_archive_p): Correct comments regarding bfd_read.
2160 (ieee_object_p): Similarly.
2161 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
2162 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
2163 input_bfd, output_bfd, output_buffer.
2164 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
2165 do_with_relocs, ie. as a symbol for relocatable files.
2166 (ieee_vec): Add comments showing functions referenced by macros.
2167
2168 2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
2169
2170 * aout-tic30.c: Add missing prototypes. Fix formatting.
2171 * aout-ns32k.c: Add missing prototypes. Fix formatting.
2172 * peXXigen.c: Add missining prototypes. Fix formatting.
2173 * aout-adobe.c: Add missining prototypes. Fix formatting.
2174
2175 2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
2176
2177 * elf32-v850.c: Add missing function prototypes.
2178 Fix some formatting.
2179
2180 * cpu-v850.c: Add missing function prototype.
2181 Fix some formatting.
2182
2183 2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
2184
2185 * elf-bfd.h (struct elf_backend_data): Add new fields
2186 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
2187 (bfd_elf_sprintf_vma): Rename function prototype to
2188 '_bfd_elf_sprintf_vma'.
2189 (bfd_elf_fprintf_vma): Rename function prototype to
2190 '_bfd_elf_fprintf_vma'.
2191 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
2192 directly, instead indirect via the elf_backend_data structure.
2193 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
2194 instead indirect via the elf_backend_data structure.
2195 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
2196 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
2197 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
2198 already defined.
2199 (elf_backend_fprintf_vma): Initialise if not already defined.
2200 (struct elf_backend_data): Initialise the
2201 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
2202
2203 2001-08-10 Andreas Jaeger <aj@suse.de>
2204
2205 * elf64-sparc.c: Add missing prototypes.
2206 * elf32-cris.c: Likewise.
2207 * elf32-i370.c: Likewise.
2208 * elf64-hppa.c: Likewise.
2209 * elf64-s390.c: Likewise.
2210
2211 2001-08-10 Andreas Jaeger <aj@suse.de>
2212
2213 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
2214 Add prototypes where needed.
2215
2216 2001-08-10 H.J. Lu <hjl@gnu.org>
2217
2218 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
2219 (bfd_fprintf_vma): Likewise.
2220
2221 2001-08-10 H.J. Lu <hjl@gnu.org>
2222
2223 * bfd.c (bfd_sprintf_vma): Don't return void.
2224 (bfd_fprintf_vma): Likewise.
2225
2226 2001-08-10 Andreas Jaeger <aj@suse.de>
2227
2228 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
2229 to build warnings.
2230 * configure: Regenerate.
2231
2232 2001-08-10 Alan Modra <amodra@bigpond.net.au>
2233
2234 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
2235 warning if not BFD64. Add braces so emacs auto format works.
2236 (bfd_elf_fprintf_vma): Likewise.
2237
2238 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
2239 of _xcoff_swap_ld*.
2240 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
2241 param to agree with libxcoff.h.
2242 (xcoff_swap_ldhdr_out): Likewise.
2243 (xcoff_swap_ldsym_in): Likewise.
2244 (xcoff_swap_ldsym_out): Likewise.
2245 (xcoff_swap_ldrel_in): Likewise.
2246 (xcoff_swap_ldrel_out): Likewise.
2247 (xcoff_create_csect_from_smclas): Likewise.
2248 * coff64-rs6000.c: Add missing prototypes.
2249 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
2250 with libxcoff.h.
2251 (xcoff64_swap_ldhdr_out): Likewise.
2252 (xcoff64_swap_ldsym_in): Likewise.
2253 (xcoff64_swap_ldsym_out): Likewise.
2254 (xcoff64_swap_ldrel_in): Likewise.
2255 (xcoff64_swap_ldrel_out): Likewise.
2256 (xcoff64_ppc_relocate_section): Make static.
2257 (xcoff64_slurp_armap): Likewise.
2258 (xcoff64_archive_p): Likewise.
2259 (xcoff64_openr_next_archived_file): Likewise.
2260 (xcoff64_sizeof_headers): Likewise.
2261 (xcoff64_is_lineno_count_overflow): Likewise.
2262 (xcoff64_is_reloc_count_overflow): Likewise.
2263 (xcoff64_loader_symbol_offset): Likewise.
2264 (xcoff64_loader_reloc_offset): Likewise.
2265 * elf64-gen.c: Add missing prototypes.
2266
2267 2001-08-09 H.J. Lu <hjl@gnu.org>
2268
2269 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
2270 (bfd_elf_fprintf_vma): Likewise.
2271
2272 2001-08-09 H.J. Lu <hjl@gnu.org>
2273
2274 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
2275 to ...
2276 * elf-bfd.h: Here.
2277 * bfd-in2.h: Regenerated.
2278
2279 2001-08-09 H.J. Lu <hjl@gnu.org>
2280
2281 * bfd-in.h (bfd_sprintf_vma): New prototype.
2282 (bfd_fprintf_vma): Likewise.
2283 (bfd_elf_sprintf_vma): Likewise.
2284 (bfd_elf_fprintf_vma): Likewise.
2285 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
2286 * bfd-in2.h: Regenerated.
2287
2288 * bfd.c (bfd_sprintf_vma): New. Defined.
2289 (bfd_fprintf_vma): Likewise.
2290
2291 * elf.c (bfd_elf_sprintf_vma): New. Defined.
2292 (bfd_elf_fprintf_vma): Likewise.
2293
2294 2001-08-09 Alan Modra <amodra@bigpond.net.au>
2295
2296 * coff-rs6000.c: Add missing prototypes.
2297 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
2298 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
2299 xcoff_loader_reloc_offset): Make static.
2300 * dwarf1.c: Add missing prototypes.
2301 * dwarf2.c: Add missing prototypes.
2302 (struct abbrev_info): Move definition.
2303 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
2304 * elf.c: Add missing prototypes.
2305 * elf32-gen.c: Likewise.
2306 * elf32-i386.c: Likewise.
2307 * elf32-ppc.c: Likewise.
2308 (ppc_elf_sort_rela): Use PTR instead of "void *".
2309 * elflink.h: Add missing prototypes. Formatting fixes.
2310 * merge.c: Add missing prototypes.
2311 (last4_eq): Use PTR instead of "void *".
2312 (last_eq): Likewise.
2313 * syms.c: Add missing prototypes.
2314
2315 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2316
2317 * bfd.c: Fix formatting.
2318 * bfd-in2.h: Regenerate.
2319
2320 2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
2321
2322 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
2323 true (this target uses REL relocations) and 'pcrel_offset' to
2324 false (the PC is implied, not stored in the offset).
2325
2326 2001-08-08 Alan Modra <amodra@bigpond.net.au>
2327
2328 1999-10-19 Linus Nordberg <linus@swox.se>
2329 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
2330 * elfxx-target.h (elf_backend_want_got_sym): Define.
2331 (elfNN_bed): Add elf_backend_want_got_sym.
2332 * elflink.c (_bfd_elf_create_got_section): Define
2333 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
2334
2335 2001-08-08 Alexandre Oliva <aoliva@redhat.com>
2336
2337 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
2338 (find_rela_addend): New function.
2339 (parse_comp_unit): Call it to find the abbrev offset addend.
2340 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
2341 members of dwarf2_debug as debugging information is read.
2342
2343 2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
2344
2345 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
2346 targets as well as sh-pe.
2347
2348 2001-08-03 Ben Harris <bjh21@netbsd.org>
2349
2350 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
2351 reloc from start of section when computing value for R_ARM_REL32
2352 reloc.
2353
2354 2001-08-03 Alan Modra <amodra@bigpond.net.au>
2355
2356 From H.J. Lu <hjl@gnu.org>
2357 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
2358 keep relocs for undefined syms if there are no dynamic sections in
2359 executable.
2360 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
2361
2362 2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
2363
2364 * cofflink.c (coff_link_check_ar_symbols): also search for
2365 __imp__symbol as well as _symbol.
2366 * linker.c (_bfd_generic_link_add_archive_symbols): also
2367 search for __imp__symbol as well as _symbol.
2368
2369 2001-08-01 Adam Nemet <anemet@lnxw.com>
2370
2371 * elf.c (elf_sort_sections): Return zero only as the last step.
2372
2373 2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
2374
2375 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
2376 ARM_COFF_BUGFIX.
2377 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
2378 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
2379 ARM_COFF_BUGFIX.
2380
2381 2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
2382
2383 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
2384 to match corresponding bfd_coff_backend data member.
2385
2386 2001-07-24 Alan Modra <amodra@bigpond.net.au>
2387
2388 * Makefile.am: Update dependencies with "make dep-am".
2389 * Makefile.in: Regenerate
2390
2391 2001-07-15 H.J. Lu <hjl@gnu.org>
2392
2393 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
2394 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
2395 * Makefile.in: Regenerate.
2396
2397 2001-07-11 H.J. Lu <hjl@gnu.org>
2398
2399 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
2400 flags when creating the reloc section if the ALLOC flag in the
2401 source section is set.
2402
2403 2001-07-11 Steve Ellcey <sje@cup.hp.com>
2404
2405 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
2406 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
2407 * bfd-in2.h: Regenerate.
2408 * libbfd.h: Regenerate.
2409 * elfxx-ia64.c (ia64_howto_table): Define how to handle
2410 new relocations.
2411 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
2412 (elfNN_ia64_check_relocs): Likewise.
2413 (elfNN_ia64_install_value): Likewise.
2414 (elfNN_ia64_relocate_section): Likewise.
2415
2416 2001-07-11 Jakub Jelinek <jakub@redhat.com>
2417
2418 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
2419 R_SPARC_UA64.
2420 (elf32_sparc_check_relocs): Likewise.
2421 Only create .rela section for alloced sections in shared libraries.
2422 (elf32_sparc_relocate_section): Likewise.
2423 Remove redundant check.
2424 Optimize unaligned reloc usage.
2425 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
2426 check.
2427
2428 2001-07-11 H.J. Lu <hjl@gnu.org>
2429
2430 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
2431 ALLOC|LOAD flags as the source section for debugging sections
2432 when creating the reloc section.
2433
2434 2001-07-05 Jim Wilson <wilson@redhat.com>
2435
2436 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
2437 the section of the bigger symbol.
2438
2439 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
2440
2441 2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
2442
2443 * peicode.h (coff_swap_scnhdr_in): For sections containing
2444 uninitialised data, only set their size to s_paddr if this does
2445 not reset their size to zero. MS's latest compilers will set
2446 s_paddr to zero.
2447
2448 2001-07-04 H.J. Lu <hjl@gnu.org>
2449
2450 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
2451 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
2452 bfd_mach_mips5000.
2453
2454 2001-07-03 Mark Elbrecht <snowball3@softhome.net>
2455
2456 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
2457
2458 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
2459 sections being discarded.
2460
2461 2001-06-30 Alan Modra <amodra@bigpond.net.au>
2462
2463 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
2464 instead of _bfd_elfcore_section_from_phdr.
2465 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
2466 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
2467 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
2468 (elfcore_grok_prstatus): Likewise.
2469 (elfcore_grok_lwpstatus): Likewise.
2470 (bfd_get_elf_phdr_upper_bound): Likewise.
2471 (elfcore_make_note_pseudosection): Formatting.
2472 (_bfd_elfcore_strndup): Formatting.
2473 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
2474 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
2475
2476 2001-06-29 Daniel Jacobowitz <drow@mvista.com>
2477
2478 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
2479 and _bfd_elfcore_strndup.
2480 (struct elf_backend_data): Add elf_backend_grok_prstatus
2481 and elf_backend_grok_psinfo.
2482 * elf.c (_bfd_elfcore_make_pseudosection): New function.
2483 (elfcore_grok_prstatus): Use it.
2484 (elfcore_make_note_pseudosection): Likewise.
2485 (elfcore_strndup): Rename to...
2486 (_bfd_elfcore_strndup): Here, and make global.
2487 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
2488 (elfcore_grok_note): Call elf_backend_grok_prstatus
2489 and elf_backend_grok_psinfo if available.
2490 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
2491 (_bfd_elf32_mips_grok_psinfo): New function.
2492 (elf_backend_grok_prstatus): Define.
2493 (elf_backend_grok_psinfo): Define.
2494 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
2495 (elf_backend_grok_psinfo): Likewise.
2496 (elfNN_bed): Include elf_backend_grok_prstatus and
2497 elf_backend_grok_psinfo.
2498
2499 2001-06-29 H.J. Lu <hjl@gnu.org>
2500
2501 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
2502 hplink->sgot is NULL before filling GOT. Check if hplink->splt
2503 is NULL before filling PLT.
2504
2505 2001-06-29 Alan Modra <amodra@bigpond.net.au>
2506
2507 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
2508
2509 2001-06-27 Alan Modra <amodra@bigpond.net.au>
2510
2511 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
2512 here..
2513 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
2514 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2515 after gc has run.
2516
2517 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
2518 (IS_ABSOLUTE_RELOC): Define.
2519 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
2520 (hppa_link_hash_newfunc): Always init it.
2521 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
2522 create COPY relocs only when the reloc is in a read-only section.
2523 Instead, allocate space for a dynamic reloc to reference the
2524 library symbol directly. Keep track of space we allocate using
2525 relocs_entries.
2526 (hppa_discard_copies): Delete, and move code to..
2527 (allocate_plt_and_got): ..here. Rename to
2528 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2529 relocs for non-shared link.
2530 (elf32_hppa_size_dynamic_sections): Update calls to above.
2531 (elf32_hppa_relocate_section): Write out the dynamic relocs used
2532 in lieu of COPY relocs.
2533
2534 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
2535 here..
2536 (elf_i386_adjust_dynamic_symbol): ..nor here..
2537 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
2538 after gc has run.
2539 (elf_i386_size_dynamic_sections): Fix a comment.
2540 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
2541 involved in writing reloc out.
2542
2543 2001-06-25 Alan Modra <amodra@bigpond.net.au>
2544
2545 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
2546 Ensure syms are dynamic if we might be emitting a reloc.
2547 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
2548 for undefweak or undefined syms..
2549 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
2550
2551 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
2552 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
2553 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
2554 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
2555
2556 2001-06-24 H.J. Lu <hjl@gnu.org>
2557
2558 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
2559 strncasecmp/strcasecmp instead of strncmp/strcmp.
2560
2561 2001-06-23 H.J. Lu <hjl@gnu.org>
2562
2563 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
2564 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
2565 in the regular object file and treat the weak definition as
2566 the normal one.
2567
2568 2001-06-23 Alan Modra <amodra@bigpond.net.au>
2569
2570 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
2571 unresolved_reloc test to exclude cases where we use "relocation"
2572 before setting it to point into the .got. Reinstate fudge for
2573 unresolved relocs in debugging sections.
2574
2575 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
2576 complicated tests for unresolvable relocs with a simple direct
2577 scheme using "unresolved_reloc" var.
2578
2579 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
2580 elf_i386_dyn_relocs. Update comment.
2581 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
2582 dyn_relocs.
2583 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
2584 others to aborts.
2585 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
2586 abort.
2587 (elf_i386_size_dynamic_sections): Likewise.
2588 (elf_i386_finish_dynamic_symbol): Likewise.
2589 (elf_i386_finish_dynamic_sections): Likewise.
2590 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
2591 handling code.
2592
2593 Avoid creating COPY relocs if possible.
2594 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
2595 which .got created. Mark symbols used by R_386_32 and R_386_PC32
2596 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
2597 reloc is in a read-only section. Instead, allocate space for a
2598 dynamic reloc to reference the library symbol directly. Keep
2599 track of space we allocate using pcrel_relocs_copied.
2600 (discard_copies): Delete, and move code to ..
2601 (allocate_plt_and_got): ..here. Rename to
2602 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
2603 relocs for non-shared link.
2604 (elf_i386_size_dynamic_sections): Update calls to above functions.
2605 (elf_i386_relocate_section): Write out the dynamic relocs. Add
2606 more ugly logic to avoid "unresolvable relocation" error. Use
2607 htab shortcut in place of elf_hash_table macro.
2608 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
2609 not always be created now.
2610
2611 2001-06-20 Bo Thorsen <bo@suse.co.uk>
2612
2613 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
2614 shared libraries.
2615
2616 2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2617
2618 * configure.host (mips64-*-linux): Reformat.
2619
2620 2001-06-21 Alan Modra <amodra@bigpond.net.au>
2621
2622 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
2623 allocate local .got space. Use shortcuts from hash table for .got
2624 and .plt rather than comparing section names.
2625 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
2626 adjusting index into local_got_refcounts to document what we are
2627 really doing.
2628 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
2629 Tidy .got and .plt error checking.
2630
2631 2001-06-20 Catherine Moore <clm@redhat.com>
2632
2633 * elf-bfd.h (struct elf_backend_data):
2634 elf_backend_emit_relocs: New field: Function for emitting
2635 relocs.
2636 elf_backend_count_relocs: New field: Function for determining
2637 the number of relocs to be emitted.
2638 * elfxx-target.h: Provide default (NULL) values for
2639 elf_backend_emit_relocs and elf_backend_count_relocs.
2640 * elflink.h (elf_link_size_reloc_section): Make the hash table
2641 big enough to hold the relocs counted by either reloc_count or
2642 o->reloc_count.
2643 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
2644 should be emitted, either because of a command line option
2645 stored in the info structure or because the target provides a
2646 special reloc emitting function.
2647 If the target provides a reloc counting function use it,
2648 unless performing a relocatable link or emitting all relocs.
2649 Also set the SEC_RELOC flag on any output section which will
2650 contain relocs.
2651 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
2652 should be emitted, either because of a command line option
2653 stored in the info structure or because the target provides a
2654 special reloc emitting function.
2655 If the target provides a reloc emitting function, use it,
2656 unless performing a relocatable link or emitting all relocs.
2657
2658 2001-06-20 H.J. Lu <hjl@gnu.org>
2659
2660 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
2661 allocate local .got space.
2662
2663 2001-06-19 Andreas Jaeger <aj@suse.de>
2664
2665 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
2666 dynamic symbols.
2667
2668 2001-06-18 Hans-Peter Nilsson <hp@axis.com>
2669
2670 * elflink.h (struct elf_assign_sym_version_info): Remove member
2671 export_dynamic. All users changed to use info member.
2672 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
2673 export_dynamic, instead use member in parameter info.
2674 * bfd-in.h (bfd_elf32_size_dynamic_sections,
2675 bfd_elf64_size_dynamic_sections): Update prototype.
2676 * bfd-in2.h: Regenerate.
2677
2678 2001-06-18 H.J. Lu <hjl@gnu.org>
2679
2680 * elflink.h (elf_info_failed): Add a new field, verdefs.
2681 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
2682 elf_export_symbol.
2683 (elf_export_symbol): Check eif->verdefs to decide if a symbol
2684 should be exported.
2685
2686 2001-06-17 H.J. Lu <hjl@gnu.org>
2687
2688 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
2689 readonly_reloc, to record if a relocation in the .rel.dyn
2690 section is against a read-only section.
2691 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
2692 field to false.
2693 (_bfd_mips_elf_check_relocs): Record if there is a relocation
2694 in the .rel.dyn section against a read-only section by setting
2695 DF_TEXTREL or readonly_reloc.
2696 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
2697 it is true.
2698 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
2699 there is a relocation in the .rel.dyn section against a
2700 read-only section.
2701 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
2702 DF_TEXTREL is set.
2703
2704 2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
2705
2706 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
2707 function. Move flagword result into parameter list. Remove
2708 comment about setting bfd_error_handler to intercept failure
2709 results.
2710 * coffgen.c (make_a_section_from_file): Examine result of
2711 calling bfd_coff_styp_to_sec_flags and pass a failure back to
2712 caller.
2713 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
2714 function. Move flagword result into parameter list.
2715 * libcoff.h: Regenerate.
2716 * libecoff.h: Regenerate.
2717
2718 2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
2719
2720 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
2721 section is going to follow it.
2722
2723 2001-06-12 Catherine Moore <clm@redhat.com>
2724
2725 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
2726 with the file_align entry from elf_backend_data.
2727 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2728 (elf_gc_record_vtentry): Likewise.
2729
2730 2001-06-10 Alan Modra <amodra@bigpond.net.au>
2731
2732 * elflink.h: Whitespace changes.
2733 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
2734 rather than "unsigned char".
2735 (elf_link_output_relocs): Likewise.
2736 (elf_link_input_bfd): Likewise.
2737 (elf_reloc_link_order): LIkewise.
2738 * elf.c: s/CONST/const/. Whitespace changes.
2739 * elf32-mips.c: Formatting fix.
2740
2741 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
2742 * Makefile.in: Regenerate.
2743 * po/Make-in: Remove trailing tab.
2744
2745 2001-06-09 Philip Blundell <philb@gnu.org>
2746
2747 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
2748 change.
2749 (elf32_arm_plt_entry): Likewise.
2750
2751 2001-06-08 H.J. Lu <hjl@gnu.org>
2752
2753 * elf.c (swap_out_syms): Keep names for global section symbols.
2754
2755 2001-06-07 H.J. Lu <hjl@gnu.org>
2756
2757 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
2758 MIPS-based machines need it.
2759
2760 2001-06-07 H.J. Lu <hjl@gnu.org>
2761
2762 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
2763 for SGI only.
2764
2765 * config.bfd: Remove ecoff from Linux/mips.
2766
2767 2001-06-07 Andreas Jaeger <aj@suse.de>
2768
2769 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
2770 assertion.
2771 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
2772 alignment of 8 for .rela sections; handle further relocations.
2773
2774 2001-06-06 Christian Groessler <cpg@aladdin.de>
2775
2776 * coff-z8k.c: Fix formatting.
2777 Fix howtos: howto->size was always 1.
2778
2779 2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2780
2781 * configure.host (mips64*-*-linux*): Define.
2782
2783 2001-06-05 Alan Modra <amodra@bigpond.net.au>
2784
2785 * elf32-i386.c (elf_i386_discard_copies): Rename to
2786 discard_copies, and use elf_link_hash_entry arg rather than
2787 elf_i386_link_hash_entry.
2788 (elf_i386_link_hash_traverse): Delete.
2789 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
2790 Tidy sizing of dynamic sections.
2791 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
2792 possible .plt entries.
2793 (elf_i386_gc_sweep_hook): Likewise.
2794 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
2795 everything with plt.refcount <= 0.
2796
2797 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
2798 .relgot space here.
2799 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
2800 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
2801 .rel.plt here..
2802 (allocate_plt_and_got): ..instead do it all here. New function.
2803 (elf_i386_size_dynamic_sections): Allocate local .got space and
2804 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
2805 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
2806 rather than gc variety).
2807 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2808 (elf_i386_relocate_section): Use it here and correct handling of
2809 R_386_GOT32. Provide section and offset for "unresolvable
2810 relocation" error message.
2811 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2812
2813 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2814 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2815 (elf_i386_link_hash_table_create): Init them.
2816 (create_got_section): New function.
2817 (elf_i386_create_dynamic_sections): New function.
2818 (elf_backend_create_dynamic_sections): Set to above.
2819 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2820 calling bfd_get_section_by_name.
2821 (elf_i386_gc_sweep_hook): Likewise.
2822 (elf_i386_adjust_dynamic_symbol): Likewise.
2823 (elf_i386_size_dynamic_sections): Likewise.
2824 (elf_i386_relocate_section): Likewise.
2825 (elf_i386_finish_dynamic_sections): Likewise.
2826
2827 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2828
2829 2001-06-02 H.J. Lu <hjl@gnu.org>
2830
2831 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2832 and ELFOSABI_HPUX.
2833 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2834
2835 2001-06-02 H.J. Lu <hjl@gnu.org>
2836
2837 * aout-cris.c (MACHTYPE_OK): New. Defined.
2838
2839 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
2840
2841 * section.c (_bfd_strip_section_from_output): Handle NULL
2842 output_section.
2843
2844 2001-06-02 H.J. Lu <hjl@gnu.org>
2845
2846 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2847 rs6000coff64_vec only if BFD64 is defined.
2848 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2849
2850 2001-06-02 H.J. Lu <hjl@gnu.org>
2851
2852 * coff-ia64.c (ia64coff_object_p): Rewrite with
2853 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2854
2855 2001-06-01 Andreas Jaeger <aj@suse.de>
2856
2857 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2858 relocation, small reformatting.
2859
2860 2001-05-29 Andreas Jaeger <aj@suse.de>
2861
2862 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2863 (elf64_x86_64_relocate_section): Likewise.
2864
2865 2001-05-30 Alan Modra <amodra@one.net.au>
2866
2867 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2868 millicode. Don't allocate .got and .rela.got space here..
2869 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2870 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2871 .rela.plt here..
2872 (hppa_handle_PIC_calls): ..nor here..
2873 (allocate_plt_and_got): ..instead do it all here. New function.
2874 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2875 call allocate_plt_and_got. No need to zap .got if not dynamic.
2876 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2877 gc_common_final_link.
2878 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2879 (elf32_hppa_relocate_section): Use it here.
2880 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2881 dynamic_sections_created.
2882 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2883
2884 2001-05-28 Andreas Jaeger <aj@suse.de>
2885
2886 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2887 generic version since we want a hashsize of 4.
2888 (elf_backend_size_info): Likewise.
2889
2890 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2891
2892 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2893 a zeroing loop.
2894 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2895 (elf_link_input_bfd): Likewise.
2896 (elf_reloc_link_order): Likewise.
2897 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2898 relocations correctly.
2899
2900 2001-05-28 Nicolas Pitre <nico@cam.org>
2901
2902 * elf32-arm.h: fix PLT generation for big endian ARM
2903
2904 2001-05-28 Alan Modra <amodra@one.net.au>
2905
2906 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2907 for symbols forced local that need plabels.
2908 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2909 .plt.rela for local syms if non-shared.
2910 (hppa_build_one_stub): Mask lsb of plt.offset.
2911 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
2912 (clobber_millicode_symbols): Correct comment.
2913 (elf32_hppa_relocate_section): Likewise.
2914 (elf32_hppa_finish_dynamic_symbol): Likewise.
2915
2916 2001-05-28 Jeff Sturm <jsturm@one-point.com>
2917
2918 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
2919 * bfd-in2.h: Regenerate.
2920 * libbfd.h: Regenerate.
2921 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
2922 and BFD_RELOC_SPARC_UA64 mapping
2923 * elf64-sparc.c: Likewise.
2924
2925 2001-05-25 H.J. Lu <hjl@gnu.org>
2926
2927 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
2928 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
2929 (coff-rs6000.lo): Remove the old dependency.
2930 * Makefile.in: Rebuild.
2931
2932 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2933 coff-rs6000.lo.
2934
2935 2001-05-25 H.J. Lu <hjl@gnu.org>
2936
2937 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
2938 rs6000coff_core_file_matches_executable_p,
2939 rs6000coff_core_file_failing_command and
2940 rs6000coff_core_file_failing_signal only if AIX_CORE is
2941 defined.
2942 (pmac_xcoff_vec): Likewise.
2943 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2944
2945 2001-05-25 Timothy Wall <twall@redhat.com>
2946
2947 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2948 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2949
2950 2001-05-25 H.J. Lu <hjl@gnu.org>
2951
2952 * bfd-in2.h: Regenerated.
2953 * libcoff.h: Likewise.
2954
2955 2001-05-25 Alan Modra <amodra@one.net.au>
2956
2957 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
2958 undefined millicode syms in shared libs.
2959 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
2960 (elf32_hppa_check_relocs): Likewise.
2961 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2962 (elf32_hppa_size_dynamic_sections): Likewise.
2963 (elf32_hppa_relocate_section): Likewise.
2964 (elf32_hppa_finish_dynamic_symbol): Likewise.
2965 (elf32_hppa_finish_dynamic_sections): Likewise.
2966
2967 2001-05-24 Tom Rix <trix@redhat.com>
2968
2969 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
2970 xcoff-target.h not used to define rs6000 or ppc bfd.
2971 * Makefile.in same
2972
2973 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
2974 to 64 bit.
2975
2976 * coff-rs6000.c : Many changes for 64 bit support. Move common
2977 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
2978 and pmac_xcoff_vec
2979
2980 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
2981 linker now supported. Explictly define the rs6000coff64_vec.
2982
2983 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
2984 (coff_print_aux) same
2985 (coff_write_object_contents) same
2986 (coff_slurp_line_table) same
2987
2988 * coffgen.c : (coff_fix_symbol_name) formatting
2989 (coff_mangle_symbols) xcoff 64 bit support
2990 (coff_write_symbol) same
2991 (coff_write_alien_symbol) same
2992 (coff_write_native_symbol) same
2993 (coff_write_symbols) same
2994 (coff_get_symbol_info) same
2995 (bfd_coff_get_syment) same
2996 (coff_print_symbol) same
2997
2998 * config.bfd : add powerpc64-*-aix* target
2999
3000 * libcoff-in.h : formatting
3001
3002 * libcoff.h : move xcoff extern declarations to libxcoff.h
3003
3004 * libxcoff.h : New file
3005
3006 * xcofflink.c : Many changes for xcoff64 support. Move common
3007 structures to include/coff/xcoff.h. Move specific structure to
3008 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
3009 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
3010
3011 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
3012 aix4.2+ -binitfini.
3013
3014 (xcoff_build_ldsyms) : handle special __rtinit symbol.
3015
3016 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
3017
3018 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
3019 s/ENTIRES/ENTRIES/.
3020
3021 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3022
3023 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
3024 * libbfd.h: Regenerate.
3025 * bfd-in2.h: Regenerate.
3026
3027 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
3028 * archures.c (bfd_mach_mips12000): Define.
3029 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
3030 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
3031 support.
3032 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
3033 * bfd-in2.h: Regenerate.
3034 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
3035
3036 2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
3037
3038 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
3039 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
3040 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
3041 that is used by GCC.
3042
3043 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3044
3045 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
3046 of entries in a structured section.
3047 * elf.c: Use new macro.
3048 * elf32-i386.c: Use new macro.
3049 * elf32-mips.c: Use new macro.
3050 * elf64-alpha.c: Use new macro.
3051 * elf64-sparc.c: Use new macro.
3052 * elfcode.h: Use new macro.
3053 * elflink.h: Use new macro.
3054
3055 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
3056
3057 * bfdint.texi: Replace -oformat with --oformat.
3058
3059 2001-05-21 Andreas Jaeger <aj@suse.de>
3060
3061 * dwarf2.c (decode_line_info): Fix error message.
3062 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
3063 adjust error message.
3064
3065 2001-05-18 H.J. Lu <hjl@gnu.org>
3066
3067 * elflink.h (elf_link_add_object_symbols): Revert the last
3068 change.
3069
3070 2001-05-17 Alan Modra <amodra@one.net.au>
3071
3072 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
3073 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
3074 (hppa_build_one_stub): Add an assert to check plt.offset.
3075
3076 2001-05-17 H.J. Lu <hjl@gnu.org>
3077
3078 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
3079 version definition to basename of the output filename.
3080
3081 2001-05-17 H.J. Lu <hjl@gnu.org>
3082
3083 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
3084 basename of the bfd filename.
3085
3086 2001-05-16 Alan Modra <amodra@one.net.au>
3087
3088 * section.c (asection): Add linker_has_input field.
3089 (STD_SECTION): Adjust initialization to suit.
3090 * ecoff.c (bfd_debug_section): Likewise.
3091 * bfd-in2.h: Regenerate.
3092
3093 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
3094
3095 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
3096 negative 32-bit operands to 16 operands when the operand is
3097 going to be zero-extended by the modified opcode.
3098
3099 2001-05-12 Peter Targett <peter.targett@arccores.com>
3100
3101 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
3102 name for 'arc5' core versions.
3103 (bfd_arc_arch): Make bfd_mach_arc_6 default.
3104
3105 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
3106 architecture.
3107 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
3108
3109 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3110
3111 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
3112 sections as well.
3113 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
3114 to .gnu.linkonce.t.FOO text section.
3115
3116 2001-05-11 Jakub Jelinek <jakub@redhat.com>
3117
3118 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
3119 fields, change sec into secinfo.
3120 (struct sec_merge_info): Add chain, remove last fields.
3121 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
3122 (sec_merge_hash_lookup): If lookup could not use a string only
3123 because it has bad alignment, mark the old string for deletion.
3124 (sec_merge_add): Add secinfo argument. Don't compute entry's
3125 position, instead record the section.
3126 (sec_merge_emit): Update for the sec into secinfo change in
3127 struct sec_merge_hash_entry.
3128 (_bfd_merge_section): Only record the section for merging, defer
3129 putting strings into the hash table.
3130 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
3131 _bfd_merge_sections): New functions.
3132 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
3133 changes.
3134 * libbfd-in.h (_bfd_merge_sections): Add prototype.
3135 (_bfd_nolink_bfd_merge_sections): Define.
3136 * libbfd.h: Likewise.
3137 (bfd_generic_merge_sections): Add prototype.
3138 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
3139 (struct bfd_target): Likewise.
3140 * bfd.c (bfd_merge_sections): Define.
3141 * bfd-in2.h: Rebuilt.
3142 * elf.c (_bfd_elf_merge_sections): New function.
3143 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
3144 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
3145 * reloc.c (bfd_generic_merge_sections): New function.
3146 * vms.c (vms_bfd_merge_sections): New function.
3147 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
3148 * aout-target.h (MY_bfd_merge_sections): Define.
3149 * aout-tic30.c (MY_bfd_merge_sections): Define.
3150 * binary.c (binary_bfd_merge_sections): Define.
3151 * bout.c (b_out_bfd_merge_sections): Define.
3152 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
3153 * coffcode.c (coff_bfd_merge_sections): Define.
3154 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
3155 * i386msdos.c (msdos_bfd_merge_sections): Define.
3156 * i386os9k.c (os9k_bfd_merge_sections): Define.
3157 * ieee.c (ieee_bfd_merge_sections): Define.
3158 * ihex.c (ihex_bfd_merge_sections): Define.
3159 * nlm-target.h (nlm_bfd_merge_sections): Define.
3160 * oasys.c (oasys_bfd_merge_sections): Define.
3161 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
3162 * som.c (som_bfd_merge_sections): Define.
3163 * srec.c (srec_bfd_merge_sections): Define.
3164 * tekhex.c (tekhex_bfd_merge_sections): Define.
3165 * versados.c (versados_bfd_merge_sections): Define.
3166 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
3167
3168 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
3169
3170 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
3171 to be unsigned long, in order to match its use.
3172
3173 2001-05-10 H.J. Lu <hjl@gnu.org>
3174
3175 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
3176 indirect symbols.
3177
3178 2001-05-09 H.J. Lu <hjl@gnu.org>
3179
3180 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
3181 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
3182 Remove the unused veriable `dynver'.
3183
3184 2001-05-08 Ian Lance Taylor <ian@zembu.com>
3185
3186 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
3187 NULL or is not COFF.
3188 (coff_i386_rtype_to_howto): Don't dump core if output section
3189 owner is not COFF.
3190
3191 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3192
3193 * ecoff.c (bfd_debug_section): Fix initialization.
3194 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
3195 is always a positive integer. Cast away sign mismatch.
3196 * elf32-mips.c: Fix misleading comment and typo.
3197 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
3198 correct data type.
3199 * elflink.c: Fix typo.
3200 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
3201 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
3202
3203 2001-05-04 Richard Henderson <rth@redhat.com>
3204
3205 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
3206
3207 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
3208
3209 * elf32-arm.h (elf32_arm_final_link_relocate): Set
3210 EF_ARM_HASENTRY if the start address is set.
3211
3212 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
3213
3214 * targets.c (_bfd_target_vector_entries): Compute value based on
3215 the size of the _bfd_target_vector and not bfd_target_vector.
3216
3217 2001-05-03 H.J. Lu <hjl@gnu.org>
3218
3219 * elfcode.h: Include "libiberty.h".
3220
3221 * elflink.h (elf_link_add_object_symbols): Set
3222 elf_dt_name (abfd) to basename of the bfd filename.
3223 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
3224 of the bfd filename.
3225
3226 2001-05-03 Andreas Jaeger <aj@suse.de>
3227
3228 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
3229 (elf_generic_info_to_howto_rel): Likewise.
3230 * coff-alpha.c (reloc_nil): Likewise.
3231 (alpha_ecoff_bad_format_hook): Likewise.
3232 (alpha_adjust_reloc_out): Likewise.
3233 (alpha_bfd_reloc_type_lookup): Likewise.
3234 (alpha_convert_external_reloc): Likewise.
3235 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
3236 (elf64_alpha_reloc_bad): Likewise.
3237 (elf64_alpha_reloc_gpdisp): Likewise.
3238 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
3239 (elf64_alpha_info_to_howto): Likewise.
3240 (elf64_alpha_add_symbol_hook): Likewise.
3241 (elf64_alpha_create_got_section): Likewise.
3242 (elf64_alpha_is_local_label_name): Likewise.
3243 (elf64_alpha_merge_ind_symbols): Likewise.
3244 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
3245 (mips_elf64_get_reloc_upper_bound): Likewise.
3246 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
3247 (nlm_alpha_get_public_offset): Likewise.
3248
3249 2001-05-02 Johan Rydberg <jrydberg@opencores.org>
3250
3251 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
3252 about overflow in R_OPENRISC_LO_16_IN_INSN and
3253 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
3254
3255 2001-04-30 H.J. Lu <hjl@gnu.org>
3256
3257 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
3258 only for ELF_LINK_FORCED_LOCAL.
3259 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
3260 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
3261 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
3262
3263 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
3264 if the symbol has hidden or internal visibility.
3265
3266 2001-04-30 Alan Modra <amodra@one.net.au>
3267
3268 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
3269 calls to undefined weak symbols.
3270
3271 2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
3272
3273 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
3274 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
3275
3276 2001-04-27 Andreas Jaeger <aj@suse.de>
3277
3278 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
3279 out handled entries.
3280 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
3281 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
3282 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
3283 GOT32.
3284
3285 2001-04-27 Sean McNeil <sean@mcneil.com>
3286
3287 * config.bfd: Add arm-vxworks target.
3288 * coff-arm (coff_arm_relocate_section): Add in symbol value to
3289 addend (fro VXworks targets).
3290
3291 2001-04-26 H.J. Lu <hjl@gnu.org>
3292
3293 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
3294 valid.
3295
3296 2001-04-25 Frank Ch. Eigler <fche@redhat.com>
3297
3298 * bfd-in.h (bfd_cache_close): Declare newly exported function.
3299 * bfd-in2.h: Regenerated.
3300
3301 2001-04-24 Jakub Jelinek <jakub@redhat.com>
3302
3303 * merge.c (struct sec_merge_hash_entry): Add alignment field.
3304 (struct sec_merge_hash): Remove alignment_power.
3305 (sec_merge_hash_newfunc): Clear alignment.
3306 (sec_merge_hash_lookup): Pass alignment as argument.
3307 Use hashp->root.next, not hashp->next to walk the hash chain.
3308 If a string already in the hashtable does not have required
3309 alignment, create a new hashtable entry.
3310 (sec_merge_init): Remove alignment_power argument.
3311 (sec_merge_add): Add alignment argument.
3312 (sec_merge_emit): Alignment is now a per-entity thing, not per
3313 section.
3314 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
3315 for proper alignment.
3316 Pass alignment information to sec_merge_add.
3317
3318 2001-04-24 Christian Groessler <cpg@aladdin.de>
3319
3320 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
3321 and R_REL16 reloc types; accept odd values for R_REL16 type
3322
3323 2001-04-24 Johan Rydberg <jrydberg@opencores.org>
3324
3325 * cpu-openrisc.c: New file.
3326 * elf32-openrisc.c: Likewise.
3327
3328 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
3329 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
3330 (BFD32_BACKENDS): Add elf32-openrisc.lo.
3331 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
3332 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
3333 * Makefile.in: Regenerated.
3334 * config.bfd: (openrisc-*-elf): New target.
3335 * configure.in (bfd_elf32_openrisc_vec): New vector.
3336 * configure: Regenerated.
3337 * libbfd.h: Regenerated.
3338 * bfd-in2.h: Regenerated.
3339 * reloc.c: Add OpenRISC relocations.
3340 * targets.c (bfd_elf32_openrisc_vec): Declare.
3341 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
3342 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
3343 (bfd_openrisc_arch): Declare.
3344 (bfd_archures_list): Add bfd_openrisc_arch.
3345 * elf.c (prep_headers): Add bfd_arch_openrisc.
3346
3347 2001-04-23 Bo Thorsen <bo@suse.de>
3348
3349 * elf64-x86-64.c: Add c++ vtable hack.
3350 Small whitespace and comment changes.
3351
3352 2001-04-19 Andreas Jaeger <aj@suse.de>
3353
3354 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
3355 (elf64_x86_64_plt_entry): Likewise.
3356 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
3357 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
3358
3359 2001-04-17 Hans-Peter Nilsson <hp@axis.com>
3360
3361 * elf32-cris.c: Tweak comments related to dynamic linking.
3362 (cris_elf_relocate_section): When not creating shared object, fill
3363 in the .got table for any symbol not in the dynamic symbol table.
3364 (elf_cris_finish_dynamic_symbol): When not creating shared object,
3365 only emit a .got.rela reloc if the symbol is in the dynamic symbol
3366 table.
3367 (cris_elf_check_relocs): Use variable r_type in all places rather
3368 than the original expression. Add default case in switch for
3369 reloc types.
3370 (elf_cris_size_dynamic_sections): Iterate over
3371 elf_cris_discard_excess_program_dynamics when not creating shared
3372 library.
3373 (elf_cris_discard_excess_dso_dynamics): Renamed from
3374 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
3375 (elf_cris_discard_excess_program_dynamics): New.
3376
3377 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
3378
3379 * coffcode.h (coff_write_object_contents): Use
3380 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
3381
3382 2001-04-14 H.J. Lu <hjl@gnu.org>
3383
3384 * bfd-in2.h: Regenerate.
3385
3386 2001-04-14 Jakub Jelinek <jakub@redhat.com>
3387
3388 * section.c (STD_SECTION): Add entsize.
3389
3390 2001-04-13 H.J. Lu <hjl@gnu.org>
3391
3392 * section.c (SEC_MERGE): Define new flag for merging.
3393 (SEC_STRINGS): Likewise.
3394 (entsize): New field.
3395
3396 2001-04-13 Roger Sayle <roger@metaphorics.com>
3397
3398 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
3399 flag on pe-i386 targets.
3400
3401 2001-04-13 Jakub Jelinek <jakub@redhat.com>
3402
3403 * libbfd-in.h (_bfd_merge_section): New.
3404 (_bfd_write_merged_section): New.
3405 (_bfd_merged_section_offset): New.
3406 * libbfd.h: Rebuilt.
3407 * linker.c (_bfd_generic_link_output_symbols): Handle
3408 discard_sec_merge.
3409 * aoutx.h (aout_link_write_symbols): Likewise.
3410 * pdp11.c (aout_link_write_symbols): Likewise.
3411 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
3412 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
3413 sections.
3414 (elf_link_sec_merge_syms): New.
3415 (elf_link_input_bfd): Call _bfd_merged_section_offset
3416 and _bfd_write_merged_section.
3417 Handle discard_sec_merge.
3418 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
3419 field.
3420 (struct bfd_elf_section_data): Likewise.
3421 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
3422 SEC_STRINGS section flags and entsize from their ELF counterparts.
3423 (_bfd_elf_link_hash_table_init): Initialize merge_info.
3424 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
3425 from their BFD counterparts.
3426 * merge.c: New file.
3427 * Makefile.am: Add strtab.lo.
3428 * Makefile.in: Rebuilt.
3429
3430 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
3431
3432 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
3433 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
3434
3435 2001-04-05 Steven J. Hill <sjhill@cotw.com>
3436
3437 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
3438 endian MIPS ELF target.
3439 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
3440 MIPS ELF target.
3441
3442 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
3443 64bit big endian MIPS ELF target.
3444 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3445 endian MIPS ELF target.
3446 * configure: Regenerated.
3447
3448 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
3449 little endian targets.
3450 (mips_elf_sym_is_global): Handle traditional targets.
3451
3452 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
3453 64bit big endian MIPS ELF target.
3454 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
3455 endian MIPS ELF target.
3456
3457 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
3458 and bfd_elf64_tradlittlemips_vec.
3459
3460 2001-04-05 David Mosberger <davidm@hpl.hp.com>
3461
3462 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
3463 ordinary "progbits" section.
3464
3465 2001-04-04 Alan Modra <alan@linuxcare.com.au>
3466
3467 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
3468 when -Bsymbolic causes a symbol to no longer need a .plt entry.
3469
3470 2001-04-03 David Mosberger <davidm@hpl.hp.com>
3471
3472 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
3473
3474 2001-03-30 H.J. Lu <hjl@gnu.org>
3475
3476 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
3477 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
3478
3479 2001-03-26 H.J. Lu <hjl@gnu.org>
3480
3481 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
3482 if there are any relocations for generic ELF.
3483 (bfd_elf32_bfd_link_add_symbols): Defined to
3484 elf32_generic_link_add_symbols.
3485 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
3486 if there are any relocations for generic ELF.
3487 (bfd_elf64_bfd_link_add_symbols): Defined to
3488 elf64_generic_link_add_symbols.
3489
3490 2001-03-23 Nick Clifton <nickc@redhat.com>
3491
3492 * Makefile.am (BUILD_CFILES): New variable: List of C source
3493 files created in build directory.
3494 (BUILD_HFILES): New variable: List of header files created in
3495 build directory.
3496 (POTFILES): Delete.
3497 (po/POTFILES.in): Replace rule with empty entry.
3498 (po/SRC-POTFILES.in): New rule: Create a list of source files
3499 in the source directory.
3500 (po/BLD-POTFILES.in): New rule: Create a list of source files
3501 in the build directory.
3502 (MOSTLYCLEAN): Do not delete source files created in build
3503 directory.
3504 * Makefile.in: Regenerate.
3505 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
3506 into po/Makefile.
3507 * configure: Regenerate.
3508
3509 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
3510 and BLD_POTFILES.
3511 Add .. to the search path when building bfd.pot.
3512 Delete POTFILES when performing distclean.
3513 Add comment describing why distclean is broken in maintainer mode.
3514 * po/POTFILES.in: Delete.
3515 * po/SRC-POTFILES.in: New file.
3516 * po/BLD-POTFILES.in: New file.
3517 * po/bfd.pot: Regenerate.
3518
3519 2001-03-22 Hans-Peter Nilsson <hp@axis.com>
3520
3521 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
3522 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
3523 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
3524 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
3525 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
3526 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
3527 functions.
3528 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
3529 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
3530 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
3531 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
3532 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
3533 New HOWTO members for new relocs.
3534 (cris_reloc_map): Map new relocs.
3535 (ELF_DYNAMIC_INTERPRETER): Define.
3536 (PLT_ENTRY_SIZE): Define.
3537 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
3538 elf_cris_pic_plt_entry): New, PLT templates.
3539 (struct elf_cris_pcrel_relocs_copied, struct
3540 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
3541 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
3542 (cris_final_link_relocate): Check that 16-bit GOT relocs have
3543 positive values. Adjust PCREL relocs to be relative to location
3544 after relocation.
3545 (cris_elf_relocate_section): Handle relocations to dynamic
3546 objects. Handle new relocations. Call error handler when seeing
3547 non-PIC relocation for read-only sections while generating shared
3548 object.
3549 (cris_elf_check_relocs): Set reference counts for GOT and PLT
3550 entries.
3551 (bfd_elf32_bfd_link_hash_table_create,
3552 elf_backend_adjust_dynamic_symbol,
3553 elf_backend_size_dynamic_sections,
3554 elf_backend_finish_dynamic_symbol,
3555 elf_backend_finish_dynamic_sections,
3556 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
3557 elf_backend_hide_symbol, elf_backend_want_got_plt,
3558 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3559 elf_backend_got_header_size, elf_backend_plt_header_size):
3560 Define.
3561
3562 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
3563 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
3564 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
3565 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
3566 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
3567 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
3568 * bfd-in2.h, libbfd.h: Regenerate.
3569
3570 2001-03-21 Diego Novillo <dnovillo@redhat.com>
3571
3572 (_bfd_mips_elf_relocate_section): Give a better error message when
3573 a relocation is not recognized.
3574
3575 2001-03-21 Alan Modra <alan@linuxcare.com.au>
3576
3577 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
3578 non-NULL before attempting to dereference.
3579
3580 2001-03-20 H.J. Lu <hjl@gnu.org>
3581
3582 * configure.in: Remove the redundent AC_ARG_PROGRAM.
3583 * configure: Rebuild.
3584
3585 2001-03-20 Andreas Schwab <schwab@suse.de>
3586
3587 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
3588 relocation value when resolving a reference from a debugging
3589 section.
3590
3591 2001-03-16 Scott Thomason <SThomaso@hii.com>
3592
3593 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
3594 (xcoff64_swap_sym_out): Fix syntax errors.
3595
3596 2001-03-16 Richard Sandiford <rsandifo@redhat.com>
3597
3598 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
3599
3600 2001-03-15 Alan Modra <alan@linuxcare.com.au>
3601
3602 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
3603 (hppa_link_hash_newfunc): Init it.
3604 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
3605 section appears to be non-PIC.
3606 (final_link_relocate): Likewise.
3607 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
3608 possible candidate function, and set pic_call for those that will
3609 only have a .plt entry for the PIC call stub.
3610 (hppa_handle_PIC_calls): Set maybe_pic_call.
3611
3612 2001-03-12 DJ Delorie <dj@redhat.com>
3613
3614 * elf32-sh.c (sh_elf_relocate_section): Only relocation
3615 R_SH_DIR8WP* relocs if they're against external symbols, else
3616 they're just for relaxing. Validate the reloc values.
3617
3618 2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
3619
3620 * binary.c (bfd_external_binary_architecture): Declare.
3621 (binary_object_p): If bfd_external_binary_architecture is defined,
3622 set the architecture to this string.
3623
3624 2001-03-11 Philip Blundell <philb@gnu.org>
3625
3626 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
3627 entries that could serve as a definition for a weak symbol.
3628
3629 2001-03-08 Nick Clifton <nickc@redhat.com>
3630
3631 * Most files: Update copyright notices using Perl script created
3632 by Kevin Buettner <kevinb@redhat.com>.
3633
3634 2001-03-07 Nick Clifton <nickc@redhat.com>
3635
3636 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
3637 prior patch on ! defined OLD_ARM_ABI.
3638
3639 2001-03-07 Andreas Jaeger <aj@suse.de>
3640
3641 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
3642 some relocation values.
3643
3644 2001-03-06 Nick Clifton <nickc@redhat.com>
3645
3646 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
3647 of offset in BLX(1) instruction.
3648 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
3649 offset in BLX(1) instruction.
3650 Fix formatting.
3651
3652 2001-03-06 Nick Clifton <nickc@redhat.com>
3653
3654 * coff-arm.c (coff_arm_reloc_type_lookup): Add
3655 BFD_RELOC_THUMB_PCREL_BLX.
3656
3657 2001-03-06 Igor Shevlyakov <igor@windriver.com>
3658
3659 * archures.c (bfd_default_scan): Add Coldfire CPUs.
3660 * bfd-in2.h: Regenerate.
3661 * cpu-m68k.c: Add Coldfire CPUs for arch table.
3662 * ieee.c (ieee_write_processor): Set proper id for
3663 Coldfire CPUs.
3664
3665 2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
3666
3667 * configure.in: Add s390 target.
3668 * configure: Regenerate.
3669
3670 2001-02-28 Andreas Jaeger <aj@suse.de>
3671
3672 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
3673 to addend.
3674
3675 2001-02-28 Philip Blundell <pb@futuretv.com>
3676
3677 * elf32-arm.h: Update mentions of renamed EF_xx constants.
3678 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
3679
3680 2001-02-27 H.J. Lu <hjl@gnu.org>
3681
3682 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
3683 abfd->tdata.aout_data == NULL.
3684
3685 2001-02-27 Alan Modra <alan@linuxcare.com.au>
3686
3687 * elf32-hppa.c: Correct field selector in stub comments.
3688 (clobber_millicode_symbols): Formatting fix.
3689
3690 * configure.in: Bump version to 2.11.90.
3691 * configure: Regenerate.
3692 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
3693 (CFILES): $SOURCE_CFILES + generated C files.
3694 (POTFILES): Include $HFILES not $SOURCE_HFILES.
3695 Run "make dep-am"
3696 * Makefile.in: Regenerate.
3697 * doc/Makefile.in: This too.
3698
3699 2001-02-26 Timothy Wall <twall@cygnus.com>
3700
3701 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
3702 comments.
3703
3704 2001-02-26 Nick Clifton <nickc@redhat.com>
3705
3706 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
3707 up, replacing multiple if statements with a switch.
3708 (handle_COMDAT): New function.
3709
3710 2001-02-26 H.J. Lu <hjl@gnu.org>
3711
3712 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
3713 a warning for section flags we do not handle instead of
3714 aborting.
3715
3716 2001-02-26 Andreas Jaeger <aj@suse.de>
3717
3718 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
3719
3720 2001-02-22 Timothy Wall <twall@cygnus.com>
3721
3722 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
3723 * configure.in: Add objects for elf64_ia64_aix vectors.
3724 * configure: Regenerated.
3725 * configure.host: Recognize ia64-*-aix*.
3726 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
3727 for AIX. AIX5 requires most relocations to be dynamic (*all*
3728 binaries are somewhat similar to shared libraries).
3729 * targets.c: Add elf64_ia64_aix vectors.
3730
3731 2001-02-21 David Mosberger <davidm@hpl.hp.com>
3732
3733 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
3734 C8 said "1" instead of "8". Clarify error string for IMM22:
3735 "signed integer" instead of just "integer".
3736
3737 2001-02-20 Andreas Jaeger <aj@suse.de>
3738
3739 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
3740 PLT entries that could serve as a definition for a weak symbol.
3741
3742 2001-02-19 Jakub Jelinek <jakub@redhat.com>
3743
3744 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
3745 entries that could serve as a definition for a weak symbol.
3746 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
3747
3748 2001-02-18 David O'Brien <obrien@FreeBSD>
3749
3750 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
3751 FreeBSD/i386-CURRENT differently until I can figure out the needed
3752 corefile changes.
3753 * configure: Regenerate.
3754 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
3755 FreeBSD/PowerPC, and FreeBSD/sparc64.
3756
3757 2001-02-18 lars brinkhoff <lars@nocrew.org>
3758
3759 * Makefile.am: Add PDP-11 a.out target.
3760 * config.bfd: Likewise.
3761 * configure.in: Likewise.
3762 * targets.c: Likewise.
3763 * archures.c: Likewise.
3764 * bfd-in2.h: Likewise. Add PDP-11 relocations.
3765 * libbfd.h: Add PDP-11 relocations.
3766 * reloc.c: Likewise.
3767 * cpu-pdp11.c: New file.
3768 * pdp11.c: New file.
3769
3770 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
3771 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3772 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
3773 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
3774 (GET_MAGIC): New macro.
3775 (PUT_MAGIC): Likewise.
3776 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
3777
3778 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
3779
3780 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
3781 multiarch needs it).
3782
3783 2001-02-18 H.J. Lu <hjl@gnu.org>
3784
3785 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
3786 index.
3787
3788 2001-02-18 Kazu Hirata <kazu@hxi.com>
3789
3790 * vms-misc.c: Fix formatting.
3791
3792 2001-02-16 Kazu Hirata <kazu@hxi.com>
3793
3794 * vms.c: Fix formatting.
3795
3796 2001-02-14 H.J. Lu <hjl@gnu.org>
3797
3798 * elf.c (elf_find_function): New function.
3799 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
3800 the file name and function name.
3801
3802 2001-02-14 Nick Clifton <nickc@redhat.com>
3803
3804 * ecoff.c (bfd_debug_section): Update to initialise new fields in
3805 asection structure.
3806
3807 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
3808 (BFD64_BACKENDS): Add pepigen.c
3809 Add rules to create peigen.c and pepigen.c from peXXigen.c.
3810
3811 * Makefile.in: Regenerate.
3812 * configure: Regenerate.
3813 * po/POTFILES.in: Regenerate.
3814 * po/bfd.pot: Regenerate.
3815
3816 2001-02-14 H.J. Lu <hjl@gnu.org>
3817
3818 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3819 force_minimum_alignment.
3820
3821 2001-02-14 Bo Thorsen <bo@suse.de>
3822
3823 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3824 (elf64_86_64_size_info): Struct added to fix a problem
3825 with the hashtable string entries.
3826 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3827 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3828 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3829 remove the FIXME for this.
3830 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3831 section. Also removed the FIXME for it.
3832 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3833 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3834 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3835
3836 2001-02-13 Richard Henderson <rth@redhat.com>
3837
3838 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3839 and not user provided.
3840
3841 2001-02-13 Kazu Hirata <kazu@hxi.com>
3842
3843 * vms.c (vms_print_symbol): Remove unreachable code.
3844
3845 * rs6000-core.c: Fix formatting.
3846
3847 2001-02-13 David Mosberger <davidm@hpl.hp.com>
3848
3849 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3850 as _bfd_XXi_only_swap_filehdr_out.
3851 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3852 pe->force_minimum_alignment to TRUE.
3853 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3854 PEI_TARGET_SUBSYSTEM.
3855 (pe_print_private_bfd_data): Call
3856 _bfd_XX_print_private_bfd_data_common() instead of
3857 _bfd_pe_print_private_bfd_data_common().
3858 (pe_bfd_copy_private_bfd_data): Call
3859 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3860 _bfd_pe_bfd_copy_private_bfd_data_common().
3861 (coff_bfd_copy_private_section_data): Define as
3862 _bfd_XX_bfd_copy_private_section_data instead of
3863 _bfd_pe_bfd_copy_private_section_data.
3864 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3865 of a _bfd_pe_get_symbol_info.
3866
3867 * peigen.c: Delete.
3868
3869 * peXXigen.c: Renamed from peigen.c.
3870 (COFF_WITH_XX): Define this macro (will get expanded into
3871 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3872 compiled as peigen.c or pepigen.c.
3873 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3874 define the canonical PEP structures and definitions.
3875 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3876 effect, enforce minimum file and section alignments. If
3877 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3878 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3879 so, by default, this is a no-op).
3880
3881 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3882 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3883 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3884 _bfd_pefoo if it's not defined. Use these macros to define
3885 coff swap macros.
3886
3887 * libcoff.h (pe_tdata): Add members target_subsystem and
3888 force_minimum_alignment.
3889
3890 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3891 COFF_WITH_pep.
3892 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3893
3894 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3895 peigen.lo.
3896
3897 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3898 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3899 PEPAOUTHDR.
3900
3901 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3902 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3903 (peigen.c): Add rule to generate from peXXigen.c.
3904 (pepigen.c): Ditto.
3905 (pepigen.lo): List dependencies for pepigen.lo.
3906
3907 2001-02-13 Alan Modra <alan@linuxcare.com.au>
3908
3909 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3910 $global$ referenced but not defined, set its value here.
3911
3912 2001-02-09 Bo Thorsen <bo@suse.de>
3913
3914 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3915 alignment to 3.
3916 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
3917 and relocation.
3918 (elf64_x86_64_relocate_section): Fix formatting.
3919 (elf64_x86_64_relocate_section): Fix addend for relocation of
3920 R_X86_64_(8|16|32|PC8|PC16|PC32).
3921
3922 2001-02-12 Jan Hubicka <jh@suse.cz>
3923
3924 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3925
3926 2001-02-11 H.J. Lu <hjl@gnu.org>
3927
3928 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3929 alignment.
3930
3931 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3932
3933 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
3934 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
3935 relocations against dynsym symbols.
3936
3937 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
3938 the R_MIPS_26 relocation.
3939 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
3940 the R_MIPS_26 relocation.
3941 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
3942 relocation.
3943 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
3944 the R_MIPS_26 relocation.
3945 (mips_elf64_howto_table_rela): Likewise.
3946
3947 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
3948 member to mark symbols that have non-CALL relocations against
3949 them.
3950 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3951 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
3952 R_MIPS_GOT16.
3953 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
3954 non-CALL relocation against it is encountered.
3955 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
3956 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
3957 no_fn_stub is not set.
3958
3959 * elf32-mips.c (mips_elf_output_extsym): Get the output section
3960 information from the real symbol for indirect ones.
3961 Check no_fn_stub to find out if a symbol has a function stub
3962 indeed.
3963
3964 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
3965
3966 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
3967 * Makefile.in: Regenerate.
3968
3969 2001-02-09 David Mosberger <davidm@hpl.hp.com>
3970
3971 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
3972 true if section name is an unwind table section name.
3973 (elfNN_ia64_additional_program_headers): Count each unwind section
3974 separately.
3975 (elfNN_ia64_modify_segment_map): Install one unwind program header
3976 for each unwind separate section. Note: normally the linker
3977 script merges the unwind sections that go into a single segment,
3978 so this still generates at most one unwind program header per
3979 segment.
3980
3981 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
3982 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
3983 (elfNN_ia64_fake_sections): Mark sections with names that start
3984 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
3985 unwind section.
3986
3987 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
3988 Use it to make sh_info in unwind section point to the text section
3989 it applies to.
3990
3991 2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3992
3993 * Makefile.am: Add linux target for S/390.
3994 * archures.c: Likewise.
3995 * bfd-in2.h: Likewise.
3996 * config.bfd: Likewise.
3997 * configure.in: Likewise.
3998 * elf.c: Likewise.
3999 * libbfd.h: Likewise.
4000 * targets.c: Likewise.
4001 * cpu-s390.c: New file.
4002 * elf32-s390.c: New file.
4003 * elf64-s390.c: New file.
4004
4005 2001-02-09 Nick Clifton <nickc@redhat.com>
4006
4007 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
4008 ImageBase. This has already been done by coff_swap_hdr_in.
4009
4010 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4011
4012 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
4013
4014 2001-02-09 Jakub Jelinek <jakub@redhat.com>
4015
4016 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
4017 (sparc64_elf_relocate_section): Likewise.
4018
4019 2001-02-09 Mark Kettenis <kettenis@gnu.org>
4020
4021 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
4022 similar to R_SPARC_32.
4023 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
4024
4025 2001-02-08 H.J. Lu <hjl@gnu.org>
4026
4027 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
4028 relocation entries for weak definitions when building DSO with
4029 -Bsymbolic.
4030
4031 2001-02-08 Richard Henderson <rth@redhat.com>
4032
4033 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
4034 before visibility. Locally defined protected symbols are not
4035 dynamic.
4036
4037 2001-02-08 Geoffrey Keating <geoffk@redhat.com>
4038
4039 * config.bfd: Enable coff64 for rs6000-*. Patch from
4040 <hzoli@austin.ibm.com>.
4041
4042 2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
4043
4044 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
4045 found, do not attempt to find dwarf2 info before returning.
4046
4047 2001-02-07 Jakub Jelinek <jakub@redhat.com>
4048
4049 * elflink.h (is_global_symbol_definition): Rename to
4050 is_global_data_symbol_definition and have it reject function
4051 symbols.
4052 (elf_link_is_defined_archive_symbol): Use renamed function.
4053
4054 2001-02-07 Todd Vierling <tv@wasabisystems.com>
4055
4056 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
4057 * libbfd.h (bfd_target_vector): Likewise.
4058 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
4059 make static; create pointer reference named bfd_target_vector.
4060 (_bfd_target_vector_entries): Calculate this based on the array
4061 typed _bfd_target_vector.
4062
4063 2001-02-06 H.J. Lu <hjl@gnu.org>
4064
4065 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
4066 internal symbols are not dynamic.
4067 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
4068
4069 2001-02-06 Nick Clifton <nickc@redhat.com>
4070
4071 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
4072 that it will not be pulled into the list of files that make up
4073 po/POTFILES.in.
4074 * Makefile.in: Regenerate.
4075 * po/bfd.pot: Regenerate.
4076
4077 2001-02-06 H.J. Lu <hjl@gnu.org>
4078
4079 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
4080 checking.
4081 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
4082 external_PEI_IMAGE_hdr.
4083
4084 2001-02-06 Kazu Hirata <kazu@hxi.com>
4085
4086 * elf-m10200.c: Fix formatting.
4087
4088 2001-02-04 Nick Clifton <nickc@redhat.com>
4089
4090 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
4091 rel, it will be handled later on.
4092
4093 2001-02-02 Fred Fish <fnf@ninemoons.com>
4094
4095 * Makefile.in: Fix typo.
4096
4097 2001-02-01 Kazu Hirata <kazu@hxi.com>
4098
4099 * elf-m10300.c: Fix formatting.
4100
4101 2001-01-30 Alan Modra <alan@linuxcare.com.au>
4102
4103 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
4104 (elf_backend_get_symbol_type): Define.
4105 (elf64_hppa_object_p): Set architecture and machine from elf
4106 header flags.
4107
4108 2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
4109
4110 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
4111 before mdebug.
4112
4113 2001-01-26 Richard Henderson <rth@redhat.com>
4114
4115 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
4116 for non-default visibility.
4117 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
4118 delete ugly macro and replace with pretty function.
4119
4120 2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
4121
4122 * coff-go32.c: Update copyright.
4123 * coff-stgo32.c: Likewise.
4124 * coff-go32.c (COFF_LONG_FILENAMES): Define.
4125 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
4126 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
4127 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4128
4129 2001-01-25 Kazu Hirata <kazu@hxi.com>
4130
4131 * bfd-in2.h: Rebuild.
4132 * libbfd.h: Likewise.
4133
4134 2001-01-23 H.J. Lu <hjl@gnu.org>
4135
4136 * bfd-in2.h: Rebuild.
4137
4138 2001-01-23 H.J. Lu <hjl@gnu.org>
4139
4140 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
4141 is NULL or PRIV(vms_rec) is outside of the buffer.
4142
4143 2001-01-23 Kazu Hirata <kazu@hxi.com>
4144
4145 * coff64-rs6000.c: Fix formatting.
4146 * coff-arm.c: Likewise.
4147 * coffgen.c: Likewise.
4148 * cofflink.c: Likewise.
4149 * coff-mcore.c: Likewise.
4150 * coff-mips.c: Likewise.
4151 * coff-pmac.c: Likewise.
4152 * coff-ppc.c: Likewise.
4153 * coff-rs6000.c: Likewise.
4154 * elf32.c: Likewise.
4155 * elf32-fr30.c: Likewise.
4156 * elf32-i370.c: Likewise.
4157 * elf32-i860.c: Likewise.
4158 * elf32-m32r.c: Likewise.
4159 * elf32-m68k.c: Likewise.
4160 * elf32-mcore.c: Likewise.
4161 * elf32-ppc.c: Likewise.
4162 * elf32-sh.c: Likewise.
4163 * elf32-v850.c: Likewise.
4164 * elf64-alpha.c: Likewise.
4165 * elf64-sparc.c: Likewise.
4166 * elflink.c: Likewise.
4167 * elflink.h: Likewise.
4168 * elf-m10200.c: Likewise.
4169 * elf-m10300.c: Likewise.
4170 * elfxx-ia64.c: Likewise.
4171
4172 * aoutx.h: Fix formatting.
4173 * bfd.c: Likewise.
4174 * bfd-in2.h: Likewise.
4175 * bfd-in.h: Likewise.
4176 * cpu-i386.c: Likewise.
4177 * cpu-m68hc11.c: Likewise.
4178 * dwarf2.c: Likewise.
4179 * elf64-x86-64.c: Likewise.
4180 * format.c: Likewise.
4181 * freebsd.h: Likewise.
4182 * hash.c: Likewise.
4183 * hp300hpux.c: Likewise.
4184 * hppabsd-core.c: Likewise.
4185 * hpux-core.c: Likewise.
4186
4187 2001-01-22 Bo Thorsen <bo@suse.de>
4188
4189 * elf64-x86-64.c: Added PIC support for X86-64.
4190 (elf64_x86_64_link_hash_newfunc): Function added.
4191 (elf64_x86_64_link_hash_table_create): Likewise.
4192 (elf64_x86_64_check_relocs): Likewise.
4193 (elf64_x86_64_gc_mark_hook): Likewise.
4194 (elf64_x86_64_gc_sweep_hook): Likewise.
4195 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
4196 (elf64_x86_64_size_dynamic_sections): Likewise.
4197 (elf64_x86_64_discard_copies): Likewise.
4198 (elf64_x86_64_finish_dynamic_symbol): Likewise.
4199 (elf64_x86_64_finish_dynamic_sections): Likewise.
4200 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
4201
4202 2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
4203
4204 * Makefile.am (install-data-local): Make use of $(DESTDIR).
4205 * Makefile.in: Regenerate.
4206
4207 2001-01-21 Kazu Hirata <kazu@hxi.com>
4208
4209 * coff-a29k.c: Fix formatting.
4210
4211 2001-01-19 H.J. Lu <hjl@gnu.org>
4212
4213 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
4214 relocation section names.
4215 (elf_i386_relocate_section): Report files with bad relocation
4216 section names and return false.
4217
4218 2001-01-17 Bo Thorsen <bo@suse.de>
4219
4220 * targets.c: Alphabetize list of xvecs.
4221
4222 2001-01-14 Alan Modra <alan@linuxcare.com.au>
4223
4224 * config.bfd: Add linux target variant for elfxx-hppa.
4225 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
4226 bfd_elf64_hppa_linux_vec.
4227 * configure: Regenerate.
4228 * elf64-hppa.c: Include elf64-target.h again to support linux
4229 target variant.
4230 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
4231 * elf32-hppa.c: Include elf32-target.h again to support linux
4232 target variant.
4233 (elf32_hppa_post_process_headers): New function.
4234 (elf_backend_post_process_headers): Define.
4235 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
4236 bfd_elf32_hppa_linux_vec.
4237
4238 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
4239 and data_segment_base fields.
4240 (elf32_hppa_link_hash_table_create ): Init them.
4241 (elf32_hppa_check_relocs): Update comments.
4242 (hppa_record_segment_addr): New function.
4243 (elf32_hppa_relocate_section): Call it.
4244 (final_link_relocate): Handle R_PARISC_SEGREL32.
4245 (elf32_hppa_final_link): New function.
4246 (bfd_elf32_bfd_final_link): Define to call it.
4247 (hppa_unwind_entry_compare): New function.
4248 * cache.c (bfd_open_file): Create files in write+read mode.
4249
4250 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
4251 SEGREL32 and numerous other relocs. Change duplicate
4252 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
4253
4254 * opncls.c (bfd_fdopenr): Add parens like the comment says around
4255 O_ACCMODE.
4256
4257 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
4258 .plt entries for DT_INIT and DT_FINI.
4259 (elf32_hppa_finish_dynamic_sections): Remove special handling of
4260 DT_INIT and DT_FINI.
4261
4262 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
4263 offsets for stub .plt access if wide mode. Check offset in range.
4264
4265 2001-01-13 Nick Clifton <nickc@redhat.com>
4266
4267 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
4268 line.
4269
4270 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
4271 line.
4272
4273 2001-01-12 Alan Modra <alan@linuxcare.com.au>
4274
4275 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
4276 * configure: Regenerate.
4277
4278 2001-01-11 Peter Targett <peter.targett@arccores.com>
4279
4280 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
4281 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
4282 * cpu-arc.c (arch_info_struct): Add entries for variants.
4283 (bfd_arc_arch) Set default to bfd_mach_arc_5.
4284 (arc_get_mach) Don't assume machine names prefixed arc- before
4285 testing.
4286 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
4287 selections.
4288 (arc_elf_final_write_processing) Likewise.
4289 (ELF_MACHINE_CODE) Use EM_ARC.
4290
4291 2001-01-10 Nick Clifton <nickc@redhat.com>
4292
4293 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
4294
4295 2001-01-07 Philip Blundell <philb@gnu.org>
4296
4297 * README: Replace `bug-gnu-utils@gnu.org' with
4298 `bug-binutils@gnu.org'.
4299
4300 2001-01-04 Kazu Hirata <kazu@hxi.com>
4301
4302 * som.c: Fix formatting.
4303
4304 2001-01-03 Kazu Hirata <kazu@hxi.com>
4305
4306 * ecoffswap.h: Fix formatting.
4307 * elf-bfd.h: Likewise.
4308 * elfarm-nabi.c: Likewise.
4309 * elfarm-oabi.c: Likewise.
4310 * elfcode.h: Likewise.
4311 * elfcore.h: Likewise.
4312 * elflink.c: Likewise.
4313 * elflink.h: Likewise.
4314 * elfxx-ia64.c: Likewise.
4315 * elfxx-target.h: Likewise.
4316 * libbfd.c: Likewise
4317 * linker.c: Likewise.
4318 * lynx-core.c: Likewise.
4319
4320 2001-01-02 Kazu Hirata <kazu@hxi.com>
4321
4322 * pc532-mach.c: Fix formatting.
4323 * pe-arm.c: Likewise.
4324 * pe-i386.c: Likewise.
4325 * pe-mips.c: Likewise.
4326 * pe-ppc.c: Likewise.
4327 * pe-sh.c: Likewise.
4328 * pei-mips.c: Likewise.
4329 * pei-sh.c: Likewise.
4330 * peicode.h: Likewise.
4331 * ppcboot.c: Likewise.
4332 * ptrace-core.c: Likewise.
4333
4334 2001-01-01 Kazu Hirata <kazu@hxi.com>
4335
4336 * reloc.c: Fix formatting.
4337 * riscix.c: Likewise.
4338 * rs6000-core.c: Likewise.
4339 * xcoff-target.h: Likewise.
4340
4341 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4342
4343 * elfcode.h (elf_object_p): Also restore the bfd mach field on
4344 error, by calling bfd_default_set_arch_mach with incoming
4345 values.
4346
4347 2000-12-26 Kazu Hirata <kazu@hxi.com>
4348
4349 * vaxnetbsd.c: Fix formatting.
4350 * versados.c: Likewise.
4351 * vms-gsd.c: Likewise.
4352 * vms-hdr.c: Likewise.
4353 * vms-misc.c: Likewise.
4354
4355 2000-12-25 Alexandre Oliva <aoliva@redhat.com>
4356
4357 * archive.c (coff_write_armap): Don't write more than symbol_count
4358 `archive_member_file_ptr's.
4359
4360 2000-12-25 Kazu Hirata <kazu@hxi.com>
4361
4362 * vms-tir.c: Fix formatting.
4363
4364 2000-12-23 Kazu Hirata <kazu@hxi.com>
4365
4366 * vms.c: Fix formatting.
4367 * vms.h: Likewise.
4368
4369 2000-12-21 Santeri Paavolainen <santtu@ssh.com>
4370
4371 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
4372
4373 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
4374
4375 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
4376 arithmetic.
4377
4378 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
4379
4380 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
4381
4382 2000-12-21 Richard Sandiford <rsandifo@redhat.com>
4383
4384 * libbfd.c (bfd_get_bits): Added
4385 (bfd_put_bits): Likewise
4386 * bfd-in.h: Declared the above.
4387 * bfd-in2.h: Regenerated.
4388
4389 2000-12-20 Kazu Hirata <kazu@hxi.com>
4390
4391 * targets.c: Fix formatting.
4392 * tekhex.c: Likewise.
4393 * trad-core.c: Likewise.
4394
4395 2000-12-19 Kazu Hirata <kazu@hxi.com>
4396
4397 * sco5-core.c: Fix formatting.
4398 * section.c: Likewise.
4399 * sparclinux.c: Likewise.
4400 * sparclynx.c: Likewise.
4401 * sparcnetbsd.c: Likewise.
4402 * srec.c: Likewise.
4403 * stabs.c: Likewise.
4404 * stab-syms.c: Likewise.
4405 * sunos.c: Likewise.
4406 * syms.c: Likewise.
4407 * sysdep.h: Likewise.
4408
4409 2000-12-18 Nick Clifton <nickc@redhat.com>
4410
4411 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
4412 defined.
4413 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
4414 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
4415
4416 2000-12-18 Nick Clifton <nickc@redhat.com>
4417
4418 * vms-misc.c (_bfd_vms_get_record): Add default case to
4419 file_format switch.
4420
4421 2000-12-15 Miloslav Trmac <mitr@volny.cz>
4422
4423 * elfcore.h (elf_core_file_p): Move to the start of the program
4424 headers before attempting to read them.
4425
4426 2000-12-14 Kazu Hirata <kazu@hxi.com>
4427
4428 * peigen.c: Fix formatting.
4429 * som.c: Likewise.
4430 * som.h: Likewise.
4431
4432 2000-12-13 Kazu Hirata <kazu@hxi.com>
4433
4434 * peigen.c: Fix formatting.
4435
4436 2000-12-12 Jim Wilson <wilson@redhat.com>
4437
4438 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
4439
4440 2000-12-08 Mark Salter <msalter@redhat.com>
4441
4442 * binary.c (binary_set_section_contents): Ignore sections
4443 with zero size.
4444
4445 2000-12-12 Kazu Hirata <kazu@hxi.com>
4446
4447 * m68klinux.c: Fix formatting.
4448 * m68knetbsd.c: Likewise.
4449 * mipsbsd.c: Likewise.
4450 * netbsd-core.c: Likewise.
4451 * netbsd.h: Likewise.
4452 * newsos3.c: Likewise.
4453 * nlm32-alpha.c: Likewise.
4454 * nlm32-i386.c: Likewise.
4455 * nlm32-ppc.c: Likewise.
4456 * nlm32-sparc.c: Likewise.
4457 * nlmcode.h: Likewise.
4458 * nlmswap.h: Likewise.
4459 * nlm-target.h: Likewise.
4460 * ns32knetbsd.c: Likewise.
4461
4462 2000-12-10 Fred Fish <fnf@be.com>
4463
4464 * elflink.h (elf_link_output_extsym): Don't complain about undefined
4465 symbols in shared objects if allow_shlib_undefined is true.
4466
4467 2000-12-12 Nick Clifton <nickc@redhat.com>
4468
4469 * cpu-sh.c: Fix formattng.
4470 * elf.c: Fix formattng.
4471 * elf32-mips.c: Fix formattng.
4472 * elf32-sh.c: Fix formattng.
4473 * elf64-alpha.c: Fix formattng.
4474
4475 2000-12-09 Nick Clifton <nickc@redhat.com>
4476
4477 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
4478 dwarf2_find_line_info as last parameter to invocation of
4479 _bfd_dwarf2_find_nearest_line.
4480 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
4481 dwarf2_find_line_info as last parameter to invocation of
4482 _bfd_dwarf2_find_nearest_line.
4483
4484 2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
4485
4486 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
4487 (BFD_LIBS): ...to here.
4488 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
4489 (BFD_LIBS_CFILES): ...to here.
4490 * Makefile.in: Regenerate.
4491 * configure.in: Remove dwarf.lo from the elf shell variable.
4492 * configure: Regenerate.
4493 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
4494 * libcoff.h: Regenerate.
4495 * coffgen.c (coff_find_nearest_line): Call
4496 _bfd_dwarf2_find_nearest_line.
4497 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
4498 accordingly.
4499 (read_abbrevs): Likewise
4500 (decode_line_info): Likewise.
4501 (parse_comp_unit): Likewise.
4502 (comp_unit_find_nearest_line): Likewise.
4503 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4504 * libbfd.h: Regenerate.
4505 * elf.c (_bfd_elf_find_nearest_line): Update call.
4506 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
4507 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
4508 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
4509 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
4510 (styp_to_sec_flags): Handle DWARF2 sections.
4511 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
4512 to _bfd_find_nearest_line.
4513 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
4514 call to _bfd_find_nearest_line.
4515
4516 2000-12-08 Kazu Hirata <kazu@hxi.com>
4517
4518 * coffgen.c: Fix formatting.
4519 * elf-m10300.c: Likewise.
4520 * elf32-i386.c: Likewise.
4521 * elf32-i960.c: Likewise.
4522 * elf32-m68k.c: Likewise.
4523 * elf32-mcore.c: Likewise.
4524 * elf32-ppc.c: Likewise.
4525 * elf32-sh.c: Likewise.
4526 * elf32-sparc.c: Likewise.
4527 * elf32-v850.c: Likewise.
4528 * elf64-alpha.c: Likewise.
4529 * elf64-hppa.c: Likewise.
4530 * elf64-mips.c: Likewise.
4531 * elf64-sparc.c: Likewise.
4532
4533 2000-12-07 Kazu Hirata <kazu@hxi.com>
4534
4535 * elf32-ppc.c: Fix formatting.
4536 * elf64-x86-64.c: Likewise.
4537
4538 2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
4539
4540 From Ralf Baechle <ralf@gnu.org>
4541
4542 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
4543 BFDs containing no sections or empty .text, .data or .bss sections
4544 to be merged, regardless of their flags.
4545
4546 2000-12-06 Kazu Hirata <kazu@hxi.com>
4547
4548 * elf32-m32r.c: Fix formatting.
4549 * elf32-m68hc11.c: Likewise.
4550 * elf32-m68hc12.c: Likewise.
4551 * elf32-m68k.c: Likewise.
4552 * elf32-mcore.c: Likewise.
4553 * elf32-pj.c: Likewise.
4554 * elf32-ppc.c: Likewise.
4555
4556 2000-12-05 Kazu Hirata <kazu@hxi.com>
4557
4558 * elf32-fr30.c: Fix formatting.
4559 * elf32-hppa.c: Likewise.
4560 * elf32-i370.c: Likewise.
4561 * elf32-i386.c: Likewise.
4562 * elf32-i860.c: Likewise.
4563 * elf32-i960.c: Likewise.
4564
4565 2000-12-03 Kazu Hirata <kazu@hxi.com>
4566
4567 * elf32-arm.h: Fix formatting.
4568 * elf32-avr.c: Likewise.
4569 * elf32-cris.c: Likewise.
4570 * elf32-d10v.c: Likewise.
4571 * elf32-d30v.c: Likewise.
4572 * elf-hppa.h: Likewise.
4573 * elf-m10200.c: Likewise.
4574 * elf-m10300.c: Likewise.
4575
4576 2000-12-01 Chris Demetriou <cgd@sibyte.com>
4577
4578 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
4579 bfd_mach_mips32_4k. Update FIXME comment.
4580 * archures.c (bfd_mach_mips32): New constant.
4581 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4582 the latter, renumber it.
4583 * bfd-in2.h (bfd_mach_mips32): New constant.
4584 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
4585 the latter, renumber it.
4586 * cpu-mips.c (I_mips32): New constant.
4587 (I_mips4K, I_mips32_4k): Rename the former to the latter.
4588 (arch_info_struct): Add bfd_mach_mips32 entry, replace
4589 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
4590 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
4591 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
4592 with E_MIPS_MACH_MIPS32_4K.
4593 (_bfd_mips_elf_final_write_processing): Replace
4594 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
4595 bfd_mach_mips32 case.
4596 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
4597 comparison with support for MIPS32.
4598 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
4599 MIPS32.
4600
4601 * aoutx.h (NAME(aout,machine_type)): Add cases for
4602 bfd_mach_mips5 and bfd_mach_mips64.
4603 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
4604 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
4605 * cpu_mips.c (I_mips5, I_mips64): New definitions.
4606 (arch_info_struct): Add entries for bfd_mach_mips5 and
4607 bfd_mach_mips64.
4608 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
4609 _bfd_mips_elf_print_private_bfd_data): Add cases for
4610 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
4611 (_bfd_mips_elf_final_write_processing): Add cases for
4612 bfd_mach_mips5 and bfd_mach_mips64.
4613
4614 * aoutx.h (NAME(aout,machine_type)): Add a
4615 bfd_mach_mips_sb1 case.
4616 * archures.c (bfd_mach_mips_sb1): New constant.
4617 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
4618 * cpu-mips.c (I_sb1): New constant.
4619 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
4620 * elf32-mips.c (elf_mips_mach): Add case for
4621 E_MIPS_MACH_SB1.
4622 (_bfd_mips_elf_final_write_processing): Add case for
4623 bfd_mach_mips_sb1.
4624
4625 2000-12-01 Joel Sherrill <joel@OARcorp.com>
4626
4627 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
4628 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
4629 (sparc*-*-rtems*): Switched from a.out to ELF.
4630
4631 2000-11-30 Jan Hubicka <jh@suse.cz>
4632
4633 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
4634 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
4635 (elf64-x86-64.lo): Add dependencies.
4636 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
4637 bfd_mach_x86_64_intel_syntax.
4638 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
4639 * config.bfd (x86_64): Add.
4640 * configure.in: Add support for bfd_elf64_x86_64_vec.
4641 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
4642 (bfd_i386_arch, i8086_ar): Link in.
4643 * elf64-x86-64.c: New file.
4644 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
4645 * targets.c (bfd_elf64_x86_64_vec): Add.
4646 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
4647
4648 2000-11-30 Kazu Hirata <kazu@hxi.com>
4649
4650 * xcofflink.c: Fix formatting.
4651
4652 2000-11-28 Kazu Hirata <kazu@hxi.com>
4653
4654 * aoutx.h: Fix formatting.
4655 * bfd-in.h: Likewise.
4656 * bfd-in2.h: Likewise.
4657 * cache.c: Likewise.
4658 * cisco-core.c: Likewise.
4659 * coff64-rs6000.c: Likewise.
4660 * coffcode.h: Likewise.
4661 * coffswap.h: Likewise.
4662 * corefile.c: Likewise.
4663 * elf32-mips.c: Likewise.
4664
4665 2000-11-27 Kazu Hirata <kazu@hxi.com>
4666
4667 * aout-adobe.c: Fix formatting.
4668 * coff64-rs6000.c: Likewise.
4669 * coffgen.c: Likewise.
4670 * cofflink.c: Likewise.
4671
4672 2000-11-27 Philip Blundell <pb@futuretv.com>
4673
4674 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
4675 (obj_coff_strings_written): New accessor macro for above.
4676 * libcoff.h: Regenerate.
4677 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
4678 strings.
4679 * coffcode.h (coff_write_object_contents): No need to write out
4680 the string table if it's already been done.
4681
4682 2000-11-22 Philip Blundell <pb@futuretv.com>
4683
4684 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
4685 weak undefined symbols.
4686
4687 2000-11-24 Nick Clifton <nickc@redhat.com>
4688
4689 * archures.c (bfd_mach_arm_5TE): Define.
4690 (bfd_mach_arm+XScale): Define.
4691 * bfd-in2.h: Regenerate.
4692
4693 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
4694 BFD_RELOC_ARM_PCREL_BLX.
4695
4696 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
4697 XScale machine numbers.
4698
4699 * config.bfd (xscale-elf): Add target.
4700 (xscale-coff): Add target.
4701
4702 * cpu-arm.c: Add xscale machine name.
4703 Add v5t, v5te and XScale machine numbers.
4704
4705 2000-11-23 Kazu Hirata <kazu@hxi.com>
4706
4707 * aix386-core.c: Fix formatting.
4708
4709 2000-11-22 Jim Wilson <wilson@redhat.com>
4710
4711 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
4712 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
4713 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
4714 (ins_imms_scaled): Initialize sign_bit at function entry.
4715 (elf64_ia64_operands): Add missing initializers.
4716 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
4717 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
4718 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
4719 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
4720 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
4721 parameters.
4722 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
4723 and free_extsyms at function entry.
4724 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
4725 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
4726 (get_got): Delete unused local srel.
4727 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
4728 (elfNN_ia64_relocate_section): Delete unused local dynindx.
4729
4730 2000-11-21 Kazu Hirata <kazu@hxi.com>
4731
4732 * coff-a29k.c: Fix formatting.
4733 * coff-h8500.c: Likewise.
4734 * coff-i960.c: Likewise.
4735 * coff-ppc.c: Likewise.
4736 * coff-rs6000.c: Likewise.
4737 * coff-stgo32.c: Likewise.
4738 * coff-tic54x.c: Likewise.
4739 * coff-w65.c: Likewise.
4740 * cpu-h8500.c: Likewise.
4741 * cpu-hppa.c: Likewise.
4742 * cpu-ns32k.c: Likewise.
4743 * ecoff.c: Likewise.
4744 * ecofflink.c: Likewise.
4745
4746 2000-11-21 Nick Clifton <nickc@redhat.com>
4747
4748 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
4749 remove possibility of infinite loop.
4750
4751 2000-11-20 Kazu Hirata <kazu@hxi.com>
4752
4753 * aix386-core.c: Fix formatting.
4754 * aout-adobe.c: Likewise.
4755 * aout-arm.c: Likewise.
4756 * aout-encap.c: Likewise.
4757 * aout-ns32k.c: Likewise.
4758 * aout-target.h: Likewise.
4759 * aout-tic30.c: Likewise.
4760 * aoutf1.h: Likewise.
4761 * aoutx.h: Likewise.
4762 * archive.c: Likewise.
4763 * bfd-in.h: Likewise.
4764 * bfd-in2.h: Likewise.
4765 * bfd.c: Likewise.
4766 * bout.c: Likewise.
4767
4768 2000-11-17 H.J. Lu <hjl@gnu.org>
4769
4770 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
4771 pltoff entries for DT_INIT and DT_FINI.
4772 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
4773 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
4774 entries.
4775
4776 2000-11-16 Richard Henderson <rth@redhat.com>
4777
4778 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
4779 (allocate_dynrel_entries): Likewise.
4780 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
4781 (set_pltoff_entry): Likewise.
4782 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
4783 (elfNN_ia64_reloc_type_lookup): Likewise.
4784 (elfNN_ia64_install_value): Likewise.
4785 (elfNN_ia64_relocate_section): Likewise.
4786 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
4787 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
4788
4789 2000-11-16 Kazu Hirata <kazu@hxi.com>
4790
4791 * cpu-a29k.c: Fix formatting.
4792 * cpu-alpha.c: Likewise.
4793 * cpu-arm.c: Likewise.
4794 * cpu-avr.c: Likewise.
4795 * cpu-d10v.c: Likewise.
4796 * cpu-h8500.c: Likewise.
4797 * cpu-hppa.c: Likewise.
4798 * cpu-i370.c: Likewise.
4799 * cpu-i386.c: Likewise.
4800 * cpu-i960.c: Likewise.
4801 * cpu-ia64-opc.c: Likewise.
4802 * cpu-ia64.c: Likewise.
4803 * cpu-m32r.c: Likewise.
4804 * cpu-m68hc11.c: Likewise.
4805 * cpu-m68hc12.c: Likewise.
4806 * cpu-m68k.c: Likewise.
4807 * cpu-m88k.c: Likewise.
4808 * cpu-mips.c: Likewise.
4809 * cpu-ns32k.c: Likewise.
4810 * cpu-pj.c: Likewise.
4811 * cpu-powerpc.c: Likewise.
4812 * cpu-sh.c: Likewise.
4813 * cpu-sparc.c: Likewise.
4814 * cpu-tic54x.c: Likewise.
4815 * cpu-v850.c: Likewise.
4816 * cpu-vax.c: Likewise.
4817 * cpu-w65.c: Likewise.
4818 * cpu-we32k.c: Likewise.
4819 * cpu-z8k.c: Likewise.
4820 * dwarf1.c: Likewise.
4821 * dwarf2.c: Likewise.
4822
4823 2000-11-15 Kazu Hirata <kazu@hxi.com>
4824
4825 * coff-arm.c: Fix formatting.
4826 * coff-ppc.c: Likewise.
4827 * coff-rs6000.c: Likewise.
4828 * coff-sh.c: Likewise.
4829 * coff-sparc.c: Likewise.
4830 * coff-tic30.c: Likewise.
4831 * coff-tic54x.c: Likewise.
4832 * coff-tic80.c: Likewise.
4833 * coff-w65.c: Likewise.
4834 * coff-we32k.c: Likewise.
4835 * coff-z8k.c: Likewise.
4836
4837 2000-11-15 Richard Henderson <rth@redhat.com>
4838
4839 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4840 section with the same ALLOC|LOAD flags as the source section.
4841
4842 2000-11-14 Jakub Jelinek <jakub@redhat.com>
4843
4844 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4845 by STO_ALPHA constants.
4846
4847 2000-11-14 Kazu Hirata <kazu@hxi.com>
4848
4849 * coff-pmac.c: Fix formatting.
4850 * coff-ppc.c: Likewise.
4851
4852 2000-11-13 H.J. Lu <hjl@gnu.org>
4853
4854 * elflink.h (elf_link_add_object_symbols): Also add indirect
4855 symbols for common symbols with the default version.
4856
4857 2000-11-09 Philip Blundell <pb@futuretv.com>
4858
4859 * section.c (STD_SECTION): Set gc_mark flag.
4860
4861 2000-11-11 Kazu Hirata <kazu@hxi.com>
4862
4863 * coff-i960.c: Likewise.
4864 * coff-m68k.c: Likewise.
4865 * coff-m88k.c: Likewise.
4866 * coff-mcore.c: Likewise.
4867 * coff-mips.c: Likewise.
4868
4869 2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4870
4871 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4872
4873 2000-11-10 Kazu Hirata <kazu@hxi.com>
4874
4875 * coff-h8300.c: Fix formatting.
4876 * coff-h8500.c: Likewise.
4877 * coff-i386.c: Likewise.
4878 * coff-i860.c: Likewise.
4879 * coff-i960.c: Likewise.
4880 * coff-ia64.c: Likewise.
4881
4882 2000-11-09 Kazu Hirata <kazu@hxi.com>
4883
4884 * archive.c: Fix formatting.
4885 * archures.c: Likewise.
4886
4887 2000-11-07 Richard Henderson <rth@redhat.com>
4888
4889 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4890 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4891 * section.c (bfd_set_section_contents): Call memcpy if
4892 section->contents set and location not equal to contents plus offset.
4893
4894 2000-11-08 Kazu Hirata <kazu@hxi.com>
4895
4896 * bfd-in.h: Fix formatting.
4897 * bfd-in2.h: Likewise.
4898 * bfd.c: Likewise.
4899 * binary.c: Likewise.
4900 * bout.c: Likewise.
4901 * coff-a29k.c: Likewise.
4902 * coff-alpha.c: Likewise.
4903 * coff-apollo.c: Likewise.
4904 * coff-aux.c: Likewise.
4905
4906 2000-11-07 Kazu Hirata <kazu@hxi.com>
4907
4908 * aix386-core.c: Fix formatting.
4909 * aoutf1.h: Likewise.
4910 * aoutx.h: Likewise.
4911 * archures.c: Likewise.
4912 * armnetbsd.c: Likewise.
4913
4914 2000-11-07 Alan Modra <alan@linuxcare.com.au>
4915
4916 * coff-h8300.c (special): Adjust reloc address.
4917
4918 2000-11-06 Steve Ellcey <sje@cup.hp.com>
4919
4920 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
4921 to differentiate elf32 and elf64 on ia64.
4922 * bfd-in2.h: Regenerate.
4923 * config.bfd: Add target for "ia64*-*-hpux*".
4924 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
4925 * configure: Regenerate.
4926 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
4927 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
4928
4929 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
4930 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
4931 * Makefile.in: Regnerate.
4932 * elf64-ia64.c: Deleted.
4933 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
4934
4935 2000-11-06 Kazu Hirata <kazu@hxi.com>
4936
4937 * aout-adobe.c: Fix formatting.
4938 * aout-arm.c: Likewise.
4939 * aout-cris.c: Likewise.
4940 * aout-encap.c: Likewise.
4941 * aout-ns32k.c: Likewise.
4942 * aout-target.h: Likewise.
4943 * aout-tic30.c: Likewise.
4944
4945 2000-11-05 Philip Blundell <philb@gnu.org>
4946
4947 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4948 BFDs containing no sections to be merged, regardless of their flags.
4949
4950 2000-11-04 Philip Blundell <philb@gnu.org>
4951
4952 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4953 if a relocation for an undefined symbol also results in an
4954 overflow.
4955
4956 2000-11-06 Christopher Faylor <cgf@cygnus.com>
4957
4958 * config.bfd: Add support for Sun Chorus.
4959
4960 2000-11-05 David O'Brien <obrien@FreeBSD.org>
4961
4962 * configure.in: Recognize alpha-*-freebsd*.
4963 * configure: Regenerate.
4964
4965 2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
4966
4967 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
4968 (Chunk): New global variable set by a parameter in objcopy.c.
4969 (S3Forced): New global variable set by a parameter in
4970 objcopy.c.
4971 (srec_set_section_contents): If S3Forced is true, always generate
4972 S3 records.
4973 (srec_write_section): Use 'Chunk' to limit maximum length of S
4974 records.
4975
4976 2000-11-02 Per Lundberg <plundis@chaosdev.org>
4977
4978 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
4979 * Makefile.in: Regenerate.
4980 * bfd-in2.h: Regenerate.
4981 * po/bfd.pot: Regenerate.
4982
4983 2000-10-31 Philip Blundell <philb@gnu.org>
4984
4985 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
4986 EF_SOFT_FLOAT if it is defined.
4987
4988 2000-10-27 Philip Blundell <philb@gnu.org>
4989
4990 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
4991 attempts to mix PIC code with non-PIC, just mark the output as
4992 being position dependent.
4993 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
4994 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
4995 all mismatches, not just the first one.
4996
4997 2000-10-25 Chris Demetriou <cgd@sibyte.com>
4998
4999 * ieee.c (ieee_archive_p): Plug one of many possible
5000 memory leaks in error handling.
5001
5002 2000-10-20 Jakub Jelinek <jakub@redhat.com>
5003
5004 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
5005 elf32_sparc_object_p, elf32_sparc_final_write_processing):
5006 Support v8plusb.
5007 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
5008 sparc64_elf_object_p): Support v9b.
5009 * archures.c: Declare v8plusb and v9b machines.
5010 * bfd-in2.h: Ditto.
5011 * cpu-sparc.c: Ditto.
5012
5013 2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5014
5015 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
5016 of a GOT reloc.
5017
5018 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
5019 (SYMBOL_CALLS_LOCAL): New macro.
5020 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
5021 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
5022 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
5023 (ppc_elf_relocate_section): Use flag variable to determine
5024 whether the relocation refers to a local symbol.
5025 Test whether a PLTREL24 reloc will produce a reloc by looking
5026 to see whether a PLT entry was made.
5027
5028 2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
5029
5030 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
5031 entries that could serve as a definition for a weak symbol.
5032
5033 2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
5034
5035 From Ralf Baechle <ralf@gnu.org>
5036
5037 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
5038 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
5039 against local symbols.
5040 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
5041
5042 2000-10-12 Alan Modra <alan@linuxcare.com.au>
5043
5044 * section.c (struct sec): Add kept_section.
5045 (struct bfd_comdat_info): Remove sec, we can use above.
5046 (STD_SECTION): Add initializer.
5047 (bfd_make_section_anyway): Init here too.
5048
5049 * bfd-in2.h: Regenerate.
5050
5051 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
5052 zeroing of `flags'.
5053 (elf_link_input_bfd): Set all asection->symbol->value's here, and
5054 fudge values for discarded link-once section symbols.
5055
5056 * elf64-hppa.c: Include alloca-conf.h
5057
5058 2000-10-11 Alan Modra <alan@linuxcare.com.au>
5059
5060 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
5061
5062 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
5063
5064 2000-10-10 Alan Modra <alan@linuxcare.com.au>
5065
5066 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
5067
5068 2000-10-10 Tom Rix <trix@redhat.com>
5069
5070 * section.c (bfd_make_section_anyway): Release newsect ptr when
5071 newsect->symbol fails to alloc. Use bfd_release instead of free.
5072
5073 2000-10-09 Richard Henderson <rth@cygnus.com
5074
5075 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
5076 (elf64_ia64_unwind_entry_compare): New.
5077 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
5078
5079 2000-10-07 Alan Modra <alan@linuxcare.com.au>
5080
5081 * elflink.h (size_dynamic_sections): Don't create various tags if
5082 .dynstr is excluded from the link. Don't set first dynsym entry
5083 if dynsymcount is zero.
5084 (elf_bfd_final_link): Don't try to swap out dynamic syms if
5085 .dynsym excluded from the link. Don't try to write any dynamic
5086 sections excluded from the link.
5087
5088 * elf.c (swap_out_syms): Handle global section symbols.
5089
5090 2000-10-05 DJ Delorie <dj@redhat.com>
5091
5092 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
5093 * coffcode.h (coff_set_alignment_hook): read extended reloc count
5094 (coff_write_relocs): write extended reloc count
5095 (coff_write_object_contents): account for extended relocs
5096
5097 2000-10-05 Jim Wilson <wilson@cygnus.com>
5098
5099 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
5100 field.
5101 * elf.c (_bfd_elf_make_section_from_shdr): Call the
5102 elf_backend_section_flags function.
5103 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
5104 code.
5105 (elf64_ia64_section_flags): New function containing flag conversion
5106 code.
5107 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
5108 * elfxx-target.h (elf_backend_section_flags): Define.
5109 (elfNN_bed): Initialize elf_backend_section_flags field.
5110
5111 2000-10-02 Alan Modra <alan@linuxcare.com.au>
5112
5113 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
5114 _bfd_elf32_gc_record_vtable. Correct a comment.
5115
5116 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
5117
5118 From Ralf Baechle <ralf@gnu.org>
5119
5120 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
5121 produces binaries with got[1] = 0x80000001 to differenciate them
5122 for the dynamic linker from the broken binaries produced by old
5123 versions.
5124
5125 2000-09-30 Petr Sorfa <petrs@sco.com>
5126
5127 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
5128 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
5129 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
5130 * configure: Regenerate.
5131
5132 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
5133
5134 Define two bfd_targets for absence and presence of leading
5135 underscore on symbols. Make sure to only link same kind.
5136 * elf32-cris.c (cris_elf_object_p,
5137 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
5138 cris_elf_merge_private_bfd_data): New.
5139 (elf_backend_object_p, elf_backend_final_write_processing,
5140 bfd_elf32_bfd_print_private_bfd_data,
5141 bfd_elf32_bfd_merge_private_bfd_data): Define.
5142 <Target vector definition>: Include elf32-target.h twice with
5143 different macro settings:
5144 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
5145 bfd_elf32_us_cris_vec.
5146 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
5147 (elf_symbol_leading_char): First as 0, then '_'.
5148 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
5149 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
5150 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
5151 * configure: Regenerate.
5152 * targets.c: Declare bfd_elf32_us_cris_vec.
5153 * po/bfd.pot: Regenerate.
5154
5155 2000-09-29 Momchil Velikov <velco@fadata.bg>
5156
5157 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
5158 R_ARM_THM_PC22 relocations.
5159
5160 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
5161
5162 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
5163
5164 2000-09-29 Momchil Velikov <velco@fadata.bg>
5165
5166 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
5167 is has the SEC_HAS_CONTENTS flag set.
5168
5169 2000-09-28 \81Örjan Friberg <orjanf@axis.com>
5170 Hans-Peter Nilsson <hp@axis.com>
5171
5172 * aout-cris.c (N_TXTADDR): Define.
5173
5174 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
5175
5176 * som.c: Include alloca-conf.h.
5177 * Makefile.am: "make dep-am"
5178 * Makefile.in: Regenerate.
5179
5180 2000-09-27 Alan Modra <alan@linuxcare.com.au>
5181
5182 * elf32-hppa.c (plt_stub): New.
5183 (PLT_STUB_ENTRY): Define.
5184 (elf32_hppa_link_hash_table): Change multi_subspace to packed
5185 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
5186 (elf32_hppa_link_hash_table_create): Init to suit.
5187 (elf32_hppa_check_relocs): Set has_12bit_branch and
5188 has_17bit_branch as appropriate.
5189 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
5190 non-local functions.
5191 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
5192 Add space for plt_stub as needed.
5193 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
5194 functions at plt_stub.
5195 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
5196 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
5197
5198 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
5199 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
5200 of fixed size, and if negative, disable handling of input sections
5201 before stub section. Set up default stub group size depending
5202 on detected branch relocs.
5203 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
5204 ensure different offsets from sym_value aren't rounded to
5205 different 2k blocks. Use lrsel and rrsel for other stubs too for
5206 consistency rather than necessity.
5207 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
5208 (final_link_relocate): Likewise.
5209 (elf32_hppa_relocate_section): Likewise.
5210
5211 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
5212 (_bfd_elf_hppa_gen_reloc_type): Generate them.
5213 (elf_hppa_final_link_relocate): Handle them.
5214 (elf_hppa_relocate_insn): Likewise.
5215 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
5216
5217 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
5218
5219 * elfcode.h (elf_object_p): Preserve and clear abfd section
5220 information. Restore at error.
5221
5222 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
5223
5224 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
5225 is empty, make sure that its rva also 0. NT loader dislikes
5226 having otherwise.
5227
5228 2000-09-26 Steve Ellcey <sje@cup.hp.com>
5229
5230 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
5231 global by default.
5232
5233 2000-09-21 Alan Modra <alan@linuxcare.com.au>
5234
5235 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
5236 currently unused RELATIVE_DYNAMIC_RELOCS code.
5237 (hppa_discard_copies): Likewise.
5238 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
5239 comments. Don't check non-code output sections for stub grouping.
5240
5241 2000-09-20 Alan Modra <alan@linuxcare.com.au>
5242
5243 * section.c (bfd_get_unique_section_name): Return NULL if
5244 bfd_malloc fails.
5245
5246 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5247
5248 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
5249 instruction sequence to actually work.
5250 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
5251 accordingly.
5252
5253 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
5254
5255 * elf32-sh.c (sh_elf_relocate_section): Use
5256 _bfd_final_link_relocate to apply the relocation against a section
5257 symbol, when doing relocatable links.
5258
5259 2000-09-18 Alan Modra <alan@linuxcare.com.au>
5260
5261 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
5262 to id_sec.
5263 (stub_hash_newfunc): Here too.
5264 (hppa_add_stub): And here.
5265 (elf32_hppa_link_hash_table): Remove stub_section_created,
5266 reloc_section_created, first_init_sec and first_fini_sec. Add
5267 stub_group.
5268 (elf32_hppa_link_hash_table_create): Init to suit.
5269 (hppa_get_stub_entry): Add support for grouping stub sections.
5270 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
5271 section code. Index stub vars by section->id.
5272 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
5273 exit paths. Zap allocation of above removed vars. Refine
5274 link-once test.
5275
5276 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
5277 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
5278 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
5279 rather than pointer to bfd_link_info.
5280 (hppa_add_stub): Likewise.
5281 (final_link_relocate): Likewise.
5282
5283 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
5284
5285 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
5286 link-once sections.
5287
5288 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
5289
5290 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
5291 ld/emulparams/shelf.sh.
5292
5293 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5294
5295 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
5296 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
5297 * bfd-in2.h: Regenerate.
5298
5299 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
5300
5301 * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
5302 LITUSE relocations incorrectly if -relax is specified on the ld
5303 command line and the displacement field of the load or store
5304 instruction is non-zero. (Patch by paul.winalski@compaq.com)
5305
5306 2000-09-15 Alan Modra <alan@linuxcare.com.au>
5307
5308 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
5309 first_fini_sec here.
5310 (elf32_hppa_size_stubs): Instead correctly find the first .init
5311 and .fini section here.
5312
5313 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
5314
5315 * elf32-hppa.c (clobber_millicode_symbols): New function.
5316 (elf32_hppa_size_dynamic_sections): Call it.
5317
5318 2000-09-14 Alan Modra <alan@linuxcare.com.au>
5319
5320 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
5321 packed. Add plabel, plt_abs packed booleans.
5322 (hppa_link_hash_newfunc): Init new fields.
5323 (PLABEL_PLT_ENTRY_SIZE): Define.
5324 (hppa_stub_name): Use size_t len vars.
5325 (hppa_add_stub): Likewise.
5326 (elf32_hppa_build_stubs): Likewise.
5327 (hppa_build_one_stub): Kill some compiler warnings.
5328 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
5329 if dynamic linking. Munge the local plt offsets into
5330 local_got_refcounts. Set h->plabel for all global PLABELs. Use
5331 size_t len vars. Add assert for plabel addend.
5332 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
5333 (elf32_hppa_hide_symbol): New function.
5334 (elf_backend_hide_symbol): Define.
5335 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
5336 with h->plabel set. Don't make plt entries to have dynamic syms
5337 when they have been forced local. If plt entry is used by a
5338 plabel, make it PLABEL_PLT_ENTRY_SIZE.
5339 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
5340 Set up .plt offsets for local syms.
5341 (elf32_hppa_relocate_section): Initialise plt entries for local
5342 syms. Leave weak undefined plabels zero. Make global plabel
5343 relocs against function symbol, and leave the addend zero.
5344 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
5345 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
5346 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
5347 relocs instead of SEGREL32 for dynamic got relocs.
5348 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
5349 (elf_backend_got_header_size): Adjust.
5350 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
5351
5352 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
5353 (hppa_type_of_stub): Use it instead of #if 0
5354 (hppa_discard_copies): Use it here too.
5355 (elf32_hppa_size_dynamic_sections): And here.
5356
5357 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
5358 (elf32_hppa_link_hash_table_create): And here.
5359 (hppa_build_one_stub): And here. Instead keep track of stub
5360 offset using _raw_size.
5361 (elf32_hppa_size_stubs): Likewise.
5362 (elf32_hppa_build_stubs): Likewise.
5363 (hppa_size_one_stub): Likewise. Resize reloc section too.
5364
5365 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
5366 first_fini_sec handling. Don't search for reloc section or set
5367 hplink->reloc_section_created here.
5368 (elf32_hppa_size_stubs): Instead search for reloc sections, and
5369 set reloc_section_created here.
5370 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
5371 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
5372 and DT_FINI.
5373 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
5374
5375 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
5376 with `hplink->root.'.
5377 (elf32_hppa_check_relocs): Likewise.
5378 (elf32_hppa_gc_sweep_hook): Likewise.
5379 (elf32_hppa_adjust_dynamic_symbol): Likewise.
5380 (hppa_handle_PIC_calls): Likewise.
5381 (elf32_hppa_size_dynamic_sections): Likewise.
5382 (elf32_hppa_set_gp): Likewise.
5383 (elf32_hppa_relocate_section): Likewise.
5384 (elf32_hppa_finish_dynamic_symbol): Likewise.
5385 (elf32_hppa_finish_dynamic_sections): Likewise.
5386
5387 From David Huggins-Daines <dhd@linuxcare.com>
5388 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
5389 defined weak symbols in shared links.
5390 (final_link_relocate): Calls to defined weak symbols in shared
5391 objects must go via import stubs, as the target might not be known
5392 at link time.
5393
5394 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
5395
5396 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
5397 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
5398 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
5399 the original entries with EMPTY_HOWTOs, and added new ones to fill
5400 in the gap.
5401 (sh_elf_info_to_howto): Make sure the new gap isn't used.
5402 (sh_elf_relocate_section): Likewise.
5403
5404 2000-09-13 Anders Norlander <anorland@acc.umu.se>
5405
5406 * cpu-mips.c (arch_info_struct): Add mips:4K
5407 * bfd-in2.h (bfd_mach_mips4K): New define.
5408 * archures.c: Add bfd_mach_mips4K to comment.
5409 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
5410 E_MIPS_ARCH_2 for bfd_mach_mips4K.
5411
5412 2000-09-13 Marco Franzen <marcof@thyron.com>
5413
5414 * som.c (som_write_symbol_strings): Do not used fixed buffers,
5415 use size_t as a counter.
5416 (som_write_space_strings): Similarly.
5417
5418 2000-09-12 Jason Eckhardt <jle@cygnus.com>
5419
5420 * elf32-i860.c (elf32_i860_relocate_pc26): New function
5421 and prototype.
5422 (elf32_i860_relocate_section): Invoke new function from here.
5423
5424 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5425
5426 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
5427 static.
5428
5429 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5430
5431 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
5432 target section name instead of dumping core when the target symbol is
5433 undefined.
5434
5435 2000-09-09 Kazu Hirata <kazu@hxi.com>
5436
5437 * riscix.c: Remove DEFUN.
5438
5439 2000-09-08 Nick Clifton <nickc@redhat.com>
5440
5441 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
5442 initialise flags in output bfd if the input bfd is the default
5443 architecture with the default flags.
5444
5445 2000-09-08 Kazu Hirata <kazu@hxi.com>
5446
5447 * archive.c: Fix formatting.
5448 * coff-arm.c: Likewise.
5449 * doc/chew.c: Likewise.
5450
5451 2000-09-08 Alan Modra <alan@linuxcare.com.au>
5452
5453 * section.c (bfd_get_unique_section_name): Put a dot before the
5454 numeric suffix.
5455
5456 2000-09-07 Kazu Hirata <kazu@hxi.com>
5457
5458 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
5459 * elf.c: Fix formatting.
5460
5461 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
5462
5463 * config.bfd (sh-*-linux*): Added.
5464 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
5465 * targets.c: Declare them.
5466 * elf32-sh-lin.c: New file.
5467 * Makefile.am: Compile it.
5468 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
5469 * configure, Makefile.in: Rebuilt.
5470
5471 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
5472
5473 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
5474 pseduo-section when determining where the TOC ends.
5475
5476 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
5477 output x_tvndx as it is only two bytes wide.
5478
5479 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
5480 reloc is 26 or 32 bits wide.
5481
5482 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
5483 for relocs that don't change anything. Also look at the full
5484 6 bits of bitsize.
5485
5486 2000-09-06 Philip Blundell <philb@gnu.org>
5487
5488 * config.bfd (arm*-*-uclinux*): New target.
5489
5490 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
5491
5492 * configure: Rebuilt with new libtool.m4.
5493
5494 2000-09-06 Alan Modra <alan@linuxcare.com.au>
5495
5496 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
5497 word for variable name.
5498 * bfd-in2.h: Regenerate.
5499
5500 2000-09-05 Nick Clifton <nickc@redhat.com>
5501
5502 * config.in: Regenerate.
5503 * libbfd.h: Regenerate.
5504 * po/bfd.pot: Regenerate.
5505 * doc/bfdint.texi: Remove CVS date string - it foils compares with
5506 local versions.
5507
5508 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
5509
5510 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
5511
5512 2000-09-05 Alan Modra <alan@linuxcare.com.au>
5513
5514 Shared library and PIC support.
5515 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
5516 (GOT_ENTRY_SIZE): New.
5517 (ELF_DYNAMIC_INTERPRETER): New.
5518 (STUB_SUFFIX): Define.
5519 (LONG_BRANCH_PIC_IN_SHLIB): Define.
5520 (RELATIVE_DYNAMIC_RELOCS): Define.
5521 (enum elf32_hppa_stub_type): New.
5522 (struct elf32_hppa_stub_hash_entry): Rename offset to
5523 stub_offset. Add a number of new fields.
5524 (struct elf32_hppa_link_hash_entry): New.
5525 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
5526 global_value.
5527 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
5528 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
5529 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
5530 new fields.
5531 (hppa_link_hash_newfunc): New function.
5532 (elf32_hppa_link_hash_table_create): Use above function. Init new
5533 fields.
5534 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
5535 instead of addend, and remove sym_name from args. Don't use
5536 symbol name for local syms, instead use sym index.
5537 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
5538 stub type rather than size. Pass in hash and handle import stub
5539 case. Also pass in reloc instead of offset so we can calculate
5540 PCREL22F and PCREL12F branches properly.
5541 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
5542 import and export stubs too.
5543 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
5544 import and export stub sizing.
5545 (elf32_hppa_check_relocs): New function.
5546 (elf32_hppa_adjust_dynamic_symbol): New function.
5547 (hppa_discard_copies): New function.
5548 (elf32_hppa_size_dynamic_sections): New function.
5549 (elf_backend_size_dynamic_sections): Define.
5550 (elf32_hppa_finish_dynamic_symbol): New function.
5551 (elf_backend_finish_dynamic_symbol): Define.
5552 (elf32_hppa_size_stubs): Stash params in link hash table, and move
5553 some local vars into the link hash table too. For shared links,
5554 trundle over function syms, generating export stubs. Handle
5555 PCREL22F branches. Break out stub creation code from here..
5556 (hppa_add_stub): .. to here. New function.
5557 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
5558 call the bfd linker. Use elf_gp to record global pointer.
5559 Calculate a value from sections if $global$ is missing.
5560 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
5561 (elf32_hppa_gc_mark_hook): New function.
5562 (elf_backend_gc_mark_hook): Define.
5563 (elf32_hppa_gc_sweep_hook): New function.
5564 (elf_backend_gc_sweep_hook): Define.
5565 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
5566 Add rel to args, and remove howto, input_bfd, offset, addend,
5567 sym_name as we can recalculate these locally. Handle calls to
5568 dynamic objects, extra PIC relocs, PCREL22F branches. Change
5569 handling of undefined weak syms. Check that stubs are in range.
5570 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
5571 message on hitting a DPREL21L reloc that needs fixing. Subtract
5572 off PC for PCREL14F. Break out code that does a stub lookup from
5573 here..
5574 (hppa_get_stub_entry): ..to here. New function.
5575 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
5576 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
5577 relocs, etc. etc.
5578 (elf32_hppa_finish_dynamic_sections): New function.
5579 (elf_backend_finish_dynamic_sections): Define.
5580 (elf_backend_final_write_processing) Define.
5581 (hppa_handle_PIC_calls): New function.
5582 (elf32_hppa_build_stubs): Call it. Pass link_info to
5583 hppa_build_one_stub.
5584 (elf32_hppa_create_dynamic_sections): New function
5585 to create .plt and .got then set .plt flags correctly.
5586 (elf_backend_create_dynamic_sections): Define.
5587 (elf32_hppa_object_p): New function.
5588 (elf_backend_object_p): Define.
5589 (elf32_hppa_elf_get_symbol_type): New function.
5590 (elf_backend_get_symbol_type): Define.
5591 (elf_backend_can_gc_sections): Define.
5592 (elf_backend_want_got_plt): Define.
5593 (elf_backend_plt_alignment): Set to 2.
5594 (elf_backend_plt_readonly): Define.
5595 (elf_backend_want_plt_sym): Define.
5596 (elf_backend_got_header_size): Reserve one entry.
5597
5598 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
5599 (elf32_hppa_size_stubs): Pass in multi_subspace.
5600 (elf32_hppa_set_gp): Declare.
5601
5602 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
5603 (bfd_get_unique_section_name): New function.
5604 * bfd-in2.h: Regenerate.
5605
5606 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
5607 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
5608 comment.
5609
5610 From David Huggins-Daines <dhd@linuxcare.com>
5611 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
5612 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
5613 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
5614 been updated in finish_dynamic_symbol before modifying function
5615 symbol.
5616
5617 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
5618 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
5619 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
5620 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
5621 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
5622 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
5623 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
5624 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
5625
5626 From David Huggins-Daines <dhd@linuxcare.com>
5627 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
5628 style of local labels as well.
5629
5630 2000-09-03 Philip Blundell <philb@gnu.org>
5631
5632 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
5633 references to undefined symbols in debugging sections.
5634
5635 2000-09-02 H.J. Lu <hjl@gnu.org>
5636
5637 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5638 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
5639 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
5640 section.
5641
5642 2000-09-02 Jason Eckhardt <jle@cygnus.com>
5643
5644 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
5645 (elf32_i860_is_local_label_name): New function and prototype.
5646
5647 2000-09-02 Nick Clifton <nickc@redhat.com>
5648
5649 * configure.in: Increase version number to 2.10.91.
5650 * configure: Regenerate.
5651 * aclocal.m4: Regenerate.
5652 * config.in: Regenerate.
5653 * po/bfd.pot: Regenerate.
5654
5655 2000-09-02 Daniel Berlin <dberlin@redhat.com>
5656
5657 * elf.c (_bfd_elf_make_section_from_shdr): Add
5658 .gnu.linkobce.wi. to the list of debug section names.
5659
5660 2000-09-02 Nick Clifton <nickc@redhat.com>
5661
5662 * dwarf2.c (find_debug_info): New function: Locate a section
5663 containing dwarf2 debug information.
5664 (bfd_dwarf2_find_nearest_line): Find all sections containing
5665 debug information and include them in the stash.
5666
5667 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
5668
5669 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
5670 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
5671 (sh_reloc_map): Add new relocs.
5672 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
5673 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
5674 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
5675 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
5676 functions.
5677 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
5678 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
5679 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
5680 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5681 New array constants.
5682 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
5683 New variables.
5684 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
5685 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
5686 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
5687 elf_sh_plt_reloc_offset): Define.
5688 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
5689 elf_sh_link_hash_table): New structs.
5690 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
5691 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
5692 relocation types.
5693 (elf_backend_create_dynamic_sections,
5694 bfd_elf32_bfd_link_hash_table_create,
5695 elf_backend_adjust_dynamic_symbol,
5696 elf_backend_size_dynamic_sections,
5697 elf_backend_finish_dynamic_symbol,
5698 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
5699 elf_backend_plt_readonly, elf_backend_want_plt_sym,
5700 elf_backend_got_header_size, elf_backend_plt_header_size):
5701 Define.
5702 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
5703 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
5704 New relocs.
5705 * bfd-in2.h, libbfd.h: Rebuilt.
5706
5707 2000-09-01 Alan Modra <alan@linuxcare.com.au>
5708
5709 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
5710 change.
5711
5712 2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
5713
5714 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
5715 not initialized, set them to indicate the SH1 instruction set.
5716
5717 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
5718
5719 * acinclude.m4: Include libtool and gettext macros from the
5720 top level.
5721 * aclocal.m4, configure: Rebuilt.
5722
5723 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
5724
5725 * elf.c: Eliminate references to __sparcv9 macro; replace with
5726 autoconf variables HAVE_PSINFO32_T etc.
5727 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
5728 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
5729 * config.in: Ditto.
5730 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
5731 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
5732 * aclocal.m4: Ditto.
5733 * configure: Regenerate.
5734
5735 2000-08-27 Alan Modra <alan@linuxcare.com.au>
5736
5737 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
5738 for any shared link, not just shared -Bsymbolic.
5739 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
5740 any shared link, and pass link info to it.
5741 (elf_i386_size_dynamic_sections): Update comment.
5742 (elf_i386_discard_copies): Modify to discard relocs for symbols
5743 that have been forced local.
5744 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
5745 that have been forced local.
5746
5747 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
5748
5749 * elflink.h (elf_link_add_object_symbols): Allow common
5750 symbols to have an alignment of 1 if explicitly requested, and
5751 not overridden by other definitions.
5752
5753 2000-08-22 Doug Kwan <dkwan@transmeta.com>
5754
5755 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
5756 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
5757
5758 2000-08-22 H.J. Lu <hjl@gnu.org>
5759
5760 * elf-bfd.h (elf_link_hash_table): Add runpath.
5761
5762 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
5763 * bfd-in2.h: Rebuilt.
5764
5765 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
5766 "runpath" field to NULL.
5767 (bfd_elf_get_runpath_list): New function.
5768
5769 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
5770 DT_RUNPATH entries.
5771
5772 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
5773
5774 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
5775 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
5776 explicitly. Improve validation of r_type.
5777
5778 2000-08-21 H.J. Lu <hjl@gnu.org>
5779
5780 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
5781 dynamic allocated content space. Add a comment to remind us that
5782 one day this ought to be fixed.
5783 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5784 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5785 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
5786
5787 2000-08-21 Jason Eckhardt <jle@cygnus.com>
5788
5789 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
5790 field with the newly relocated value instead of adding it to the
5791 existing immediate field.
5792 (elf32_i860_relocate_splitn): Likewise.
5793 (elf32_i860_relocate_highadj): Likewise.
5794
5795 2000-08-16 Jason Eckhardt <jle@cygnus.com>
5796
5797 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
5798 was previously just a stub).
5799
5800 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
5801
5802 * elflink.c (_bfd_elf_create_got_section): Don't abort().
5803 Formatting fixes.
5804 (_bfd_elf_create_dynamic_sections): Likewise.
5805
5806 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
5807
5808 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
5809 for undefined symbols to be the beginning of the section.
5810
5811 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
5812 four extra entries at the beginning of the .rela.plt section.
5813 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
5814 section to account for the four reserved entries in the .plt section.
5815
5816 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
5817
5818 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
5819 to the list of NOPs we recognize after a branch-and-link.
5820 Use the ori NOP when one is needed.
5821
5822 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
5823 for large archives.
5824
5825 2000-08-14 Jim Wilson <wilson@cygnus.com>
5826
5827 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
5828 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
5829 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
5830 EF_IA_64_ABSOLUTE.
5831
5832 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
5833
5834 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
5835
5836 2000-08-10 Jason Eckhardt <jle@cygnus.com>
5837
5838 * elf32-i860.c (elf32_i860_relocate_section): New function.
5839 (i860_final_link_relocate): New function.
5840 (elf32_i860_relocate_splitn): New function.
5841 (elf32_i860_relocate_pc16): New function.
5842 (elf32_i860_relocate_highadj): New function.
5843 (elf32_i860_howto): Minor adjustments to some relocations.
5844 (elf_info_to_howto_rel): Define.
5845 (elf_backend_relocate_section): Define.
5846
5847 2000-08-10 Nick Clifton <nickc@cygnus.com>
5848
5849 * elf32-arm.h: Fix formatting.
5850
5851 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
5852
5853 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
5854
5855 2000-08-08 Jason Eckhardt <jle@cygnus.com>
5856
5857 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
5858
5859 2000-08-07 Kazu Hirata <kazu@hxi.com>
5860
5861 * ieee.c (ieee_write_debug_part): Rewrite a comment.
5862 * elf64-ia64.c: Fix a typo.
5863
5864 2000-08-05 Jason Eckhardt <jle@cygnus.com>
5865
5866 * elf32-i860.c (elf32_i860_howto_table): New structure.
5867 (lookup_howto): New function.
5868 (elf32_i860_reloc_type_lookup): New function.
5869 (elf32_i860_info_to_howto_rela): New function.
5870 (elf_code_to_howto_index): New structure.
5871 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
5872 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
5873 elf32_i860_reloc_type_lookup.
5874
5875 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
5876
5877 * som.c (struct fixup_format): Constify `format'.
5878 (som_hppa_howto_table): Use SOM_HOWTO macro.
5879 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
5880 (som_bfd_reloc_type_lookup): Likewise.
5881 (compare_subspaces): Remove unused `count1', `count2'.
5882 (som_begin_writing): Remove unused `total_reloc_size'.
5883 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
5884 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
5885 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
5886 (som_find_nearest_line): Decorate unused parameter(s).
5887 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
5888 (som_bfd_link_split_section): Likewise.
5889
5890 2000-08-03 Nick Clifton <nickc@cygnus.com>
5891
5892 * section.c: Restore backed out code.
5893 * elf.c: Restore backed out code.
5894 (copy_private_bfd_data): Fix bug preventing stipped dynamic
5895 binaries from working.
5896 * bfd-in2.h: Regenerate.
5897
5898 2000-08-03 H.J. Lu <hjl@gnu.org>
5899
5900 * section.c: Back out the change made by Nick Clifton
5901 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
5902 binaries.
5903 * bfd-in2.h: Likewise.
5904 * elf.c: Likewise.
5905
5906 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
5907
5908 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
5909
5910 2000-07-31 Jason Eckhardt <jle@cygnus.com>
5911
5912 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
5913 * bfd-in2.h, libbfd.h: Regenerate.
5914
5915 2000-07-31 Nick Clifton <nickc@cygnus.com>
5916
5917 * section.c (struct sec): Add new boolean field 'segment_mark'.
5918 (STD_SECTION): Initialise new field to zero.
5919
5920 * bfd-in2.h: Regenerate.
5921
5922 * elf.c (copy_private_bfd_data): Reorganise section to segment
5923 mapping to cope with moved sections requiring new segments,
5924 and overlapping segments.
5925 (SEGMENT_END): New macro: Return the end address of a segment.
5926 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
5927 contains a section by comparing their VMA addresses.
5928 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
5929 contains a section by comparing their LMA addresses.
5930 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
5931 section should be included in a segment.
5932 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
5933 follows another in memory.
5934 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
5935 segments overlap.
5936
5937 2000-07-22 Jason Eckhardt <jle@cygnus.com>
5938
5939 * cpu-i860.c: Added comments.
5940
5941 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
5942 bfd_elf32_i860_little_vec.
5943 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
5944 (ELF_MAXPAGESIZE): Changed to 4096.
5945
5946 * targets.c (bfd_elf32_i860_little_vec): Declaration of
5947 new target.
5948 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
5949
5950 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
5951 config for little endian elf32 i860.
5952 (targ_defvec): Define for the new config above
5953 as "bfd_elf32_i860_little_vec".
5954 (targ_selvecs): Define for the new config above
5955 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
5956
5957 * configure.in (bfd_elf32_i860_little_vec): Added recognition
5958 of new target vec.
5959
5960 * configure: Regenerated.
5961
5962 2000-07-27 H.J. Lu <hjl@gnu.org>
5963
5964 * elflink.h (elf_merge_symbol): Take one more argument,
5965 dt_needed, to indicate if the symbol comes from a DT_NEEDED
5966 entry. Don't overide the existing weak definition if dt_needed
5967 is true.
5968 (elf_link_add_object_symbols): Pass dt_needed to
5969 elf_merge_symbol ().
5970
5971 2000-07-27 Nick Clifton <nickc@cygnus.com>
5972
5973 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
5974 allocated contents.
5975
5976 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
5977
5978 * configure.host (*-*-aix*): AIX has 'long long' always.
5979
5980 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
5981 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
5982 (xcoff_write_archive_contents_big): Don't update the offset
5983 of the symbol table, xcoff_write_armap will do it.
5984
5985 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
5986
5987 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
5988 of dynobj for SGI_COMPAT checks.
5989
5990 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
5991
5992 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
5993 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
5994 * bfd-in2.h: Regenerate.
5995
5996 2000-07-21 Nick Clifton <nickc@cygnus.com>
5997
5998 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
5999 range symbol indices in relocs and issue an error message.
6000
6001 2000-07-20 H.J. Lu <hjl@gnu.org>
6002
6003 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
6004 info->new_dtags when setting DT_FLAGS_1. It will only be set
6005 by the new linker options. It shouldn't break anything.
6006
6007 2000-07-20 H.J. Lu <hjl@gnu.org>
6008
6009 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
6010 only if info->new_dtags is true.
6011
6012 2000-07-20 H.J. Lu <hjl@gnu.org>
6013
6014 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
6015 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
6016
6017 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
6018
6019 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
6020 (ALL_MACHINES_CFILES): Add cpu-cris.c.
6021 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
6022 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
6023 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
6024 * Makefile.in: Rebuild.
6025 * aclocal.m4: Rebuild.
6026 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
6027 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
6028 (bfd_cris_arch): Declare.
6029 (bfd_archures_list): Add bfd_cris_arch.
6030 * bfd-in2.h: Rebuild.
6031 * config.bfd: (cris-*-*): New target.
6032 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
6033 * configure: Rebuild.
6034 * elf.c (prep_headers): Add bfd_arch_cris.
6035 * libbfd.h: Rebuild.
6036 * libaout.h (enum machine_type): Add M_CRIS.
6037 * reloc.c: Add CRIS relocations.
6038 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
6039 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
6040 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
6041 * po/POTFILES.in, po/bfd.pot: Regenerate.
6042
6043 2000-07-19 H.J. Lu <hjl@gnu.org>
6044
6045 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
6046 DF_TEXTREL if DT_TEXTREL is set.
6047 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
6048 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
6049 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
6050 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
6051 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
6052 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
6053 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
6054 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
6055 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
6056 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
6057
6058 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
6059 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
6060 DT_RPATH is set.
6061 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
6062
6063 2000-07-19 H.J. Lu <hjl@gnu.org>
6064
6065 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
6066 * bfd-in2.h: Rebuild.
6067
6068 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
6069 (elf_dt_soname): New.
6070
6071 * elf.c (bfd_elf_set_dt_needed_soname): New.
6072
6073 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
6074 entry if the shared object loaded by DT_NEEDED is used to
6075 resolve the reference in a regular object.
6076
6077 2000-07-19 H.J. Lu <hjl@gnu.org>
6078
6079 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
6080 DT_DEPAUDIT and DT_AUDIT as strings.
6081
6082 2000-07-19 Nick Clifton <nickc@cygnus.com>
6083
6084 * format.c: Fix formatting.
6085
6086 2000-07-19 H.J. Lu <hjl@gnu.org>
6087
6088 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
6089
6090 2000-07-19 H.J. Lu <hjl@gnu.org>
6091
6092 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
6093 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
6094 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
6095 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
6096 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
6097 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
6098 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
6099
6100 2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
6101
6102 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
6103 renamed functions from here...
6104 (assign_section_numbers): Use renamed functions.
6105 (prep_headers): Use renamed functions.
6106
6107 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
6108 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
6109 * bfd-in2.h: Regenerate.
6110
6111 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
6112
6113 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
6114 parenthesis in if statement.
6115
6116 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
6117
6118 Enable the support for Traditional MIPS.
6119 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
6120 return ict_none appropriately for traditional mips targets.
6121 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
6122 (STUB_MOVE): Conditionalize for traditonal mips.
6123 (STUB_LI16): Likewise.
6124 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
6125 room for RTPROC header.
6126 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
6127 the permission for the PT_DYNAMIC as read, write and execute.
6128 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
6129 for traditonal mips.
6130 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
6131 _DYNAMIC_LINKING for traditonal mips.
6132 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
6133 in case of traditonal mips.
6134 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
6135 entry is required. For a function if PLT is not required then set the
6136 corresponding hash table entry to 0.
6137 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
6138 traditonal mips.
6139 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
6140 shared object set the value to 0.
6141 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
6142 _DYNAMIC_LINKING for traditonal mips.
6143 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
6144 for traditonal mips.
6145
6146 2000-07-15 H.J. Lu <hjl@gnu.org>
6147
6148 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
6149
6150 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
6151
6152 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
6153 out a structure that is BFD_IN_MEMORY.
6154
6155 2000-07-11 Alan Modra <alan@linuxcare.com.au>
6156
6157 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
6158 bfd pointer. Print section id instead of bfd pointer for local
6159 syms. Prefix addend with `+' for global syms as well as local.
6160 Correct calculation of name component lengths.
6161 (elf64_hppa_check_relocs): Update call to get_dyn_name.
6162
6163 From David Huggins-Daines <dhd@linuxcare.com>
6164 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
6165 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
6166 (elf64_hppa_modify_segment_map): Likewise.
6167
6168 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6169
6170 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
6171 addresses to be "naturally" sign extended. Return -1 if unknown.
6172 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
6173 * bfd-in2.h: Regenerate.
6174
6175 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6176
6177 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
6178 and ECOF_SIGNED_64 to list ways to extract an offset.
6179 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
6180 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
6181 Update.
6182 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
6183 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
6184
6185 2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
6186
6187 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
6188 bfd_get_start_address.
6189 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
6190 (elf_swap_ehdr_out): Ditto.
6191
6192 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
6193
6194 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
6195 compatibility with older binutils.
6196
6197 2000-07-10 Alan Modra <alan@linuxcare.com.au>
6198
6199 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
6200 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
6201
6202 From Ryan Bradetich <rbradetich@uswest.net>
6203 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
6204 (parse_line_table): Ditto.
6205 (_bfd_dwarf1_find_nearest_line): Ditto.
6206 * syms.c (cmpindexentry): Remove extra `*' from params.
6207
6208 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
6209
6210 * elf32-mips.c (sort_dynamic_relocs): New Function.
6211 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
6212 via qsort to sort the dynamic relocations in increasing r_symndx
6213 value.
6214
6215 2000-07-09 Alan Modra <alan@linuxcare.com.au>
6216
6217 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
6218 ATTRIBUTE_UNUSED to unused args.
6219 (get_opd): Likewise.
6220 (get_plt): Likewise.
6221 (get_dlt): Likewise.
6222 (get_stub): Likewise.
6223 (elf64_hppa_adjust_dynamic_symbol): Likewise.
6224 (elf64_hppa_link_output_symbol_hook): Likewise.
6225 (elf64_hppa_check_relocs): Delete unused var.
6226 (elf64_hppa_size_dynamic_sections): Likewise.
6227 (elf64_hppa_finalize_opd): Likewise.
6228 (elf64_hppa_finalize_dynreloc): Likewise.
6229 (elf64_hppa_modify_segment_map): Likewise.
6230 (elf64_hppa_finish_dynamic_sections): Likewise.
6231
6232 * elf-hppa.h (elf_hppa_final_write_processing): Add
6233 ATTRIBUTE_UNUSED to unused args.
6234 (elf_hppa_final_link_relocate): Likewise.
6235 (elf_hppa_record_segment_addrs): Add paretheses.
6236 (elf_hppa_relocate_section): Constify dyn_name.
6237
6238 From David Huggins-Daines <dhd@linuxcare.com>
6239 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
6240 rearrange case statement so that it gets preferred to 32-bit ones.
6241
6242 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
6243 asection->id instead of address of asection structure.
6244 (elf32_hppa_size_stubs): Likewise.
6245
6246 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
6247 for .init* and .fini*.
6248
6249 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
6250 and addends used in stub names to 32 bits.
6251 (elf32_hppa_size_stubs): Likewise.
6252
6253 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
6254 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
6255 not bfd_put_64. Fix minor comment typo and formatting.
6256
6257 Changes to create multiple linker stubs, positioned immediately
6258 before the section where they are required.
6259 * elf32-hppa.c: Don't include hppa_stubs.h.
6260 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
6261 (elf32_hppa_stub_hash_table): Delete.
6262 (elf32_hppa_link_hash_entry): Delete.
6263 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
6264 stub_hash_table, and store the struct here rather than a pointer.
6265 Delete output_symbol_count. Add offset array. Change
6266 global_value to a bfd_vma.
6267 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
6268 (elf32_hppa_stub_hash_traverse): Delete.
6269 (elf32_hppa_name_of_stub): Delete.
6270 (elf32_hppa_link_hash_lookup): Delete.
6271 (elf32_hppa_link_hash_traverse): Delete.
6272 (elf32_hppa_stub_hash_table_init): Delete.
6273 (elf32_hppa_size_of_stub): Pass input section and offset rather
6274 than location and calculate location here. Don't pass name as all
6275 stubs are now the same size.
6276 (elf32_hppa_stub_hash_newfunc): Init new fields.
6277 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
6278 too.
6279 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
6280 comparing against ints. Rewrite stub handling code.
6281 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
6282 Case enums to int before comparing against ints. Remove
6283 bfd_reloc_dangerous case.
6284 (elf32_hppa_build_one_stub): Rewrite.
6285 (elf32_hppa_size_one_stub): New function.
6286 (elf32_hppa_build_stubs): Rewrite.
6287 (elf32_hppa_size_stubs): Pass in linker call-back functions.
6288 Rewrite stub-handling specific code.
6289
6290 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
6291
6292 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
6293
6294 * hppa_stubs.h: Delete.
6295 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
6296 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
6297 * Makefile.in: Regenerate.
6298
6299 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
6300 e_nlrsel.
6301
6302 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
6303
6304 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
6305 and section name for bfd_reloc_notsupported error message.
6306 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
6307 bfd_reloc_notsupported.
6308 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
6309
6310 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
6311 undefined weak symbols for all relocs.
6312 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
6313 offsets are relative to one past the delay slot.
6314 (elf32_hppa_size_stubs): Account for reloc addend when calculating
6315 branch destination. Put addend into stub name too.
6316 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
6317 adjust by 8 when deciding whether a linker stub is needed. Put
6318 addend into stub name as for above.
6319
6320 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
6321 various args and vars.
6322 (elf32_hppa_bfd_final_link_relocate): Here too.
6323 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
6324 inner block var to avoid shadowing.
6325
6326 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
6327 unsigned.
6328 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
6329 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
6330 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
6331
6332 * libhppa.h: Change practically all unsigned ints to plain ints.
6333 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
6334 prototypes.
6335
6336 From Ryan Bradetich <rbradetich@uswest.net>
6337 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
6338 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
6339 suit above.
6340 From David Huggins-Daines <dhd@linuxcare.com>
6341 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
6342 to the new OP_* ones.
6343
6344 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
6345 error exit. Bail out earlier on plabel relocs that we aren't
6346 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
6347 string, and then don't free our copy.
6348 (elf32_hppa_build_one_stub): Make insn unsigned int.
6349
6350 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
6351 available with BL, not BE and BLE.
6352
6353 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
6354 code for elf arg relocs.
6355 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
6356 argument with elf_link_hash_entry h. Handle undefined weak
6357 symbols. Move $global$ lookup from here...
6358 (elf32_hppa_relocate_section): ...to here. Return correct error
6359 message for non-handled relocs.
6360 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
6361 wrong test was -0x3ffff to +0x40000.
6362
6363 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
6364 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
6365 Handle them as such.
6366 (elf_hppa_relocate_insn): Fix a typo.
6367
6368 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
6369 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
6370 assemble_17, assemble_21): Delete.
6371 Supply defines for all 64 possible opcodes.
6372 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
6373 formats. Handle COMICLR.
6374 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
6375 -10, -16, 16, 22.
6376
6377 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
6378 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
6379 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
6380 to suit.
6381 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
6382 the local syms - did this code get deleted accidentally? Ignore
6383 undefined and undefweak syms.
6384
6385 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
6386 block. Use it instead of elf64_hppa_hash_table (info).
6387 (elf_hppa_final_link_relocate): Use hppa_info instead of
6388 elf64_hppa_hash_table (info).
6389
6390 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6391 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6392 (hppa_rebuild_insn): Mask immediate bits here instead.
6393 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6394
6395 2000-07-08 Alan Modra <alan@linuxcare.com.au>
6396
6397 * section.c (struct sec): Add id field. Tidy comment formatting.
6398 (bfd_make_section_anyway): Set id.
6399 (STD_SECTION): Init id too.
6400 Change CONST to const throughout.
6401 * archures.c (bfd_arch_info): Tidy comment.
6402 (bfd_arch_list): Change a CONST to const.
6403 * libbfd-in.h: Tidy comments and replace CONST with const.
6404 * elf-bfd.h: Likewise.
6405 * libbfd.h: Regenerate.
6406 * bfd-in2.h: Regenerate.
6407 * libcoff.h: Regenerate.
6408
6409 2000-07-07 DJ Delorie <dj@redhat.com>
6410
6411 * archive.c (_bfd_write_archive_contents): Add an informative
6412 comment.
6413
6414 2000-07-06 Kazu Hirata <kazu@hxi.com>
6415
6416 * srec.c: Fix formatting.
6417
6418 2000-06-05 DJ Delorie <dj@redhat.com>
6419
6420 * MAINTAINERS: new
6421
6422 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
6423
6424 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
6425 value of PC-relative offsets.
6426
6427 2000-07-03 Jim Wilson <wilson@cygnus.com>
6428
6429 * elf64-alpha.c (alpha_elf_size_info): New.
6430 (elf_backend_size_info): Define to alpha_elf_size_info.
6431 * elfcode.h (elf_size_info): Change hash bucket size to 4.
6432
6433 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
6434
6435 * elf32-mips.c: Include elf32-target.h again for the traditional
6436 MIPS targets.
6437
6438 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
6439
6440 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
6441 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
6442 (avr_info_to_howto_rela): Likewise.
6443 (elf32_avr_gc_mark_hook): Likewise.
6444 (elf32_avr_gc_sweep_hook): Likewise.
6445 (elf32_avr_relocate_section): Likewise.
6446
6447 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
6448
6449 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
6450 an external symbol for a non-shared, non-relocatable link.
6451
6452 2000-07-03 Nick Clifton <nickc@redhat.com>
6453
6454 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
6455 is an external symbol.
6456 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
6457 external symbol.
6458
6459 2000-07-03 Kazu Hirata <kazu@hxi.com>
6460
6461 * reloc16.c: Fix formatting.
6462
6463 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
6464
6465 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
6466 to add a new target for traditional mips i.e
6467 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
6468 * configure.in: Likewise.
6469 * configure: Rebuild.
6470 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
6471 bfd_target_vector.
6472 (bfd_elf32_tradlittlemips_vec): Likewise.
6473 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
6474 to see that elfNN_bed does not get redefined even if the target file
6475 is included twice for a chip. See elf32-mips.c.
6476
6477 2000-07-01 Alan Modra <alan@linuxcare.com.au>
6478
6479 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
6480 (CLEANFILES): Add DEPA.
6481 * Makefile.in: Regenerate.
6482
6483 2000-06-30 DJ Delorie <dj@cygnus.com>
6484
6485 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
6486 can't assume the PE header is at 0x80.
6487
6488 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
6489
6490 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
6491
6492 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
6493
6494 * go32stub.h: Update stub.
6495
6496 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
6497
6498 * archures.c (bfd_mach_avr5): Define.
6499 * bfd-in2.h (bfd_mach_avr5): Define.
6500 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
6501 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
6502 (compatible): Update comment. Add missing test.
6503 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
6504 for avr2 and avr4. Simplify 8K wrap code.
6505 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
6506 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
6507
6508 2000-06-26 Kazu Hirata <kazu@hxi.com>
6509
6510 * coff-h8300.c: Fix formatting.
6511 * cpu-h8300.c: Likewise.
6512
6513 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
6514
6515 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
6516 for local symbols whose names are unknown.
6517
6518 2000-06-22 Alan Modra <alan@linuxcare.com.au>
6519
6520 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
6521 find one.
6522 * Makefile.in: Regenerate.
6523 * doc/Makefile.in: Regenerate.
6524
6525 2000-06-20 H.J. Lu <hjl@gnu.org>
6526
6527 * Makefile.am: Rebuild dependency.
6528 * Makefile.in: Rebuild.
6529
6530 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6531
6532 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
6533 (elf_backend_copy_indirect_symbol): Map to the new function.
6534
6535 2000-06-20 Alan Modra <alan@linuxcare.com.au>
6536
6537 * archive.c (normalize): Correct pointer comparison when checking
6538 for backslashes.
6539 (bfd_bsd_truncate_arname): Likewise.
6540 (bfd_gnu_truncate_arname): Likewise.
6541
6542 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
6543
6544 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
6545 sections elf_{text,data}_{section,symbol}.
6546 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
6547 (_bfd_mips_elf_hide_symbol): New function.
6548 (elf_backend_hide_symbol): Map to the new function.
6549 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
6550 definitions of mips_elf_{text,data}_{section,symbol}.
6551 (mips_elf_local_relocation_p): Try to find the direct symbol
6552 based on new check_forced argument.
6553 (mips_elf_calculate_relocation): Use new version of
6554 mips_elf_local_relocation_p.
6555 (mips_elf_relocate_section): Likewise.
6556 (_bfd_mips_elf_relocate_section): Likewise.
6557 (mips_elf_sort_hash_table): Only assert that have enough GOT
6558 space.
6559 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
6560 entry if the relocation based on the new external argument.
6561 (mips_elf_create_dynamic_relocation): Assert that we have a
6562 section contents allocated where we can swap out the dynamic
6563 relocations.
6564 (mips_elf_calculate_relocation): Find the real hash-table entry
6565 correctly by using h->root.root.type. Only create a dynamic
6566 relocation entry if the symbol is defined in a shared library.
6567 Create an external GOT entry for the GOT16 relocation if the
6568 symbol was forced local.
6569 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
6570 dynamic index if the symbol was forced local.
6571
6572 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6573
6574 * elf32-mips.c: Fix typos in comments.
6575
6576 2000-06-19 Mark Kettenis <kettenis@gnu.org>
6577
6578 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
6579 CORE_VERSION_1.
6580
6581 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
6582
6583 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
6584 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
6585 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
6586 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
6587 (bfd_elf32_m68hc11_vec): Likewise.
6588 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
6589 Supports 68hc11 & 68hc12 at the same time.
6590 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
6591 bfd_target_vector.
6592 (bfd_elf32_m68hc11_vec): Likewise.
6593 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
6594 * archures.c (bfd_m68hc12_arch): Define and register in global list
6595 (bfd_m68hc11_arch): Likewise.
6596 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
6597 BFD_RELOC_M68HC11_3B): Define.
6598 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
6599 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
6600
6601 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
6602
6603 * elf_bfd.h (struct elf_backend_data): Add info argument to
6604 elf_backend_hide_symbol.
6605 (_bfd_elf_link_hash_hide_symbol): Likewise.
6606 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
6607 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
6608 * elflink.h (elf_link_add_object_symbols): Likewise.
6609 (elf_link_assign_sym_version): Likewise.
6610
6611 2000-06-18 H.J. Lu <hjl@gnu.org>
6612
6613 * coff-i386.c (coff_i386_reloc): Don't return in case of
6614 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
6615 Compensate PE relocations when linking with non-PE object
6616 files to generate a non-PE executable.
6617
6618 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
6619
6620 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
6621 GOT entries if we're doing a static link or -Bsymbolic link.
6622
6623 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
6624
6625 * elflink.h (elf_link_adjust_relocs): Check for and call backend
6626 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
6627 available.
6628 (elf_link_output_relocs): Likewise.
6629 (elf_reloc_link_order): Likewise.
6630
6631 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6632
6633 * archures.c (enum bfd_architecture): #define constants for
6634 PowerPc and RS6000 machine numbers.
6635 * bfd-in2.h: Regenerate.
6636 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
6637 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
6638 and RS6000 machine numbers using #defined constants from
6639 archures.c.
6640 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
6641 machine numbers using #defined constants from archures.c. Add
6642 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
6643 64-bit words in 620 entry.
6644 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
6645 RSC, and RS2.
6646 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
6647
6648 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
6649
6650 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
6651 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
6652 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
6653
6654 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6655
6656 * bfd-in.h (bfd_family_coff): Define.
6657 * bfd-in2.h: Regenerate.
6658 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
6659 coff_find_nearest_line): Check COFFness using bfd_family_coff()
6660 instead of bfd_target_coff_flavour.
6661 * cofflink.c (_bfd_coff_final_link): Likewise.
6662 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
6663 exclude XCOFF files.
6664 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
6665 Likewise.
6666 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
6667 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
6668 * xcofflink.c (XCOFF_XVECP): Delete.
6669 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
6670 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
6671 bfd_xcoff_record_link_assignment,
6672 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
6673 check for bfd_target_xcoff_flavour.
6674
6675 2000-06-16 Nicholas Duffek <nsd@redhat.com>
6676
6677 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
6678 files on AIX 4.3.
6679 (read_hdr): New function.
6680 (rs6000coff_core_p): Store mstsave or __context64 struct instead
6681 of trying to extract individual registers. Set abfd->arch_info
6682 to match the architecture that created the core file.
6683 (rs6000coff_get_section_contents): Delete.
6684 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
6685
6686 2000-06-14 H.J. Lu <hjl@gnu.org>
6687
6688 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
6689 is NULL.
6690
6691 2000-06-13 H.J. Lu <hjl@gnu.org>
6692
6693 * configure: Regenerate.
6694
6695 2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
6696
6697 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
6698 armpei_little_vec.
6699
6700 2000-06-08 David O'Brien <obrien@FreeBSD.org>
6701
6702 * configure.in (VERSION): Update to show this is the CVS mainline.
6703
6704 2000-06-07 Alan Modra <alan@linuxcare.com.au>
6705
6706 * elf32-d10v.c: Include elf/d10v.h
6707 (enum reloc_type): Delete.
6708 * elf32-d30v.c: Include elf/d30v.h
6709 (enum reloc_type): Delete.
6710
6711 * Makefile.am: Run "make dep-am" to regenerate dependencies.
6712 * Makefile.in: Regenerate.
6713
6714 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
6715 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
6716 move HOWTOs into elf_howto_table.
6717 (R_386_standard, R_386_ext_offset): Define.
6718 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
6719 (elf_i386_reloc_type_lookup): Modify calculation of index into
6720 elf_howto_table since we've removed the padding.
6721 (elf_i386_info_to_howto_rel): Likewise.
6722 (elf_i386_relocate_section): Likewise.
6723
6724 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
6725
6726 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
6727
6728 2000-06-05 H.J. Lu <hjl@gnu.org>
6729
6730 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
6731 an error when seeing an undefined symbol with hidden/internal
6732 attribute. It is handled in *_relocate_section ().
6733
6734 2000-06-05 H.J. Lu <hjl@gnu.org>
6735
6736 * elflink.h (elf_fix_symbol_flags): Follow the link for the
6737 indirect symbol for the ELF_LINK_NON_ELF bit.
6738 (elf_link_output_extsym): Don't output the indirect symbol even
6739 if the ELF_LINK_NON_ELF bit is set.
6740
6741 2000-06-01 J.T. Conklin <jtc@redback.com>
6742
6743 * config.bfd (i[3456]86-*-netbsdelf*): New target.
6744 (i[3456]86-*-netbsdaout*): New target.
6745 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
6746 (i[3456]86-*-openbsd*): Likewise.
6747
6748 2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
6749
6750 * trad-core.c: From hpux-core.c, include <dirent.h> or
6751 <sys/ndir.h> when possible.
6752
6753 2000-05-31 Ulrich Drepper <drepper@redhat.com>
6754
6755 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
6756 definitions. We must not assume they are sorted in the file
6757 according to their index numbers.
6758
6759 2000-05-31 Alan Modra <alan@linuxcare.com.au>
6760
6761 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
6762 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
6763 R_PARISC_DIR17F are for absolute branches; Handle them as such.
6764
6765 2000-05-30 Nick Clifton <nickc@cygnus.com>
6766
6767 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
6768 80960CA, 80960MC as valid machine names.
6769
6770 2000-05-30 H.J. Lu <hjl@gnu.org>
6771
6772 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
6773 visibility bits if the symbol is undefined. Correctly handle
6774 weak undefined symbols with hidden and internal attributes.
6775
6776 * elflink.h (elf_link_add_object_symbols): Always turn the
6777 symbol into local if it has the hidden or internal attribute.
6778
6779 2000-05-29 Philip Blundell <philb@gnu.org>
6780
6781 * ppcboot.c: Add packed attribute if compiling with GCC.
6782
6783 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
6784
6785 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
6786
6787 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
6788
6789 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
6790 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
6791 corefile on a 64-bit (Sparc Solaris) host. Also clean up
6792 a few old comments.
6793
6794 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6795
6796 * Makefile.am: Update dependencies with "make dep-am"
6797 * Makefile.in: Regenerate.
6798
6799 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
6800 bindtextdomain): Replace defines with those from intl/libgettext.h
6801 to quieten gcc warnings.
6802
6803 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
6804
6805 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
6806
6807 * archive.c (normalize, bfd_bsd_truncate_arname,
6808 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
6809 file names with backslashes.
6810
6811 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
6812 before opening it.
6813
6814 * sysdep.h: Include filenames.h.
6815
6816 2000-05-26 Alan Modra <alan@linuxcare.com.au>
6817
6818 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
6819
6820 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6821
6822 * elf64-sparc.c (sparc64_elf_relax_section): New.
6823 (sparc64_elf_relocate_section): Optimize tail call into branch always
6824 if possible.
6825 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6826 (elf32_sparc_relax_section): New.
6827
6828 2000-05-26 Jakub Jelinek <jakub@redhat.com>
6829
6830 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
6831 Remove unusued variables.
6832 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
6833 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
6834 previous fix, so that shared libs really don't influence targets
6835 extension mask and memory model.
6836
6837 2000-05-23 H.J. Lu <hjl@gnu.org>
6838
6839 * elf64-alpha.c (elf64_alpha_relocate_section): Check
6840 h->root.other not h->other.
6841 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6842
6843 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
6844
6845 2000-05-23 H.J. Lu <hjl@gnu.org>
6846
6847 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
6848 undefined symbol with the non-default visibility attributes.
6849 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
6850 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
6851 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6852 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6853 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6854 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
6855 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6856 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6857 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6858 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
6859 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6860
6861 2000-05-22 Richard Henderson <rth@cygnus.com>
6862
6863 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
6864 PCREL22, PCREL64I. Zero size of special relocs.
6865 (elf64_ia64_reloc_type_lookup): Likewise.
6866 (USE_BRL, oor_brl, oor_ip): New.
6867 (elf64_ia64_relax_section): New.
6868 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
6869 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
6870 (elf64_ia64_relocate_section): Likewise.
6871 (bfd_elf64_bfd_relax_section): New.
6872 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
6873 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
6874 * bfd-in2.h, libbfd.h: Regenerate.
6875
6876 2000-05-22 Nick Clifton <nickc@cygnus.com>
6877
6878 * configure.in : Add peigen.lo to MIPS PE targets.
6879 * configure: Regenerate.
6880
6881 2000-05-22 Momchil Velikov <velco@fadata.bg>
6882
6883 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
6884 only if it is known for both input and output bfds. Separate
6885 error message strings as in some languages, it may be necessary
6886 to change more than one place in the string to change between
6887 'big' and 'little'.
6888
6889 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
6890 endianess checks, call _bfd_generic_verify_endian_match() instead.
6891
6892 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
6893
6894 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
6895
6896 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
6897 endianess before checking bfd flavours.
6898
6899 2000-05-22 H.J. Lu <hjl@gnu.org>
6900
6901 * elflink.h (elf_link_output_extsym): Clear the visibility
6902 field for symbols not defined locally.
6903
6904 2000-05-18 Alan Modra <alan@linuxcare.com.au>
6905
6906 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
6907 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
6908 (hppa_rebuild_insn): Mask immediate bits here instead.
6909 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
6910
6911 2000-05-18 Momchil Velikov <velco@fadata.bg>
6912
6913 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
6914 relocs for an executable, ensure that they are virtual addresses.
6915
6916 2000-05-18 Jeffrey A Law (law@cygnus.com)
6917
6918 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
6919
6920 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
6921 Rick Gorton <gorton@scrugs.lkg.dec.com>
6922
6923 * elflink.h: Add emitrelocations support: when enabled, relocation
6924 information and relocation sections are put into final output
6925 executables. If the emitrelocations flag is set, do the following:
6926 (elf_bfd_final_link): Emit relocation sections.
6927 (elf_link_input_bfd): Compute relocation section contents.
6928 (elf_gc_sections): Don't clean relocation sections.
6929
6930 2000-05-16 Catherine Moore <clm@cygnus.com>
6931
6932 * som.c (som_decode_symclass): Recognize weak symbols.
6933
6934 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
6935
6936 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
6937 read idata section only from dataoff.
6938 (pe_print_edata): Correctly check for valid eat_member.
6939
6940 2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
6941
6942 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6943
6944 2000-05-14 Philip Blundell <philb@gnu.org>
6945
6946 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
6947
6948 2000-05-12 Alan Modra <alan@linuxcare.com.au>
6949
6950 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
6951
6952 * peigen.c (pe_print_idata): Look for .idata section and print
6953 info even if data directory has zero entries. Read idata section
6954 starting from dataoff, and adjust all data offsets to suit. Cast
6955 all bfd_vma vars to unsigned long before passing to fprintf.
6956 * peigen.c (pe_print_edata): Similarly, look for .edata section
6957 and print info even if data directory has zero entries. Cast
6958 all bfd_vma vars to unsigned long before passing to fprintf.
6959
6960 From Szabolcs Szakacsits <szaka@F-Secure.com>
6961 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
6962 directory size which may be bogus.
6963 * peigen.c (pe_print_edata): Similarly.
6964
6965 2000-05-09 Alan Modra <alan@linuxcare.com.au>
6966
6967 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
6968 section is empty.
6969 (copy_private_bfd_data): Allow for space possibly taken up by elf
6970 headers when calculating segment physical address from lma.
6971
6972 2000-05-08 Alan Modra <alan@linuxcare.com.au>
6973
6974 * versados.c (versados_scan): Init stringlen and pass_2_done.
6975
6976 * trad-core.c (trad_unix_core_file_p): Return
6977 bfd_error_wrong_format rather than bfd_error_file_truncated.
6978
6979 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
6980 add_data_entry. DataDirectory virtual address is relative.
6981 (pe_print_idata): Account for relative DataDirectory virtual
6982 addresses. Don't trash datasize inside POWERPC_LE_PE code.
6983 (pe_print_edata): Similarly.
6984
6985 From Szabolcs Szakacsits <szaka@F-Secure.com>
6986 * peigen.c (dir_names): Add Delay Import Directory.
6987 (pe_print_idata): Always search for bfd section containing
6988 idata address rather than looking up section name. Print this
6989 section name rather than .idata.
6990 (pe_print_edata): Similarly. Also print some fields as %08lx.
6991 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
6992 Win32Version.
6993
6994 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
6995
6996 * xcoff.h: Rename to xcoff-target.h
6997 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
6998 * coff-rs6000.c: Ditto.
6999 * coff64-rs6000.c: Ditto.
7000 * coff-pmac.c: Ditto.
7001 * Makefile.in: Regenerate.
7002
7003 2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
7004
7005 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
7006 Change U802TOC64MAGIC to U803XTOCMAGIC.
7007
7008 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
7009
7010 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
7011 * bfd-in.h: Prototype bfd_elf_get_arch_size.
7012 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
7013
7014 2000-05-04 Alan Modra <alan@linuxcare.com.au>
7015
7016 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
7017
7018 2000-05-03 Martin v. L\81öwis <loewis@informatik.hu-berlin.de>
7019
7020 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
7021 hidden and internal symbols.
7022 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
7023 visibility.
7024 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
7025 assign a PLT or GOT entry to symbols with hidden and
7026 internal visibility.
7027
7028 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
7029
7030 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
7031 the .bss section.
7032 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7033
7034 2000-05-02 H.J. Lu <hjl@gnu.org>
7035
7036 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
7037 ELFOSABI_SYSV.
7038
7039 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7040
7041 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
7042 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
7043 dependencies.
7044 * Makefile.in: Regenerate.
7045
7046 2000-05-01 Jim Wilson <wilson@cygnus.com>
7047
7048 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
7049 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
7050 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
7051 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
7052 * Makefile.in: Rebuild.
7053
7054 2000-05-02 Alan Modra <alan@linuxcare.com.au>
7055
7056 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
7057 doesn't work very well.
7058
7059 * elf-hppa.h (elf_hppa_internal_shdr): Define.
7060 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
7061 Set hdr->s_type to 1 if ARCH_SIZE == 32.
7062 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
7063 (elf_hppa_info_to_howto): Likewise.
7064 (elf_hppa_info_to_howto_rel): Likewise.
7065 (elf_hppa_reloc_type_lookup): Likewise.
7066 (elf_hppa_is_local_label_name): Likewise.
7067 (elf_hppa_fake_sections): Likewise.
7068 (elf_hppa_final_write_processing): Likewise.
7069 (elf_hppa_howto_table): Fully initialise all entries.
7070 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
7071 (elf_hppa_info_to_howto): Likewise.
7072 (elf_hppa_info_to_howto_rel): Likewise.
7073 (elf_hppa_reloc_type_lookup): Likewise.
7074 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
7075 elf_hppa_unmark_useless_dynamic_symbols,
7076 elf_hppa_remark_useless_dynamic_symbols,
7077 elf_hppa_record_segment_addrs, elf_hppa_final_link,
7078 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
7079 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
7080 elf32-hppa.c mess is cleaned up.
7081 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
7082 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
7083 r_field then call hppa_field_adjust inline func with variable
7084 r_field arg, instead call hppa_field_adjust with fixed arg.
7085 In case R_PARISC_PCREL22F, don't set r_field.
7086 (elf_hppa_relocate_insn): Change args and return type to unsigned
7087 int. Call re_assemble_* funcs to do the work.
7088
7089 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
7090 sign extending.
7091
7092 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
7093 extending.
7094 (sign_extend): Mask first before sign extending.
7095 (low_sign_extend): Rewrite without condition expression.
7096 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
7097 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
7098 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
7099 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
7100 result as function return value rather than through pointer arg.
7101 Accept unsigned int args, and return unsigned int.
7102 (re_assemble_3): New. Combines function of dis_assemble_3 with
7103 re-assembly of opcode and immediate.
7104 (re_assemble_12): Likewise.
7105 (re_assemble_16): Likewise.
7106 (re_assemble_17): Likewise.
7107 (re_assemble_21): Likewise.
7108 (re_assemble_22): Likewise.
7109 (hppa_field_adjust): Rewrite and document, paying attention to
7110 size of types and signed/unsigned issues.
7111 (get_opcode): Shift before masking.
7112 (FDLW): Rename to FLDW.
7113 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
7114 (hppa_rebuild_insn): Change args and return value to unsigned
7115 int. Make use of re_assemble_*. Correct case 11.
7116
7117 * dep-in.sed: Handle ../opcodes/.
7118 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
7119 elf64-hppa.h, hppa_stubs.h, xcoff.h.
7120 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
7121 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
7122 elfarm-nabi.lo dependencies outside of auto-dependency area.
7123 Regenerate dependencies.
7124 * Makefile.in: Regenerate.
7125
7126 * configure.in (TRAD_HEADER): Test non-null before
7127 AC_DEFINE_UNQUOTED.
7128 * configure: Regenerate.
7129
7130 * reloc.c: Fix mis-spelling in comment.
7131
7132 2000-05-01 Alan Modra <alan@linuxcare.com.au>
7133
7134 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
7135 * vms.c (vms_openr_next_archived_file): Return NULL.
7136
7137 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7138
7139 * coffcode.h Copy changes mistakenly done to libcoff.h in
7140 4/24/2000 patch.
7141
7142 2000-04-29 Andreas Jaeger <aj@suse.de>
7143
7144 * libbfd-in.h: Correctly check GCC version.
7145 * bfd-in.h: Likewise.
7146 * libhppa.h: Likewise.
7147 * libbfd.h: Regenerate.
7148 * bfd-in2.h: Regenerate.
7149
7150 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7151
7152 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
7153 coffdu-rs6000.{lo,c}.
7154 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
7155 on xcoff.h
7156 * Makefile.in: Regenerate.
7157 * xcoff.h: New file.
7158 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
7159 * coff-rs6000.c: Move all declarations and defines that are
7160 common to the xcoff backends into xcoff.h
7161 * coff64-rs6000.c: Ditto,
7162
7163 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7164
7165 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
7166 _bfd_coff_force_symnames in strings and
7167 _bfd_coff_debug_string_prefix_length to their default values.
7168 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
7169
7170 2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
7171
7172 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
7173 _bfd_coff_force_symnames in strings and
7174 _bfd_coff_debug_string_prefix_length to their default values.
7175
7176 2000-04-27 Alan Modra <alan@linuxcare.com.au>
7177
7178 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
7179 Check local_got_refcounts before dereferencing.
7180
7181 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
7182 before deciding we don't need R_PPC_PLT32 relocation.
7183 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
7184 dereferencing.
7185
7186 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
7187
7188 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
7189 .plt entries.
7190 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
7191 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
7192 (elf_i386_relocate_section): Allow for .plt to go missing.
7193 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
7194 can use a relative reloc for got as elf_i386_relocate_section.
7195 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
7196
7197 2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
7198
7199 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
7200
7201 2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
7202
7203 * Makefile.am (coff64-rs6000.lo): New rule.
7204 * Makefile.in: Regenerate.
7205 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
7206 xcoff_is_local_label_name, xcoff_rtype2howto,
7207 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
7208 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
7209 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
7210 (NO_COFF_SYMBOLS): Define.
7211 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
7212 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
7213 internally.
7214 (MINUS_ONE): New macro.
7215 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
7216 relocation.
7217 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
7218 coff_SWAP_aux_out): Map to the new functions.
7219 * coff64-rs6000.c: New file.
7220 * libcoff.h (bfd_coff_backend_data): Add new fields
7221 _bfd_coff_force_symnames_in_strings and
7222 _bfd_coff_debug_string_prefix_length.
7223 (bfd_coff_force_symnames_in_strings,
7224 bfd_coff_debug_string_prefix_length): New macros for above fields.
7225 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
7226 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
7227 of using coff_swap_sym_in directly.
7228 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
7229 (coff_set_flags) Set magic for XCOFF64.
7230 (coff_compute_section_file_positions): Add symbol name length to
7231 string section length if bfd_coff_debug_string_prefix_length is
7232 true.
7233 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
7234 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
7235 using coff_swap_lineno_in directly.
7236 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
7237 and _bfd_coff_debug_string_prefix_length fields.
7238 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
7239 symbol names into strings table when
7240 bfd_coff_force_symnames_in_strings is true.
7241 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
7242 SET_RELOC_VADDR): New macros.
7243 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
7244 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
7245 code.
7246 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
7247 changes within RS6000COFF_C specific code.
7248 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
7249 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
7250 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
7251 Extend existing hack on target name.
7252 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
7253 target name.
7254 * coff-tic54x.c (ticof): Keep up to date with new fields
7255 in bfd_coff_backend_data.
7256 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
7257 targ_selvecs to include rs6000coff64_vec for rs6000.
7258 * configure.in: Add rs6000coff64_vec case.
7259 * cpu-powerpc.c: New bfd_arch_info_type.
7260
7261 2000-04-24 Jeffrey A Law (law@cygnus.com)
7262
7263 * config.bfd: Only disable elf32-hppa vectors, not all of the
7264 BSD and OSF configuration support. Provide (disabled) clauses
7265 for PA64 support.
7266 * configure.in: Add clause for PA64 support.
7267 * configure: Rebuilt.
7268
7269 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
7270 (bfd_elf64_hppa_vec): Declare.
7271
7272 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
7273 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
7274 (elf64-hppa.lo): Add dependencies.
7275 * Makefile.in: Rebuilt.
7276
7277 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
7278
7279 2000-04-24 Jason Eckhardt <jle@cygnus.com>
7280
7281 * libhppa.h (dis_assemble_16): New function.
7282 (pa_arch): Added pa20w element.
7283
7284 2000-04-24 Ulrich Drepper <drepper@cygnus.com>
7285
7286 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
7287 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
7288 bfd_elf64_slurp_reloc_table.
7289
7290 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
7291 definitions to get external names.
7292 (elf_write_relocs): Renamed from write_relocs and make global.
7293 (elf_slurp_reloc_table): Make global.
7294 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
7295
7296 * archive.c (hpux_uid_gid_encode): New function.
7297 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
7298 defined and the ID is greater than 99999.
7299 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
7300 special uid/gid fields into 32 bit values.
7301
7302 2000-04-21 Matthew Green <mrg@cygnus.com>
7303
7304 * config.bfd: Add NetBSD/sparc64 support.
7305
7306 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
7307 David Mosberger <davidm@hpl.hp.com>
7308 Timothy Wall <twall@cygnus.com>
7309 Jim Wilson <wilson@cygnus.com>
7310
7311 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
7312 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
7313 (BFD64_BACKENDS): Add elf64-ia64.lo.
7314 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
7315 (cpu-ia64.lo, elf64-ia64.lo): New rules.
7316 * Makefile.in: Rebuild.
7317 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
7318 (bfd_ia64_arch): Declare.
7319 (bfd_archures_list): Add bfd_ia64_arch.
7320 * bfd-in2.h: Rebuild.
7321 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
7322 * configure: Rebuild.
7323 * configure.host: (ia64-*-linux*): New host.
7324 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
7325 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
7326 * elf.c (prep_headers): Add bfd_arch_ia64.
7327 * libbfd.h: Rebuild.
7328 * reloc.c: Add IA-64 relocations.
7329 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
7330 Declare.
7331 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
7332 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
7333
7334 2000-04-21 Richard Henderson <rth@cygnus.com>
7335
7336 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
7337 contents when performing a partial link.
7338 (bfd_elf_d30v_reloc_21): Likewise.
7339
7340 2000-04-20 H.J. Lu <hjl@gnu.org>
7341
7342 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
7343 patch to symbols defined by a shared object.
7344 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
7345
7346 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
7347
7348 K&R compiler fixes.
7349 * dwarf2.c (concat_filename): Avoid string literal concatenation.
7350 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
7351
7352 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
7353
7354 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
7355 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
7356 (coff-ia64.lo): Add dependency.
7357 * Makefile.in: Regenerate.
7358 * coff-ia64.c: New file.
7359 * efi-app-ia32.c: Ditto.
7360 * efi-app-ia64.c: Ditto.
7361 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
7362 (coff_set_flags): Ditto.
7363 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
7364 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
7365 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
7366 * configure: Regenerate.
7367 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
7368 (PUT_OPTHDR_IMAGE_BASE): Ditto.
7369 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7370 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
7371 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7372 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
7373 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7374 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
7375 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7376 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
7377 (GET_PDATA_ENTRY): Ditto.
7378 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
7379 data_start. Use above macros to read fields that are 64 bit wide for
7380 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
7381 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
7382 FileAlignment and SectionAlignment to minimum alignment if they
7383 are zero.
7384 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
7385 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
7386 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
7387 Use above macros to write fields that are 64 bit wide for
7388 COFF_WITH_PEP64.
7389 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
7390 5*4 otherwise. This should be right for IA-32 and IA-64, but may
7391 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
7392 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
7393 begin address, end address, and unwind info address only. Use
7394 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
7395 print addresses.
7396 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
7397 HIGH3ADJ relocation names.
7398 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
7399 * targets.c: Declare bfd_efi_app_ia32_vec and
7400 bfd_efi_app_ia64_vec.
7401 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
7402 bfd_efi_app_ia64_vec.
7403
7404 2000-04-17 Timothy Wall <twall@cygnus.com>
7405
7406 * bfd-in2.h: Add prototypes for tic54x load page access.
7407 * bfd-in.h: Regenerate.
7408 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
7409 in customized _set_arch_mach function.
7410 * coffcode.h (coff_set_alignment_hook): Set section load page if
7411 the appropriate macro is defined.
7412 (write_object_contents): Read section load page.
7413
7414 2000-04-13 Alan Modra <alan@linuxcare.com.au>
7415
7416 * elf32-hppa.h: Update copyright date.
7417
7418 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
7419 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
7420
7421 * elf32-d30v.c (MAX32): Don't use LL suffix.
7422 (MIN32): Define in terms of MAX32.
7423 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
7424
7425 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
7426 expression.
7427
7428 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
7429
7430 2000-04-12 Alan Modra <alan@linuxcare.com.au>
7431
7432 * dep-in.sed: Match space before file name, not after.
7433 * Makefile.am: Regenerate dependencies.
7434 * Makefile.in: Regenerate.
7435
7436 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
7437 case, allow address wrap-around stupidly removed 2000-03-17. Sign
7438 extend without an if statement.
7439
7440 2000-04-11 Alan Modra <alan@linuxcare.com.au>
7441
7442 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
7443 signed quantites.
7444 * elf32-mips.c (gprel16_with_gp): Likewise.
7445 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
7446 here using -0x40000, not (int)0xfffc0000.
7447 (elf32_hppa_size_of_stub): Likewise.
7448
7449 2000-04-11 Timothy Wall <twall@cygnus.com>
7450
7451 * coff-tic54x.c: Now builds with all targets.
7452 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
7453 * Makefile.in: Regenerate.
7454 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
7455 unitialized variable.
7456
7457 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
7458
7459 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
7460 --enable-build-warnings option.
7461 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
7462 * Makefile.in, configure: Re-generate.
7463
7464 2000-04-07 Nick Clifton <nickc@cygnus.com>
7465
7466 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
7467 BFD_RELOC_THUMB_PCREL_BLX.
7468
7469 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
7470 R_ARM_XPC25 and R_ARM_THM_PC22.
7471
7472 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
7473 R_ARM_XPC25 and R_ARM_THM_XPC22.
7474 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
7475 R_ARM_[XPC25|THM_XPC22].
7476
7477 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
7478 elf/arm-oabi.h to elf/arm.h
7479
7480 * Makefile.am: Fix dependency for elfarm-oabi.c
7481 * Makefile.in: Regenerate.
7482
7483 * bfd-in2.h: Regenerate.
7484 * libbfd.h: Regenerate.
7485
7486 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7487
7488 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
7489 and restore it on failure. Release newly allocated tdata on
7490 failure.
7491
7492 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
7493
7494 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
7495 (decode_line_info): Set it. Report error if unit->line_offset is
7496 equal to or larger than it.
7497
7498 2000-04-07 Timothy Wall <twall@cygnus.com>
7499
7500 * targets.c: Added vecs for tic54x.
7501 * reloc.c: Added relocs for tic54x.
7502 * libbfd.h: Regenerated.
7503 * configure: Add TI COFF vecs for tic54x.
7504 * configure.in: Ditto.
7505 * config.bfd (targ_cpu): Recognize new tic54x target.
7506 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
7507 * bfd-in2.h: Add tic54x target and relocations.
7508 * Makefile.am, Makefile.in: Add tic54x target.
7509 * archures.c (bfd_archures_list): Add tic54x target.
7510 * coff-tic54x.c: New.
7511 * cpu-tic54x.c: New.
7512
7513 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
7514
7515 * elfcore.h (elf_core_file_p): call backend_object_p which
7516 thereby gets an opportunity to update the arch/machine type.
7517
7518 2000-04-06 Timothy Wall <twall@cygnus.com>
7519
7520 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
7521 class. Handle SEC_CLINK and SEC_BLOCK flags.
7522 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
7523 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
7524
7525 2000-04-06 Nick Clifton <nickc@cygnus.com>
7526
7527 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
7528 EF_INTERWORK if this is an unknown EABI.
7529 (elf32_arm_merge_private_bfd_data): Check EABI version
7530 numbers. Only check EF_xxx flags if the EABI version number
7531 is unknown.
7532 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
7533 if the EABI version number is unknown.
7534 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
7535 if the EABI version number is unknown.
7536
7537 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
7538
7539 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
7540 BFD_RELOC_SH_LOOP_END.
7541 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
7542 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
7543 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
7544 (sh_elf_reloc_loop): New function.
7545 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
7546 any more.
7547 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
7548 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
7549 * bfd-in2.h, libbfd.h: Regenerate.
7550
7551 2000-04-04 Alan Modra <alan@linuxcare.com.au>
7552
7553 * po/bfd.pot: Regenerate.
7554
7555 * Makefile.am: Remove extraneous mkdep comment.
7556 (MKDEP): Use gcc -MM rather than mkdep.
7557 (DEP): Quote when passing vars to sub-make. Add warning
7558 message to end.
7559 (DEP1): Rewrite for "gcc -MM".
7560 (CLEANFILES): Add DEP2.
7561 Update dependencies.
7562 * Makefile.in: Regenerate.
7563
7564 2000-04-03 Kevin Buettner <kevinb@redhat.com>
7565
7566 * configure.in: Added corefile support for AIX 4.3. In particular,
7567 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
7568 compiling rs6000-core.c.
7569 * configure: Regenerated.
7570
7571 2000-04-03 H.J. Lu <hjl@gnu.org>
7572
7573 * cache.c (bfd_open_file): Unlink the output file only if
7574 it has non-zero size.
7575
7576 2000-04-01 Ken Block USG <block@zk3.dec.com>
7577
7578 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
7579 relative relocations for non-loaded sections in shared objects.
7580 (elf64_alpha_check_relocs): Similarly.
7581
7582 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
7583
7584 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
7585 BFD_RELOC_16 to switch for extended relocs.
7586 (MY_swap_ext_reloc_in): New.
7587 (MY_swap_ext_reloc_out): New.
7588 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
7589 than NAME(aout,swap_ext_reloc_in) for extended relocs.
7590 (NAME(aout,squirt_out_relocs)): Similarly use
7591 MY_swap_ext_reloc_out.
7592 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
7593
7594 2000-04-03 Kazu Hirata <kazu@hxi.com>
7595
7596 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
7597 the R_PCRWORD_B case.
7598
7599 2000-03-31 Thomas de Lellis <tdel@wrs.com>
7600
7601 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
7602 on some targets.
7603 * ihex.c : Ditto.
7604
7605 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
7606
7607 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
7608 HOWTO references to bfd_elf_generic_reloc, that have
7609 partial_inplace == true, now use the new function. The function
7610 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
7611 extends its fixes to the R_M32R_{16,24,32} relocs.
7612 The new logic in m32r_elf_lo16_reloc() has been removed, and
7613 it instead calls the new routine to obtain that functionality.
7614
7615 2000-03-27 Alan Modra <alan@linuxcare.com.au>
7616
7617 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
7618 elf32_avr_check_relocs, avr_final_link_relocate,
7619 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
7620 elf32_avr_object_p): Add prototypes.
7621 (elf32_avr_gc_mark_hook): Add default for h->root.type.
7622 (bfd_elf_avr_final_write_processing): Make static.
7623
7624 2000-03-27 Denis Chertykov <denisc@overta.ru>
7625
7626 * cpu-avr.c: New file. BFD support routines for AVR architecture.
7627 * archures.c (bfd_architecture): Add AVR architecture.
7628 (bfd_archures_list): Add reference to AVR architecture info.
7629 * elf.c (prep_headers): Handle bfd_arch_avr.
7630 * reloc.c: Add various AVR relocation enums.
7631 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
7632 list.
7633 * Makefile.am: Add support for AVR elf.
7634 * configure.in: Likewise.
7635 * config.bfd: Likewise.
7636 * Makefile.in: Regenerate.
7637 * configure: This too.
7638 * bfd-in2.h: And this.
7639 * libbfd.h: And this.
7640
7641 2000-03-24 H.J. Lu <hjl@gnu.org>
7642
7643 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
7644 (elf64_alpha_find_reloc_at_ofs): Likewise.
7645
7646 2000-03-17 Alan Modra <alan@linuxcare.com.au>
7647
7648 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
7649 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
7650 allowable range used to be -2**(n-1) to 2**n-1.
7651 * reloc.c (_bfd_relocate_contents): Same here. Also replace
7652 "boolean overflow" with "bfd_reloc_status_type flag".
7653
7654 2000-03-14 Doug Evans <dje@casey.transmeta.com>
7655
7656 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
7657
7658 2000-03-14 Kazu Hirata <kazu@hxi.com>
7659
7660 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
7661 of shrinks properly, including the last reloc.
7662
7663 2000-03-13 Kazu Hirata <kazu@hxi.com>
7664
7665 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
7666 check for R_MOVL2.
7667
7668 2000-03-11 Alan Modra <alan@linuxcare.com.au>
7669
7670 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
7671 a format mismatch rather than an "error" from bfd_read such as
7672 bfd_error_file_truncated.
7673
7674 2000-03-10 Geoff Keating <geoffk@cygnus.com>
7675
7676 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
7677 sign-extension and big-endian compensation for
7678 R_MIPS_64 even in ld -r.
7679
7680 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
7681
7682 * elf32-mips.c (mips_elf_next_relocation): Rename from
7683 mips_elf_next_lo16_relocation, and generalize to look
7684 for any relocation type.
7685 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
7686 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
7687 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
7688 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
7689 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
7690 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
7691 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
7692 (mips_rtype_to_howto): Likewise.
7693 (mips_elf_calculate_relocation): Handle new relocs.
7694 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
7695 are paired. The addend for R_MIPS_GNU_REL16_S2
7696 is shifted right two bits.
7697
7698 2000-03-10 Alan Modra <alan@linuxcare.com.au>
7699
7700 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
7701 comment, and ensure it doesn't happen again.
7702 (bfd_install_relocation): Same here.
7703 (_bfd_relocate_contents): Don't bother assigning unused signmask
7704 shift result. Fix typos in comments.
7705 Remove trailing whitespace throughout file.
7706
7707 2000-03-07 Doug Evans <dje@casey.transmeta.com>
7708
7709 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
7710 * bfd-in2.h: Rebuild.
7711
7712 2000-03-06 Nick Clifton <nickc@cygnus.com>
7713
7714 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
7715 sym_ptr_ptr fields.
7716 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
7717 (SIZEOF_ILF_STRINGS): Redefine.
7718 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
7719 relative reloc, as opposed to a section relative reloc.
7720 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
7721 not C_LABEL.
7722 Add length of symbol's prefix to string pointer.
7723 Store a pointer to the symbol in the symbol pointer table.
7724 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
7725 Initialise the symbol pointer table.
7726 Store the hint in the Hint/Name table.
7727 Make the jump reloc be symbol realtive, not section relative.
7728 Create an import symbol for imported code.
7729
7730 2000-03-06 Catherine Moore <clm@cygnus.com>
7731
7732 * elf.c (swap_out_syms): Check for null type_ptr.
7733
7734 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
7735
7736 * aout-target.h (MY(write_object_contents)): Remove unused
7737 and unusable "#if CHOOSE_RELOC_SIZE".
7738 * pc532-mach.c (MY(write_object_contents)): Ditto.
7739 * netbsd.h (MY(write_object_contents)): Ditto.
7740 * hp300hpux.c (MY(write_object_contents)): Ditto.
7741 * freebsd.h (MY(write_object_contents)): Ditto.
7742 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
7743
7744 2000-02-29 H.J. Lu <hjl@gnu.org>
7745
7746 * peicode.h (jtab): Make it static.
7747
7748 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
7749 defined and COFF_IMAGE_WITH_PE is not defined.
7750 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
7751 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
7752
7753 2000-03-01 Nick Clifton <nickc@cygnus.com>
7754
7755 * coff-arm.c (bfd_arm_process_before_allocation): Make
7756 'symndx' signed to prevent compile time warning.
7757
7758 * coff-mcore.c: Remove unused prototype for pe_object_p.
7759
7760 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
7761 functions that are not used when COFF_IMAGE_WITH_PE is
7762 defined.
7763 (struct sh_opcode): Change type of 'flags' field to unsigned
7764 long so that it can hold the USESAS flag.
7765
7766 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
7767
7768 * elf-m10300.c (mn10300_elf_relax_section): Initialise
7769 'sym_sec'.
7770
7771 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
7772 parameters.
7773 Remove unusued variables and code.
7774 (elf_backend_add_symbol_hook): Fix prototype.
7775
7776 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
7777 'srelgot'.
7778
7779 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
7780 'oldinst'.
7781
7782 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
7783 parameters.
7784 Remove unusued variables and code.
7785 (elf_backend_add_symbol_hook): Fix prototype.
7786
7787 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
7788
7789 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
7790 to unused function parameter.
7791
7792 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
7793 parameters.
7794 Use EMPTY_HOWTO to initialise empty howto slots.
7795 Remove unused variables.
7796
7797 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
7798
7799 2000-03-01 H.J. Lu <hjl@gnu.org>
7800
7801 * aoutx.h (aout_link_input_section_std): Pass "true" to
7802 the undefined_symbol callback.
7803 (aout_link_input_section_ext): Likewise.
7804 * bout.c (get_value): Likewise.
7805 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
7806 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
7807 Likewise.
7808 (alpha_relocate_section): Likewise.
7809 * coff-arm.c (coff_arm_relocate_section): Likewise.
7810 * coff-i960.c (coff_i960_relocate_section): Likewise.
7811 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
7812 * coff-mips.c (mips_relocate_section): Likewise.
7813 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
7814 * coff-sh.c (sh_relocate_section): Likewise.
7815 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
7816 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
7817 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
7818 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7819 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7820 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7821 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7822 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7823 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7824 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7825 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7826 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7827 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7828 * elflink.h (elf_link_output_extsym): Likewise.
7829 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
7830 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
7831 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
7832
7833 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
7834 undefined_symbol callback when building shared library with
7835 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
7836 "true".
7837 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
7838 * elf32-i386.c (elf_i386_relocate_section): Likewise.
7839 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7840 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
7841 (elf32_mips_get_relocated_section_content): Likewise.
7842 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7843 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7844 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
7845 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7846
7847 2000-02-28 Nick Clifton <nickc@cygnus.com>
7848
7849 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
7850 * Makefile.in: Regenerate.
7851
7852 * configure.in: Add support for mips and sh pe vectors.
7853 * configure: regenerate.
7854
7855 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
7856 targets.
7857
7858 * targets.c: Add mips and sh pe vectors.
7859
7860 * libpei.h (coff_final_link_postscript): Only define if not
7861 already defined.
7862
7863 * coffcode.h: Add support for WinCE magic numbers.
7864
7865 * peigen.c (pe_print_reloc): Update comment and rearrange
7866 appending of newline character.
7867
7868 * peicode.h: Add support for Image Library Format.
7869 (pe_ILF_vars): Structure containing data used by ILF code.
7870 (pe_ILF_make_a_section): New function. Create a section based
7871 on ILF data.
7872 (pe_ILF_make_a_reloc): New function. Create a reloc based on
7873 ILF data.
7874 (pe_ILF_make_a_symbol): New function. Create a symbol based
7875 on ILF data.
7876 (pe_ILF_save_relocs): New function. Store the relocs created
7877 by pe_ILF_make_a_reloc in a section.
7878 (pe_ILF_build_a_bfd): New function. Create a BFD describing
7879 an ILF object.
7880 (pe_ILF_object_p): New function. Return a bfd_target pointer
7881 for an ILF object.
7882 (pe_bfd_object_p): If an ILF object is detected call
7883 pe_ILF_object_p on it.
7884
7885 * coff-arm.c: Add support for WinCE relocs which are different
7886 from normal ARM COFF relocs.
7887 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
7888
7889 * coff-sh.c: Add support for sh-pe target.
7890 * pe-sh.c: New file. Support code for sh-pe target.
7891 * pei-sh.c: New file. Support code for sh-pe target.
7892
7893 * pe-mips.c: New file. Support code for mips-pe target.
7894 * pei-mips.c: New file. Support code for mips-pe target.
7895
7896 2000-02-27 Jakub Jelinek <jakub@redhat.com>
7897
7898 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
7899 architecture if the object causing the bump is dynamic.
7900 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
7901 and also don't it for memory ordering.
7902 (sparc64_elf_write_relocs): Take src_rela out of the loop.
7903
7904 2000-02-27 Ian Lance Taylor <ian@zembu.com>
7905
7906 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
7907 calling bfd_get_section_size_before_reloc.
7908 (decode_line_info): Likewise.
7909 (_bfd_dwarf2_find_nearest_line): Likewise.
7910
7911 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
7912
7913 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
7914 name of the libtool directory.
7915 * Makefile.in: Rebuild.
7916
7917 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
7918
7919 * som.c (SOM_HOWTO): Define.
7920 (som_hppa_howto_table): Use it.
7921
7922 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
7923
7924 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
7925
7926 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
7927
7928 2000-02-24 Catherine Moore <clm@cygnus.com>
7929
7930 * som.c (som_misc_symbol_info): Add field
7931 secondary_def.
7932 (som_bfd_derive_misc_symbol_info): Initialize
7933 secondary_def.
7934 (som_build_and_write_symbol_table): Keep track
7935 of secondary_def field.
7936 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
7937 if secondary_def field is set.
7938 (som_bfd_ar_write_symbol_stuff): Initialize
7939 secondary_def.
7940
7941 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
7942
7943 * dwarf2.c (read_address): Read 16-bits addresses.
7944 (parse_comp_unit): Accept addr_size == 2.
7945
7946 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
7947
7948 * bfd-in.h: Update copyright date.
7949
7950 2000-02-23 Linas Vepstas <linas@linas.org>
7951
7952 * cpu-i370.c: New file.
7953 * elf32-i370.c: New file.
7954 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
7955 (bfd_i370_arch): New.
7956 (bfd_archures_list): Add bfd_i370_arch.
7957 * elf.c (prep_headers): Add bfd_arch_i370.
7958 * Makefile.am: Add support for IBM 370 elf.
7959 * config.bfd: Likewise.
7960 * configure.in: Likewise.
7961 * libbfd.h (bfd_reloc_code_real_names): Likewise.
7962 * reloc.c (bfd_reloc_code_type): Likewise.
7963 * targets.c: Likewise.
7964
7965 * Makefile.in: Regenerate.
7966 * configure: Regenerate.
7967 * bfd-in2.h: Regenerate.
7968
7969 2000-02-22 Ian Lance Taylor <ian@zembu.com>
7970
7971 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
7972 invalid relocation types, and change them to R_386_NONE.
7973
7974 2000-02-22 H.J. Lu <hjl@gnu.org>
7975
7976 * elflink.h (elf_link_add_object_symbols): If a version symbol is
7977 not defined, don't add a second ELF_VER_CHR.
7978
7979 * elflink.h (elf_bfd_final_link): Call output_extsym for global
7980 symbols converted to local symbols even when stripping all
7981 symbols.
7982 (elf_link_output_extsym): Process global symbols converted to
7983 local symbols even if they are being stripped.
7984
7985 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
7986
7987 * archures.c (bfd_octets_per_byte): Return unsigned int.
7988 (bfd_arch_mach_octets_per_byte): Ditto.
7989 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
7990 comparison warning.
7991 * section.c (bfd_get_section_size_before_reloc): Quell signed
7992 vs. unsigned comparison warning.
7993 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
7994 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
7995 change. What was I thinking?
7996 * bfd-in2.h: Regenerate.
7997
7998 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
7999 (elf_gc_sections): Same here.
8000 (elf_gc_common_finalize_got_offsets): And here.
8001
8002 2000-02-21 Ian Lance Taylor <ian@zembu.com>
8003
8004 ELF HPPA doesn't work at present; remove it until it does.
8005 * config.bfd: Comment out setting targ_defvec to
8006 bfd_elf32_hppa_vec.
8007 * Makefile.am: Rebuild dependencies.
8008 (BFD32_BACKENDS): Remove elf32-hppa.lo.
8009 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
8010 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
8011 * Makefile.in: Rebuild.
8012 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
8013
8014 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8015
8016 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
8017 is no bfd_free(). Revert bfd_free part of previous change.
8018
8019 2000-02-18 Geoff Keating <geoffk@cygnus.com>
8020
8021 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
8022 arrays.
8023 (coff_compute_section_file_positions): Use bfd_free to pair
8024 bfd_malloc.
8025 (coff_write_object_contents): Likewise.
8026
8027 * coff-rs6000.c (xcoff_howto_table_16): New variable.
8028 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
8029
8030 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
8031
8032 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
8033 (xcoff_ar_file_hdr_big): New structure.
8034 (SIZEOF_AR_FILE_HDR_BIG): New macro.
8035 (xcoff_ar_hdr_big): New structure.
8036 (SIZEOF_AR_HDR_BIG): New macro.
8037 (xcoff_big_format_p): New macro.
8038 (xcoff_ardata_big): New macro.
8039 (arch_xhdr_big): New macro.
8040 (xcoff_slurp_armap): Handle large archives.
8041 (xcoff_archive_p): Detect large archives.
8042 (xcoff_read_ar_hdr): Handle large archives.
8043 (xcoff_openr_next_archived_file): Handle large archives.
8044 (xcoff_generic_stat_arch_elt): Handle large archives.
8045 (xcoff_write_armap_old): Rename from xcoff_write_armap.
8046 (xcoff_write_armap_big): New function.
8047 (xcoff_write_armap): New function, dispatch to _old or _big.
8048 (xcoff_write_archive_contents_old): Rename from
8049 xcoff_write_archive_contents.
8050 (xcoff_write_archive_contents_big): New function.
8051 (xcoff_write_archive_contents): New function, dispatch to _old or
8052 _big.
8053
8054 2000-02-18 Richard Henderson <rth@cygnus.com>
8055
8056 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
8057 and hide_symbol members.
8058 (elf_link_hash_copy_indirect): Remove.
8059 (elf_link_hash_hide_symbol): Remove.
8060 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
8061 and elf_backend_hide_symbol.
8062 (_bfd_elf_link_hash_copy_indirect): Declare.
8063 (_bfd_elf_link_hash_hide_symbol): Declare.
8064 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
8065 (_bfd_elf_link_hash_hide_symbol): Likewise.
8066 (_bfd_elf_link_hash_table_init): Don't init killed members.
8067 * elflink.h (elf_link_add_object_symbols): Use the bed function
8068 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
8069 (elf_link_assign_sym_version): Likewise.
8070 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
8071 (elf_backend_hide_symbol): Likewise.
8072 (elfNN_bed): Update for new members.
8073
8074 2000-02-17 Kevin Buettner <kevinb@redhat.com>
8075
8076 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
8077 STACK_END_ADDR): Define for new core file format.
8078 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
8079 for handling the vagaries of the various core file structures used
8080 by AIX over the years.
8081 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
8082 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
8083 core_dumpx structure.
8084
8085 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
8086
8087 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
8088 (bfd_mach_sh3_dsp): Likewise.
8089 (bfd_mach_sh4): Reinstate.
8090 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
8091 * bfd-in2.h: Regenerate.
8092 * coff-sh.c (struct sh_opcode): flags is no longer short.
8093 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
8094 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
8095 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
8096 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
8097 (sh_opcodes): No longer const.
8098 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
8099 (sh_insn_uses_reg): Check for USESAS and USESR8.
8100 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
8101 (_bfd_sh_align_load_span): Return early for SH4.
8102 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
8103 Take into account that field b of a parallel processing insn
8104 could be mistaken for a separate insn.
8105 * cpu-sh.c (arch_info_struct): New array elements for
8106 sh2, sh-dsp and sh3-dsp.
8107 Reinstate element for sh4.
8108 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
8109 (SH4_NEXT): Reinstate.
8110 (SH3_NEXT, SH3E_NEXT): Adjust.
8111 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
8112 * elf32-sh.c (sh_elf_set_private_flags): New function.
8113 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
8114 (sh_elf_merge_private_data): New function.
8115 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
8116 (bfd_elf32_bfd_copy_private_bfd_data): Define.
8117 (bfd_elf32_bfd_merge_private_bfd_data): Change to
8118 sh_elf_merge_private_data.
8119
8120 2000-02-13 Richard Henderson <rth@cygnus.com>
8121
8122 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
8123 hide_symbol members.
8124 (elf_link_hash_copy_indirect): New.
8125 (elf_link_hash_hide_symbol): New.
8126 * elflink.h (elf_link_add_object_symbols): Break out copy from
8127 indirect new new symbol to elf.c.
8128 (elf_link_assign_sym_version): Break out privatization of
8129 non-exported symbol to elf.c.
8130 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
8131 (_bfd_elf_link_hash_hide_symbol): New.
8132 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
8133
8134 2000-02-13 Ian Lance Taylor <ian@zembu.com>
8135
8136 * section.c (_bfd_strip_section_from_output): Add info parameter.
8137 If it passed as non-NULL, use it to check whether any input BFD
8138 has an input section which uses this output section. Change all
8139 callers.
8140 * bfd-in2.h: Rebuild.
8141
8142 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
8143 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
8144 1999-11-29.
8145 * bfd-in2.h: Rebuild.
8146
8147 2000-02-10 Timothy Wall <twall@cygnus.com>
8148
8149 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
8150 allow final modifications of swapped-in symbol.
8151 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
8152 * coffcode.h (coff_write_relocs): Use macro
8153 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
8154 symbol index should be set to -1.
8155
8156 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
8157
8158 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
8159 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
8160 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
8161 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
8162 sh_insns_uses_or_sets_freg): New functions.
8163 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
8164 * (sh_insns_conflict): Use new functions and new macros to
8165 detect conflicts when two instructions both set same integer registers,
8166 both set same fp register, and both set special register.
8167
8168 2000-02-09 Timothy Wall <twall@cygnus.com>
8169
8170 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
8171 swapping in sections, so that the swapping routines have access to
8172 the arch/mach info.
8173
8174 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
8175
8176 * coff-go32.c: Update comment. Update copyright.
8177
8178 2000-01-27 Thomas de Lellis <tdel@windriver.com>
8179
8180 * syms.c (bfd_decode_symclass)
8181 Two new class characters were added - 'V' and 'v'. The
8182 meaning of 'W' is now restricted to just weak non-object
8183 symbols. This allows differentiation between, for example,
8184 weak functions vs weak objects. nm for example now dumps:
8185 'W' = weak global
8186 'w' = weak unresolved
8187 'V' = weak global object
8188 'v' = weak unresolved object
8189
8190 (bfd_is_undefined_symclass): New function. Return true if the
8191 given symbol class represents and undefined/unresolved symbol.
8192
8193 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
8194 unresolved symbols.
8195
8196 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
8197
8198 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
8199 STT_ARM_16BIT flag set, but it is not attached to a data object
8200 return STT_ARM_16BIT so that it will be treated as code by the
8201 disassembler.
8202
8203 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
8204
8205 * coff-i386.c (i3coff_object_p): Remove prototype.
8206 Update copyright.
8207
8208 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
8209 to name. Update copyright.
8210
8211 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
8212 assignment to avoid warning. Update copyright.
8213
8214 2000-01-24 Robert Lipe (robertl@sco.com)
8215
8216 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
8217 instead of using GNU C extension.
8218
8219 2000-01-21 Nick Clifton <nickc@cygnus.com>
8220
8221 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
8222 amount from a bfd_in_memory structure.
8223 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
8224 structure.
8225
8226 2000-01-14 Nick Clifton <nickc@cygnus.com>
8227
8228 * linker.c (default_indirect_link_order): oops - fix incorrectly
8229 applied patch from Tim Wall.
8230
8231 2000-01-13 Timothy Wall (twall@tiac.net>
8232
8233 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
8234 = scnhsz, filhsz, relsz, aoutsz, etc)
8235
8236 * coffswap.h: Ditto.
8237
8238 2000-01-13 Nick Clifton <nickc@cygnus.com>
8239
8240 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
8241 interwork thumb to arm stub.
8242
8243 2000-01-13 Timothy Wall (twall@tiac.net>
8244
8245 * archures.c (bfd_octets_per_byte): New function: Return
8246 target byte size.
8247 (bfd_arch_mach_octets_per_byte): New function: Return target
8248 byte size.
8249
8250 * section.c: Distinguish between octets and bytes for usage of
8251 _cooked_size, _raw_size, and output_offset. Clarify
8252 description of bfd_set_section_contents.
8253
8254 * bfd-in2.h: Regenerate.
8255
8256 * coffgen.c: Indicate that the offset parameter is in bytes, not
8257 octets.
8258
8259 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
8260 where appropriate to get the octet offset when calling
8261 bfd_set_section_contents.
8262 (bfd_coff_reloc_link_order): Ditto.
8263
8264 * linker.c (bfd_generic_reloc_link_order): Ditto.
8265 (_bfd_default_link_order): Ditto.
8266
8267 * reloc.c (bfd_perform_relocation): Distinguish between octets
8268 and bytes. Use octets when indexing into octet data; use bytes
8269 when calculating target addresses.
8270 (bfd_install_relocation): Ditto.
8271
8272 * srec.c (srec_write_section): Ditto.
8273
8274 2000-01-13 Nick Clifton <nickc@cygnus.com>
8275
8276 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
8277 3 to 2. This allows 4 byte sized sections, which is necessary for
8278 dlltool to build functioning DLLs.
8279
8280 2000-01-10 Philip Blundell <pb@futuretv.com>
8281
8282 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
8283 (arm*-*-conix*): New target.
8284
8285 2000-01-10 Egor Duda <deo@logos-m.ru>
8286
8287 * config.bfd: Include elf32_i386 vector to target list for cygwin
8288 and mingw.
8289
8290 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
8291 * configure.in: Test for structure win32_pstatus_t in
8292 <sys/procfs.h>
8293 * configure: Regenerate.
8294
8295 * elf.c (elfcore_grok_win32pstatus): New function: process
8296 win32_pstatus_t notes in elf core file.
8297 (elfcore_grok_note): Detect win32_pstatus notes.
8298
8299 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
8300
8301 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
8302 visibility.
8303 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
8304 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
8305
8306 For older changes see ChangeLog-9899
8307 \f
8308 Local Variables:
8309 mode: change-log
8310 left-margin: 8
8311 fill-column: 74
8312 version-control: never
8313 End:
This page took 0.199851 seconds and 5 git commands to generate.