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