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