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