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