coordinate info->symbolic and info->allow_shlib_undefined
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
671bae9c
NC
12001-09-20 John Reiser <jreiser@BitWagon.com>
2
3 * elf32-i386.c (elf_i386_relocate_section): coordinate info->symbolic
4 and info->allow_shlib_undefined.
5 * elf32-cris.c: likewise
6 * elf32-hppa.c: likewise
7 * elf32-m68k.c: likewise
8 * elf32-mips.c: likewise
9 * elf32-ppc.c: likewise
10 * elf32-s390.c: likewise
11 * elf32-sh.c: likewise
12 * elf32-sparc.c: likewise
13 * elf64-alpha.c: likewise
14 * elf64-hppa.c: likewise
15 * elf64-ppc.c: likewise
16 * elf64-s390.c: likewise
17 * elf64-sparc.c: likewise
18 * elf64-x86-64.c: likewise
19 * elfxx-ia64.c: likewise
20
3882b010
L
212001-09-18 Bruno Haible <haible@clisp.cons.org>
22
23 * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
24 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
25 * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
26 (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
27 * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
28 (bfd_default_scan): Use ISDIGIT instead of isdigit.
29 * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
30 (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
31 isxdigit/isdigit/islower.
32 * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
33 (mangle_name): Use ISALNUM instead of isalnum.
34 * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
35 (scan): Use ISDIGIT instead of isdigit.
36 * hosts/alphavms.h: Don't include <ctype.h>.
37 * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
38 (ieee_object_p): Use TOUPPER instead of toupper.
39 * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
40 (ihex_bad_byte): Use ISPRINT instead of isprint.
41 * merge.c: Don't include <ctype.h>.
42 * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
43 (oasys_write_sections): Use ISDIGIT instead of isdigit.
44 * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
45 (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
46 * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
47 (mangle_name): Use ISALNUM instead of isalnum.
48 * som.c: Include "safe-ctype.h" instead of <ctype.h>.
49 (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
50 isupper/islower/isdigit.
51 (som_decode_symclass): Use TOUPPER instead of toupper.
52 * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
53 (srec_bad_byte): Use ISPRINT instead of isprint.
54 (srec_scan): Use ISSPACE instead of isspace.
55 * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
56 (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
57 * syms.c: Include "safe-ctype.h"
58 (islower, toupper): Remove macro definitions.
59 (bfd_decode_symclass): Use TOUPPER instead of toupper.
60 * vms-gsd.c: Don't include <ctype.h>.
61 * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
62 (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
63 islower/toupper.
64 * vms-tir.c: Don't include <ctype.h>.
65
dc810e39
AM
662001-09-18 Alan Modra <amodra@bigpond.net.au>
67
68 * libbfd.c (bfd_bread): New function replacing bfd_read without
69 redundant params. Allow reads up to (size_t) -2 in length.
70 (bfd_bwrite): Similarly for bfd_write.
71 (real_read): Return a size_t.
72 (bfd_read): Call bfd_bread.
73 (bfd_write): Call bfd_bwrite.
74 (warn_deprecated): New function to annoy everybody.
75 (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
76 * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
77 (bfd_read, bfd_write): Define as macro.
78 * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
79 likewise for bfd_write. Ensure function args are correct size by
80 using casts or local vars. In some cases, remove unnecessary
81 casts. Formatting fixes, in some cases removing a large expression
82 from function args by using a local var. Replace CONST with const.
83 Modify variable types to avoid warings. Use casts to avoid
84 warnings when using negative numbers in unsigned expressions.
85 * aout-adobe.c: Likewise.
86 * aout-arm.c: Likewise.
87 * aout-cris.c: Likewise.
88 * aout-encap.c: Likewise.
89 * aout-ns32k.c: Likewise.
90 * aout-target.h: Likewise.
91 * aout-tic30.c: Likewise.
92 * aoutf1.h: Likewise.
93 * aoutx.h: Likewise.
94 * archive.c: Likewise.
95 * archures.c: Likewise.
96 * bfd-in.h: Likewise.
97 * bfd.c: Likewise.
98 * binary.c: Likewise.
99 * bout.c: Likewise.
100 * cache.c: Likewise.
101 * cisco-core.c: Likewise.
102 * coff-a29k.c: Likewise.
103 * coff-alpha.c: Likewise.
104 * coff-arm.c: Likewise.
105 * coff-h8300.c: Likewise.
106 * coff-h8500.c: Likewise.
107 * coff-i386.c: Likewise.
108 * coff-i860.c: Likewise.
109 * coff-i960.c: Likewise.
110 * coff-ia64.c: Likewise.
111 * coff-m68k.c: Likewise.
112 * coff-m88k.c: Likewise.
113 * coff-mcore.c: Likewise.
114 * coff-mips.c: Likewise.
115 * coff-ppc.c: Likewise.
116 * coff-rs6000.c: Likewise.
117 * coff-sh.c: Likewise.
118 * coff-sparc.c: Likewise.
119 * coff-stgo32.c: Likewise.
120 * coff-tic30.c: Likewise.
121 * coff-tic54x.c: Likewise.
122 * coff-tic80.c: Likewise.
123 * coff-w65.c: Likewise.
124 * coff-z8k.c: Likewise.
125 * coff64-rs6000.c: Likewise.
126 * coffcode.h: Likewise.
127 * coffgen.c: Likewise.
128 * cofflink.c: Likewise.
129 * coffswap.h: Likewise.
130 * corefile.c: Likewise.
131 * cpu-arc.c: Likewise.
132 * cpu-h8300.c: Likewise.
133 * cpu-h8500.c: Likewise.
134 * cpu-i960.c: Likewise.
135 * cpu-ia64-opc.c: Likewise.
136 * cpu-ns32k.c: Likewise.
137 * cpu-pdp11.c: Likewise.
138 * cpu-pj.c: Likewise.
139 * cpu-sh.c: Likewise.
140 * cpu-w65.c: Likewise.
141 * cpu-z8k.c: Likewise.
142 * dwarf1.c: Likewise.
143 * dwarf2.c: Likewise.
144 * ecoff.c: Likewise.
145 * ecofflink.c: Likewise.
146 * ecoffswap.h: Likewise.
147 * elf-bfd.h: Likewise.
148 * elf-hppa.h: Likewise.
149 * elf-m10200.c: Likewise.
150 * elf-m10300.c: Likewise.
151 * elf.c: Likewise.
152 * elf32-arc.c: Likewise.
153 * elf32-arm.h: Likewise.
154 * elf32-avr.c: Likewise.
155 * elf32-cris.c: Likewise.
156 * elf32-fr30.c: Likewise.
157 * elf32-gen.c: Likewise.
158 * elf32-h8300.c: Likewise.
159 * elf32-hppa.c: Likewise.
160 * elf32-i370.c: Likewise.
161 * elf32-i386.c: Likewise.
162 * elf32-i860.c: Likewise.
163 * elf32-m32r.c: Likewise.
164 * elf32-m68k.c: Likewise.
165 * elf32-mcore.c: Likewise.
166 * elf32-mips.c: Likewise.
167 * elf32-openrisc.c: Likewise.
168 * elf32-pj.c: Likewise.
169 * elf32-ppc.c: Likewise.
170 * elf32-s390.c: Likewise.
171 * elf32-sh-lin.c: Likewise.
172 * elf32-sh.c: Likewise.
173 * elf32-sparc.c: Likewise.
174 * elf32-v850.c: Likewise.
175 * elf64-alpha.c: Likewise.
176 * elf64-hppa.c: Likewise.
177 * elf64-mips.c: Likewise.
178 * elf64-ppc.c: Likewise.
179 * elf64-s390.c: Likewise.
180 * elf64-sparc.c: Likewise.
181 * elf64-x86-64.c: Likewise.
182 * elfarm-nabi.c: Likewise.
183 * elfcode.h: Likewise.
184 * elfcore.h: Likewise.
185 * elflink.c: Likewise.
186 * elflink.h: Likewise.
187 * elfxx-ia64.c: Likewise.
188 * elfxx-target.h: Likewise.
189 * format.c: Likewise.
190 * hash.c: Likewise.
191 * hp300hpux.c: Likewise.
192 * hppabsd-core.c: Likewise.
193 * hpux-core.c: Likewise.
194 * i386aout.c: Likewise.
195 * i386dynix.c: Likewise.
196 * i386linux.c: Likewise.
197 * i386lynx.c: Likewise.
198 * i386mach3.c: Likewise.
199 * i386msdos.c: Likewise.
200 * i386os9k.c: Likewise.
201 * ieee.c: Likewise.
202 * ihex.c: Likewise.
203 * irix-core.c: Likewise.
204 * libaout.h: Likewise.
205 * libbfd-in.h: Likewise.
206 * libbfd.c: Likewise.
207 * libcoff-in.h: Likewise.
208 * libecoff.h: Likewise.
209 * libieee.h: Likewise.
210 * libnlm.h: Likewise.
211 * libpei.h: Likewise.
212 * libxcoff.h: Likewise.
213 * linker.c: Likewise.
214 * lynx-core.c: Likewise.
215 * m68klinux.c: Likewise.
216 * merge.c: Likewise.
217 * mipsbsd.c: Likewise.
218 * netbsd-core.c: Likewise.
219 * nlm.c: Likewise.
220 * nlm32-alpha.c: Likewise.
221 * nlm32-i386.c: Likewise.
222 * nlm32-ppc.c: Likewise.
223 * nlm32-sparc.c: Likewise.
224 * nlmcode.h: Likewise.
225 * nlmswap.h: Likewise.
226 * ns32k.h: Likewise.
227 * oasys.c: Likewise.
228 * opncls.c: Likewise.
229 * osf-core.c: Likewise.
230 * pc532-mach.c: Likewise.
231 * pdp11.c: Likewise.
232 * pe-mips.c: Likewise.
233 * peXXigen.c: Likewise.
234 * peicode.h: Likewise.
235 * ppcboot.c: Likewise.
236 * ptrace-core.c: Likewise.
237 * reloc.c: Likewise.
238 * reloc16.c: Likewise.
239 * riscix.c: Likewise.
240 * rs6000-core.c: Likewise.
241 * sco5-core.c: Likewise.
242 * section.c: Likewise.
243 * som.c: Likewise.
244 * sparclinux.c: Likewise.
245 * sparclynx.c: Likewise.
246 * srec.c: Likewise.
247 * stabs.c: Likewise.
248 * sunos.c: Likewise.
249 * syms.c: Likewise.
250 * targets.c: Likewise.
251 * tekhex.c: Likewise.
252 * trad-core.c: Likewise.
253 * versados.c: Likewise.
254 * vms-gsd.c: Likewise.
255 * vms-hdr.c: Likewise.
256 * vms-misc.c: Likewise.
257 * vms-tir.c: Likewise.
258 * vms.c: Likewise.
259 * vms.h: Likewise.
260 * xcofflink.c: Likewise.
261 * bfd-in2.h: Regenerate.
262 * libbfd.h: Regenerate.
263 * libcoff.h: Regenerate.
264
265 * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
266 * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
267 (ufile_ptr): Define.
268 (bfd_tell): Return a ufile_ptr.
269 * libbfd.c (bfd_tell): Likewise.
270 (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
271 unnecessarily.
272 * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
273 * aoutf1.h: Likewise.
274 * som.c: Likewise.
275 * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
276 larger than unsigned long can represent.
277
278 * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
279 size overflows size_t.
280 (bfd_realloc): Likewise.
281 (bfd_zmalloc): Likewise.
282 * opncls.c (bfd_alloc): Likewise.
283 (bfd_zalloc): Likewise.
284 * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
285 (bfd_alloc, bfd_zalloc): Update.
286
287 * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
288 8 bits.
289 (bfd_get_signed_8): Likewise.
290 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
291 H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
292 H_GET_64, H_GET_32, H_GET_16, H_GET_8,
293 H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
294 * libaout.h: Likewise define and use here.
295 * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
296 * aout-arm.c: Likewise.
297 * aout-encap.c: Likewise.
298 * aout-ns32k.c: Likewise.
299 * aout-tic30.c: Likewise.
300 * aoutf1.h: Likewise.
301 * aoutx.h: Likewise.
302 * bout.c: Likewise.
303 * coff-alpha.c: Likewise.
304 * coff-h8300.c: Likewise.
305 * coff-h8500.c: Likewise.
306 * coff-i960.c: Likewise.
307 * coff-ia64.c: Likewise.
308 * coff-m88k.c: Likewise.
309 * coff-mips.c: Likewise.
310 * coff-ppc.c: Likewise.
311 * coff-rs6000.c: Likewise.
312 * coff-sh.c: Likewise.
313 * coff-sparc.c: Likewise.
314 * coff-stgo32.c: Likewise.
315 * coff-tic30.c: Likewise.
316 * coff-tic80.c: Likewise.
317 * coff-w65.c: Likewise.
318 * coff-z8k.c: Likewise.
319 * coff64-rs6000.c: Likewise.
320 * coffgen.c: Likewise.
321 * cofflink.c: Likewise.
322 * coffswap.h: Likewise.
323 * ecoff.c: Likewise.
324 * ecoffswap.h: Likewise.
325 * elf.c: Likewise.
326 * elf32-mips.c: Likewise.
327 * elf64-mips.c: Likewise.
328 * hp300hpux.c: Likewise.
329 * i386dynix.c: Likewise.
330 * i386lynx.c: Likewise.
331 * i386msdos.c: Likewise.
332 * i386os9k.c: Likewise.
333 * libpei.h: Likewise.
334 * nlm32-alpha.c: Likewise.
335 * nlm32-i386.c: Likewise.
336 * nlm32-ppc.c: Likewise.
337 * nlmcode.h: Likewise.
338 * nlmswap.h: Likewise.
339 * oasys.c: Likewise.
340 * pdp11.c: Likewise.
341 * pe-mips.c: Likewise.
342 * peXXigen.c: Likewise.
343 * peicode.h: Likewise.
344 * riscix.c: Likewise.
345 * sunos.c: Likewise.
346 * xcofflink.c: Likewise.
347 * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
348 Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
349 * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
350 equivalent H_PUT_* macro instead.
351 (GETWORD, GETHALF, GETBYTE): Similarly.
352 * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
353 (GETWORD, GETHALF, GETBYTE): Likewise.
354 * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
355
356 * bfd-in.h (struct orl): Change "pos" to a union.
357 * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
358 (bsd_write_armap): Here too.
359 (coff_write_armap): And here.
360 * coff-rs6000.c (xcoff_write_armap_old): And here.
361 (xcoff_write_one_armap_big): And here.
362 (xcoff_write_armap_big): And here.
363 * ecoff.c (_bfd_ecoff_write_armap): And here.
364 * elf64-mips.c (mips_elf64_write_armap): And here.
365
366 * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
367 * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
368 * elf32-h8300.c (elf32_h8_mach): Likewise.
369 * elf32-mips.c (elf_mips_mach): Likewise.
370 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
371
372 * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
373 calls.
374 (aix386_core_vec): Typo fix.
375
376 * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
377 etc. to avoid redefined macro warning.
378 (MY(put_reloc)): Use bfd_vma for "value" rather than long.
379 (MY(fix_pcrel_26)): Likewise.
380 * aout-ns32k.c (MY(put_reloc)): Likewise.
381 * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
382 * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
383 * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
384
385 * aout-encap.c: Include "file", not <file> for binutils headers.
386 (encap_object_p): Half baked attempt to fix compile errors in
387 code dealing with "magic".
388
389 * aout-ns32k.c: Include "file", not <file> for binutils headers.
390 (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
391 bfd_vma's rather than longs.
392 * cpu-ns32k.c (ns32k_sign_extend): Delete.
393 (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
394 (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
395 remove case 3.
396 (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
397 Use unsigned comparisons.
398 (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
399 (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
400 (_bfd_do_ns32k_reloc_contents): Likewise.
401 * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
402 (_bfd_ns32k_get_immediate): Likewise.
403 (_bfd_ns32k_put_displacement): Likewise.
404 (_bfd_ns32k_put_immediate): Likewise.
405 (bfd_reloc_status_type): Likewise.
406
407 * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
408 to avoid shadowing.
409 * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
410 * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
411 * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
412 avoid shadowing.
413 (record_toc): Use a bfd_signed_vma for our_toc_offset.
414 * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
415 * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
416 shadow warning.
417 (_bfd_elfcore_strndup): Likewise for "dup".
418 * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
419 "name" to avoid shadowing.
420 * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
421 definition of "off".
422 * elf32-i386.c (elf_i386_relocate_section): Likewise.
423 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
424 definition of "s".
425 (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
426 "secpp".
427 * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
428 to avoid shadowing.
429 * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
430 to avoid shadowing.
431 (elf_link_input_bfd): Likewise.
432 (elf_bfd_final_link): Remove duplicate innermost "off" var.
433 * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
434 * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
435 "input_section".
436 * som.c (som_prep_for_fixups): Rename inner "i" to "j".
437 * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
438 (sunos_write_dynamic_symbol): Remove unused vars.
439 * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
440 innermost "directory_name" and "file_name" vars.
441 * tekhex.c (first_phase): Rename local var "type" to "stype".
442 (tekhex_write_object_contents): Rename innermost "s" to "sym".
443 * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
444 doing comparison at caller.
445 (vms_esecflag_by_name): Likewise.
446 * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
447 * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
448 (xcoff_write_global_symbol): Rename "p" param to "inf".
449
450 * cisco-core.c: Add missing prototypes.
451 (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
452 (cisco_core_file_failing_signal): Likewise.
453 (cisco_core_file_matches_executable_p): Likewise.
454 * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
455 * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
456 * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
457 * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
458
459 * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
460 thumb_glue_size and arm_glue_size.
461 * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
462
463 * coff64-rs6000.c: Group prototypes together.
464
465 * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
466 (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
467
468 * cpu-arc.c: Add missing prototypes.
469 * cpu-h8500.c: Likewise.
470 * cpu-i960.c: Likewise.
471 * cpu-pj.c: Likewise.
472 * cpu-sh.c: Likewise.
473 * cpu-w65.c: Likewise.
474 * cpu-z8k.c: Likewise.
475 * elf32-fr30.c: Likewise.
476 * elf32-h8300.c: Likewise.
477 * elf32-i370.c: Likewise.
478 * hpux-core.c: Likewise.
479 * versados.c: Likewise.
480
481 * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
482 * cpu-h8500.c: Likewise.
483 * cpu-i960.c: Likewise.
484 * cpu-z8k.c: Likewise.
485
486 * cpu-ia64-opc.c: Correct comment.
487
488 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
489
490 * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
491 to unsigned.
492 (bfd_elf32_write_out_phdrs): Likewise.
493 (bfd_elf64_write_out_phdrs): Likewise.
494 (elf_linker_section_pointers): Change addend to bfd_vma.
495 (_bfd_elf_find_pointer_linker_section): Likewise.
496 (_bfd_elfcore_make_pseudosection): Change size param to size_t and
497 filepos to unsigned file_ptr.
498 (_bfd_elfcore_strndup): Change max param to size_t.
499 * elf.c (_bfd_elfcore_make_pseudosection): As above.
500 (_bfd_elfcore_strndup): Likewise.
501 (_bfd_elf_find_pointer_linker_section): Likewise.
502
503 * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
504 insn and sym_value to ints.
505
506 * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
507 bfd_size_type.
508 (elfcore_read_notes): Likewise.
509
510 * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
511 param from unsigned char to int.
512 (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
513 for info_to_howto call.
514 (add_dynamic_entry): Define macro.
515 (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
516
517 * elf32-cris.c (add_dynamic_entry): Define macro.
518 (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
519
520 * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
521 (elf32_h8_object_p): Likewise.
522 (elf32_h8_merge_private_bfd_data): Likewise.
523 (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
524
525 * elf32-hppa.c (add_dynamic_entry): Define macro.
526 (elf32_hppa_size_dynamic_sections): Use it.
527 * elf32-i370.c (add_dynamic_entry): Define macro.
528 (i370_elf_size_dynamic_sections): Use it.
529 (i370_noop): Make static.
530 * elf32-i386.c (add_dynamic_entry): Define macro.
531 (elf_i386_size_dynamic_sections): Use it.
532 * elf32-m68k.c (add_dynamic_entry): Define macro.
533 (elf_m68k_size_dynamic_sections): Use it.
534 * elf32-ppc.c (add_dynamic_entry): Define macro.
535 (ppc_elf_size_dynamic_sections): Use it.
536 * elf32-s390.c (add_dynamic_entry): Define macro.
537 (elf_s390_size_dynamic_sections): Use it.
538 * elf64-alpha.c (add_dynamic_entry): Define macro.
539 (elf64_alpha_size_dynamic_sections): Use it.
540 * elf64-hppa.c (add_dynamic_entry): Define macro.
541 (elf64_hppa_size_dynamic_sections): Use it.
542 * elf64-ppc.c (add_dynamic_entry): Define macro.
543 (ppc64_elf_size_dynamic_sections): Use it.
544 * elf64-s390.c (add_dynamic_entry): Define macro.
545 (elf_s390_size_dynamic_sections): Use it.
546 * elf64-sparc.c (add_dynamic_entry): Define macro.
547 (sparc64_elf_size_dynamic_sections): Use it.
548 * elf64-x86-64.c (add_dynamic_entry): Define macro.
549 (elf64_x86_64_size_dynamic_sections): Use it.
550 * elfxx-ia64.c (add_dynamic_entry): Define macro.
551 (elfNN_ia64_size_dynamic_sections): Use it.
552
553 * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
554 (v850_elf_perform_relocation): Make "r_type" param unsigned.
555
556 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
557 false if the first malloc fails rather than going via error_return.
558
559 * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
560 "index" param.
561 (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
562
563 * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
564
565 * elfxx-ia64.c (global_sym_index): Return a long.
566
567 * ieee.c (get_symbol): Use int rather than char param.
568 (ieee_slurp_sections): Move "section" var to inner blocks.
569 (copy_expression): Don't init "value" to zero or worry about
570 clearing to zero after using.
571 (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
572 shadowing.
573
574 * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
575 unsigned int.
576
577 * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
578 (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
579
580 * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
581
582 * pc532-mach.c (MYNSX): Delete.
583 (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
584 (write_object_contents): Correct prototype.
585
586 * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
587 than unsigned short.
588
589 * section.c (bfd_set_section_contents): Remove redundant
590 "offset < 0" test. Check that "count" doesn't overflow size_t.
591 (bfd_get_section_contents): Likewise.
592
593 * som.c (som_fixup_formats): Add missing braces.
594 (som_reloc_addend): Pass a bfd_vma for "addend".
595
596 * srec.c (srec_write_record): Pass "type" as an unsigned int.
597 (srec_write_symbols): Remove an unnecessary var.
598
599 * targets.c (_bfd_target_vector): Sort entries. Sort externs
600 to match.
601 * configure.in: Sort to match. Bump version number.
602 * configure: Regenerate.
603
604 * tekhex.c (move_section_contents): Assert offset == 0.
605
606 * versados.c (new_symbol_string): Constify arg.
607 (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
608 (versados_get_symbol_info): Make static.
609 (versados_print_symbol): Likewise.
610 (versados_get_reloc_upper_bound): Likewise.
611 (versados_canonicalize_reloc): Likewise.
612
417412a2
NC
6132001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
614
615 * elflink.h (elf_link_input_bfd): Fix typo in error message.
616
bb731fb6
L
6172001-09-17 H.J. Lu <hjl@gnu.org>
618
619 * dwarf1.c (parse_die): Take a new arg for the end of the
620 section. Return false if die is beyond the section.
621 (parse_functions_in_unit): Pass the end of the section to
622 parse_die ().
623 (_bfd_dwarf1_find_nearest_line): Likewise.
624
841989d6
NC
6252001-09-14 Michael Rauch <mrauch@netbsd.org>
626
627 * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
628 just like R_SPARC_32.
629
056a1d49
NC
6302001-09-14 Kevin Lo <kevlo@openbsd.org>
631
632 * configure.bfd: Add arm-openbsd target.
633
4008bd9b
TS
6342001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
635
636 * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
637 Add support for mips64.
638
c11cc227
AO
6392001-09-13 Alexandre Oliva <aoliva@redhat.com>
640
641 * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
642
aa4f99bb
AO
6432001-09-12 Alexandre Oliva <aoliva@redhat.com>
644
645 * elf.c (prep_headers): Get the machine code from the elf
646 backend data.
647 * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
648 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
649 * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
650 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
651 * elf-arc.c (arc_elf_final_write_processing): Don't override
652 e_machine, it's now properly set in prep_headers.
653 * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
654 EM_AVR_OLD.
655 (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
656 * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
657 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
658 * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
659 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
660 * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
661 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
662 * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
663 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
664 * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
665 * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
666 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
667
204692d7
RH
6682001-09-11 Richard Henderson <rth@redhat.com>
669
670 * elf64-alpha.c (elf64_alpha_section_flags): New.
671 (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
672
f94952df
RH
6732001-09-11 Richard Henderson <rth@redhat.com>
674
675 * elf64-alpha.c (elf64_alpha_relocate_section): Do not
676 apply HINT relocations against dynamic symbols.
677
146f1a87
L
6782001-09-11 H.J. Lu <hjl@gnu.org>
679
f94952df 680 * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
146f1a87 681
1cd6895c
RH
6822001-09-09 Richard Henderson <rth@redhat.com>
683
96e2734b
RH
684 * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
685
1cd6895c
RH
686 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
687 following a call to a near function.
688
f16fbd61
RH
6892001-09-08 Richard Henderson <rth@redhat.com>
690
691 * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
692 relocation errors. Fail gp-relative relocations against
693 dynamic symbols.
694
56882138
AM
6952001-09-08 Alan Modra <amodra@bigpond.net.au>
696
697 * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
698 as well as DEF_DYNAMIC in test for avoided copy relocs.
699 (allocate_plt_and_got_and_discard_relocs): Likewise.
700 * elf32-hppa.c (elf_i386_relocate_section): Likewise.
701 (allocate_plt_and_got_and_discard_relocs): Likewise.
702
cb56d3d3
TS
7032001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
704
705 * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
706 of R_MIPS_PC16.
56882138
AM
707
7082001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
709
710 * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
711 definitions.
712 (mips_elf64_howto_table_rel): Likewise.
713
7142001-09-05 Tom Rix <trix@redhat.com>
715
716 * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
717 and syscall symbols.
718 (write_global_symbol) : Same.
719 (bfd_xcoff_export_symbol): Remove unused syscall param.
720 * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
721 bfd_xcoff_import_symbol.
722 * bfd-in.h: Same.
723 * bfd-in2.h : Regenerate.
724
7252001-09-04 Richard Henderson <rth@redhat.com>
726
727 * elf64-alpha.c (SKIP_HOWTO): New.
728 (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
729 Fix sizes of 16-bit mem format relocs.
730 (elf64_alpha_reloc_map): Update to match.
731 (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
732 (elf64_alpha_relax_without_lituse): Likewise.
733 (elf64_alpha_check_relocs): Handle GPREL16.
734 (elf64_alpha_relocate_section): Likewise.
735 * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
736 (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
737 * bfd-in2.h, libbfd.h: Rebuild.
738
7392001-09-04 Jeff Law <law@redhat.com>
740
741 * elf32-h8300.c (elf32_h8_relax_section): New function.
742 (elf32_h8_relax_delete_bytes): Likewise.
743 (elf32_h8_symbol_address_p): Likewise.
744 (elf32_h8_get_relocated_section_contents): Likewise.
745 (bfd_elf32_bfd_relax_section): Define.
746 (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
747
748 * elf32-h8300.c (special): New function.
749 (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
750 all relocations.
751 (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
752 relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
753 Fix minor problems with 8bit and 16bit PC relative relocations.
754
7552001-09-01 Andreas Jaeger <aj@suse.de>
756
757 * vms-tir.c: Add missing prototypes.
758 * vms-hdr.c: Likewise.
759 * vms-gsd.c: Likewise.
760 * vms-misc.c: Likewise.
761
7622001-08-31 H.J. Lu <hjl@gnu.org>
763
764 * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
765 with bad relocation.
766
7672001-08-31 Eric Christopher <echristo@redhat.com>
768 Jason Eckhardt <jle@redhat.com>
769
770 * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
771 mips32_4k and mips64.
772 * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
773 bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
774 * bfd/cpu-mips.c: Ditto.
775 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
776 * bfd/bfd-in2.h: Regenerate.
777
7782001-08-31 Jakub Jelinek <jakub@redhat.com>
779
780 * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
781 value into R_ALPHA_RELATIVE's addend.
782 (elf64_alpha_finish_dynamic_symbol): Likewise.
783
7842001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
785
786 * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
787 recomputed addend during relocatable link if not USE_REL.
788
789 * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
790 error.
791
7922001-08-30 H.J. Lu <hjl@gnu.org>
793
794 * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
795 2 changes.
796 (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
797 relocations for weak definitions.
798
7992001-08-30 H.J. Lu <hjl@gnu.org>
800
801 * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
802 (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
803 * Makefile.in: Rebuild.
804
8052001-08-30 H.J. Lu <hjl@gnu.org>
806
807 * elf32-mips.c (mips_elf_calculate_relocation): Don't create
808 dynamic relocation for undefined weak symbols when creating
809 executables. Check h->root.root.type, instead of h->root.type.
810
8112001-08-29 Joel Sherrill <joel@OARcorp.com>
812
813 * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
814 default from coff to elf.
815
8162001-08-29 Jeff Law <law@redhat.com>
817
818 * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
819 relocations.
820 (h8_reloc_map): Similarly.
821 (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
822 Add support for PC relative relocations.
823
824 * elf32-h8300.c: Put all prototypes together.
825 (elf32_h8_info_to_howto): Parameter elf_reloc is used.
826 (elf32_h8_final_link_relocate): New function for linker.
827 (elf32_h8_relocate_section): Similarly.
828 (elf_backend_relocate_section): Define.
829
830 * cpu-h8300.c (h8300_scan, compatible): Prototype.
831 (h8300_scan): Handle architecture:machine encodings typically
832 found in linker scripts.
833 * elf.c (prep_headers): Do not try to do H8 machine recognition
834 here.
835 * elf32-h8300.c: Add some missing prototypes.
836 (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
837 (elf32_h8_object_p): Similarly.
838
8392001-08-29 Tom Rix <trix@redhat.com>
840
841 * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
842 does not follow a XTY_SD.
843
8442001-08-29 Alan Modra <amodra@bigpond.net.au>
845
846 * targmatch.sed: Delete case statements.
847 * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
848 aix4.3 and above.
849
850Wed Aug 29 02:27:36 2001 J"orn Rennecke <amylaar@redhat.com>
851
852 * Makefile.am (elf32-h8300.lo): New target.
853 * config.bfd (h8300*-*-elf): New case.
854 * configure.in (bfd_elf32_h8300_vec): New case.
855 * elf.c (prep_headers): Add case for bfd_arch_h8300.
856 * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
857 (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
858 (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
859 * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
860 * elf32-h8300.c: New file.
861 * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
862
8632001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
864
865 * sparclynx.c: Add missing prototypes.
866 * coff-mcore.c: Add missing prototypes.
867 * elf32-pj.c: Add missing prototypes.
868 * nlm32-sparc.c: Add missing prototypes.
869 * oasys.c: Add missing prototypes.
870 * pdp11.c: Add missing prototypes.
871 * pe-mips.c: Add missing prototypes.
872 * riscix.c: Add missing prototypes.
873
8742001-08-27 Daniel Jacobowitz <drow@mvista.com>
875
876 * elf32-i386.c: Add missing prototypes.
877 * elf32-ppc.c: Likewise.
878 * elf32-sh-lin.c: Likewise.
879 * elfarm-nabi.c: Likewise.
880
8812001-08-27 Daniel Jacobowitz <drow@mvista.com>
882
883 * elf32-i386.c (elf_i386_grok_prstatus): New function.
884 (elf_i386_grok_psinfo): New function.
885 (elf_backend_grok_prstatus): Define.
886 (elf_backend_grok_psinfo): Likewise.
887 * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
888 (ppc_elf_grok_psinfo): New function.
889 (elf_backend_grok_prstatus): Define.
890 (elf_backend_grok_psinfo): Likewise.
891 * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
892 (elf32_shlin_grok_psinfo): New function.
893 (elf_backend_grok_prstatus): Define.
894 (elf_backend_grok_psinfo): Likewise.
895 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
896 (elf32_arm_nabi_grok_psinfo): New function.
897 (elf_backend_grok_prstatus): Define.
898 (elf_backend_grok_psinfo): Likewise.
899
9002001-08-27 H.J. Lu <hjl@gnu.org>
901
902 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
903 sanity check.
904 (mips_elf_calculate_relocation): Create dynamic relocation for
905 symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
906 bit is not set.
907
9082001-08-27 H.J. Lu <hjl@gnu.org>
909
910 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
911 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
912 (_bfd_elf32_mips_grok_prstatus): Likewise.
913 (_bfd_elf32_mips_grok_psinfo): Likewise.
914 (_bfd_mips_elf_hide_symbol): Make it static and cast to
915 `struct mips_elf_link_hash_entry *'.
916 (_bfd_mips_elf_copy_indirect_symbol): Make it static.
917
9182001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
919
920 * mipsbsd.c: Add missing prototypes.
921 * hp300hpux.c: Add missing prototypes.
922 * i386aout.c: Add missing prototypes.
923 * i386lynx.c: Add missing prototypes.
924 * i386mach3.c: Add missing prototypes.
925 * i386msdos.c: Add missing prototypes.
926 * i386os9k.c: Add missing prototypes.
927
9282001-08-27 Linus Nordberg <linus@swox.se>
929 Torbjorn Granlund <tege@swox.com>
930 Staffan Ulfberg <staffanu@swox.se>
931 Alan Modra <amodra@bigpond.net.au>
932
933 * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
934 targ64_selvecs for 32 bit powerpc targets.
935 * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
936 (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
937 Run "make dep-am".
938 * Makefile.in: Regenerate.
939 * configure.in: Add elf64_powerpc vecs.
940 * configure: Regenerate.
941 * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
942 * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
943 * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
944 * elf64-ppc.c: New file.
945 * reloc.c: Add powerpc64 relocs.
946 * libbfd.h: Regenerate.
947 * bfd-in2.h: Regenerate.
948
9492001-08-27 Andreas Schwab <schwab@suse.de>
950
951 * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
952 reloc is against read-only section.
953 (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
954 looking up section names for DT_TEXTREL.
955 (elf32_m68k_reloc_type_class): New function.
956 (elf_backend_reloc_type_class): Define.
957
9582001-08-27 Andreas Jaeger <aj@suse.de>
959
960 * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
961 reloc is against read-only section.
962 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
963 looking up section names for DT_TEXTREL.
964 (elf_s390_reloc_type_class): New.
965 (elf_backend_reloc_type_class): Define.
966
967 * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
968 reloc is against read-only section.
969 (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
970 looking up section names for DT_TEXTREL.
971 (elf_s390_reloc_type_class): New.
972 (elf_backend_reloc_type_class): Define.
973
974 * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
975 is against read-only section.
976 (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
977 looking up section names for DT_TEXTREL.
978 (ppc_elf_reloc_type_class): New.
979 (elf_backend_reloc_type_class): Define.
980
9812001-08-26 Andreas Jaeger <aj@suse.de>
982
983 * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
984 reloc is against read-only section.
985 (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
986 looking up section names for DT_TEXTREL.
987 (elf_cris_reloc_type_class): New.
988 (elf_backend_reloc_type_class): Define.
989
990 * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
991 against read-only section.
992 (elf_backend_reloc_type_class): Define.
993 (sh_elf_reloc_type_class): New.
994 (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
995 looking up section names for DT_TEXTREL.
996
997 * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
998 reloc is against read-only section.
999 (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
1000 looking up section names for DT_TEXTREL.
1001 (elf32_arm_reloc_type_class): New.
1002 (elf_backend_reloc_type_class): Define.
1003
10042001-08-25 Andreas Jaeger <aj@suse.de>
1005
1006 * oasys.c: Add missing prototypes.
1007
1008 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
1009 attribute for parameter.
1010 * elf.c (_bfd_elf_reloc_type_class): Likewise.
1011
1012 * versados.c (get_4): Make static.
1013 (get_10): Make static.
1014 Add missing prototypes.
1015 (process_esd): Fix call to versados_new_symbol.
1016
10172001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
1018
1019 * coff-a29k.c: Add missing prototypes.
1020 * coff-apollo.c: Add missing prototypes.
1021 * coff-arm.c: Add missing prototypes.
1022 * coff-i860.c: Add missing prototypes.
1023 * coff-rs6000.c: Add missing prototypes.
1024 * coff-tic80.c: Add missing prototypes.
1025 * elf-m10200.c: Add missing prototypes.
1026 * elf-m10300.c: Add missing prototypes.
1027 * elf32-arm.h: Add missing prototypes.
1028 * elf32-d10v.c: Add missing prototypes.
1029 * elf32-m32r.c: Add missing prototypes.
1030 * elf32-mcore.c: Add missing prototypes.
1031 * elf32-openrisc.c: Add missing prototypes.
1032 * elf32-sh.c: Add missing prototypes.
1033 * elf32-sparc.c: Add missing prototypes.
1034 * elf32-v850.c: Add missing prototypes.
1035 * elfarm-nabi.c: Add missing prototypes.
1036 * elfarm-oabi.c: Add missing prototypes.
1037
10382001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1039
1040 * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
1041 E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
1042
10432001-08-24 H.J. Lu <hjl@gnu.org>
1044
1045 * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
1046 hash structure.
1047
10482001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
1049
1050 * elf-bfd.h (elf_hash_table): Revert definition.
1051 (is_elf_hash_table): New macro.
1052 * elflink.h (elf_link_add_object_symbols): Test
1053 is_elf_hash_table before accessing ELF only fields in hash
1054 structure.
1055 (elf_link_create_dynamic_sections): Fail if not using an ELF
1056 hash structure.
1057 (elf_add_dynamic_entry): Fail if not using an ELF hash
1058 structure.
1059 (elf_link_record_local_dynamic_symbol): Fail if not using an
1060 ELF hash structure.
1061 (size_dynamic_sections): Fail if not using an ELF hash
1062 structure.
1063 (elf_adjust_dynamic_symbol): Fail if not using an ELF
1064 hash structure.
1065 (elf_bfd_final_link): Fail if not using an ELF hash
1066 structure.
1067
10682001-08-24 H.J. Lu <hjl@gnu.org>
1069
1070 * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
1071 table is not an ELF linker hash table.
1072
1073 * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
1074 table type to bfd_link_elf_hash_table.
1075
1076 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
1077 the last change.
1078
1079 * linker.c (_bfd_link_hash_table_init): Set the linker hash
1080 table type to bfd_link_generic_hash_table.
1081
10822001-08-24 Alexandre Oliva <aoliva@redhat.com>
1083
1084 * bfd.c (bfd_alt_mach_code): New function.
1085 * bfd-in2.h: Rebuilt.
1086
10872001-08-24 Alexandre Oliva <aoliva@redhat.com>
1088
1089 * elf-m10300.c (mn10300_elf_relocate_section): Test the right
1090 `type' field in the hash entry when deciding whether to follow a
1091 link.
1092
10932001-08-24 Jakub Jelinek <jakub@redhat.com>
1094
1095 * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
1096 last.
1097 (elf_link_sort_relocs): Adjust accordingly.
1098
1099 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
1100 (elf64_alpha_check_relocs): Set it if section this reloc is against
1101 is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
1102 read-only section.
1103 (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
1104 is is against read-only section.
1105 (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
1106 check section names.
1107 (elf64_alpha_reloc_type_class): New.
1108 (elf_backend_reloc_type_class): Define.
1109
11102001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1111
1112 * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
1113 by bfd_malloc().
1114
11152001-08-23 Andreas Jaeger <aj@suse.de>
1116
1117 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
1118 the reloc is against read-only section.
1119 (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
1120 of looking up section names for DT_TEXTREL.
1121 (elf64_x86_64_reloc_type_class): New.
1122 (elf_backend_reloc_type_class): Define.
1123
11242001-08-23 H.J. Lu <hjl@gnu.org>
1125
1126 * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
1127 * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
1128
1129 * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
1130 bfd_print_symbol_vandf.
1131 * coffgen.c (coff_print_symbol): Likewise.
1132 * elf.c (bfd_elf_print_symbol): Likewise.
1133 * ieee.c (ieee_print_symbol): Likewise.
1134 * nlmcode.h (nlm_print_symbol): Likewise.
1135 * oasys.c (oasys_print_symbol): Likewise.
1136 * pdp11.c (NAME(aout,print_symbol)): Likewise.
1137 * som.c (som_print_symbol): Likewise.
1138 * srec.c (srec_print_symbol): Likewise.
1139 * tekhex.c (tekhex_print_symbol): Likewise.
1140 * versados.c (versados_print_symbol): Likewise.
1141 * vms.c (vms_print_symbol): Likewise.
1142
1143 * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
1144 with bfd_fprintf_vma.
1145 (bfd_elf_print_symbol): Likewise.
1146 * syms.c (bfd_print_symbol_vandf): Likewise.
1147
11482001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1149
1150 * aoutf1.h (sunos_write_object_contents): Silence compile time
1151 warning.
1152 * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
1153
1154 * bout.c: Add missing function prototypes. Fix formatting.
1155 * coff-z8k.c: Add missing function prototypes. Fix formatting.
1156 * coff-w65.c: Add missing function prototypes. Fix formatting.
1157 * coff-h8500.c: Add missing function prototypes. Fix formatting.
1158 * coff-h8300.c: Add missing function prototypes. Fix formatting.
1159 * coff-tic54x.c: Add missing function prototypes. Fix formatting.
1160 * coff-tic30.c: Add missing function prototypes. Fix formatting.
1161 * coff-m68k.c: Add missing function prototypes. Fix formatting.
1162 * coff-rs6000.c: Add missing function prototypes. Fix formatting.
1163 * coff-sh.c: Add missing function prototypes. Fix formatting.
1164
11652001-08-23 Jakub Jelinek <jakub@redhat.com>
1166
1167 * elf-bfd.h (enum elf_reloc_type_class): New.
1168 (struct elf_backend_data): Add elf_backend_reloc_type_class.
1169 (_bfd_elf_reloc_type_class): New.
1170 * elfxx-target.h (elf_backend_reloc_type_class): Define.
1171 (elfNN_bed): Add elf_backend_reloc_type_class.
1172 * elf.c (_bfd_elf_reloc_type_class): New.
1173 * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
1174 is against read-only section.
1175 (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
1176 looking up section names for DT_TEXTREL.
1177 (elf_i386_reloc_type_class): New.
1178 (elf_backend_reloc_type_class): Define.
1179 * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
1180 reloc is against read-only section.
1181 (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
1182 looking up section names for DT_TEXTREL.
1183 (elf32_sparc_reloc_type_class): New.
1184 (elf_backend_reloc_type_class): Define.
1185 * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
1186 reloc is against read-only section.
1187 (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
1188 looking up section names for DT_TEXTREL.
1189 (sparc64_elf_reloc_type_class): New.
1190 (elf_backend_reloc_type_class): Define.
1191 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
1192 (elfNN_ia64_hash_table_create): Clear ia64_info.
1193 (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
1194 section.
1195 (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
1196 instead of looking up section names for DT_TEXTREL.
1197 (elfNN_ia64_reloc_type_class): New.
1198 (elf_backend_reloc_type_class): Define.
1199 * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
1200 (struct elf_link_sort_rela): New.
1201 (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
1202 (elf_bfd_final_link): Call elf_link_sort_relocs.
1203 Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
1204 necessary.
1205
12062001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
1207
1208 * configure.in (x86-bsdi): No corefile support.
1209 * configure: Regenerate.
1210
12112001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
1212
1213 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
1214 comma.
1215
12162001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
1217
1218 * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
1219 the alignment of dwarf2 linkonce sections to 0.
1220 * coff-sto32.c: Likewise.
1221
12222001-08-20 Andreas Jaeger <aj@suse.de>
1223
1224 * coff-sparc.c: Add missing prototypes.
1225 * elf32-s390.c: Likewise.
1226 * elf32-i960.c: Likewise.
1227 * aout-target.h: Likewise.
1228
12292001-08-20 H.J. Lu <hjl@gnu.org>
1230
1231 * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
1232 (elf_num_section_syms): New for num_section_syms.
1233
1234 * elf.c (elf_map_symbols): Set num_section_syms.
1235 (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
1236 the section symbol index.
1237
12382001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
1239
1240 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
1241 select the generic has table creator. All elf backends need elf
1242 specific fields in the hash table.
1243
12442001-08-20 Alan Modra <amodra@bigpond.net.au>
1245
1246 * archive.c (offsetof): Remove define.
1247 * elf.c: Likewise.
1248 * oasys.c: Likewise
1249 * sysdep.h (offsetof): Define.
1250
12512001-08-17 Alan Modra <amodra@bigpond.net.au>
1252
1253 * bfd.c (bfd_get_gp_size): Return an unsigned int.
1254 (bfd_set_gp_size): Make param unsigned.
1255 * bfd-in2.h: Regenerate.
1256 * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
1257 than calling bfd_get_gp_size.
1258 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
1259 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
1260
12612001-08-17 Alan Modra <amodra@bigpond.net.au>
1262
1263 * linker.c (default_fill_link_order): Handle four byte fill value.
1264
12652001-08-17 Alan Modra <amodra@bigpond.net.au>
1266
1267 * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
1268 prototype.
1269 * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
1270
1271 * elf64-mips.c (UNUSED_RELOC): Define.
1272 (mips_elf64_howto_table_rel): Use it.
1273 (mips_elf64_howto_table_rela): Here too.
1274 (mips_elf64_write_relocs): Fix signed/unsigned warning.
1275
1276 * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
1277 silence warning.
1278 * coffgen.c (coff_print_symbol): Fix warnings.
1279 (coff_find_nearest_line): Likewise.
1280 * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
1281 * coff-alpha.c (alpha_convert_external_reloc): Likewise.
1282 * format.c (bfd_check_format_matches): Likewise.
1283 (bfd_set_format): Likewise.
1284 * coff-ia64.c: Add missing prototypes.
1285 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
1286 signed to silence warnings.
1287 (elf64_alpha_relocate_section): Likewise.
1288 (elf64_alpha_find_reloc_at_ofs): Fix warnings.
1289 (elf64_alpha_add_symbol_hook): Likewise.
1290 (elf64_alpha_final_link): Likewise.
1291 (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
1292 (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
1293 (elf64_alpha_size_got_sections): Likewise.
1294 * elfxx-ia64.c: Add missing prototypes.
1295 (elfNN_ia64_relocate_section): Fix warning.
1296 (elfNN_ia64_unwind_entry_compare): Make params const.
1297
12982001-08-17 Alan Modra <amodra@bigpond.net.au>
1299
1300 * config.bfd (targ64_selvecs): New.
1301 <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
1302
1303 * bfd-in.h (BFD_VERSION): Remove wrong comment.
1304 (BFD_DEFAULT_TARGET_SIZE): New.
1305 (BFD_ARCH_SIZE): Comment.
1306 * configure.in (target_size): New. Set instead of target64 in
1307 selvecs case statement. Set target64 from it.
1308 (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
1309 * bfd-in2.h: Regenerate.
1310 * configure: Regenerate.
1311
13122001-08-17 Alan Modra <amodra@bigpond.net.au>
1313
1314 * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
1315 (bfd_errmsgs): Add corresponding message.
1316 * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
1317 finding an archive that contains different format object files.
1318 Return bfd_error_wrong_object_format for this case.
1319 * format.c: Formatting fixes. s/CONST/const/.
1320 (bfd_check_format_matches): Accept archives that give
1321 bfd_error_wrong_object_format if no full match is found. Tidy
1322 code handling matching_vector. Don't return a pointer to freed
1323 memory in `matching'. Handle ambiguous matches as for partial
1324 archive matches.
1325 * bfd-in2.h: Regenerate.
1326
13272001-08-15 Alan Modra <amodra@bigpond.net.au>
1328
1329 * libieee.h (common_header_type): Add last_byte field.
1330
1331 * ieee.c: Add missing prototypes. Some format fixes.
1332 (struct output_buffer_struct): Move for availability to prototypes.
1333 (ieee_part_after): New function.
1334 (ieee_slurp_debug): Use it here.
1335 (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
1336 ieee_part_after to set last_byte to one past end of current part.
1337 Update callers.
1338 (ieee_pos): Pass in ieee_data_struct rather than bfd.
1339 Update callers.
1340 (parse_expression): Don't go beyond the end of the current part.
1341 (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
1342 (ieee_get_symtab_upper_bound, ieee_get_symtab,
1343 ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
1344 ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
1345 ieee_set_section_contents, ieee_write_object_contents,
1346 ieee_make_empty_symbol): Make static.
1347 (ieee_archive_p): Correct comments regarding bfd_read.
1348 (ieee_object_p): Similarly.
1349 (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
1350 output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
1351 input_bfd, output_bfd, output_buffer.
1352 (do_as_repeat): Write out ieee_set_current_pc_enum value as for
1353 do_with_relocs, ie. as a symbol for relocatable files.
1354 (ieee_vec): Add comments showing functions referenced by macros.
1355
13562001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
1357
1358 * aout-tic30.c: Add missing prototypes. Fix formatting.
1359 * aout-ns32k.c: Add missing prototypes. Fix formatting.
1360 * peXXigen.c: Add missining prototypes. Fix formatting.
1361 * aout-adobe.c: Add missining prototypes. Fix formatting.
1362
13632001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
1364
1365 * elf32-v850.c: Add missing function prototypes.
1366 Fix some formatting.
1367
1368 * cpu-v850.c: Add missing function prototype.
1369 Fix some formatting.
1370
13712001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
1372
1373 * elf-bfd.h (struct elf_backend_data): Add new fields
1374 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
1375 (bfd_elf_sprintf_vma): Rename function prototype to
1376 '_bfd_elf_sprintf_vma'.
1377 (bfd_elf_fprintf_vma): Rename function prototype to
1378 '_bfd_elf_fprintf_vma'.
1379 * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
1380 directly, instead indirect via the elf_backend_data structure.
1381 (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
1382 instead indirect via the elf_backend_data structure.
1383 * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
1384 (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
1385 * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
1386 already defined.
1387 (elf_backend_fprintf_vma): Initialise if not already defined.
1388 (struct elf_backend_data): Initialise the
1389 elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
1390
13912001-08-10 Andreas Jaeger <aj@suse.de>
1392
1393 * elf64-sparc.c: Add missing prototypes.
1394 * elf32-cris.c: Likewise.
1395 * elf32-i370.c: Likewise.
1396 * elf64-hppa.c: Likewise.
1397 * elf64-s390.c: Likewise.
1398
13992001-08-10 Andreas Jaeger <aj@suse.de>
1400
1401 * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
1402 Add prototypes where needed.
1403
14042001-08-10 H.J. Lu <hjl@gnu.org>
1405
1406 * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
1407 (bfd_fprintf_vma): Likewise.
1408
14092001-08-10 H.J. Lu <hjl@gnu.org>
1410
1411 * bfd.c (bfd_sprintf_vma): Don't return void.
1412 (bfd_fprintf_vma): Likewise.
1413
14142001-08-10 Andreas Jaeger <aj@suse.de>
1415
1416 * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
1417 to build warnings.
1418 * configure: Regenerate.
1419
14202001-08-10 Alan Modra <amodra@bigpond.net.au>
1421
1422 * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
1423 warning if not BFD64. Add braces so emacs auto format works.
1424 (bfd_elf_fprintf_vma): Likewise.
1425
1426 * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
1427 of _xcoff_swap_ld*.
1428 * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
1429 param to agree with libxcoff.h.
1430 (xcoff_swap_ldhdr_out): Likewise.
1431 (xcoff_swap_ldsym_in): Likewise.
1432 (xcoff_swap_ldsym_out): Likewise.
1433 (xcoff_swap_ldrel_in): Likewise.
1434 (xcoff_swap_ldrel_out): Likewise.
1435 (xcoff_create_csect_from_smclas): Likewise.
1436 * coff64-rs6000.c: Add missing prototypes.
1437 (xcoff64_swap_ldhdr_in): Modify type of external param to agree
1438 with libxcoff.h.
1439 (xcoff64_swap_ldhdr_out): Likewise.
1440 (xcoff64_swap_ldsym_in): Likewise.
1441 (xcoff64_swap_ldsym_out): Likewise.
1442 (xcoff64_swap_ldrel_in): Likewise.
1443 (xcoff64_swap_ldrel_out): Likewise.
1444 (xcoff64_ppc_relocate_section): Make static.
1445 (xcoff64_slurp_armap): Likewise.
1446 (xcoff64_archive_p): Likewise.
1447 (xcoff64_openr_next_archived_file): Likewise.
1448 (xcoff64_sizeof_headers): Likewise.
1449 (xcoff64_is_lineno_count_overflow): Likewise.
1450 (xcoff64_is_reloc_count_overflow): Likewise.
1451 (xcoff64_loader_symbol_offset): Likewise.
1452 (xcoff64_loader_reloc_offset): Likewise.
1453 * elf64-gen.c: Add missing prototypes.
1454
14552001-08-09 H.J. Lu <hjl@gnu.org>
1456
1457 * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
1458 (bfd_elf_fprintf_vma): Likewise.
1459
14602001-08-09 H.J. Lu <hjl@gnu.org>
1461
1462 * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
1463 to ...
1464 * elf-bfd.h: Here.
1465 * bfd-in2.h: Regenerated.
1466
14672001-08-09 H.J. Lu <hjl@gnu.org>
1468
1469 * bfd-in.h (bfd_sprintf_vma): New prototype.
1470 (bfd_fprintf_vma): Likewise.
1471 (bfd_elf_sprintf_vma): Likewise.
1472 (bfd_elf_fprintf_vma): Likewise.
1473 (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
1474 * bfd-in2.h: Regenerated.
1475
1476 * bfd.c (bfd_sprintf_vma): New. Defined.
1477 (bfd_fprintf_vma): Likewise.
1478
1479 * elf.c (bfd_elf_sprintf_vma): New. Defined.
1480 (bfd_elf_fprintf_vma): Likewise.
1481
14822001-08-09 Alan Modra <amodra@bigpond.net.au>
1483
1484 * coff-rs6000.c: Add missing prototypes.
1485 (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
1486 xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
1487 xcoff_loader_reloc_offset): Make static.
1488 * dwarf1.c: Add missing prototypes.
1489 * dwarf2.c: Add missing prototypes.
1490 (struct abbrev_info): Move definition.
1491 (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
1492 * elf.c: Add missing prototypes.
1493 * elf32-gen.c: Likewise.
1494 * elf32-i386.c: Likewise.
1495 * elf32-ppc.c: Likewise.
1496 (ppc_elf_sort_rela): Use PTR instead of "void *".
1497 * elflink.h: Add missing prototypes. Formatting fixes.
1498 * merge.c: Add missing prototypes.
1499 (last4_eq): Use PTR instead of "void *".
1500 (last_eq): Likewise.
1501 * syms.c: Add missing prototypes.
1502
15032001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
1504
1505 * bfd.c: Fix formatting.
1506 * bfd-in2.h: Regenerate.
1507
15082001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
1509
1510 * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
1511 true (this target uses REL relocations) and 'pcrel_offset' to
1512 false (the PC is implied, not stored in the offset).
1513
15142001-08-08 Alan Modra <amodra@bigpond.net.au>
1515
1516 1999-10-19 Linus Nordberg <linus@swox.se>
1517 * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
1518 * elfxx-target.h (elf_backend_want_got_sym): Define.
1519 (elfNN_bed): Add elf_backend_want_got_sym.
1520 * elflink.c (_bfd_elf_create_got_section): Define
1521 _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
1522
15232001-08-08 Alexandre Oliva <aoliva@redhat.com>
1524
1525 * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
1526 (find_rela_addend): New function.
1527 (parse_comp_unit): Call it to find the abbrev offset addend.
1528 (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
1529 members of dwarf2_debug as debugging information is read.
1530
15312001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
1532
1533 * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
1534 targets as well as sh-pe.
1535
15362001-08-03 Ben Harris <bjh21@netbsd.org>
1537
1538 * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
1539 reloc from start of section when computing value for R_ARM_REL32
1540 reloc.
1541
15422001-08-03 Alan Modra <amodra@bigpond.net.au>
1543
1544 From H.J. Lu <hjl@gnu.org>
1545 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
1546 keep relocs for undefined syms if there are no dynamic sections in
1547 executable.
1548 * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
1549
15502001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
1551
1552 * cofflink.c (coff_link_check_ar_symbols): also search for
1553 __imp__symbol as well as _symbol.
1554 * linker.c (_bfd_generic_link_add_archive_symbols): also
1555 search for __imp__symbol as well as _symbol.
1556
15572001-08-01 Adam Nemet <anemet@lnxw.com>
1558
1559 * elf.c (elf_sort_sections): Return zero only as the last step.
1560
15612001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
1562
1563 * config.bfd (arm-vxworks): Change name of define from VXWORKS to
1564 ARM_COFF_BUGFIX.
1565 (arm-epoc-pe): Define ARM_COFF_BUGFIX.
1566 coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
1567 ARM_COFF_BUGFIX.
1568
15692001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
1570
1571 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
1572 to match corresponding bfd_coff_backend data member.
1573
15742001-07-24 Alan Modra <amodra@bigpond.net.au>
1575
1576 * Makefile.am: Update dependencies with "make dep-am".
1577 * Makefile.in: Regenerate
1578
15792001-07-15 H.J. Lu <hjl@gnu.org>
1580
1581 * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
1582 (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
1583 * Makefile.in: Regenerate.
1584
15852001-07-11 H.J. Lu <hjl@gnu.org>
1586
1587 * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
1588 flags when creating the reloc section if the ALLOC flag in the
1589 source section is set.
1590
15912001-07-11 Steve Ellcey <sje@cup.hp.com>
1592
1593 * reloc.c (bfd_reloc_code_type): Add IA64 relocs
1594 BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
1595 * bfd-in2.h: Regenerate.
1596 * libbfd.h: Regenerate.
1597 * elfxx-ia64.c (ia64_howto_table): Define how to handle
1598 new relocations.
1599 (elfNN_ia64_reloc_type_lookup): Handle new relocations.
1600 (elfNN_ia64_check_relocs): Likewise.
1601 (elfNN_ia64_install_value): Likewise.
1602 (elfNN_ia64_relocate_section): Likewise.
1603
16042001-07-11 Jakub Jelinek <jakub@redhat.com>
1605
1606 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
1607 R_SPARC_UA64.
1608 (elf32_sparc_check_relocs): Likewise.
1609 Only create .rela section for alloced sections in shared libraries.
1610 (elf32_sparc_relocate_section): Likewise.
1611 Remove redundant check.
1612 Optimize unaligned reloc usage.
1613 * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
1614 check.
1615
16162001-07-11 H.J. Lu <hjl@gnu.org>
1617
1618 * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
1619 ALLOC|LOAD flags as the source section for debugging sections
1620 when creating the reloc section.
1621
16222001-07-05 Jim Wilson <wilson@redhat.com>
1623
1624 * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
1625 the section of the bigger symbol.
1626
1627 * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
1628
16292001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
1630
1631 * peicode.h (coff_swap_scnhdr_in): For sections containing
1632 uninitialised data, only set their size to s_paddr if this does
1633 not reset their size to zero. MS's latest compilers will set
1634 s_paddr to zero.
1635
16362001-07-04 H.J. Lu <hjl@gnu.org>
1637
1638 * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
1639 Handle bfd_mach_mips4400, bfd_mach_mips4600 and
1640 bfd_mach_mips5000.
1641
16422001-07-03 Mark Elbrecht <snowball3@softhome.net>
1643
1644 * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
1645
1646 * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
1647 sections being discarded.
1648
16492001-06-30 Alan Modra <amodra@bigpond.net.au>
1650
1651 * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
1652 instead of _bfd_elfcore_section_from_phdr.
1653 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
1654 * elf.c (_bfd_elfcore_section_from_phdr): Remove.
1655 (_bfd_elfcore_make_pseudosection): Expedite tail-call.
1656 (elfcore_grok_prstatus): Likewise.
1657 (elfcore_grok_lwpstatus): Likewise.
1658 (bfd_get_elf_phdr_upper_bound): Likewise.
1659 (elfcore_make_note_pseudosection): Formatting.
1660 (_bfd_elfcore_strndup): Formatting.
1661 * elf32-mips.c (mips_elf_sym_is_global): Formatting.
1662 (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
1663
16642001-06-29 Daniel Jacobowitz <drow@mvista.com>
1665
1666 * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
1667 and _bfd_elfcore_strndup.
1668 (struct elf_backend_data): Add elf_backend_grok_prstatus
1669 and elf_backend_grok_psinfo.
1670 * elf.c (_bfd_elfcore_make_pseudosection): New function.
1671 (elfcore_grok_prstatus): Use it.
1672 (elfcore_make_note_pseudosection): Likewise.
1673 (elfcore_strndup): Rename to...
1674 (_bfd_elfcore_strndup): Here, and make global.
1675 (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
1676 (elfcore_grok_note): Call elf_backend_grok_prstatus
1677 and elf_backend_grok_psinfo if available.
1678 * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
1679 (_bfd_elf32_mips_grok_psinfo): New function.
1680 (elf_backend_grok_prstatus): Define.
1681 (elf_backend_grok_psinfo): Define.
1682 * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
1683 (elf_backend_grok_psinfo): Likewise.
1684 (elfNN_bed): Include elf_backend_grok_prstatus and
1685 elf_backend_grok_psinfo.
1686
16872001-06-29 H.J. Lu <hjl@gnu.org>
1688
1689 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
1690 hplink->sgot is NULL before filling GOT. Check if hplink->splt
1691 is NULL before filling PLT.
1692
16932001-06-29 Alan Modra <amodra@bigpond.net.au>
1694
1695 * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
1696
16972001-06-27 Alan Modra <amodra@bigpond.net.au>
1698
1699 * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
1700 here..
1701 (elf32_hppa_adjust_dynamic_symbol): ..nor here..
1702 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
1703 after gc has run.
1704
1705 * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
1706 (IS_ABSOLUTE_RELOC): Define.
1707 (elf32_hppa_link_hash_entry): Always include reloc_entries field.
1708 (hppa_link_hash_newfunc): Always init it.
1709 (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
1710 create COPY relocs only when the reloc is in a read-only section.
1711 Instead, allocate space for a dynamic reloc to reference the
1712 library symbol directly. Keep track of space we allocate using
1713 relocs_entries.
1714 (hppa_discard_copies): Delete, and move code to..
1715 (allocate_plt_and_got): ..here. Rename to
1716 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
1717 relocs for non-shared link.
1718 (elf32_hppa_size_dynamic_sections): Update calls to above.
1719 (elf32_hppa_relocate_section): Write out the dynamic relocs used
1720 in lieu of COPY relocs.
1721
1722 * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
1723 here..
1724 (elf_i386_adjust_dynamic_symbol): ..nor here..
1725 (allocate_plt_and_got_and_discard_relocs): .. instead do so here
1726 after gc has run.
1727 (elf_i386_size_dynamic_sections): Fix a comment.
1728 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
1729 involved in writing reloc out.
1730
17312001-06-25 Alan Modra <amodra@bigpond.net.au>
1732
1733 * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
1734 Ensure syms are dynamic if we might be emitting a reloc.
1735 (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
1736 for undefweak or undefined syms..
1737 (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
1738
1739 * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
1740 relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
1741 (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
1742 redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
1743
17442001-06-24 H.J. Lu <hjl@gnu.org>
1745
1746 * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
1747 strncasecmp/strcasecmp instead of strncmp/strcmp.
1748
17492001-06-23 H.J. Lu <hjl@gnu.org>
1750
1751 * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
1752 Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
1753 in the regular object file and treat the weak definition as
1754 the normal one.
1755
17562001-06-23 Alan Modra <amodra@bigpond.net.au>
1757
1758 * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
1759 unresolved_reloc test to exclude cases where we use "relocation"
1760 before setting it to point into the .got. Reinstate fudge for
1761 unresolved relocs in debugging sections.
1762
1763 * elf32-i386.c (elf_i386_relocate_section): Replace ugly
1764 complicated tests for unresolvable relocs with a simple direct
1765 scheme using "unresolved_reloc" var.
1766
1767 * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
1768 elf_i386_dyn_relocs. Update comment.
1769 (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
1770 dyn_relocs.
1771 (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
1772 others to aborts.
1773 (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
1774 abort.
1775 (elf_i386_size_dynamic_sections): Likewise.
1776 (elf_i386_finish_dynamic_symbol): Likewise.
1777 (elf_i386_finish_dynamic_sections): Likewise.
1778 (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
1779 handling code.
1780
1781 Avoid creating COPY relocs if possible.
1782 * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
1783 which .got created. Mark symbols used by R_386_32 and R_386_PC32
1784 relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
1785 reloc is in a read-only section. Instead, allocate space for a
1786 dynamic reloc to reference the library symbol directly. Keep
1787 track of space we allocate using pcrel_relocs_copied.
1788 (discard_copies): Delete, and move code to ..
1789 (allocate_plt_and_got): ..here. Rename to
1790 allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
1791 relocs for non-shared link.
1792 (elf_i386_size_dynamic_sections): Update calls to above functions.
1793 (elf_i386_relocate_section): Write out the dynamic relocs. Add
1794 more ugly logic to avoid "unresolvable relocation" error. Use
1795 htab shortcut in place of elf_hash_table macro.
1796 (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
1797 not always be created now.
1798
17992001-06-20 Bo Thorsen <bo@suse.co.uk>
1800
1801 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
1802 shared libraries.
1803
18042001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1805
1806 * configure.host (mips64-*-linux): Reformat.
1807
18082001-06-21 Alan Modra <amodra@bigpond.net.au>
1809
1810 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
1811 allocate local .got space. Use shortcuts from hash table for .got
1812 and .plt rather than comparing section names.
1813 (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
1814 adjusting index into local_got_refcounts to document what we are
1815 really doing.
1816 (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
1817 Tidy .got and .plt error checking.
1818
18192001-06-20 Catherine Moore <clm@redhat.com>
1820
1821 * elf-bfd.h (struct elf_backend_data):
1822 elf_backend_emit_relocs: New field: Function for emitting
1823 relocs.
1824 elf_backend_count_relocs: New field: Function for determining
1825 the number of relocs to be emitted.
1826 * elfxx-target.h: Provide default (NULL) values for
1827 elf_backend_emit_relocs and elf_backend_count_relocs.
1828 * elflink.h (elf_link_size_reloc_section): Make the hash table
1829 big enough to hold the relocs counted by either reloc_count or
1830 o->reloc_count.
1831 (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
1832 should be emitted, either because of a command line option
1833 stored in the info structure or because the target provides a
1834 special reloc emitting function.
1835 If the target provides a reloc counting function use it,
1836 unless performing a relocatable link or emitting all relocs.
1837 Also set the SEC_RELOC flag on any output section which will
1838 contain relocs.
1839 (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
1840 should be emitted, either because of a command line option
1841 stored in the info structure or because the target provides a
1842 special reloc emitting function.
1843 If the target provides a reloc emitting function, use it,
1844 unless performing a relocatable link or emitting all relocs.
1845
18462001-06-20 H.J. Lu <hjl@gnu.org>
1847
1848 * elf32-i386.c (elf_i386_size_dynamic_sections): Always
1849 allocate local .got space.
1850
18512001-06-19 Andreas Jaeger <aj@suse.de>
1852
1853 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
1854 dynamic symbols.
1855
18562001-06-18 Hans-Peter Nilsson <hp@axis.com>
1857
1858 * elflink.h (struct elf_assign_sym_version_info): Remove member
1859 export_dynamic. All users changed to use info member.
1860 NAME(bfd_elf,size_dynamic_sections)): Remove parameter
1861 export_dynamic, instead use member in parameter info.
1862 * bfd-in.h (bfd_elf32_size_dynamic_sections,
1863 bfd_elf64_size_dynamic_sections): Update prototype.
1864 * bfd-in2.h: Regenerate.
1865
18662001-06-18 H.J. Lu <hjl@gnu.org>
1867
1868 * elflink.h (elf_info_failed): Add a new field, verdefs.
1869 (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
1870 elf_export_symbol.
1871 (elf_export_symbol): Check eif->verdefs to decide if a symbol
1872 should be exported.
1873
18742001-06-17 H.J. Lu <hjl@gnu.org>
1875
1876 * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
1877 readonly_reloc, to record if a relocation in the .rel.dyn
1878 section is against a read-only section.
1879 (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
1880 field to false.
1881 (_bfd_mips_elf_check_relocs): Record if there is a relocation
1882 in the .rel.dyn section against a read-only section by setting
1883 DF_TEXTREL or readonly_reloc.
1884 (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
1885 it is true.
1886 (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
1887 there is a relocation in the .rel.dyn section against a
1888 read-only section.
1889 (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
1890 DF_TEXTREL is set.
1891
18922001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
1893
1894 * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
1895 function. Move flagword result into parameter list. Remove
1896 comment about setting bfd_error_handler to intercept failure
1897 results.
1898 * coffgen.c (make_a_section_from_file): Examine result of
1899 calling bfd_coff_styp_to_sec_flags and pass a failure back to
1900 caller.
1901 * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
1902 function. Move flagword result into parameter list.
1903 * libcoff.h: Regenerate.
1904 * libecoff.h: Regenerate.
1905
19062001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
1907
1908 * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
1909 section is going to follow it.
1910
19112001-06-12 Catherine Moore <clm@redhat.com>
1912
1913 * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
1914 with the file_align entry from elf_backend_data.
1915 (elf_gc_smash_unused_vtentry_relocs): Likewise.
1916 (elf_gc_record_vtentry): Likewise.
1917
19182001-06-10 Alan Modra <amodra@bigpond.net.au>
1919
1920 * elflink.h: Whitespace changes.
1921 (elf_link_read_relocs_from_section): Use "unsigned int" iterator
1922 rather than "unsigned char".
1923 (elf_link_output_relocs): Likewise.
1924 (elf_link_input_bfd): Likewise.
1925 (elf_reloc_link_order): LIkewise.
1926 * elf.c: s/CONST/const/. Whitespace changes.
1927 * elf32-mips.c: Formatting fix.
1928
1929 * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
1930 * Makefile.in: Regenerate.
1931 * po/Make-in: Remove trailing tab.
1932
19332001-06-09 Philip Blundell <philb@gnu.org>
1934
1935 * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
1936 change.
1937 (elf32_arm_plt_entry): Likewise.
1938
19392001-06-08 H.J. Lu <hjl@gnu.org>
1940
1941 * elf.c (swap_out_syms): Keep names for global section symbols.
1942
19432001-06-07 H.J. Lu <hjl@gnu.org>
1944
1945 * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
1946 MIPS-based machines need it.
1947
19482001-06-07 H.J. Lu <hjl@gnu.org>
1949
1950 * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
1951 for SGI only.
1952
1953 * config.bfd: Remove ecoff from Linux/mips.
1954
19552001-06-07 Andreas Jaeger <aj@suse.de>
1956
1957 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
1958 assertion.
1959 (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
1960 alignment of 8 for .rela sections; handle further relocations.
1961
19622001-06-06 Christian Groessler <cpg@aladdin.de>
1963
1964 * coff-z8k.c: Fix formatting.
1965 Fix howtos: howto->size was always 1.
1966
19672001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1968
1969 * configure.host (mips64*-*-linux*): Define.
1970
19712001-06-05 Alan Modra <amodra@bigpond.net.au>
1972
1973 * elf32-i386.c (elf_i386_discard_copies): Rename to
1974 discard_copies, and use elf_link_hash_entry arg rather than
1975 elf_i386_link_hash_entry.
1976 (elf_i386_link_hash_traverse): Delete.
1977 (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
1978 Tidy sizing of dynamic sections.
1979 (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
1980 possible .plt entries.
1981 (elf_i386_gc_sweep_hook): Likewise.
1982 (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
1983 everything with plt.refcount <= 0.
1984
1985 * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
1986 .relgot space here.
1987 (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
1988 (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
1989 .rel.plt here..
1990 (allocate_plt_and_got): ..instead do it all here. New function.
1991 (elf_i386_size_dynamic_sections): Allocate local .got space and
1992 call allocate_plt_and_got. No need to zap .relgot if not dynamic.
1993 (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
1994 rather than gc variety).
1995 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1996 (elf_i386_relocate_section): Use it here and correct handling of
1997 R_386_GOT32. Provide section and offset for "unresolvable
1998 relocation" error message.
1999 (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
2000
2001 * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
2002 sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
2003 (elf_i386_link_hash_table_create): Init them.
2004 (create_got_section): New function.
2005 (elf_i386_create_dynamic_sections): New function.
2006 (elf_backend_create_dynamic_sections): Set to above.
2007 (elf_i386_check_relocs): Use shortcuts from hash table rather than
2008 calling bfd_get_section_by_name.
2009 (elf_i386_gc_sweep_hook): Likewise.
2010 (elf_i386_adjust_dynamic_symbol): Likewise.
2011 (elf_i386_size_dynamic_sections): Likewise.
2012 (elf_i386_relocate_section): Likewise.
2013 (elf_i386_finish_dynamic_sections): Likewise.
2014
2015 * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
2016
20172001-06-02 H.J. Lu <hjl@gnu.org>
2018
2019 * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
2020 and ELFOSABI_HPUX.
2021 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
2022
20232001-06-02 H.J. Lu <hjl@gnu.org>
2024
2025 * aout-cris.c (MACHTYPE_OK): New. Defined.
2026
20272001-06-02 Hans-Peter Nilsson <hp@axis.com>
2028
2029 * section.c (_bfd_strip_section_from_output): Handle NULL
2030 output_section.
2031
20322001-06-02 H.J. Lu <hjl@gnu.org>
2033
2034 * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
2035 rs6000coff64_vec only if BFD64 is defined.
2036 (powerpc64-*-aix*): Enable only if BFD64 is defined.
2037
20382001-06-02 H.J. Lu <hjl@gnu.org>
2039
2040 * coff-ia64.c (ia64coff_object_p): Rewrite with
2041 external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
2042
20432001-06-01 Andreas Jaeger <aj@suse.de>
2044
2045 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
2046 relocation, small reformatting.
2047
20482001-05-29 Andreas Jaeger <aj@suse.de>
2049
2050 * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
2051 (elf64_x86_64_relocate_section): Likewise.
2052
20532001-05-30 Alan Modra <amodra@one.net.au>
2054
2055 * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
2056 millicode. Don't allocate .got and .rela.got space here..
2057 (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
2058 (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
2059 .rela.plt here..
2060 (hppa_handle_PIC_calls): ..nor here..
2061 (allocate_plt_and_got): ..instead do it all here. New function.
2062 (elf32_hppa_size_dynamic_sections): Allocate local .got space and
2063 call allocate_plt_and_got. No need to zap .got if not dynamic.
2064 (elf32_hppa_final_link): Call regular bfd_final_link instead of
2065 gc_common_final_link.
2066 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2067 (elf32_hppa_relocate_section): Use it here.
2068 (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
2069 dynamic_sections_created.
2070 (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
2071
20722001-05-28 Andreas Jaeger <aj@suse.de>
2073
2074 * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
2075 generic version since we want a hashsize of 4.
2076 (elf_backend_size_info): Likewise.
2077
20782001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2079
2080 * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
2081 a zeroing loop.
2082 (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
2083 (elf_link_input_bfd): Likewise.
2084 (elf_reloc_link_order): Likewise.
2085 (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
2086 relocations correctly.
2087
20882001-05-28 Nicolas Pitre <nico@cam.org>
2089
2090 * elf32-arm.h: fix PLT generation for big endian ARM
2091
20922001-05-28 Alan Modra <amodra@one.net.au>
2093
2094 * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
2095 for symbols forced local that need plabels.
2096 (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
2097 .plt.rela for local syms if non-shared.
2098 (hppa_build_one_stub): Mask lsb of plt.offset.
2099 (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
2100 (clobber_millicode_symbols): Correct comment.
2101 (elf32_hppa_relocate_section): Likewise.
2102 (elf32_hppa_finish_dynamic_symbol): Likewise.
2103
21042001-05-28 Jeff Sturm <jsturm@one-point.com>
2105
2106 * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
2107 * bfd-in2.h: Regenerate.
2108 * libbfd.h: Regenerate.
2109 * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
2110 and BFD_RELOC_SPARC_UA64 mapping
2111 * elf64-sparc.c: Likewise.
2112
21132001-05-25 H.J. Lu <hjl@gnu.org>
2114
2115 * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
2116 (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
2117 (coff-rs6000.lo): Remove the old dependency.
2118 * Makefile.in: Rebuild.
2119
2120 * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
2121 coff-rs6000.lo.
2122
21232001-05-25 H.J. Lu <hjl@gnu.org>
2124
2125 * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
2126 rs6000coff_core_file_matches_executable_p,
2127 rs6000coff_core_file_failing_command and
2128 rs6000coff_core_file_failing_signal only if AIX_CORE is
2129 defined.
2130 (pmac_xcoff_vec): Likewise.
2131 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2132
21332001-05-25 Timothy Wall <twall@redhat.com>
2134
2135 * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
2136 for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
2137
21382001-05-25 H.J. Lu <hjl@gnu.org>
2139
2140 * bfd-in2.h: Regenerated.
2141 * libcoff.h: Likewise.
2142
21432001-05-25 Alan Modra <amodra@one.net.au>
2144
2145 * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
2146 undefined millicode syms in shared libs.
2147 (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
2148 (elf32_hppa_check_relocs): Likewise.
2149 (elf32_hppa_adjust_dynamic_symbol): Likewise.
2150 (elf32_hppa_size_dynamic_sections): Likewise.
2151 (elf32_hppa_relocate_section): Likewise.
2152 (elf32_hppa_finish_dynamic_symbol): Likewise.
2153 (elf32_hppa_finish_dynamic_sections): Likewise.
2154
21552001-05-24 Tom Rix <trix@redhat.com>
2156
2157 * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
2158 xcoff-target.h not used to define rs6000 or ppc bfd.
2159 * Makefile.in same
2160
2161 * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
2162 to 64 bit.
2163
2164 * coff-rs6000.c : Many changes for 64 bit support. Move common
2165 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
2166 and pmac_xcoff_vec
2167
2168 * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
2169 linker now supported. Explictly define the rs6000coff64_vec.
2170
2171 * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
2172 (coff_print_aux) same
2173 (coff_write_object_contents) same
2174 (coff_slurp_line_table) same
2175
2176 * coffgen.c : (coff_fix_symbol_name) formatting
2177 (coff_mangle_symbols) xcoff 64 bit support
2178 (coff_write_symbol) same
2179 (coff_write_alien_symbol) same
2180 (coff_write_native_symbol) same
2181 (coff_write_symbols) same
2182 (coff_get_symbol_info) same
2183 (bfd_coff_get_syment) same
2184 (coff_print_symbol) same
2185
2186 * config.bfd : add powerpc64-*-aix* target
2187
2188 * libcoff-in.h : formatting
2189
2190 * libcoff.h : move xcoff extern declarations to libxcoff.h
2191
2192 * libxcoff.h : New file
2193
2194 * xcofflink.c : Many changes for xcoff64 support. Move common
2195 structures to include/coff/xcoff.h. Move specific structure to
2196 backends coff-rs6000.c and coff64-rs6000.c. Use new backend
2197 functions, defined in libxcoff.h, to isolate 32/64 dependencies.
2198
2199 (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
2200 aix4.2+ -binitfini.
2201
2202 (xcoff_build_ldsyms) : handle special __rtinit symbol.
2203
22042001-05-23 Alexandre Oliva <aoliva@redhat.com>
2205
2206 * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
2207 s/ENTIRES/ENTRIES/.
2208
22092001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2210
2211 * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
2212 * libbfd.h: Regenerate.
2213 * bfd-in2.h: Regenerate.
2214
2215 * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
2216 * archures.c (bfd_mach_mips12000): Define.
2217 * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
2218 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
2219 support.
2220 (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
2221 * bfd-in2.h: Regenerate.
2222 * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
2223
22242001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
2225
2226 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
2227 elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
2228 elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
2229 that is used by GCC.
2230
22312001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2232
2233 * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
2234 of entries in a structured section.
2235 * elf.c: Use new macro.
2236 * elf32-i386.c: Use new macro.
2237 * elf32-mips.c: Use new macro.
2238 * elf64-alpha.c: Use new macro.
2239 * elf64-sparc.c: Use new macro.
2240 * elfcode.h: Use new macro.
2241 * elflink.h: Use new macro.
2242
22432001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2244
2245 * bfdint.texi: Replace -oformat with --oformat.
2246
22472001-05-21 Andreas Jaeger <aj@suse.de>
2248
2249 * dwarf2.c (decode_line_info): Fix error message.
2250 (read_abbrevs): Fix test for offset as suggested by Alan Modra and
2251 adjust error message.
2252
22532001-05-18 H.J. Lu <hjl@gnu.org>
2254
2255 * elflink.h (elf_link_add_object_symbols): Revert the last
2256 change.
2257
22582001-05-17 Alan Modra <amodra@one.net.au>
2259
2260 * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
2261 ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
2262 (hppa_build_one_stub): Add an assert to check plt.offset.
2263
22642001-05-17 H.J. Lu <hjl@gnu.org>
2265
2266 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
2267 version definition to basename of the output filename.
2268
22692001-05-17 H.J. Lu <hjl@gnu.org>
2270
2271 * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
2272 basename of the bfd filename.
2273
22742001-05-16 Alan Modra <amodra@one.net.au>
2275
2276 * section.c (asection): Add linker_has_input field.
2277 (STD_SECTION): Adjust initialization to suit.
2278 * ecoff.c (bfd_debug_section): Likewise.
2279 * bfd-in2.h: Regenerate.
2280
22812001-05-15 Alexandre Oliva <aoliva@redhat.com>
2282
2283 * elf-m10300.c (mn10300_elf_relax_section): Don't relax
2284 negative 32-bit operands to 16 operands when the operand is
2285 going to be zero-extended by the modified opcode.
2286
22872001-05-12 Peter Targett <peter.targett@arccores.com>
2288
2289 * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
2290 name for 'arc5' core versions.
2291 (bfd_arc_arch): Make bfd_mach_arc_6 default.
2292
2293 * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
2294 architecture.
2295 (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
2296
22972001-05-11 Jakub Jelinek <jakub@redhat.com>
2298
2299 * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
2300 sections as well.
2301 (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
2302 to .gnu.linkonce.t.FOO text section.
2303
23042001-05-11 Jakub Jelinek <jakub@redhat.com>
2305
2306 * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
2307 fields, change sec into secinfo.
2308 (struct sec_merge_info): Add chain, remove last fields.
2309 (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
2310 (sec_merge_hash_lookup): If lookup could not use a string only
2311 because it has bad alignment, mark the old string for deletion.
2312 (sec_merge_add): Add secinfo argument. Don't compute entry's
2313 position, instead record the section.
2314 (sec_merge_emit): Update for the sec into secinfo change in
2315 struct sec_merge_hash_entry.
2316 (_bfd_merge_section): Only record the section for merging, defer
2317 putting strings into the hash table.
2318 (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
2319 _bfd_merge_sections): New functions.
2320 (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
2321 changes.
2322 * libbfd-in.h (_bfd_merge_sections): Add prototype.
2323 (_bfd_nolink_bfd_merge_sections): Define.
2324 * libbfd.h: Likewise.
2325 (bfd_generic_merge_sections): Add prototype.
2326 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
2327 (struct bfd_target): Likewise.
2328 * bfd.c (bfd_merge_sections): Define.
2329 * bfd-in2.h: Rebuilt.
2330 * elf.c (_bfd_elf_merge_sections): New function.
2331 * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
2332 * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
2333 * reloc.c (bfd_generic_merge_sections): New function.
2334 * vms.c (vms_bfd_merge_sections): New function.
2335 * aout-adobe.c (aout_32_bfd_merge_sections): Define.
2336 * aout-target.h (MY_bfd_merge_sections): Define.
2337 * aout-tic30.c (MY_bfd_merge_sections): Define.
2338 * binary.c (binary_bfd_merge_sections): Define.
2339 * bout.c (b_out_bfd_merge_sections): Define.
2340 * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
2341 * coffcode.c (coff_bfd_merge_sections): Define.
2342 * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
2343 * i386msdos.c (msdos_bfd_merge_sections): Define.
2344 * i386os9k.c (os9k_bfd_merge_sections): Define.
2345 * ieee.c (ieee_bfd_merge_sections): Define.
2346 * ihex.c (ihex_bfd_merge_sections): Define.
2347 * nlm-target.h (nlm_bfd_merge_sections): Define.
2348 * oasys.c (oasys_bfd_merge_sections): Define.
2349 * ppcboot.c (ppcboot_bfd_merge_sections): Define.
2350 * som.c (som_bfd_merge_sections): Define.
2351 * srec.c (srec_bfd_merge_sections): Define.
2352 * tekhex.c (tekhex_bfd_merge_sections): Define.
2353 * versados.c (versados_bfd_merge_sections): Define.
2354 * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
2355
23562001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
2357
2358 * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
2359 to be unsigned long, in order to match its use.
2360
23612001-05-10 H.J. Lu <hjl@gnu.org>
2362
2363 * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
2364 indirect symbols.
2365
23662001-05-09 H.J. Lu <hjl@gnu.org>
2367
2368 * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
2369 versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
2370 Remove the unused veriable `dynver'.
2371
23722001-05-08 Ian Lance Taylor <ian@zembu.com>
2373
2374 * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
2375 NULL or is not COFF.
2376 (coff_i386_rtype_to_howto): Don't dump core if output section
2377 owner is not COFF.
2378
23792001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2380
2381 * ecoff.c (bfd_debug_section): Fix initialization.
2382 * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
2383 is always a positive integer. Cast away sign mismatch.
2384 * elf32-mips.c: Fix misleading comment and typo.
2385 (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
2386 correct data type.
2387 * elflink.c: Fix typo.
2388 (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
2389 * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
2390
23912001-05-04 Richard Henderson <rth@redhat.com>
2392
2393 * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
2394
23952001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
2396
2397 * elf32-arm.h (elf32_arm_final_link_relocate): Set
2398 EF_ARM_HASENTRY if the start address is set.
2399
24002001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
2401
2402 * targets.c (_bfd_target_vector_entries): Compute value based on
2403 the size of the _bfd_target_vector and not bfd_target_vector.
2404
24052001-05-03 H.J. Lu <hjl@gnu.org>
2406
2407 * elfcode.h: Include "libiberty.h".
2408
2409 * elflink.h (elf_link_add_object_symbols): Set
2410 elf_dt_name (abfd) to basename of the bfd filename.
2411 (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
2412 of the bfd filename.
2413
24142001-05-03 Andreas Jaeger <aj@suse.de>
2415
2416 * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
2417 (elf_generic_info_to_howto_rel): Likewise.
2418 * coff-alpha.c (reloc_nil): Likewise.
2419 (alpha_ecoff_bad_format_hook): Likewise.
2420 (alpha_adjust_reloc_out): Likewise.
2421 (alpha_bfd_reloc_type_lookup): Likewise.
2422 (alpha_convert_external_reloc): Likewise.
2423 * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
2424 (elf64_alpha_reloc_bad): Likewise.
2425 (elf64_alpha_reloc_gpdisp): Likewise.
2426 (elf64_alpha_bfd_reloc_type_lookup): Likewise.
2427 (elf64_alpha_info_to_howto): Likewise.
2428 (elf64_alpha_add_symbol_hook): Likewise.
2429 (elf64_alpha_create_got_section): Likewise.
2430 (elf64_alpha_is_local_label_name): Likewise.
2431 (elf64_alpha_merge_ind_symbols): Likewise.
2432 * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
2433 (mips_elf64_get_reloc_upper_bound): Likewise.
2434 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
2435 (nlm_alpha_get_public_offset): Likewise.
2436
24372001-05-02 Johan Rydberg <jrydberg@opencores.org>
2438
2439 * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
2440 about overflow in R_OPENRISC_LO_16_IN_INSN and
2441 R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
2442
24432001-04-30 H.J. Lu <hjl@gnu.org>
2444
2445 * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
2446 only for ELF_LINK_FORCED_LOCAL.
2447 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
2448 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
2449 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
2450
2451 * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
2452 if the symbol has hidden or internal visibility.
2453
24542001-04-30 Alan Modra <amodra@one.net.au>
2455
2456 * elf32-hppa.c (final_link_relocate): Branch to .+8 for
2457 calls to undefined weak symbols.
2458
24592001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
2460
2461 * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
2462 R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
2463
24642001-04-27 Andreas Jaeger <aj@suse.de>
2465
2466 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
2467 out handled entries.
2468 (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
2469 (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
2470 (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
2471 GOT32.
2472
24732001-04-27 Sean McNeil <sean@mcneil.com>
2474
2475 * config.bfd: Add arm-vxworks target.
2476 * coff-arm (coff_arm_relocate_section): Add in symbol value to
2477 addend (fro VXworks targets).
2478
24792001-04-26 H.J. Lu <hjl@gnu.org>
2480
2481 * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
2482 valid.
2483
24842001-04-25 Frank Ch. Eigler <fche@redhat.com>
2485
2486 * bfd-in.h (bfd_cache_close): Declare newly exported function.
2487 * bfd-in2.h: Regenerated.
2488
24892001-04-24 Jakub Jelinek <jakub@redhat.com>
2490
2491 * merge.c (struct sec_merge_hash_entry): Add alignment field.
2492 (struct sec_merge_hash): Remove alignment_power.
2493 (sec_merge_hash_newfunc): Clear alignment.
2494 (sec_merge_hash_lookup): Pass alignment as argument.
2495 Use hashp->root.next, not hashp->next to walk the hash chain.
2496 If a string already in the hashtable does not have required
2497 alignment, create a new hashtable entry.
2498 (sec_merge_init): Remove alignment_power argument.
2499 (sec_merge_add): Add alignment argument.
2500 (sec_merge_emit): Alignment is now a per-entity thing, not per
2501 section.
2502 (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
2503 for proper alignment.
2504 Pass alignment information to sec_merge_add.
2505
25062001-04-24 Christian Groessler <cpg@aladdin.de>
2507
2508 * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
2509 and R_REL16 reloc types; accept odd values for R_REL16 type
2510
25112001-04-24 Johan Rydberg <jrydberg@opencores.org>
2512
2513 * cpu-openrisc.c: New file.
2514 * elf32-openrisc.c: Likewise.
2515
2516 * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
2517 (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
2518 (BFD32_BACKENDS): Add elf32-openrisc.lo.
2519 (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
2520 (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
2521 * Makefile.in: Regenerated.
2522 * config.bfd: (openrisc-*-elf): New target.
2523 * configure.in (bfd_elf32_openrisc_vec): New vector.
2524 * configure: Regenerated.
2525 * libbfd.h: Regenerated.
2526 * bfd-in2.h: Regenerated.
2527 * reloc.c: Add OpenRISC relocations.
2528 * targets.c (bfd_elf32_openrisc_vec): Declare.
2529 (bfd_target_vect): Add bfd_elf32_openrisc_vec.
2530 * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
2531 (bfd_openrisc_arch): Declare.
2532 (bfd_archures_list): Add bfd_openrisc_arch.
2533 * elf.c (prep_headers): Add bfd_arch_openrisc.
2534
25352001-04-23 Bo Thorsen <bo@suse.de>
2536
2537 * elf64-x86-64.c: Add c++ vtable hack.
2538 Small whitespace and comment changes.
2539
25402001-04-19 Andreas Jaeger <aj@suse.de>
2541
2542 * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
2543 (elf64_x86_64_plt_entry): Likewise.
2544 (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
2545 (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
2546
25472001-04-17 Hans-Peter Nilsson <hp@axis.com>
2548
2549 * elf32-cris.c: Tweak comments related to dynamic linking.
2550 (cris_elf_relocate_section): When not creating shared object, fill
2551 in the .got table for any symbol not in the dynamic symbol table.
2552 (elf_cris_finish_dynamic_symbol): When not creating shared object,
2553 only emit a .got.rela reloc if the symbol is in the dynamic symbol
2554 table.
2555 (cris_elf_check_relocs): Use variable r_type in all places rather
2556 than the original expression. Add default case in switch for
2557 reloc types.
2558 (elf_cris_size_dynamic_sections): Iterate over
2559 elf_cris_discard_excess_program_dynamics when not creating shared
2560 library.
2561 (elf_cris_discard_excess_dso_dynamics): Renamed from
2562 elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
2563 (elf_cris_discard_excess_program_dynamics): New.
2564
25652001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
2566
2567 * coffcode.h (coff_write_object_contents): Use
2568 bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
2569
25702001-04-14 H.J. Lu <hjl@gnu.org>
2571
2572 * bfd-in2.h: Regenerate.
2573
25742001-04-14 Jakub Jelinek <jakub@redhat.com>
2575
2576 * section.c (STD_SECTION): Add entsize.
2577
25782001-04-13 H.J. Lu <hjl@gnu.org>
2579
2580 * section.c (SEC_MERGE): Define new flag for merging.
2581 (SEC_STRINGS): Likewise.
2582 (entsize): New field.
2583
25842001-04-13 Roger Sayle <roger@metaphorics.com>
2585
2586 * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
2587 flag on pe-i386 targets.
2588
25892001-04-13 Jakub Jelinek <jakub@redhat.com>
2590
2591 * libbfd-in.h (_bfd_merge_section): New.
2592 (_bfd_write_merged_section): New.
2593 (_bfd_merged_section_offset): New.
2594 * libbfd.h: Rebuilt.
2595 * linker.c (_bfd_generic_link_output_symbols): Handle
2596 discard_sec_merge.
2597 * aoutx.h (aout_link_write_symbols): Likewise.
2598 * pdp11.c (aout_link_write_symbols): Likewise.
2599 * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
2600 (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
2601 sections.
2602 (elf_link_sec_merge_syms): New.
2603 (elf_link_input_bfd): Call _bfd_merged_section_offset
2604 and _bfd_write_merged_section.
2605 Handle discard_sec_merge.
2606 * elf-bfd.h (struct elf_link_hash_table): Add merge_info
2607 field.
2608 (struct bfd_elf_section_data): Likewise.
2609 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
2610 SEC_STRINGS section flags and entsize from their ELF counterparts.
2611 (_bfd_elf_link_hash_table_init): Initialize merge_info.
2612 (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
2613 from their BFD counterparts.
2614 * merge.c: New file.
2615 * Makefile.am: Add strtab.lo.
2616 * Makefile.in: Rebuilt.
2617
26182001-04-09 Hans-Peter Nilsson <hp@axis.com>
2619
2620 * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
2621 only hide symbols marked STV_INTERNAL or STV_HIDDEN.
2622
26232001-04-05 Steven J. Hill <sjhill@cotw.com>
2624
2625 * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
2626 endian MIPS ELF target.
2627 * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
2628 MIPS ELF target.
2629
2630 * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
2631 64bit big endian MIPS ELF target.
2632 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
2633 endian MIPS ELF target.
2634 * configure: Regenerated.
2635
2636 * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
2637 little endian targets.
2638 (mips_elf_sym_is_global): Handle traditional targets.
2639
2640 * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
2641 64bit big endian MIPS ELF target.
2642 (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
2643 endian MIPS ELF target.
2644
2645 * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
2646 and bfd_elf64_tradlittlemips_vec.
2647
26482001-04-05 David Mosberger <davidm@hpl.hp.com>
2649
2650 * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
2651 ordinary "progbits" section.
2652
26532001-04-04 Alan Modra <alan@linuxcare.com.au>
2654
2655 * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
2656 when -Bsymbolic causes a symbol to no longer need a .plt entry.
2657
26582001-04-03 David Mosberger <davidm@hpl.hp.com>
2659
2660 * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
2661
26622001-03-30 H.J. Lu <hjl@gnu.org>
2663
2664 * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
2665 (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
2666
26672001-03-26 H.J. Lu <hjl@gnu.org>
2668
2669 * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
2670 if there are any relocations for generic ELF.
2671 (bfd_elf32_bfd_link_add_symbols): Defined to
2672 elf32_generic_link_add_symbols.
2673 * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
2674 if there are any relocations for generic ELF.
2675 (bfd_elf64_bfd_link_add_symbols): Defined to
2676 elf64_generic_link_add_symbols.
2677
26782001-03-23 Nick Clifton <nickc@redhat.com>
2679
2680 * Makefile.am (BUILD_CFILES): New variable: List of C source
2681 files created in build directory.
2682 (BUILD_HFILES): New variable: List of header files created in
2683 build directory.
2684 (POTFILES): Delete.
2685 (po/POTFILES.in): Replace rule with empty entry.
2686 (po/SRC-POTFILES.in): New rule: Create a list of source files
2687 in the source directory.
2688 (po/BLD-POTFILES.in): New rule: Create a list of source files
2689 in the build directory.
2690 (MOSTLYCLEAN): Do not delete source files created in build
2691 directory.
2692 * Makefile.in: Regenerate.
2693 * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
2694 into po/Makefile.
2695 * configure: Regenerate.
2696
2697 * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
2698 and BLD_POTFILES.
2699 Add .. to the search path when building bfd.pot.
2700 Delete POTFILES when performing distclean.
2701 Add comment describing why distclean is broken in maintainer mode.
2702 * po/POTFILES.in: Delete.
2703 * po/SRC-POTFILES.in: New file.
2704 * po/BLD-POTFILES.in: New file.
2705 * po/bfd.pot: Regenerate.
2706
27072001-03-22 Hans-Peter Nilsson <hp@axis.com>
2708
2709 * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
2710 (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
2711 elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
2712 elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
2713 elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
2714 elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
2715 functions.
2716 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
2717 R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
2718 <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
2719 R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
2720 R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
2721 New HOWTO members for new relocs.
2722 (cris_reloc_map): Map new relocs.
2723 (ELF_DYNAMIC_INTERPRETER): Define.
2724 (PLT_ENTRY_SIZE): Define.
2725 (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
2726 elf_cris_pic_plt_entry): New, PLT templates.
2727 (struct elf_cris_pcrel_relocs_copied, struct
2728 elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
2729 (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
2730 (cris_final_link_relocate): Check that 16-bit GOT relocs have
2731 positive values. Adjust PCREL relocs to be relative to location
2732 after relocation.
2733 (cris_elf_relocate_section): Handle relocations to dynamic
2734 objects. Handle new relocations. Call error handler when seeing
2735 non-PIC relocation for read-only sections while generating shared
2736 object.
2737 (cris_elf_check_relocs): Set reference counts for GOT and PLT
2738 entries.
2739 (bfd_elf32_bfd_link_hash_table_create,
2740 elf_backend_adjust_dynamic_symbol,
2741 elf_backend_size_dynamic_sections,
2742 elf_backend_finish_dynamic_symbol,
2743 elf_backend_finish_dynamic_sections,
2744 elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
2745 elf_backend_hide_symbol, elf_backend_want_got_plt,
2746 elf_backend_plt_readonly, elf_backend_want_plt_sym,
2747 elf_backend_got_header_size, elf_backend_plt_header_size):
2748 Define.
2749
2750 * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
2751 BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
2752 BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
2753 BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
2754 BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
2755 BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
2756 * bfd-in2.h, libbfd.h: Regenerate.
2757
27582001-03-21 Diego Novillo <dnovillo@redhat.com>
2759
2760 (_bfd_mips_elf_relocate_section): Give a better error message when
2761 a relocation is not recognized.
2762
27632001-03-21 Alan Modra <alan@linuxcare.com.au>
2764
2765 * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
2766 non-NULL before attempting to dereference.
2767
27682001-03-20 H.J. Lu <hjl@gnu.org>
2769
2770 * configure.in: Remove the redundent AC_ARG_PROGRAM.
2771 * configure: Rebuild.
2772
27732001-03-20 Andreas Schwab <schwab@suse.de>
2774
2775 * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
2776 relocation value when resolving a reference from a debugging
2777 section.
2778
27792001-03-16 Scott Thomason <SThomaso@hii.com>
2780
2781 * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
2782 (xcoff64_swap_sym_out): Fix syntax errors.
2783
27842001-03-16 Richard Sandiford <rsandifo@redhat.com>
2785
2786 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
2787
27882001-03-15 Alan Modra <alan@linuxcare.com.au>
2789
2790 * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
2791 (hppa_link_hash_newfunc): Init it.
2792 (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
2793 section appears to be non-PIC.
2794 (final_link_relocate): Likewise.
2795 (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
2796 possible candidate function, and set pic_call for those that will
2797 only have a .plt entry for the PIC call stub.
2798 (hppa_handle_PIC_calls): Set maybe_pic_call.
2799
28002001-03-12 DJ Delorie <dj@redhat.com>
2801
2802 * elf32-sh.c (sh_elf_relocate_section): Only relocation
2803 R_SH_DIR8WP* relocs if they're against external symbols, else
2804 they're just for relaxing. Validate the reloc values.
2805
28062001-03-12 Stefan Geuken <mail@stefan-geuken.de>
2807
2808 * binary.c (bfd_external_binary_architecture): Declare.
2809 (binary_object_p): If bfd_external_binary_architecture is defined,
2810 set the architecture to this string.
2811
28122001-03-11 Philip Blundell <philb@gnu.org>
2813
2814 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
2815 entries that could serve as a definition for a weak symbol.
2816
28172001-03-08 Nick Clifton <nickc@redhat.com>
2818
2819 * Most files: Update copyright notices using Perl script created
2820 by Kevin Buettner <kevinb@redhat.com>.
2821
28222001-03-07 Nick Clifton <nickc@redhat.com>
2823
2824 * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
2825 prior patch on ! defined OLD_ARM_ABI.
2826
28272001-03-07 Andreas Jaeger <aj@suse.de>
2828
2829 * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
2830 some relocation values.
2831
28322001-03-06 Nick Clifton <nickc@redhat.com>
2833
2834 * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
2835 of offset in BLX(1) instruction.
2836 * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
2837 offset in BLX(1) instruction.
2838 Fix formatting.
2839
28402001-03-06 Nick Clifton <nickc@redhat.com>
2841
2842 * coff-arm.c (coff_arm_reloc_type_lookup): Add
2843 BFD_RELOC_THUMB_PCREL_BLX.
2844
28452001-03-06 Igor Shevlyakov <igor@windriver.com>
2846
2847 * archures.c (bfd_default_scan): Add Coldfire CPUs.
2848 * bfd-in2.h: Regenerate.
2849 * cpu-m68k.c: Add Coldfire CPUs for arch table.
2850 * ieee.c (ieee_write_processor): Set proper id for
2851 Coldfire CPUs.
2852
28532001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
2854
2855 * configure.in: Add s390 target.
2856 * configure: Regenerate.
2857
28582001-02-28 Andreas Jaeger <aj@suse.de>
2859
2860 * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
2861 to addend.
2862
28632001-02-28 Philip Blundell <pb@futuretv.com>
2864
2865 * elf32-arm.h: Update mentions of renamed EF_xx constants.
2866 (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
2867
28682001-02-27 H.J. Lu <hjl@gnu.org>
2869
2870 * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
2871 abfd->tdata.aout_data == NULL.
2872
28732001-02-27 Alan Modra <alan@linuxcare.com.au>
2874
2875 * elf32-hppa.c: Correct field selector in stub comments.
2876 (clobber_millicode_symbols): Formatting fix.
2877
2878 * configure.in: Bump version to 2.11.90.
2879 * configure: Regenerate.
2880 * Makefile.am (CFILES): Rename to SOURCE_CFILES.
2881 (CFILES): $SOURCE_CFILES + generated C files.
2882 (POTFILES): Include $HFILES not $SOURCE_HFILES.
2883 Run "make dep-am"
2884 * Makefile.in: Regenerate.
2885 * doc/Makefile.in: This too.
2886
28872001-02-26 Timothy Wall <twall@cygnus.com>
2888
2889 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
2890 comments.
2891
28922001-02-26 Nick Clifton <nickc@redhat.com>
2893
2894 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
2895 up, replacing multiple if statements with a switch.
2896 (handle_COMDAT): New function.
2897
28982001-02-26 H.J. Lu <hjl@gnu.org>
2899
2900 * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
2901 a warning for section flags we do not handle instead of
2902 aborting.
2903
29042001-02-26 Andreas Jaeger <aj@suse.de>
2905
2906 * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
2907
29082001-02-22 Timothy Wall <twall@cygnus.com>
2909
2910 * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
2911 * configure.in: Add objects for elf64_ia64_aix vectors.
2912 * configure: Regenerated.
2913 * configure.host: Recognize ia64-*-aix*.
2914 * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
2915 for AIX. AIX5 requires most relocations to be dynamic (*all*
2916 binaries are somewhat similar to shared libraries).
2917 * targets.c: Add elf64_ia64_aix vectors.
2918
29192001-02-21 David Mosberger <davidm@hpl.hp.com>
2920
2921 * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
2922 C8 said "1" instead of "8". Clarify error string for IMM22:
2923 "signed integer" instead of just "integer".
2924
29252001-02-20 Andreas Jaeger <aj@suse.de>
2926
2927 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
2928 PLT entries that could serve as a definition for a weak symbol.
2929
29302001-02-19 Jakub Jelinek <jakub@redhat.com>
2931
2932 * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
2933 entries that could serve as a definition for a weak symbol.
2934 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
2935
29362001-02-18 David O'Brien <obrien@FreeBSD>
2937
2938 * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
2939 FreeBSD/i386-CURRENT differently until I can figure out the needed
2940 corefile changes.
2941 * configure: Regenerate.
2942 * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
2943 FreeBSD/PowerPC, and FreeBSD/sparc64.
2944
29452001-02-18 lars brinkhoff <lars@nocrew.org>
2946
2947 * Makefile.am: Add PDP-11 a.out target.
2948 * config.bfd: Likewise.
2949 * configure.in: Likewise.
2950 * targets.c: Likewise.
2951 * archures.c: Likewise.
2952 * bfd-in2.h: Likewise. Add PDP-11 relocations.
2953 * libbfd.h: Add PDP-11 relocations.
2954 * reloc.c: Likewise.
2955 * cpu-pdp11.c: New file.
2956 * pdp11.c: New file.
2957
2958 * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
2959 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
2960 (GET_SWORD) [ARCH_SIZE==16]: Likewise.
2961 (PUT_WORD) [ARCH_SIZE==16]: Likewise.
2962 (GET_MAGIC): New macro.
2963 (PUT_MAGIC): Likewise.
2964 * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
2965
29662001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
2967
2968 * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
2969 multiarch needs it).
2970
29712001-02-18 H.J. Lu <hjl@gnu.org>
2972
2973 * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
2974 index.
2975
29762001-02-18 Kazu Hirata <kazu@hxi.com>
2977
2978 * vms-misc.c: Fix formatting.
2979
29802001-02-16 Kazu Hirata <kazu@hxi.com>
2981
2982 * vms.c: Fix formatting.
2983
29842001-02-14 H.J. Lu <hjl@gnu.org>
2985
2986 * elf.c (elf_find_function): New function.
2987 (_bfd_elf_find_nearest_line): Call elf_find_function () to find
2988 the file name and function name.
2989
29902001-02-14 Nick Clifton <nickc@redhat.com>
2991
2992 * ecoff.c (bfd_debug_section): Update to initialise new fields in
2993 asection structure.
2994
2995 * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
2996 (BFD64_BACKENDS): Add pepigen.c
2997 Add rules to create peigen.c and pepigen.c from peXXigen.c.
2998
2999 * Makefile.in: Regenerate.
3000 * configure: Regenerate.
3001 * po/POTFILES.in: Regenerate.
3002 * po/bfd.pot: Regenerate.
3003
30042001-02-14 H.J. Lu <hjl@gnu.org>
3005
3006 * libcoff-in.h (pe_tdata): Add members target_subsystem and
3007 force_minimum_alignment.
3008
30092001-02-14 Bo Thorsen <bo@suse.de>
3010
3011 * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
3012 (elf64_86_64_size_info): Struct added to fix a problem
3013 with the hashtable string entries.
3014 (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
3015 (elf64_x86_64_size_dynamic_sections): A FIXME removed.
3016 (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
3017 remove the FIXME for this.
3018 (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
3019 section. Also removed the FIXME for it.
3020 (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
3021 (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
3022 (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
3023
30242001-02-13 Richard Henderson <rth@redhat.com>
3025
3026 * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
3027 and not user provided.
3028
30292001-02-13 Kazu Hirata <kazu@hxi.com>
3030
3031 * vms.c (vms_print_symbol): Remove unreachable code.
3032
3033 * rs6000-core.c: Fix formatting.
3034
30352001-02-13 David Mosberger <davidm@hpl.hp.com>
3036
3037 * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
3038 as _bfd_XXi_only_swap_filehdr_out.
3039 (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
3040 pe->force_minimum_alignment to TRUE.
3041 (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
3042 PEI_TARGET_SUBSYSTEM.
3043 (pe_print_private_bfd_data): Call
3044 _bfd_XX_print_private_bfd_data_common() instead of
3045 _bfd_pe_print_private_bfd_data_common().
3046 (pe_bfd_copy_private_bfd_data): Call
3047 _bfd_XX_bfd_copy_private_bfd_data_common() instead of
3048 _bfd_pe_bfd_copy_private_bfd_data_common().
3049 (coff_bfd_copy_private_section_data): Define as
3050 _bfd_XX_bfd_copy_private_section_data instead of
3051 _bfd_pe_bfd_copy_private_section_data.
3052 (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
3053 of a _bfd_pe_get_symbol_info.
3054
3055 * peigen.c: Delete.
3056
3057 * peXXigen.c: Renamed from peigen.c.
3058 (COFF_WITH_XX): Define this macro (will get expanded into
3059 COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
3060 compiled as peigen.c or pepigen.c.
3061 [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
3062 define the canonical PEP structures and definitions.
3063 (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
3064 effect, enforce minimum file and section alignments. If
3065 extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
3066 pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
3067 so, by default, this is a no-op).
3068
3069 * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
3070 (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
3071 _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
3072 _bfd_pefoo if it's not defined. Use these macros to define
3073 coff swap macros.
3074
3075 * libcoff.h (pe_tdata): Add members target_subsystem and
3076 force_minimum_alignment.
3077
3078 * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
3079 COFF_WITH_pep.
3080 (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
3081
3082 * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
3083 peigen.lo.
3084
3085 * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
3086 (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
3087 PEPAOUTHDR.
3088
3089 * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
3090 (BFD64_BACKENDS_CFILES): Mention pepigen.c
3091 (peigen.c): Add rule to generate from peXXigen.c.
3092 (pepigen.c): Ditto.
3093 (pepigen.lo): List dependencies for pepigen.lo.
3094
30952001-02-13 Alan Modra <alan@linuxcare.com.au>
3096
3097 * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
3098 $global$ referenced but not defined, set its value here.
3099
31002001-02-09 Bo Thorsen <bo@suse.de>
3101
3102 * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
3103 alignment to 3.
3104 (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
3105 and relocation.
3106 (elf64_x86_64_relocate_section): Fix formatting.
3107 (elf64_x86_64_relocate_section): Fix addend for relocation of
3108 R_X86_64_(8|16|32|PC8|PC16|PC32).
3109
31102001-02-12 Jan Hubicka <jh@suse.cz>
3111
3112 * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
3113
31142001-02-11 H.J. Lu <hjl@gnu.org>
3115
3116 * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
3117 alignment.
3118
31192001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3120
3121 * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
3122 from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
3123 relocations against dynsym symbols.
3124
3125 * elf32-mips.c (elf_mips_howto_table): Fix the comment on
3126 the R_MIPS_26 relocation.
3127 (mips_elf_calculate_relocation): Use (p + 4) instead of p for
3128 the R_MIPS_26 relocation.
3129 (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
3130 relocation.
3131 * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
3132 the R_MIPS_26 relocation.
3133 (mips_elf64_howto_table_rela): Likewise.
3134
3135 * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
3136 member to mark symbols that have non-CALL relocations against
3137 them.
3138 (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
3139 (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
3140 R_MIPS_GOT16.
3141 (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
3142 non-CALL relocation against it is encountered.
3143 (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
3144 (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
3145 no_fn_stub is not set.
3146
3147 * elf32-mips.c (mips_elf_output_extsym): Get the output section
3148 information from the real symbol for indirect ones.
3149 Check no_fn_stub to find out if a symbol has a function stub
3150 indeed.
3151
31522001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
3153
3154 * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
3155 * Makefile.in: Regenerate.
3156
31572001-02-09 David Mosberger <davidm@hpl.hp.com>
3158
3159 * elfxx-ia64.c (is_unwind_section_name): New function. Returns
3160 true if section name is an unwind table section name.
3161 (elfNN_ia64_additional_program_headers): Count each unwind section
3162 separately.
3163 (elfNN_ia64_modify_segment_map): Install one unwind program header
3164 for each unwind separate section. Note: normally the linker
3165 script merges the unwind sections that go into a single segment,
3166 so this still generates at most one unwind program header per
3167 segment.
3168
3169 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
3170 name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
3171 (elfNN_ia64_fake_sections): Mark sections with names that start
3172 with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
3173 unwind section.
3174
3175 * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
3176 Use it to make sh_info in unwind section point to the text section
3177 it applies to.
3178
31792001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
3180
3181 * Makefile.am: Add linux target for S/390.
3182 * archures.c: Likewise.
3183 * bfd-in2.h: Likewise.
3184 * config.bfd: Likewise.
3185 * configure.in: Likewise.
3186 * elf.c: Likewise.
3187 * libbfd.h: Likewise.
3188 * targets.c: Likewise.
3189 * cpu-s390.c: New file.
3190 * elf32-s390.c: New file.
3191 * elf64-s390.c: New file.
3192
31932001-02-09 Nick Clifton <nickc@redhat.com>
3194
3195 * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
3196 ImageBase. This has already been done by coff_swap_hdr_in.
3197
31982001-02-09 Jakub Jelinek <jakub@redhat.com>
3199
3200 * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
3201
32022001-02-09 Jakub Jelinek <jakub@redhat.com>
3203
3204 * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
3205 (sparc64_elf_relocate_section): Likewise.
3206
32072001-02-09 Mark Kettenis <kettenis@gnu.org>
3208
3209 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
3210 similar to R_SPARC_32.
3211 * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
3212
32132001-02-08 H.J. Lu <hjl@gnu.org>
3214
3215 * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
3216 relocation entries for weak definitions when building DSO with
3217 -Bsymbolic.
3218
32192001-02-08 Richard Henderson <rth@redhat.com>
3220
3221 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
3222 before visibility. Locally defined protected symbols are not
3223 dynamic.
3224
32252001-02-08 Geoffrey Keating <geoffk@redhat.com>
3226
3227 * config.bfd: Enable coff64 for rs6000-*. Patch from
3228 <hzoli@austin.ibm.com>.
3229
32302001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
3231
3232 * coffgen.c (coff_find_nearest_line): If stabs info is successfully
3233 found, do not attempt to find dwarf2 info before returning.
3234
32352001-02-07 Jakub Jelinek <jakub@redhat.com>
3236
3237 * elflink.h (is_global_symbol_definition): Rename to
3238 is_global_data_symbol_definition and have it reject function
3239 symbols.
3240 (elf_link_is_defined_archive_symbol): Use renamed function.
3241
32422001-02-07 Todd Vierling <tv@wasabisystems.com>
3243
3244 * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
3245 * libbfd.h (bfd_target_vector): Likewise.
3246 * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
3247 make static; create pointer reference named bfd_target_vector.
3248 (_bfd_target_vector_entries): Calculate this based on the array
3249 typed _bfd_target_vector.
3250
32512001-02-06 H.J. Lu <hjl@gnu.org>
3252
3253 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
3254 internal symbols are not dynamic.
3255 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
3256
32572001-02-06 Nick Clifton <nickc@redhat.com>
3258
3259 * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
3260 that it will not be pulled into the list of files that make up
3261 po/POTFILES.in.
3262 * Makefile.in: Regenerate.
3263 * po/bfd.pot: Regenerate.
3264
32652001-02-06 H.J. Lu <hjl@gnu.org>
3266
3267 * peicode.h (coff_swap_filehdr_in): Remove the e_magic
3268 checking.
3269 (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
3270 external_PEI_IMAGE_hdr.
3271
32722001-02-06 Kazu Hirata <kazu@hxi.com>
3273
3274 * elf-m10200.c: Fix formatting.
3275
32762001-02-04 Nick Clifton <nickc@redhat.com>
3277
3278 * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
3279 rel, it will be handled later on.
3280
32812001-02-02 Fred Fish <fnf@ninemoons.com>
3282
3283 * Makefile.in: Fix typo.
3284
32852001-02-01 Kazu Hirata <kazu@hxi.com>
3286
3287 * elf-m10300.c: Fix formatting.
3288
32892001-01-30 Alan Modra <alan@linuxcare.com.au>
3290
3291 * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
3292 (elf_backend_get_symbol_type): Define.
3293 (elf64_hppa_object_p): Set architecture and machine from elf
3294 header flags.
3295
32962001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
3297
3298 * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
3299 before mdebug.
3300
33012001-01-26 Richard Henderson <rth@redhat.com>
3302
3303 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
3304 for non-default visibility.
3305 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
3306 delete ugly macro and replace with pretty function.
3307
33082001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
3309
3310 * coff-go32.c: Update copyright.
3311 * coff-stgo32.c: Likewise.
3312 * coff-go32.c (COFF_LONG_FILENAMES): Define.
3313 * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
3314 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
3315 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
3316
33172001-01-25 Kazu Hirata <kazu@hxi.com>
3318
3319 * bfd-in2.h: Rebuild.
3320 * libbfd.h: Likewise.
3321
33222001-01-23 H.J. Lu <hjl@gnu.org>
3323
3324 * bfd-in2.h: Rebuild.
3325
33262001-01-23 H.J. Lu <hjl@gnu.org>
3327
3328 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
3329 is NULL or PRIV(vms_rec) is outside of the buffer.
3330
33312001-01-23 Kazu Hirata <kazu@hxi.com>
3332
3333 * coff64-rs6000.c: Fix formatting.
3334 * coff-arm.c: Likewise.
3335 * coffgen.c: Likewise.
3336 * cofflink.c: Likewise.
3337 * coff-mcore.c: Likewise.
3338 * coff-mips.c: Likewise.
3339 * coff-pmac.c: Likewise.
3340 * coff-ppc.c: Likewise.
3341 * coff-rs6000.c: Likewise.
3342 * elf32.c: Likewise.
3343 * elf32-fr30.c: Likewise.
3344 * elf32-i370.c: Likewise.
3345 * elf32-i860.c: Likewise.
3346 * elf32-m32r.c: Likewise.
3347 * elf32-m68k.c: Likewise.
3348 * elf32-mcore.c: Likewise.
3349 * elf32-ppc.c: Likewise.
3350 * elf32-sh.c: Likewise.
3351 * elf32-v850.c: Likewise.
3352 * elf64-alpha.c: Likewise.
3353 * elf64-sparc.c: Likewise.
3354 * elflink.c: Likewise.
3355 * elflink.h: Likewise.
3356 * elf-m10200.c: Likewise.
3357 * elf-m10300.c: Likewise.
3358 * elfxx-ia64.c: Likewise.
3359
3360 * aoutx.h: Fix formatting.
3361 * bfd.c: Likewise.
3362 * bfd-in2.h: Likewise.
3363 * bfd-in.h: Likewise.
3364 * cpu-i386.c: Likewise.
3365 * cpu-m68hc11.c: Likewise.
3366 * dwarf2.c: Likewise.
3367 * elf64-x86-64.c: Likewise.
3368 * format.c: Likewise.
3369 * freebsd.h: Likewise.
3370 * hash.c: Likewise.
3371 * hp300hpux.c: Likewise.
3372 * hppabsd-core.c: Likewise.
3373 * hpux-core.c: Likewise.
3374
33752001-01-22 Bo Thorsen <bo@suse.de>
3376
3377 * elf64-x86-64.c: Added PIC support for X86-64.
3378 (elf64_x86_64_link_hash_newfunc): Function added.
3379 (elf64_x86_64_link_hash_table_create): Likewise.
3380 (elf64_x86_64_check_relocs): Likewise.
3381 (elf64_x86_64_gc_mark_hook): Likewise.
3382 (elf64_x86_64_gc_sweep_hook): Likewise.
3383 (elf64_x86_64_adjust_dynamic_symbol): Likewise.
3384 (elf64_x86_64_size_dynamic_sections): Likewise.
3385 (elf64_x86_64_discard_copies): Likewise.
3386 (elf64_x86_64_finish_dynamic_symbol): Likewise.
3387 (elf64_x86_64_finish_dynamic_sections): Likewise.
3388 (elf64_x86_64_relocate_section): Add relocation of PIC sections.
3389
33902001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3391
3392 * Makefile.am (install-data-local): Make use of $(DESTDIR).
3393 * Makefile.in: Regenerate.
3394
33952001-01-21 Kazu Hirata <kazu@hxi.com>
3396
3397 * coff-a29k.c: Fix formatting.
3398
33992001-01-19 H.J. Lu <hjl@gnu.org>
3400
3401 * elf32-i386.c (elf_i386_check_relocs): Report files with bad
3402 relocation section names.
3403 (elf_i386_relocate_section): Report files with bad relocation
3404 section names and return false.
3405
34062001-01-17 Bo Thorsen <bo@suse.de>
3407
3408 * targets.c: Alphabetize list of xvecs.
3409
34102001-01-14 Alan Modra <alan@linuxcare.com.au>
3411
3412 * config.bfd: Add linux target variant for elfxx-hppa.
3413 * configure.in: Recognize bfd_elf32_hppa_linux_vec and
3414 bfd_elf64_hppa_linux_vec.
3415 * configure: Regenerate.
3416 * elf64-hppa.c: Include elf64-target.h again to support linux
3417 target variant.
3418 (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
3419 * elf32-hppa.c: Include elf32-target.h again to support linux
3420 target variant.
3421 (elf32_hppa_post_process_headers): New function.
3422 (elf_backend_post_process_headers): Define.
3423 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
3424 bfd_elf32_hppa_linux_vec.
3425
3426 * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
3427 and data_segment_base fields.
3428 (elf32_hppa_link_hash_table_create ): Init them.
3429 (elf32_hppa_check_relocs): Update comments.
3430 (hppa_record_segment_addr): New function.
3431 (elf32_hppa_relocate_section): Call it.
3432 (final_link_relocate): Handle R_PARISC_SEGREL32.
3433 (elf32_hppa_final_link): New function.
3434 (bfd_elf32_bfd_final_link): Define to call it.
3435 (hppa_unwind_entry_compare): New function.
3436 * cache.c (bfd_open_file): Create files in write+read mode.
3437
3438 * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
3439 SEGREL32 and numerous other relocs. Change duplicate
3440 R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
3441
3442 * opncls.c (bfd_fdopenr): Add parens like the comment says around
3443 O_ACCMODE.
3444
3445 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
3446 .plt entries for DT_INIT and DT_FINI.
3447 (elf32_hppa_finish_dynamic_sections): Remove special handling of
3448 DT_INIT and DT_FINI.
3449
3450 * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
3451 offsets for stub .plt access if wide mode. Check offset in range.
3452
34532001-01-13 Nick Clifton <nickc@redhat.com>
3454
3455 * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
3456 line.
3457
3458 * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
3459 line.
3460
34612001-01-12 Alan Modra <alan@linuxcare.com.au>
3462
3463 * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
3464 * configure: Regenerate.
3465
34662001-01-11 Peter Targett <peter.targett@arccores.com>
3467
3468 * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
3469 bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
3470 * cpu-arc.c (arch_info_struct): Add entries for variants.
3471 (bfd_arc_arch) Set default to bfd_mach_arc_5.
3472 (arc_get_mach) Don't assume machine names prefixed arc- before
3473 testing.
3474 * elf32-arc.c (arc_elf_object_p): Set machine number based on new
3475 selections.
3476 (arc_elf_final_write_processing) Likewise.
3477 (ELF_MACHINE_CODE) Use EM_ARC.
3478
34792001-01-10 Nick Clifton <nickc@redhat.com>
3480
3481 * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
3482
34832001-01-07 Philip Blundell <philb@gnu.org>
3484
3485 * README: Replace `bug-gnu-utils@gnu.org' with
3486 `bug-binutils@gnu.org'.
3487
34882001-01-04 Kazu Hirata <kazu@hxi.com>
3489
3490 * som.c: Fix formatting.
3491
34922001-01-03 Kazu Hirata <kazu@hxi.com>
3493
3494 * ecoffswap.h: Fix formatting.
3495 * elf-bfd.h: Likewise.
3496 * elfarm-nabi.c: Likewise.
3497 * elfarm-oabi.c: Likewise.
3498 * elfcode.h: Likewise.
3499 * elfcore.h: Likewise.
3500 * elflink.c: Likewise.
3501 * elflink.h: Likewise.
3502 * elfxx-ia64.c: Likewise.
3503 * elfxx-target.h: Likewise.
3504 * libbfd.c: Likewise
3505 * linker.c: Likewise.
3506 * lynx-core.c: Likewise.
3507
35082001-01-02 Kazu Hirata <kazu@hxi.com>
3509
3510 * pc532-mach.c: Fix formatting.
3511 * pe-arm.c: Likewise.
3512 * pe-i386.c: Likewise.
3513 * pe-mips.c: Likewise.
3514 * pe-ppc.c: Likewise.
3515 * pe-sh.c: Likewise.
3516 * pei-mips.c: Likewise.
3517 * pei-sh.c: Likewise.
3518 * peicode.h: Likewise.
3519 * ppcboot.c: Likewise.
3520 * ptrace-core.c: Likewise.
3521
35222001-01-01 Kazu Hirata <kazu@hxi.com>
3523
3524 * reloc.c: Fix formatting.
3525 * riscix.c: Likewise.
3526 * rs6000-core.c: Likewise.
3527 * xcoff-target.h: Likewise.
3528
35292000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
3530
3531 * elfcode.h (elf_object_p): Also restore the bfd mach field on
3532 error, by calling bfd_default_set_arch_mach with incoming
3533 values.
3534
35352000-12-26 Kazu Hirata <kazu@hxi.com>
3536
3537 * vaxnetbsd.c: Fix formatting.
3538 * versados.c: Likewise.
3539 * vms-gsd.c: Likewise.
3540 * vms-hdr.c: Likewise.
3541 * vms-misc.c: Likewise.
3542
35432000-12-25 Alexandre Oliva <aoliva@redhat.com>
3544
3545 * archive.c (coff_write_armap): Don't write more than symbol_count
3546 `archive_member_file_ptr's.
3547
35482000-12-25 Kazu Hirata <kazu@hxi.com>
3549
3550 * vms-tir.c: Fix formatting.
3551
35522000-12-23 Kazu Hirata <kazu@hxi.com>
3553
3554 * vms.c: Fix formatting.
3555 * vms.h: Likewise.
3556
35572000-12-21 Santeri Paavolainen <santtu@ssh.com>
3558
3559 * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
3560
3561 * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
3562
3563 * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
3564 arithmetic.
3565
3566 * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
3567
3568 * coffcode.h (styp_to_sec_flags): Add empty statement after label.
3569
35702000-12-21 Richard Sandiford <rsandifo@redhat.com>
3571
3572 * libbfd.c (bfd_get_bits): Added
3573 (bfd_put_bits): Likewise
3574 * bfd-in.h: Declared the above.
3575 * bfd-in2.h: Regenerated.
3576
35772000-12-20 Kazu Hirata <kazu@hxi.com>
3578
3579 * targets.c: Fix formatting.
3580 * tekhex.c: Likewise.
3581 * trad-core.c: Likewise.
3582
35832000-12-19 Kazu Hirata <kazu@hxi.com>
3584
3585 * sco5-core.c: Fix formatting.
3586 * section.c: Likewise.
3587 * sparclinux.c: Likewise.
3588 * sparclynx.c: Likewise.
3589 * sparcnetbsd.c: Likewise.
3590 * srec.c: Likewise.
3591 * stabs.c: Likewise.
3592 * stab-syms.c: Likewise.
3593 * sunos.c: Likewise.
3594 * syms.c: Likewise.
3595 * sysdep.h: Likewise.
3596
35972000-12-18 Nick Clifton <nickc@redhat.com>
3598
3599 * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
3600 defined.
3601 * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
3602 * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
3603
36042000-12-18 Nick Clifton <nickc@redhat.com>
3605
3606 * vms-misc.c (_bfd_vms_get_record): Add default case to
3607 file_format switch.
3608
36092000-12-15 Miloslav Trmac <mitr@volny.cz>
3610
3611 * elfcore.h (elf_core_file_p): Move to the start of the program
3612 headers before attempting to read them.
3613
36142000-12-14 Kazu Hirata <kazu@hxi.com>
3615
3616 * peigen.c: Fix formatting.
3617 * som.c: Likewise.
3618 * som.h: Likewise.
3619
36202000-12-13 Kazu Hirata <kazu@hxi.com>
3621
3622 * peigen.c: Fix formatting.
3623
36242000-12-12 Jim Wilson <wilson@redhat.com>
3625
3626 * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
3627
36282000-12-08 Mark Salter <msalter@redhat.com>
3629
3630 * binary.c (binary_set_section_contents): Ignore sections
3631 with zero size.
3632
36332000-12-12 Kazu Hirata <kazu@hxi.com>
3634
3635 * m68klinux.c: Fix formatting.
3636 * m68knetbsd.c: Likewise.
3637 * mipsbsd.c: Likewise.
3638 * netbsd-core.c: Likewise.
3639 * netbsd.h: Likewise.
3640 * newsos3.c: Likewise.
3641 * nlm32-alpha.c: Likewise.
3642 * nlm32-i386.c: Likewise.
3643 * nlm32-ppc.c: Likewise.
3644 * nlm32-sparc.c: Likewise.
3645 * nlmcode.h: Likewise.
3646 * nlmswap.h: Likewise.
3647 * nlm-target.h: Likewise.
3648 * ns32knetbsd.c: Likewise.
3649
36502000-12-10 Fred Fish <fnf@be.com>
3651
3652 * elflink.h (elf_link_output_extsym): Don't complain about undefined
3653 symbols in shared objects if allow_shlib_undefined is true.
3654
36552000-12-12 Nick Clifton <nickc@redhat.com>
3656
3657 * cpu-sh.c: Fix formattng.
3658 * elf.c: Fix formattng.
3659 * elf32-mips.c: Fix formattng.
3660 * elf32-sh.c: Fix formattng.
3661 * elf64-alpha.c: Fix formattng.
3662
36632000-12-09 Nick Clifton <nickc@redhat.com>
3664
3665 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
3666 dwarf2_find_line_info as last parameter to invocation of
3667 _bfd_dwarf2_find_nearest_line.
3668 * elf32-arm.h (elf32_arm_find_nearest_line): Pass
3669 dwarf2_find_line_info as last parameter to invocation of
3670 _bfd_dwarf2_find_nearest_line.
3671
36722000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
3673
3674 * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
3675 (BFD_LIBS): ...to here.
3676 (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
3677 (BFD_LIBS_CFILES): ...to here.
3678 * Makefile.in: Regenerate.
3679 * configure.in: Remove dwarf.lo from the elf shell variable.
3680 * configure: Regenerate.
3681 * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
3682 * libcoff.h: Regenerate.
3683 * coffgen.c (coff_find_nearest_line): Call
3684 _bfd_dwarf2_find_nearest_line.
3685 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
3686 accordingly.
3687 (read_abbrevs): Likewise
3688 (decode_line_info): Likewise.
3689 (parse_comp_unit): Likewise.
3690 (comp_unit_find_nearest_line): Likewise.
3691 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
3692 * libbfd.h: Regenerate.
3693 * elf.c (_bfd_elf_find_nearest_line): Update call.
3694 * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
3695 * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
3696 * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
3697 (sec_to_styp_flags): Use them. Handle DWARF2 sections.
3698 (styp_to_sec_flags): Handle DWARF2 sections.
3699 * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
3700 to _bfd_find_nearest_line.
3701 * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
3702 call to _bfd_find_nearest_line.
3703
37042000-12-08 Kazu Hirata <kazu@hxi.com>
3705
3706 * coffgen.c: Fix formatting.
3707 * elf-m10300.c: Likewise.
3708 * elf32-i386.c: Likewise.
3709 * elf32-i960.c: Likewise.
3710 * elf32-m68k.c: Likewise.
3711 * elf32-mcore.c: Likewise.
3712 * elf32-ppc.c: Likewise.
3713 * elf32-sh.c: Likewise.
3714 * elf32-sparc.c: Likewise.
3715 * elf32-v850.c: Likewise.
3716 * elf64-alpha.c: Likewise.
3717 * elf64-hppa.c: Likewise.
3718 * elf64-mips.c: Likewise.
3719 * elf64-sparc.c: Likewise.
3720
37212000-12-07 Kazu Hirata <kazu@hxi.com>
3722
3723 * elf32-ppc.c: Fix formatting.
3724 * elf64-x86-64.c: Likewise.
3725
37262000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
3727
3728 From Ralf Baechle <ralf@gnu.org>
3729
3730 * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
3731 BFDs containing no sections or empty .text, .data or .bss sections
3732 to be merged, regardless of their flags.
3733
37342000-12-06 Kazu Hirata <kazu@hxi.com>
3735
3736 * elf32-m32r.c: Fix formatting.
3737 * elf32-m68hc11.c: Likewise.
3738 * elf32-m68hc12.c: Likewise.
3739 * elf32-m68k.c: Likewise.
3740 * elf32-mcore.c: Likewise.
3741 * elf32-pj.c: Likewise.
3742 * elf32-ppc.c: Likewise.
3743
37442000-12-05 Kazu Hirata <kazu@hxi.com>
3745
3746 * elf32-fr30.c: Fix formatting.
3747 * elf32-hppa.c: Likewise.
3748 * elf32-i370.c: Likewise.
3749 * elf32-i386.c: Likewise.
3750 * elf32-i860.c: Likewise.
3751 * elf32-i960.c: Likewise.
3752
37532000-12-03 Kazu Hirata <kazu@hxi.com>
3754
3755 * elf32-arm.h: Fix formatting.
3756 * elf32-avr.c: Likewise.
3757 * elf32-cris.c: Likewise.
3758 * elf32-d10v.c: Likewise.
3759 * elf32-d30v.c: Likewise.
3760 * elf-hppa.h: Likewise.
3761 * elf-m10200.c: Likewise.
3762 * elf-m10300.c: Likewise.
3763
37642000-12-01 Chris Demetriou <cgd@sibyte.com>
3765
3766 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
3767 bfd_mach_mips32_4k. Update FIXME comment.
3768 * archures.c (bfd_mach_mips32): New constant.
3769 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
3770 the latter, renumber it.
3771 * bfd-in2.h (bfd_mach_mips32): New constant.
3772 (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
3773 the latter, renumber it.
3774 * cpu-mips.c (I_mips32): New constant.
3775 (I_mips4K, I_mips32_4k): Rename the former to the latter.
3776 (arch_info_struct): Add bfd_mach_mips32 entry, replace
3777 bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
3778 * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
3779 (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
3780 with E_MIPS_MACH_MIPS32_4K.
3781 (_bfd_mips_elf_final_write_processing): Replace
3782 bfd_mach_mips4K with bfd_mach_mips32_4k case, add
3783 bfd_mach_mips32 case.
3784 (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
3785 comparison with support for MIPS32.
3786 (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
3787 MIPS32.
3788
3789 * aoutx.h (NAME(aout,machine_type)): Add cases for
3790 bfd_mach_mips5 and bfd_mach_mips64.
3791 * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
3792 * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
3793 * cpu_mips.c (I_mips5, I_mips64): New definitions.
3794 (arch_info_struct): Add entries for bfd_mach_mips5 and
3795 bfd_mach_mips64.
3796 * elf32-mips.c (elf_mips_isa, elf_mips_mach,
3797 _bfd_mips_elf_print_private_bfd_data): Add cases for
3798 E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
3799 (_bfd_mips_elf_final_write_processing): Add cases for
3800 bfd_mach_mips5 and bfd_mach_mips64.
3801
3802 * aoutx.h (NAME(aout,machine_type)): Add a
3803 bfd_mach_mips_sb1 case.
3804 * archures.c (bfd_mach_mips_sb1): New constant.
3805 * bfd-in2.h (bfd_mach_mips_sb1): New constant.
3806 * cpu-mips.c (I_sb1): New constant.
3807 (arch_info_struct): Add entry for bfd_mach_mips_sb1.
3808 * elf32-mips.c (elf_mips_mach): Add case for
3809 E_MIPS_MACH_SB1.
3810 (_bfd_mips_elf_final_write_processing): Add case for
3811 bfd_mach_mips_sb1.
3812
38132000-12-01 Joel Sherrill <joel@OARcorp.com>
3814
3815 * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
3816 (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
3817 (sparc*-*-rtems*): Switched from a.out to ELF.
3818
38192000-11-30 Jan Hubicka <jh@suse.cz>
3820
3821 * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
3822 BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
3823 (elf64-x86-64.lo): Add dependencies.
3824 * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
3825 bfd_mach_x86_64_intel_syntax.
3826 * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
3827 * config.bfd (x86_64): Add.
3828 * configure.in: Add support for bfd_elf64_x86_64_vec.
3829 * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
3830 (bfd_i386_arch, i8086_ar): Link in.
3831 * elf64-x86-64.c: New file.
3832 * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
3833 * targets.c (bfd_elf64_x86_64_vec): Add.
3834 (bfd_target_vect): Add bfd_elf64_x86_64_vec.
3835
38362000-11-30 Kazu Hirata <kazu@hxi.com>
3837
3838 * xcofflink.c: Fix formatting.
3839
38402000-11-28 Kazu Hirata <kazu@hxi.com>
3841
3842 * aoutx.h: Fix formatting.
3843 * bfd-in.h: Likewise.
3844 * bfd-in2.h: Likewise.
3845 * cache.c: Likewise.
3846 * cisco-core.c: Likewise.
3847 * coff64-rs6000.c: Likewise.
3848 * coffcode.h: Likewise.
3849 * coffswap.h: Likewise.
3850 * corefile.c: Likewise.
3851 * elf32-mips.c: Likewise.
3852
38532000-11-27 Kazu Hirata <kazu@hxi.com>
3854
3855 * aout-adobe.c: Fix formatting.
3856 * coff64-rs6000.c: Likewise.
3857 * coffgen.c: Likewise.
3858 * cofflink.c: Likewise.
3859
38602000-11-27 Philip Blundell <pb@futuretv.com>
3861
3862 * libcoff-in.h (coff_tdata): Add `strings_written' flag.
3863 (obj_coff_strings_written): New accessor macro for above.
3864 * libcoff.h: Regenerate.
3865 * cofflink.c (_bfd_coff_final_link): Say that we wrote the
3866 strings.
3867 * coffcode.h (coff_write_object_contents): No need to write out
3868 the string table if it's already been done.
3869
38702000-11-22 Philip Blundell <pb@futuretv.com>
3871
3872 * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
3873 weak undefined symbols.
3874
38752000-11-24 Nick Clifton <nickc@redhat.com>
3876
3877 * archures.c (bfd_mach_arm_5TE): Define.
3878 (bfd_mach_arm+XScale): Define.
3879 * bfd-in2.h: Regenerate.
3880
3881 * coff-arm.c (coff_arm_reloc_type_lookup): Accept
3882 BFD_RELOC_ARM_PCREL_BLX.
3883
3884 * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
3885 XScale machine numbers.
3886
3887 * config.bfd (xscale-elf): Add target.
3888 (xscale-coff): Add target.
3889
3890 * cpu-arm.c: Add xscale machine name.
3891 Add v5t, v5te and XScale machine numbers.
3892
38932000-11-23 Kazu Hirata <kazu@hxi.com>
3894
3895 * aix386-core.c: Fix formatting.
3896
38972000-11-22 Jim Wilson <wilson@redhat.com>
3898
3899 * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
3900 (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
3901 * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
3902 (ins_imms_scaled): Initialize sign_bit at function entry.
3903 (elf64_ia64_operands): Add missing initializers.
3904 * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
3905 elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
3906 elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
3907 elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
3908 elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
3909 parameters.
3910 (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
3911 and free_extsyms at function entry.
3912 (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
3913 (elfNN_ia64_create_dynamic_sections): Delete unused local h.
3914 (get_got): Delete unused local srel.
3915 (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
3916 (elfNN_ia64_relocate_section): Delete unused local dynindx.
3917
39182000-11-21 Kazu Hirata <kazu@hxi.com>
3919
3920 * coff-a29k.c: Fix formatting.
3921 * coff-h8500.c: Likewise.
3922 * coff-i960.c: Likewise.
3923 * coff-ppc.c: Likewise.
3924 * coff-rs6000.c: Likewise.
3925 * coff-stgo32.c: Likewise.
3926 * coff-tic54x.c: Likewise.
3927 * coff-w65.c: Likewise.
3928 * cpu-h8500.c: Likewise.
3929 * cpu-hppa.c: Likewise.
3930 * cpu-ns32k.c: Likewise.
3931 * ecoff.c: Likewise.
3932 * ecofflink.c: Likewise.
3933
39342000-11-21 Nick Clifton <nickc@redhat.com>
3935
3936 * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
3937 remove possibility of infinite loop.
3938
39392000-11-20 Kazu Hirata <kazu@hxi.com>
3940
3941 * aix386-core.c: Fix formatting.
3942 * aout-adobe.c: Likewise.
3943 * aout-arm.c: Likewise.
3944 * aout-encap.c: Likewise.
3945 * aout-ns32k.c: Likewise.
3946 * aout-target.h: Likewise.
3947 * aout-tic30.c: Likewise.
3948 * aoutf1.h: Likewise.
3949 * aoutx.h: Likewise.
3950 * archive.c: Likewise.
3951 * bfd-in.h: Likewise.
3952 * bfd-in2.h: Likewise.
3953 * bfd.c: Likewise.
3954 * bout.c: Likewise.
3955
39562000-11-17 H.J. Lu <hjl@gnu.org>
3957
3958 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
3959 pltoff entries for DT_INIT and DT_FINI.
3960 (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
3961 (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
3962 entries.
3963
39642000-11-16 Richard Henderson <rth@redhat.com>
3965
3966 * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
3967 (allocate_dynrel_entries): Likewise.
3968 (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
3969 (set_pltoff_entry): Likewise.
3970 (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
3971 (elfNN_ia64_reloc_type_lookup): Likewise.
3972 (elfNN_ia64_install_value): Likewise.
3973 (elfNN_ia64_relocate_section): Likewise.
3974 * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
3975 (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
3976
39772000-11-16 Kazu Hirata <kazu@hxi.com>
3978
3979 * cpu-a29k.c: Fix formatting.
3980 * cpu-alpha.c: Likewise.
3981 * cpu-arm.c: Likewise.
3982 * cpu-avr.c: Likewise.
3983 * cpu-d10v.c: Likewise.
3984 * cpu-h8500.c: Likewise.
3985 * cpu-hppa.c: Likewise.
3986 * cpu-i370.c: Likewise.
3987 * cpu-i386.c: Likewise.
3988 * cpu-i960.c: Likewise.
3989 * cpu-ia64-opc.c: Likewise.
3990 * cpu-ia64.c: Likewise.
3991 * cpu-m32r.c: Likewise.
3992 * cpu-m68hc11.c: Likewise.
3993 * cpu-m68hc12.c: Likewise.
3994 * cpu-m68k.c: Likewise.
3995 * cpu-m88k.c: Likewise.
3996 * cpu-mips.c: Likewise.
3997 * cpu-ns32k.c: Likewise.
3998 * cpu-pj.c: Likewise.
3999 * cpu-powerpc.c: Likewise.
4000 * cpu-sh.c: Likewise.
4001 * cpu-sparc.c: Likewise.
4002 * cpu-tic54x.c: Likewise.
4003 * cpu-v850.c: Likewise.
4004 * cpu-vax.c: Likewise.
4005 * cpu-w65.c: Likewise.
4006 * cpu-we32k.c: Likewise.
4007 * cpu-z8k.c: Likewise.
4008 * dwarf1.c: Likewise.
4009 * dwarf2.c: Likewise.
4010
40112000-11-15 Kazu Hirata <kazu@hxi.com>
4012
4013 * coff-arm.c: Fix formatting.
4014 * coff-ppc.c: Likewise.
4015 * coff-rs6000.c: Likewise.
4016 * coff-sh.c: Likewise.
4017 * coff-sparc.c: Likewise.
4018 * coff-tic30.c: Likewise.
4019 * coff-tic54x.c: Likewise.
4020 * coff-tic80.c: Likewise.
4021 * coff-w65.c: Likewise.
4022 * coff-we32k.c: Likewise.
4023 * coff-z8k.c: Likewise.
4024
40252000-11-15 Richard Henderson <rth@redhat.com>
4026
4027 * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
4028 section with the same ALLOC|LOAD flags as the source section.
4029
40302000-11-14 Jakub Jelinek <jakub@redhat.com>
4031
4032 * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
4033 by STO_ALPHA constants.
4034
40352000-11-14 Kazu Hirata <kazu@hxi.com>
4036
4037 * coff-pmac.c: Fix formatting.
4038 * coff-ppc.c: Likewise.
4039
40402000-11-13 H.J. Lu <hjl@gnu.org>
4041
4042 * elflink.h (elf_link_add_object_symbols): Also add indirect
4043 symbols for common symbols with the default version.
4044
40452000-11-09 Philip Blundell <pb@futuretv.com>
4046
4047 * section.c (STD_SECTION): Set gc_mark flag.
4048
40492000-11-11 Kazu Hirata <kazu@hxi.com>
4050
4051 * coff-i960.c: Likewise.
4052 * coff-m68k.c: Likewise.
4053 * coff-m88k.c: Likewise.
4054 * coff-mcore.c: Likewise.
4055 * coff-mips.c: Likewise.
4056
40572000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
4058
4059 * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
4060
40612000-11-10 Kazu Hirata <kazu@hxi.com>
4062
4063 * coff-h8300.c: Fix formatting.
4064 * coff-h8500.c: Likewise.
4065 * coff-i386.c: Likewise.
4066 * coff-i860.c: Likewise.
4067 * coff-i960.c: Likewise.
4068 * coff-ia64.c: Likewise.
4069
40702000-11-09 Kazu Hirata <kazu@hxi.com>
4071
4072 * archive.c: Fix formatting.
4073 * archures.c: Likewise.
4074
40752000-11-07 Richard Henderson <rth@redhat.com>
4076
4077 * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
4078 Set it before bfd_elf64_bfd_final_link call. Use it after the call.
4079 * section.c (bfd_set_section_contents): Call memcpy if
4080 section->contents set and location not equal to contents plus offset.
4081
40822000-11-08 Kazu Hirata <kazu@hxi.com>
4083
4084 * bfd-in.h: Fix formatting.
4085 * bfd-in2.h: Likewise.
4086 * bfd.c: Likewise.
4087 * binary.c: Likewise.
4088 * bout.c: Likewise.
4089 * coff-a29k.c: Likewise.
4090 * coff-alpha.c: Likewise.
4091 * coff-apollo.c: Likewise.
4092 * coff-aux.c: Likewise.
4093
40942000-11-07 Kazu Hirata <kazu@hxi.com>
4095
4096 * aix386-core.c: Fix formatting.
4097 * aoutf1.h: Likewise.
4098 * aoutx.h: Likewise.
4099 * archures.c: Likewise.
4100 * armnetbsd.c: Likewise.
4101
41022000-11-07 Alan Modra <alan@linuxcare.com.au>
4103
4104 * coff-h8300.c (special): Adjust reloc address.
4105
41062000-11-06 Steve Ellcey <sje@cup.hp.com>
4107
4108 * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
4109 to differentiate elf32 and elf64 on ia64.
4110 * bfd-in2.h: Regenerate.
4111 * config.bfd: Add target for "ia64*-*-hpux*".
4112 * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
4113 * configure: Regenerate.
4114 * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
4115 * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
4116
4117 * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
4118 from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
4119 * Makefile.in: Regnerate.
4120 * elf64-ia64.c: Deleted.
4121 * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
4122
41232000-11-06 Kazu Hirata <kazu@hxi.com>
4124
4125 * aout-adobe.c: Fix formatting.
4126 * aout-arm.c: Likewise.
4127 * aout-cris.c: Likewise.
4128 * aout-encap.c: Likewise.
4129 * aout-ns32k.c: Likewise.
4130 * aout-target.h: Likewise.
4131 * aout-tic30.c: Likewise.
4132
41332000-11-05 Philip Blundell <philb@gnu.org>
4134
4135 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
4136 BFDs containing no sections to be merged, regardless of their flags.
4137
41382000-11-04 Philip Blundell <philb@gnu.org>
4139
4140 * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
4141 if a relocation for an undefined symbol also results in an
4142 overflow.
4143
41442000-11-06 Christopher Faylor <cgf@cygnus.com>
4145
4146 * config.bfd: Add support for Sun Chorus.
4147
41482000-11-05 David O'Brien <obrien@FreeBSD.org>
4149
4150 * configure.in: Recognize alpha-*-freebsd*.
4151 * configure: Regenerate.
4152
41532000-11-02 Luciano Gemme <ishitawa@yahoo.com>
4154
4155 * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
4156 (Chunk): New global variable set by a parameter in objcopy.c.
4157 (S3Forced): New global variable set by a parameter in
4158 objcopy.c.
4159 (srec_set_section_contents): If S3Forced is true, always generate
4160 S3 records.
4161 (srec_write_section): Use 'Chunk' to limit maximum length of S
4162 records.
4163
41642000-11-02 Per Lundberg <plundis@chaosdev.org>
4165
4166 * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
4167 * Makefile.in: Regenerate.
4168 * bfd-in2.h: Regenerate.
4169 * po/bfd.pot: Regenerate.
4170
41712000-10-31 Philip Blundell <philb@gnu.org>
4172
4173 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
4174 EF_SOFT_FLOAT if it is defined.
4175
41762000-10-27 Philip Blundell <philb@gnu.org>
4177
4178 * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
4179 attempts to mix PIC code with non-PIC, just mark the output as
4180 being position dependent.
4181 (elf32_arm_merge_private_bfd_data): Likewise. Print an error
4182 message for EF_SOFT_FLOAT mismatches. Display diagnostics for
4183 all mismatches, not just the first one.
4184
41852000-10-25 Chris Demetriou <cgd@sibyte.com>
4186
4187 * ieee.c (ieee_archive_p): Plug one of many possible
4188 memory leaks in error handling.
4189
41902000-10-20 Jakub Jelinek <jakub@redhat.com>
4191
4192 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
4193 elf32_sparc_object_p, elf32_sparc_final_write_processing):
4194 Support v8plusb.
4195 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
4196 sparc64_elf_object_p): Support v9b.
4197 * archures.c: Declare v8plusb and v9b machines.
4198 * bfd-in2.h: Ditto.
4199 * cpu-sparc.c: Ditto.
4200
42012000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4202
4203 * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
4204 of a GOT reloc.
4205
4206 * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
4207 (SYMBOL_CALLS_LOCAL): New macro.
4208 (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
4209 (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
4210 (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
4211 (ppc_elf_relocate_section): Use flag variable to determine
4212 whether the relocation refers to a local symbol.
4213 Test whether a PLTREL24 reloc will produce a reloc by looking
4214 to see whether a PLT entry was made.
4215
42162000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
4217
4218 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
4219 entries that could serve as a definition for a weak symbol.
4220
42212000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
4222
4223 From Ralf Baechle <ralf@gnu.org>
4224
4225 * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
4226 local_p. Add symbol value only for non-R_MIPS_REL32 relocations
4227 against local symbols.
4228 (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
4229
42302000-10-12 Alan Modra <alan@linuxcare.com.au>
4231
4232 * section.c (struct sec): Add kept_section.
4233 (struct bfd_comdat_info): Remove sec, we can use above.
4234 (STD_SECTION): Add initializer.
4235 (bfd_make_section_anyway): Init here too.
4236
4237 * bfd-in2.h: Regenerate.
4238
4239 * elflink.h (elf_link_add_object_symbols): Remove unnecessary
4240 zeroing of `flags'.
4241 (elf_link_input_bfd): Set all asection->symbol->value's here, and
4242 fudge values for discarded link-once section symbols.
4243
4244 * elf64-hppa.c: Include alloca-conf.h
4245
42462000-10-11 Alan Modra <alan@linuxcare.com.au>
4247
4248 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
4249
4250 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
4251
42522000-10-10 Alan Modra <alan@linuxcare.com.au>
4253
4254 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
4255
42562000-10-10 Tom Rix <trix@redhat.com>
4257
4258 * section.c (bfd_make_section_anyway): Release newsect ptr when
4259 newsect->symbol fails to alloc. Use bfd_release instead of free.
4260
42612000-10-09 Richard Henderson <rth@cygnus.com
4262
4263 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
4264 (elf64_ia64_unwind_entry_compare): New.
4265 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
4266
42672000-10-07 Alan Modra <alan@linuxcare.com.au>
4268
4269 * elflink.h (size_dynamic_sections): Don't create various tags if
4270 .dynstr is excluded from the link. Don't set first dynsym entry
4271 if dynsymcount is zero.
4272 (elf_bfd_final_link): Don't try to swap out dynamic syms if
4273 .dynsym excluded from the link. Don't try to write any dynamic
4274 sections excluded from the link.
4275
4276 * elf.c (swap_out_syms): Handle global section symbols.
4277
42782000-10-05 DJ Delorie <dj@redhat.com>
4279
4280 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
4281 * coffcode.h (coff_set_alignment_hook): read extended reloc count
4282 (coff_write_relocs): write extended reloc count
4283 (coff_write_object_contents): account for extended relocs
4284
42852000-10-05 Jim Wilson <wilson@cygnus.com>
4286
4287 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
4288 field.
4289 * elf.c (_bfd_elf_make_section_from_shdr): Call the
4290 elf_backend_section_flags function.
4291 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
4292 code.
4293 (elf64_ia64_section_flags): New function containing flag conversion
4294 code.
4295 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
4296 * elfxx-target.h (elf_backend_section_flags): Define.
4297 (elfNN_bed): Initialize elf_backend_section_flags field.
4298
42992000-10-02 Alan Modra <alan@linuxcare.com.au>
4300
4301 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
4302 _bfd_elf32_gc_record_vtable. Correct a comment.
4303
43042000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
4305
4306 From Ralf Baechle <ralf@gnu.org>
4307
4308 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
4309 produces binaries with got[1] = 0x80000001 to differenciate them
4310 for the dynamic linker from the broken binaries produced by old
4311 versions.
4312
43132000-09-30 Petr Sorfa <petrs@sco.com>
4314
4315 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
4316 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
4317 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
4318 * configure: Regenerate.
4319
43202000-09-27 Hans-Peter Nilsson <hp@axis.com>
4321
4322 Define two bfd_targets for absence and presence of leading
4323 underscore on symbols. Make sure to only link same kind.
4324 * elf32-cris.c (cris_elf_object_p,
4325 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
4326 cris_elf_merge_private_bfd_data): New.
4327 (elf_backend_object_p, elf_backend_final_write_processing,
4328 bfd_elf32_bfd_print_private_bfd_data,
4329 bfd_elf32_bfd_merge_private_bfd_data): Define.
4330 <Target vector definition>: Include elf32-target.h twice with
4331 different macro settings:
4332 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
4333 bfd_elf32_us_cris_vec.
4334 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
4335 (elf_symbol_leading_char): First as 0, then '_'.
4336 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
4337 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
4338 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
4339 * configure: Regenerate.
4340 * targets.c: Declare bfd_elf32_us_cris_vec.
4341 * po/bfd.pot: Regenerate.
4342
43432000-09-29 Momchil Velikov <velco@fadata.bg>
4344
4345 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
4346 R_ARM_THM_PC22 relocations.
4347
43482000-09-29 NIIBE Yutaka <gniibe@chroot.org>
4349
4350 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
4351
43522000-09-29 Momchil Velikov <velco@fadata.bg>
4353
4354 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
4355 is has the SEC_HAS_CONTENTS flag set.
4356