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