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