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