d9b016be91c3fedf9c0fa06172d65e66da6a19eb
[binutils-gdb.git] / bfd / ChangeLog
1 2000-10-11 Alan Modra <alan@linuxcare.com.au>
2
3 * elf.c (swap_out_syms): Revert 2000-10-07 changes.
4
5 * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
6
7 2000-10-10 Alan Modra <alan@linuxcare.com.au>
8
9 * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
10
11 2000-10-10 Tom Rix <trix@redhat.com>
12
13 * section.c (bfd_make_section_anyway): Release newsect ptr when
14 newsect->symbol fails to alloc. Use bfd_release instead of free.
15
16 2000-10-09 Richard Henderson <rth@cygnus.com
17
18 * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
19 (elf64_ia64_unwind_entry_compare): New.
20 (elf64_ia64_final_link): Sort the .IA_64.unwind section.
21
22 2000-10-07 Alan Modra <alan@linuxcare.com.au>
23
24 * elflink.h (size_dynamic_sections): Don't create various tags if
25 .dynstr is excluded from the link. Don't set first dynsym entry
26 if dynsymcount is zero.
27 (elf_bfd_final_link): Don't try to swap out dynamic syms if
28 .dynsym excluded from the link. Don't try to write any dynamic
29 sections excluded from the link.
30
31 * elf.c (swap_out_syms): Handle global section symbols.
32
33 2000-10-05 DJ Delorie <dj@redhat.com>
34
35 * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
36 * coffcode.h (coff_set_alignment_hook): read extended reloc count
37 (coff_write_relocs): write extended reloc count
38 (coff_write_object_contents): account for extended relocs
39
40 2000-10-05 Jim Wilson <wilson@cygnus.com>
41
42 * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
43 field.
44 * elf.c (_bfd_elf_make_section_from_shdr): Call the
45 elf_backend_section_flags function.
46 * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
47 code.
48 (elf64_ia64_section_flags): New function containing flag conversion
49 code.
50 (elf_backend_section_flags): Define to elf64_ia64_section_flags.
51 * elfxx-target.h (elf_backend_section_flags): Define.
52 (elfNN_bed): Initialize elf_backend_section_flags field.
53
54 2000-10-02 Alan Modra <alan@linuxcare.com.au>
55
56 * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
57 _bfd_elf32_gc_record_vtable. Correct a comment.
58
59 2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
60
61 From Ralf Baechle <ralf@gnu.org>
62
63 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
64 produces binaries with got[1] = 0x80000001 to differenciate them
65 for the dynamic linker from the broken binaries produced by old
66 versions.
67
68 2000-09-30 Petr Sorfa <petrs@sco.com>
69
70 * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
71 (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
72 * configure.in: Add check for pxstatus_t and lwpxstatus_t.
73 * configure: Regenerate.
74
75 2000-09-27 Hans-Peter Nilsson <hp@axis.com>
76
77 Define two bfd_targets for absence and presence of leading
78 underscore on symbols. Make sure to only link same kind.
79 * elf32-cris.c (cris_elf_object_p,
80 cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
81 cris_elf_merge_private_bfd_data): New.
82 (elf_backend_object_p, elf_backend_final_write_processing,
83 bfd_elf32_bfd_print_private_bfd_data,
84 bfd_elf32_bfd_merge_private_bfd_data): Define.
85 <Target vector definition>: Include elf32-target.h twice with
86 different macro settings:
87 (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
88 bfd_elf32_us_cris_vec.
89 (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
90 (elf_symbol_leading_char): First as 0, then '_'.
91 (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
92 * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
93 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
94 * configure: Regenerate.
95 * targets.c: Declare bfd_elf32_us_cris_vec.
96 * po/bfd.pot: Regenerate.
97
98 2000-09-29 Momchil Velikov <velco@fadata.bg>
99
100 * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
101 R_ARM_THM_PC22 relocations.
102
103 2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
104
105 * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
106
107 2000-09-29 Momchil Velikov <velco@fadata.bg>
108
109 * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
110 is has the SEC_HAS_CONTENTS flag set.
111
112 2000-09-28 Örjan Friberg <orjanf@axis.com>
113 Hans-Peter Nilsson <hp@axis.com>
114
115 * aout-cris.c (N_TXTADDR): Define.
116
117 2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
118
119 * som.c: Include alloca-conf.h.
120 * Makefile.am: "make dep-am"
121 * Makefile.in: Regenerate.
122
123 2000-09-27 Alan Modra <alan@linuxcare.com.au>
124
125 * elf32-hppa.c (plt_stub): New.
126 (PLT_STUB_ENTRY): Define.
127 (elf32_hppa_link_hash_table): Change multi_subspace to packed
128 boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
129 (elf32_hppa_link_hash_table_create): Init to suit.
130 (elf32_hppa_check_relocs): Set has_12bit_branch and
131 has_17bit_branch as appropriate.
132 (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
133 non-local functions.
134 (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
135 Add space for plt_stub as needed.
136 (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
137 functions at plt_stub.
138 (elf32_hppa_finish_dynamic_sections): Write plt_stub.
139 (elf32_hppa_create_dynamic_sections): Leave .plt executable.
140
141 * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
142 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
143 of fixed size, and if negative, disable handling of input sections
144 before stub section. Set up default stub group size depending
145 on detected branch relocs.
146 (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
147 ensure different offsets from sym_value aren't rounded to
148 different 2k blocks. Use lrsel and rrsel for other stubs too for
149 consistency rather than necessity.
150 (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
151 (final_link_relocate): Likewise.
152 (elf32_hppa_relocate_section): Likewise.
153
154 * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
155 (_bfd_elf_hppa_gen_reloc_type): Generate them.
156 (elf_hppa_final_link_relocate): Handle them.
157 (elf_hppa_relocate_insn): Likewise.
158 (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
159
160 2000-09-26 Hans-Peter Nilsson <hp@axis.com>
161
162 * elfcode.h (elf_object_p): Preserve and clear abfd section
163 information. Restore at error.
164
165 2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
166
167 * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
168 is empty, make sure that its rva also 0. NT loader dislikes
169 having otherwise.
170
171 2000-09-26 Steve Ellcey <sje@cup.hp.com>
172
173 * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
174 global by default.
175
176 2000-09-21 Alan Modra <alan@linuxcare.com.au>
177
178 * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
179 currently unused RELATIVE_DYNAMIC_RELOCS code.
180 (hppa_discard_copies): Likewise.
181 (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
182 comments. Don't check non-code output sections for stub grouping.
183
184 2000-09-20 Alan Modra <alan@linuxcare.com.au>
185
186 * section.c (bfd_get_unique_section_name): Return NULL if
187 bfd_malloc fails.
188
189 2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
190
191 * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
192 instruction sequence to actually work.
193 (elf_m68k_finish_dynamic_sections): Change the patch-in offset
194 accordingly.
195
196 2000-09-18 Alexandre Oliva <aoliva@redhat.com>
197
198 * elf32-sh.c (sh_elf_relocate_section): Use
199 _bfd_final_link_relocate to apply the relocation against a section
200 symbol, when doing relocatable links.
201
202 2000-09-18 Alan Modra <alan@linuxcare.com.au>
203
204 * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
205 to id_sec.
206 (stub_hash_newfunc): Here too.
207 (hppa_add_stub): And here.
208 (elf32_hppa_link_hash_table): Remove stub_section_created,
209 reloc_section_created, first_init_sec and first_fini_sec. Add
210 stub_group.
211 (elf32_hppa_link_hash_table_create): Init to suit.
212 (hppa_get_stub_entry): Add support for grouping stub sections.
213 (hppa_add_stub): Likewise. Remove sec_count param and init/fini
214 section code. Index stub vars by section->id.
215 (elf32_hppa_size_stubs): Likewise. Remove duplicated function
216 exit paths. Zap allocation of above removed vars. Refine
217 link-once test.
218
219 * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
220 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
221 (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
222 rather than pointer to bfd_link_info.
223 (hppa_add_stub): Likewise.
224 (final_link_relocate): Likewise.
225
226 2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
227
228 (elf32_hppa_size_stubs): Don't try to build stubs for discarded
229 link-once sections.
230
231 2000-09-16 Alexandre Oliva <aoliva@redhat.com>
232
233 * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
234 ld/emulparams/shelf.sh.
235
236 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
237
238 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
239 * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
240 * bfd-in2.h: Regenerate.
241
242 2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
243
244 * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
245 LITUSE relocations incorrectly if -relax is specified on the ld
246 command line and the displacement field of the load or store
247 instruction is non-zero. (Patch by paul.winalski@compaq.com)
248
249 2000-09-15 Alan Modra <alan@linuxcare.com.au>
250
251 * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
252 first_fini_sec here.
253 (elf32_hppa_size_stubs): Instead correctly find the first .init
254 and .fini section here.
255
256 2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
257
258 * elf32-hppa.c (clobber_millicode_symbols): New function.
259 (elf32_hppa_size_dynamic_sections): Call it.
260
261 2000-09-14 Alan Modra <alan@linuxcare.com.au>
262
263 * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
264 packed. Add plabel, plt_abs packed booleans.
265 (hppa_link_hash_newfunc): Init new fields.
266 (PLABEL_PLT_ENTRY_SIZE): Define.
267 (hppa_stub_name): Use size_t len vars.
268 (hppa_add_stub): Likewise.
269 (elf32_hppa_build_stubs): Likewise.
270 (hppa_build_one_stub): Kill some compiler warnings.
271 (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
272 if dynamic linking. Munge the local plt offsets into
273 local_got_refcounts. Set h->plabel for all global PLABELs. Use
274 size_t len vars. Add assert for plabel addend.
275 (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
276 (elf32_hppa_hide_symbol): New function.
277 (elf_backend_hide_symbol): Define.
278 (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
279 with h->plabel set. Don't make plt entries to have dynamic syms
280 when they have been forced local. If plt entry is used by a
281 plabel, make it PLABEL_PLT_ENTRY_SIZE.
282 (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
283 Set up .plt offsets for local syms.
284 (elf32_hppa_relocate_section): Initialise plt entries for local
285 syms. Leave weak undefined plabels zero. Make global plabel
286 relocs against function symbol, and leave the addend zero.
287 Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
288 (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
289 non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
290 relocs instead of SEGREL32 for dynamic got relocs.
291 (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
292 (elf_backend_got_header_size): Adjust.
293 (elf32_hppa_set_gp): Calculate an "ideal" LTP.
294
295 * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
296 (hppa_type_of_stub): Use it instead of #if 0
297 (hppa_discard_copies): Use it here too.
298 (elf32_hppa_size_dynamic_sections): And here.
299
300 * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
301 (elf32_hppa_link_hash_table_create): And here.
302 (hppa_build_one_stub): And here. Instead keep track of stub
303 offset using _raw_size.
304 (elf32_hppa_size_stubs): Likewise.
305 (elf32_hppa_build_stubs): Likewise.
306 (hppa_size_one_stub): Likewise. Resize reloc section too.
307
308 * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
309 first_fini_sec handling. Don't search for reloc section or set
310 hplink->reloc_section_created here.
311 (elf32_hppa_size_stubs): Instead search for reloc sections, and
312 set reloc_section_created here.
313 (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
314 (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
315 and DT_FINI.
316 (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
317
318 * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
319 with `hplink->root.'.
320 (elf32_hppa_check_relocs): Likewise.
321 (elf32_hppa_gc_sweep_hook): Likewise.
322 (elf32_hppa_adjust_dynamic_symbol): Likewise.
323 (hppa_handle_PIC_calls): Likewise.
324 (elf32_hppa_size_dynamic_sections): Likewise.
325 (elf32_hppa_set_gp): Likewise.
326 (elf32_hppa_relocate_section): Likewise.
327 (elf32_hppa_finish_dynamic_symbol): Likewise.
328 (elf32_hppa_finish_dynamic_sections): Likewise.
329
330 From David Huggins-Daines <dhd@linuxcare.com>
331 * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
332 defined weak symbols in shared links.
333 (final_link_relocate): Calls to defined weak symbols in shared
334 objects must go via import stubs, as the target might not be known
335 at link time.
336
337 2000-09-14 Alexandre Oliva <aoliva@redhat.com>
338
339 * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
340 R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
341 R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
342 the original entries with EMPTY_HOWTOs, and added new ones to fill
343 in the gap.
344 (sh_elf_info_to_howto): Make sure the new gap isn't used.
345 (sh_elf_relocate_section): Likewise.
346
347 2000-09-13 Anders Norlander <anorland@acc.umu.se>
348
349 * cpu-mips.c (arch_info_struct): Add mips:4K
350 * bfd-in2.h (bfd_mach_mips4K): New define.
351 * archures.c: Add bfd_mach_mips4K to comment.
352 * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
353 E_MIPS_ARCH_2 for bfd_mach_mips4K.
354
355 Wed Sep 13 19:31:39 2000 Marco Franzen <marcof@thyron.com>
356
357 * som.c (som_write_symbol_strings): Do not used fixed buffers,
358 use size_t as a counter.
359 (som_write_space_strings): Similarly.
360
361 2000-09-12 Jason Eckhardt <jle@cygnus.com>
362
363 * elf32-i860.c (elf32_i860_relocate_pc26): New function
364 and prototype.
365 (elf32_i860_relocate_section): Invoke new function from here.
366
367 2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
368
369 * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
370 static.
371
372 2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
373
374 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
375 target section name instead of dumping core when the target symbol is
376 undefined.
377
378 2000-09-09 Kazu Hirata <kazu@hxi.com>
379
380 * riscix.c: Remove DEFUN.
381
382 2000-09-08 Nick Clifton <nickc@redhat.com>
383
384 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
385 initialise flags in output bfd if the input bfd is the default
386 architecture with the default flags.
387
388 2000-09-08 Kazu Hirata <kazu@hxi.com>
389
390 * archive.c: Fix formatting.
391 * coff-arm.c: Likewise.
392 * doc/chew.c: Likewise.
393
394 2000-09-08 Alan Modra <alan@linuxcare.com.au>
395
396 * section.c (bfd_get_unique_section_name): Put a dot before the
397 numeric suffix.
398
399 2000-09-07 Kazu Hirata <kazu@hxi.com>
400
401 * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
402 * elf.c: Fix formatting.
403
404 2000-09-07 Alexandre Oliva <aoliva@redhat.com>
405
406 * config.bfd (sh-*-linux*): Added.
407 * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
408 * targets.c: Declare them.
409 * elf32-sh-lin.c: New file.
410 * Makefile.am: Compile it.
411 * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
412 * configure, Makefile.in: Rebuilt.
413
414 2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
415
416 * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
417 pseduo-section when determining where the TOC ends.
418
419 * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
420 output x_tvndx as it is only two bytes wide.
421
422 * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
423 reloc is 26 or 32 bits wide.
424
425 * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
426 for relocs that don't change anything. Also look at the full
427 6 bits of bitsize.
428
429 2000-09-06 Philip Blundell <philb@gnu.org>
430
431 * config.bfd (arm*-*-uclinux*): New target.
432
433 2000-09-06 Alexandre Oliva <aoliva@redhat.com>
434
435 * configure: Rebuilt with new libtool.m4.
436
437 2000-09-06 Alan Modra <alan@linuxcare.com.au>
438
439 * section.c (bfd_get_unique_section_name): Avoid c++ reserved
440 word for variable name.
441 * bfd-in2.h: Regenerate.
442
443 2000-09-05 Nick Clifton <nickc@redhat.com>
444
445 * config.in: Regenerate.
446 * libbfd.h: Regenerate.
447 * po/bfd.pot: Regenerate.
448 * doc/bfdint.texi: Remove CVS date string - it foils compares with
449 local versions.
450
451 2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
452
453 * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
454
455 2000-09-05 Alan Modra <alan@linuxcare.com.au>
456
457 Shared library and PIC support.
458 * elf32-hppa.c (PLT_ENTRY_SIZE): New.
459 (GOT_ENTRY_SIZE): New.
460 (ELF_DYNAMIC_INTERPRETER): New.
461 (STUB_SUFFIX): Define.
462 (LONG_BRANCH_PIC_IN_SHLIB): Define.
463 (RELATIVE_DYNAMIC_RELOCS): Define.
464 (enum elf32_hppa_stub_type): New.
465 (struct elf32_hppa_stub_hash_entry): Rename offset to
466 stub_offset. Add a number of new fields.
467 (struct elf32_hppa_link_hash_entry): New.
468 (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
469 global_value.
470 (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
471 (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
472 (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
473 new fields.
474 (hppa_link_hash_newfunc): New function.
475 (elf32_hppa_link_hash_table_create): Use above function. Init new
476 fields.
477 (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
478 instead of addend, and remove sym_name from args. Don't use
479 symbol name for local syms, instead use sym index.
480 (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
481 stub type rather than size. Pass in hash and handle import stub
482 case. Also pass in reloc instead of offset so we can calculate
483 PCREL22F and PCREL12F branches properly.
484 (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
485 import and export stubs too.
486 (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
487 import and export stub sizing.
488 (elf32_hppa_check_relocs): New function.
489 (elf32_hppa_adjust_dynamic_symbol): New function.
490 (hppa_discard_copies): New function.
491 (elf32_hppa_size_dynamic_sections): New function.
492 (elf_backend_size_dynamic_sections): Define.
493 (elf32_hppa_finish_dynamic_symbol): New function.
494 (elf_backend_finish_dynamic_symbol): Define.
495 (elf32_hppa_size_stubs): Stash params in link hash table, and move
496 some local vars into the link hash table too. For shared links,
497 trundle over function syms, generating export stubs. Handle
498 PCREL22F branches. Break out stub creation code from here..
499 (hppa_add_stub): .. to here. New function.
500 (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
501 call the bfd linker. Use elf_gp to record global pointer.
502 Calculate a value from sections if $global$ is missing.
503 (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
504 (elf32_hppa_gc_mark_hook): New function.
505 (elf_backend_gc_mark_hook): Define.
506 (elf32_hppa_gc_sweep_hook): New function.
507 (elf_backend_gc_sweep_hook): Define.
508 (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
509 Add rel to args, and remove howto, input_bfd, offset, addend,
510 sym_name as we can recalculate these locally. Handle calls to
511 dynamic objects, extra PIC relocs, PCREL22F branches. Change
512 handling of undefined weak syms. Check that stubs are in range.
513 Only look for import stubs on PCREL17F and PCREL22F relocs. Add
514 message on hitting a DPREL21L reloc that needs fixing. Subtract
515 off PC for PCREL14F. Break out code that does a stub lookup from
516 here..
517 (hppa_get_stub_entry): ..to here. New function.
518 (elf32_hppa_relocate_insn): Merge into final_link_relocate.
519 (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
520 relocs, etc. etc.
521 (elf32_hppa_finish_dynamic_sections): New function.
522 (elf_backend_finish_dynamic_sections): Define.
523 (elf_backend_final_write_processing) Define.
524 (hppa_handle_PIC_calls): New function.
525 (elf32_hppa_build_stubs): Call it. Pass link_info to
526 hppa_build_one_stub.
527 (elf32_hppa_create_dynamic_sections): New function
528 to create .plt and .got then set .plt flags correctly.
529 (elf_backend_create_dynamic_sections): Define.
530 (elf32_hppa_object_p): New function.
531 (elf_backend_object_p): Define.
532 (elf32_hppa_elf_get_symbol_type): New function.
533 (elf_backend_get_symbol_type): Define.
534 (elf_backend_can_gc_sections): Define.
535 (elf_backend_want_got_plt): Define.
536 (elf_backend_plt_alignment): Set to 2.
537 (elf_backend_plt_readonly): Define.
538 (elf_backend_want_plt_sym): Define.
539 (elf_backend_got_header_size): Reserve one entry.
540
541 * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
542 (elf32_hppa_size_stubs): Pass in multi_subspace.
543 (elf32_hppa_set_gp): Declare.
544
545 * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
546 (bfd_get_unique_section_name): New function.
547 * bfd_in2.h: Regenerate.
548
549 * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
550 (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
551 comment.
552
553 From David Huggins-Daines <dhd@linuxcare.com>
554 * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
555 (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
556 (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
557 been updated in finish_dynamic_symbol before modifying function
558 symbol.
559
560 * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
561 eight entries. Replace NULL with bfd_elf_generic_reloc. Add
562 R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
563 (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
564 comments. Handle format == 12 for R_HPPA_PCREL_CALL.
565 (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
566 (elf_hppa_relocate_insn): Likewise. Reformat some comments.
567 (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
568
569 From David Huggins-Daines <dhd@linuxcare.com>
570 * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
571 style of local labels as well.
572
573 2000-09-03 Philip Blundell <philb@gnu.org>
574
575 * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
576 references to undefined symbols in debugging sections.
577
578 2000-09-02 H.J. Lu <hjl@gnu.org>
579
580 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
581 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
582 BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
583 section.
584
585 2000-09-02 Jason Eckhardt <jle@cygnus.com>
586
587 * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
588 (elf32_i860_is_local_label_name): New function and prototype.
589
590 2000-09-02 Nick Clifton <nickc@redhat.com>
591
592 * configure.in: Increase version number to 2.10.91.
593 * configure: Regenerate.
594 * aclocal.m4: Regenerate.
595 * config.in: Regenerate.
596 * po/bfd.pot: Regenerate.
597
598 2000-09-02 Daniel Berlin <dberlin@redhat.com>
599
600 * elf.c (_bfd_elf_make_section_from_shdr): Add
601 .gnu.linkobce.wi. to the list of debug section names.
602
603 2000-09-02 Nick Clifton <nickc@redhat.com>
604
605 * dwarf2.c (find_debug_info): New function: Locate a section
606 containing dwarf2 debug information.
607 (bfd_dwarf2_find_nearest_line): Find all sections containing
608 debug information and include them in the stash.
609
610 2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
611
612 * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
613 R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
614 (sh_reloc_map): Add new relocs.
615 (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
616 sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
617 sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
618 sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
619 functions.
620 (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
621 (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
622 elf_sh_plt_entry_be, elf_sh_plt_entry_le,
623 elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
624 New array constants.
625 (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
626 New variables.
627 (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
628 elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
629 elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
630 elf_sh_plt_reloc_offset): Define.
631 (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
632 elf_sh_link_hash_table): New structs.
633 (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
634 (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
635 relocation types.
636 (elf_backend_create_dynamic_sections,
637 bfd_elf32_bfd_link_hash_table_create,
638 elf_backend_adjust_dynamic_symbol,
639 elf_backend_size_dynamic_sections,
640 elf_backend_finish_dynamic_symbol,
641 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
642 elf_backend_plt_readonly, elf_backend_want_plt_sym,
643 elf_backend_got_header_size, elf_backend_plt_header_size):
644 Define.
645 * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
646 BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
647 New relocs.
648 * bfd-in2.h, libbfd.h: Rebuilt.
649
650 2000-09-01 Alan Modra <alan@linuxcare.com.au>
651
652 * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
653 change.
654
655 Thu Aug 31 22:49:30 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
656
657 * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
658 not initialized, set them to indicate the SH1 instruction set.
659
660 2000-08-31 Alexandre Oliva <aoliva@redhat.com>
661
662 * acinclude.m4: Include libtool and gettext macros from the
663 top level.
664 * aclocal.m4, configure: Rebuilt.
665
666 2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
667
668 * elf.c: Eliminate references to __sparcv9 macro; replace with
669 autoconf variables HAVE_PSINFO32_T etc.
670 * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
671 HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
672 * config.in: Ditto.
673 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
674 detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
675 * aclocal.m4: Ditto.
676 * configure: Regenerate.
677
678 2000-08-27 Alan Modra <alan@linuxcare.com.au>
679
680 * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
681 for any shared link, not just shared -Bsymbolic.
682 (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
683 any shared link, and pass link info to it.
684 (elf_i386_size_dynamic_sections): Update comment.
685 (elf_i386_discard_copies): Modify to discard relocs for symbols
686 that have been forced local.
687 (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
688 that have been forced local.
689
690 2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
691
692 * elflink.h (elf_link_add_object_symbols): Allow common
693 symbols to have an alignment of 1 if explicitly requested, and
694 not overridden by other definitions.
695
696 2000-08-22 Doug Kwan <dkwan@transmeta.com>
697
698 * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
699 * coffcode.h (coff_set_flags): Add detection of w65 architecture.
700
701 2000-08-22 H.J. Lu <hjl@gnu.org>
702
703 * elf-bfd.h (elf_link_hash_table): Add runpath.
704
705 * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
706 * bfd-in2.h: Rebuilt.
707
708 * elf.c (_bfd_elf_link_hash_table_init): Initialize the
709 "runpath" field to NULL.
710 (bfd_elf_get_runpath_list): New function.
711
712 * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
713 DT_RUNPATH entries.
714
715 2000-08-22 Alexandre Oliva <aoliva@redhat.com>
716
717 * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
718 R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
719 explicitly. Improve validation of r_type.
720
721 2000-08-21 H.J. Lu <hjl@gnu.org>
722
723 * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
724 dynamic allocated content space. Add a comment to remind us that
725 one day this ought to be fixed.
726 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
727 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
728 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
729
730 2000-08-21 Jason Eckhardt <jle@cygnus.com>
731
732 * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
733 field with the newly relocated value instead of adding it to the
734 existing immediate field.
735 (elf32_i860_relocate_splitn): Likewise.
736 (elf32_i860_relocate_highadj): Likewise.
737
738 2000-08-16 Jason Eckhardt <jle@cygnus.com>
739
740 * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
741 was previously just a stub).
742
743 2000-08-16 Alexandre Oliva <aoliva@redhat.com>
744
745 * elflink.c (_bfd_elf_create_got_section): Don't abort().
746 Formatting fixes.
747 (_bfd_elf_create_dynamic_sections): Likewise.
748
749 2000-08-16 Andrew Macleod <amacleod@cygnus.com>
750
751 * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
752 for undefined symbols to be the beginning of the section.
753
754 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
755 four extra entries at the beginning of the .rela.plt section.
756 (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
757 section to account for the four reserved entries in the .plt section.
758
759 2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
760
761 * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
762 to the list of NOPs we recognize after a branch-and-link.
763 Use the ori NOP when one is needed.
764
765 * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
766 for large archives.
767
768 2000-08-14 Jim Wilson <wilson@cygnus.com>
769
770 * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
771 EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
772 (elf64_ia64_print_private_bfd_data): Likewise. Also handle
773 EF_IA_64_ABSOLUTE.
774
775 2000-08-11 Alexandre Oliva <aoliva@redhat.com>
776
777 * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
778
779 2000-08-10 Jason Eckhardt <jle@cygnus.com>
780
781 * elf32-i860.c (elf32_i860_relocate_section): New function.
782 (i860_final_link_relocate): New function.
783 (elf32_i860_relocate_splitn): New function.
784 (elf32_i860_relocate_pc16): New function.
785 (elf32_i860_relocate_highadj): New function.
786 (elf32_i860_howto): Minor adjustments to some relocations.
787 (elf_info_to_howto_rel): Define.
788 (elf_backend_relocate_section): Define.
789
790 2000-08-10 Nick Clifton <nickc@cygnus.com>
791
792 * elf32-arm.h: Fix formatting.
793
794 2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
795
796 * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
797
798 2000-08-08 Jason Eckhardt <jle@cygnus.com>
799
800 * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
801
802 2000-08-07 Kazu Hirata <kazu@hxi.com>
803
804 * ieee.c (ieee_write_debug_part): Rewrite a comment.
805 * elf64-ia64.c: Fix a typo.
806
807 2000-08-05 Jason Eckhardt <jle@cygnus.com>
808
809 * elf32-i860 (elf32_i860_howto_table): New structure.
810 (lookup_howto): New function.
811 (elf32_i860_reloc_type_lookup): New function.
812 (elf32_i860_info_to_howto_rela): New function.
813 (elf_code_to_howto_index): New structure.
814 (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
815 (bfd_elf32_bfd_reloc_type_lookup): Re-define as
816 elf32_i860_reloc_type_lookup.
817
818 2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
819
820 * som.c (struct fixup_format): Constify `format'.
821 (som_hppa_howto_table): Use SOM_HOWTO macro.
822 (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
823 (som_bfd_reloc_type_lookup): Likewise.
824 (compare_subspaces): Remove unused `count1', `count2'.
825 (som_begin_writing): Remove unused `total_reloc_size'.
826 (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
827 (som_print_symbol, som_bfd_is_local_label_name): Likewise.
828 (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
829 (som_find_nearest_line): Decorate unused parameter(s).
830 (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
831 (som_bfd_link_split_section): Likewise.
832
833 2000-08-03 Nick Clifton <nickc@cygnus.com>
834
835 * section.c: Restore backed out code.
836 * elf.c: Restore backed out code.
837 (copy_private_bfd_data): Fix bug preventing stipped dynamic
838 binaries from working.
839 * bfd-in2.h: Regenerate.
840
841 2000-08-03 H.J. Lu <hjl@gnu.org>
842
843 * section.c: Back out the change made by Nick Clifton
844 <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
845 binaries.
846 * bfd-in2.h: Likewise.
847 * elf.c: Likewise.
848
849 2000-08-03 Alexandre Oliva <aoliva@redhat.com>
850
851 * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
852
853 2000-07-31 Jason Eckhardt <jle@cygnus.com>
854
855 * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
856 * bfd-in2.h, libbfd.h: Regenerate.
857
858 2000-07-31 Nick Clifton <nickc@cygnus.com>
859
860 * section.c (struct sec): Add new boolean field 'segment_mark'.
861 (STD_SECTION): Initialise new field to zero.
862
863 * bfd-in2.h: Regenerate.
864
865 * elf.c (copy_private_bfd_data): Reorganise section to segment
866 mapping to cope with moved sections requiring new segments,
867 and overlapping segments.
868 (SEGMENT_END): New macro: Return the end address of a segment.
869 (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
870 contains a section by comparing their VMA addresses.
871 (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
872 contains a section by comparing their LMA addresses.
873 (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
874 section should be included in a segment.
875 (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
876 follows another in memory.
877 (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
878 segments overlap.
879
880 2000-07-22 Jason Eckhardt <jle@cygnus.com>
881
882 * cpu-i860.c: Added comments.
883
884 * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
885 bfd_elf32_i860_little_vec.
886 (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
887 (ELF_MAXPAGESIZE): Changed to 4096.
888
889 * targets.c (bfd_elf32_i860_little_vec): Declaration of
890 new target.
891 (bfd_target_vector): Added bfd_elf32_i860_little_vec.
892
893 * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
894 config for little endian elf32 i860.
895 (targ_defvec): Define for the new config above
896 as "bfd_elf32_i860_little_vec".
897 (targ_selvecs): Define for the new config above
898 as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
899
900 * configure.in (bfd_elf32_i860_little_vec): Added recognition
901 of new target vec.
902
903 * configure: Regenerated.
904
905 2000-07-27 H.J. Lu <hjl@gnu.org>
906
907 * elflink.h (elf_merge_symbol): Take one more argument,
908 dt_needed, to indicate if the symbol comes from a DT_NEEDED
909 entry. Don't overide the existing weak definition if dt_needed
910 is true.
911 (elf_link_add_object_symbols): Pass dt_needed to
912 elf_merge_symbol ().
913
914 2000-07-27 Nick Clifton <nickc@cygnus.com>
915
916 * elflink.h (elf_link_size_reloc_section): Zeroes the section's
917 allocated contents.
918
919 2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
920
921 * configure.host (*-*-aix*): AIX has 'long long' always.
922
923 * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
924 (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
925 (xcoff_write_archive_contents_big): Don't update the offset
926 of the symbol table, xcoff_write_armap will do it.
927
928 2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
929
930 * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
931 of dynobj for SGI_COMPAT checks.
932
933 2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
934
935 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
936 * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
937 * bfd-in2.h: Regenerate.
938
939 2000-07-21 Nick Clifton <nickc@cygnus.com>
940
941 * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
942 range symbol indices in relocs and issue an error message.
943
944 2000-07-20 H.J. Lu <hjl@gnu.org>
945
946 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
947 info->new_dtags when setting DT_FLAGS_1. It will only be set
948 by the new linker options. It shouldn't break anything.
949
950 2000-07-20 H.J. Lu <hjl@gnu.org>
951
952 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
953 only if info->new_dtags is true.
954
955 2000-07-20 H.J. Lu <hjl@gnu.org>
956
957 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
958 DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
959
960 2000-07-20 Hans-Peter Nilsson <hp@axis.com>
961
962 * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
963 (ALL_MACHINES_CFILES): Add cpu-cris.c.
964 (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
965 (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
966 (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
967 * Makefile.in: Rebuild.
968 * aclocal.m4: Rebuild.
969 * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
970 * archures.c (enum bfd_architecture): Add bfd_arch_cris.
971 (bfd_cris_arch): Declare.
972 (bfd_archures_list): Add bfd_cris_arch.
973 * bfd-in2.h: Rebuild.
974 * config.bfd: (cris-*-*): New target.
975 * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
976 * configure: Rebuild.
977 * elf.c (prep_headers): Add bfd_arch_cris.
978 * libbfd.h: Rebuild.
979 * libaout.h (enum machine_type): Add M_CRIS.
980 * reloc.c: Add CRIS relocations.
981 * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
982 (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
983 * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
984 * po/POTFILES.in, po/bfd.pot: Regenerate.
985
986 2000-07-19 H.J. Lu <hjl@gnu.org>
987
988 * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
989 DF_TEXTREL if DT_TEXTREL is set.
990 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
991 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
992 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
993 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
994 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
995 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
996 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
997 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
998 * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
999 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
1000
1001 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
1002 set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
1003 DT_RPATH is set.
1004 Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
1005
1006 2000-07-19 H.J. Lu <hjl@gnu.org>
1007
1008 * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
1009 * bfd-in2.h: Rebuild.
1010
1011 * elf-bfd.h (elf_obj_tdata): Add dt_soname.
1012 (elf_dt_soname): New.
1013
1014 * elf.c (bfd_elf_set_dt_needed_soname): New.
1015
1016 * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
1017 entry if the shared object loaded by DT_NEEDED is used to
1018 resolve the reference in a regular object.
1019
1020 2000-07-19 H.J. Lu <hjl@gnu.org>
1021
1022 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
1023 DT_DEPAUDIT and DT_AUDIT as strings.
1024
1025 2000-07-19 Nick Clifton <nickc@cygnus.com>
1026
1027 * format.c: Fix formatting.
1028
1029 2000-07-19 H.J. Lu <hjl@gnu.org>
1030
1031 * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
1032
1033 2000-07-19 H.J. Lu <hjl@gnu.org>
1034
1035 * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
1036 DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
1037 DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
1038 DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
1039 DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
1040 DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
1041 DT_FLAGS_1, DT_USED and DT_CHECKSUM.
1042
1043 Tue Jul 18 13:11:54 2000 Andrew Cagney <cagney@b1.cygnus.com>
1044
1045 * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
1046 renamed functions from here...
1047 (assign_section_numbers): Use renamed functions.
1048 (prep_headers): Use renamed functions.
1049
1050 * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
1051 * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
1052 * bfd-in2.h: Regenerate.
1053
1054 2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
1055
1056 * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
1057 parenthesis in if statement.
1058
1059 2000-07-17 Koundinya K <kk@ddeorg.soft.net>
1060
1061 Enable the support for Traditional MIPS.
1062 * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
1063 return ict_none appropriately for traditional mips targets.
1064 (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
1065 (STUB_MOVE): Conditionalize for traditonal mips.
1066 (STUB_LI16): Likewise.
1067 (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
1068 room for RTPROC header.
1069 (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
1070 the permission for the PT_DYNAMIC as read, write and execute.
1071 (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
1072 for traditonal mips.
1073 (_bfd_mips_elf_create_dynamic_sections): Add the symbol
1074 _DYNAMIC_LINKING for traditonal mips.
1075 (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
1076 in case of traditonal mips.
1077 (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
1078 entry is required. For a function if PLT is not required then set the
1079 corresponding hash table entry to 0.
1080 (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
1081 traditonal mips.
1082 (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
1083 shared object set the value to 0.
1084 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
1085 _DYNAMIC_LINKING for traditonal mips.
1086 (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
1087 for traditonal mips.
1088
1089 2000-07-15 H.J. Lu <hjl@gnu.org>
1090
1091 * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
1092
1093 2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
1094
1095 * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
1096 out a structure that is BFD_IN_MEMORY.
1097
1098 2000-07-11 Alan Modra <alan@linuxcare.com.au>
1099
1100 * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
1101 bfd pointer. Print section id instead of bfd pointer for local
1102 syms. Prefix addend with `+' for global syms as well as local.
1103 Correct calculation of name component lengths.
1104 (elf64_hppa_check_relocs): Update call to get_dyn_name.
1105
1106 From David Huggins-Daines <dhd@linuxcare.com>
1107 * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
1108 * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
1109 (elf64_hppa_modify_segment_map): Likewise.
1110
1111 Tue Jul 11 17:21:52 2000 Andrew Cagney <cagney@b1.cygnus.com>
1112
1113 * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
1114 addresses to be "naturally" sign extended. Return -1 if unknown.
1115 * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
1116 * bfd-in2.h: Regenerate.
1117
1118 Tue Jul 11 16:25:52 2000 Andrew Cagney <cagney@b1.cygnus.com>
1119
1120 * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
1121 and ECOF_SIGNED_64 to list ways to extract an offset.
1122 (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
1123 ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
1124 Update.
1125 * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
1126 * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
1127
1128 Tue Jul 11 16:03:04 2000 Andrew Cagney <cagney@b1.cygnus.com>
1129
1130 * elfcode.h (elf_object_p): Use bfd_set_start_address and not
1131 bfd_get_start_address.
1132 (elf_swap_ehdr_in): Sign extend e_entry when applicable.
1133 (elf_swap_ehdr_out): Ditto.
1134
1135 2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
1136
1137 * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
1138 compatibility with older binutils.
1139
1140 2000-07-10 Alan Modra <alan@linuxcare.com.au>
1141
1142 * section.c (bfd_make_section_anyway): Start section_id at 0x10.
1143 (STD_SECTION): Avoid negative ids, instead use 0 to 3.
1144
1145 From Ryan Bradetich <rbradetich@uswest.net>
1146 * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
1147 (parse_line_table): Ditto.
1148 (_bfd_dwarf1_find_nearest_line): Ditto.
1149 * syms.c (cmpindexentry): Remove extra `*' from params.
1150
1151 2000-07-09 Koundinya K <kk@ddeorg.soft.net>
1152
1153 * elf32-mips.c (sort_dynamic_relocs): New Function.
1154 (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
1155 via qsort to sort the dynamic relocations in increasing r_symndx
1156 value.
1157
1158 2000-07-09 Alan Modra <alan@linuxcare.com.au>
1159
1160 * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
1161 ATTRIBUTE_UNUSED to unused args.
1162 (get_opd): Likewise.
1163 (get_plt): Likewise.
1164 (get_dlt): Likewise.
1165 (get_stub): Likewise.
1166 (elf64_hppa_adjust_dynamic_symbol): Likewise.
1167 (elf64_hppa_link_output_symbol_hook): Likewise.
1168 (elf64_hppa_check_relocs): Delete unused var.
1169 (elf64_hppa_size_dynamic_sections): Likewise.
1170 (elf64_hppa_finalize_opd): Likewise.
1171 (elf64_hppa_finalize_dynreloc): Likewise.
1172 (elf64_hppa_modify_segment_map): Likewise.
1173 (elf64_hppa_finish_dynamic_sections): Likewise.
1174
1175 * elf-hppa.h (elf_hppa_final_write_processing): Add
1176 ATTRIBUTE_UNUSED to unused args.
1177 (elf_hppa_final_link_relocate): Likewise.
1178 (elf_hppa_record_segment_addrs): Add paretheses.
1179 (elf_hppa_relocate_section): Constify dyn_name.
1180
1181 From David Huggins-Daines <dhd@linuxcare.com>
1182 * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
1183 rearrange case statement so that it gets preferred to 32-bit ones.
1184
1185 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
1186 asection->id instead of address of asection structure.
1187 (elf32_hppa_size_stubs): Likewise.
1188
1189 * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
1190 for .init* and .fini*.
1191
1192 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
1193 and addends used in stub names to 32 bits.
1194 (elf32_hppa_size_stubs): Likewise.
1195
1196 * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
1197 twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
1198 not bfd_put_64. Fix minor comment typo and formatting.
1199
1200 Changes to create multiple linker stubs, positioned immediately
1201 before the section where they are required.
1202 * elf32-hppa.c: Don't include hppa_stubs.h.
1203 (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
1204 (elf32_hppa_stub_hash_table): Delete.
1205 (elf32_hppa_link_hash_entry): Delete.
1206 (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
1207 stub_hash_table, and store the struct here rather than a pointer.
1208 Delete output_symbol_count. Add offset array. Change
1209 global_value to a bfd_vma.
1210 (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
1211 (elf32_hppa_stub_hash_traverse): Delete.
1212 (elf32_hppa_name_of_stub): Delete.
1213 (elf32_hppa_link_hash_lookup): Delete.
1214 (elf32_hppa_link_hash_traverse): Delete.
1215 (elf32_hppa_stub_hash_table_init): Delete.
1216 (elf32_hppa_size_of_stub): Pass input section and offset rather
1217 than location and calculate location here. Don't pass name as all
1218 stubs are now the same size.
1219 (elf32_hppa_stub_hash_newfunc): Init new fields.
1220 (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
1221 too.
1222 (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
1223 comparing against ints. Rewrite stub handling code.
1224 (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
1225 Case enums to int before comparing against ints. Remove
1226 bfd_reloc_dangerous case.
1227 (elf32_hppa_build_one_stub): Rewrite.
1228 (elf32_hppa_size_one_stub): New function.
1229 (elf32_hppa_build_stubs): Rewrite.
1230 (elf32_hppa_size_stubs): Pass in linker call-back functions.
1231 Rewrite stub-handling specific code.
1232
1233 * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
1234
1235 * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
1236
1237 * hppa_stubs.h: Delete.
1238 * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
1239 (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
1240 * Makefile.in: Regenerate.
1241
1242 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
1243 e_nlrsel.
1244
1245 * libhppa.h (hppa_field_adjust): Correct e_nsel case.
1246
1247 * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
1248 and section name for bfd_reloc_notsupported error message.
1249 (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
1250 bfd_reloc_notsupported.
1251 (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
1252
1253 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
1254 undefined weak symbols for all relocs.
1255 (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
1256 offsets are relative to one past the delay slot.
1257 (elf32_hppa_size_stubs): Account for reloc addend when calculating
1258 branch destination. Put addend into stub name too.
1259 (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
1260 adjust by 8 when deciding whether a linker stub is needed. Put
1261 addend into stub name as for above.
1262
1263 * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
1264 various args and vars.
1265 (elf32_hppa_bfd_final_link_relocate): Here too.
1266 (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
1267 inner block var to avoid shadowing.
1268
1269 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
1270 unsigned.
1271 * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
1272 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
1273 (elf_hppa_fake_sections): Rename local var to avoid shadowing.
1274
1275 * libhppa.h: Change practically all unsigned ints to plain ints.
1276 Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
1277 prototypes.
1278
1279 From Ryan Bradetich <rbradetich@uswest.net>
1280 * libhppa.h (hppa_opcode_type): New enum to replace #define's.
1281 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
1282 suit above.
1283 From David Huggins-Daines <dhd@linuxcare.com>
1284 * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
1285 to the new OP_* ones.
1286
1287 * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
1288 error exit. Bail out earlier on plabel relocs that we aren't
1289 interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
1290 string, and then don't free our copy.
1291 (elf32_hppa_build_one_stub): Make insn unsigned int.
1292
1293 * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
1294 available with BL, not BE and BLE.
1295
1296 * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
1297 code for elf arg relocs.
1298 (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
1299 argument with elf_link_hash_entry h. Handle undefined weak
1300 symbols. Move $global$ lookup from here...
1301 (elf32_hppa_relocate_section): ...to here. Return correct error
1302 message for non-handled relocs.
1303 (elf32_hppa_size_of_stub): Correctly test branch range. Previous
1304 wrong test was -0x3ffff to +0x40000.
1305
1306 * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
1307 R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
1308 Handle them as such.
1309 (elf_hppa_relocate_insn): Fix a typo.
1310
1311 * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
1312 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
1313 assemble_17, assemble_21): Delete.
1314 Supply defines for all 64 possible opcodes.
1315 (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
1316 formats. Handle COMICLR.
1317 (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
1318 -10, -16, 16, 22.
1319
1320 * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
1321 (elf32_hppa_bfd_final_link_relocate): Major rewrite.
1322 (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
1323 to suit.
1324 (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
1325 the local syms - did this code get deleted accidentally? Ignore
1326 undefined and undefweak syms.
1327
1328 * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
1329 block. Use it instead of elf64_hppa_hash_table (info).
1330 (elf_hppa_final_link_relocate): Use hppa_info instead of
1331 elf64_hppa_hash_table (info).
1332
1333 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1334 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1335 (hppa_rebuild_insn): Mask immediate bits here instead.
1336 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1337
1338 2000-07-08 Alan Modra <alan@linuxcare.com.au>
1339
1340 * section.c (struct sec): Add id field. Tidy comment formatting.
1341 (bfd_make_section_anyway): Set id.
1342 (STD_SECTION): Init id too.
1343 Change CONST to const throughout.
1344 * archures.c (bfd_arch_info): Tidy comment.
1345 (bfd_arch_list): Change a CONST to const.
1346 * libbfd-in.h: Tidy comments and replace CONST with const.
1347 * elf-bfd.h: Likewise.
1348 * libbfd.h: Regenerate.
1349 * bfd-in2.h: Regenerate.
1350 * libcoff.h: Regenerate.
1351
1352 2000-07-07 DJ Delorie <dj@redhat.com>
1353
1354 * archive.c (_bfd_write_archive_contents): Add an informative
1355 comment.
1356
1357 2000-07-06 Kazu Hirata <kazu@hxi.com>
1358
1359 * srec.c: Fix formatting.
1360
1361 2000-06-05 DJ Delorie <dj@redhat.com>
1362
1363 * MAINTAINERS: new
1364
1365 2000-07-04 Alexandre Oliva <aoliva@redhat.com>
1366
1367 * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
1368 value of PC-relative offsets.
1369
1370 2000-07-03 Jim Wilson <wilson@cygnus.com>
1371
1372 * elf64-alpha.c (alpha_elf_size_info): New.
1373 (elf_backend_size_info): Define to alpha_elf_size_info.
1374 * elfcode.h (elf_size_info): Change hash bucket size to 4.
1375
1376 2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
1377
1378 * elf32-mips.c: Include elf32-target.h again for the traditional
1379 MIPS targets.
1380
1381 2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
1382
1383 * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
1384 Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
1385 (avr_info_to_howto_rela): Likewise.
1386 (elf32_avr_gc_mark_hook): Likewise.
1387 (elf32_avr_gc_sweep_hook): Likewise.
1388 (elf32_avr_relocate_section): Likewise.
1389
1390 2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
1391
1392 * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
1393 an external symbol for a non-shared, non-relocatable link.
1394
1395 2000-07-03 Nick Clifton <nickc@redhat.com>
1396
1397 * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
1398 is an external symbol.
1399 (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
1400 external symbol.
1401
1402 2000-07-03 Kazu Hirata <kazu@hxi.com>
1403
1404 * reloc16.c: Fix formatting.
1405
1406 2000-07-01 Koundinya K <kk@ddeorg.soft.net>
1407
1408 * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
1409 to add a new target for traditional mips i.e
1410 bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
1411 * configure.in: Likewise.
1412 * configure: Rebuild.
1413 * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
1414 bfd_target_vector.
1415 (bfd_elf32_tradlittlemips_vec): Likewise.
1416 * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
1417 to see that elfNN_bed does not get redefined even if the target file
1418 is included twice for a chip. See elf32-mips.c.
1419
1420 2000-07-01 Alan Modra <alan@linuxcare.com.au>
1421
1422 * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
1423 (CLEANFILES): Add DEPA.
1424 * Makefile.in: Regenerate.
1425
1426 2000-06-30 DJ Delorie <dj@cygnus.com>
1427
1428 * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
1429 can't assume the PE header is at 0x80.
1430
1431 2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
1432
1433 * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
1434
1435 2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
1436
1437 * go32stub.h: Update stub.
1438
1439 2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
1440
1441 * archures.c (bfd_mach_avr5): Define.
1442 * bfd-in2.h (bfd_mach_avr5): Define.
1443 * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
1444 bfd_mach_avr5, add bfd_mach_avr4. Update comments.
1445 (compatible): Update comment. Add missing test.
1446 * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
1447 for avr2 and avr4. Simplify 8K wrap code.
1448 (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
1449 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
1450
1451 2000-06-26 Kazu Hirata <kazu@hxi.com>
1452
1453 * coff-h8300.c: Fix formatting.
1454 * cpu-h8300.c: Likewise.
1455
1456 2000-06-24 Alexandre Oliva <aoliva@redhat.com>
1457
1458 * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
1459 for local symbols whose names are unknown.
1460
1461 2000-06-22 Alan Modra <alan@linuxcare.com.au>
1462
1463 * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
1464 find one.
1465 * Makefile.in: Regenerate.
1466 * doc/Makefile.in: Regenerate.
1467
1468 2000-06-20 H.J. Lu <hjl@gnu.org>
1469
1470 * Makefile.am: Rebuild dependency.
1471 * Makefile.in: Rebuild.
1472
1473 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1474
1475 * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
1476 (elf_backend_copy_indirect_symbol): Map to the new function.
1477
1478 2000-06-20 Alan Modra <alan@linuxcare.com.au>
1479
1480 * archive.c (normalize): Correct pointer comparison when checking
1481 for backslashes.
1482 (bfd_bsd_truncate_arname): Likewise.
1483 (bfd_gnu_truncate_arname): Likewise.
1484
1485 2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
1486
1487 * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
1488 sections elf_{text,data}_{section,symbol}.
1489 * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
1490 (_bfd_mips_elf_hide_symbol): New function.
1491 (elf_backend_hide_symbol): Map to the new function.
1492 (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
1493 definitions of mips_elf_{text,data}_{section,symbol}.
1494 (mips_elf_local_relocation_p): Try to find the direct symbol
1495 based on new check_forced argument.
1496 (mips_elf_calculate_relocation): Use new version of
1497 mips_elf_local_relocation_p.
1498 (mips_elf_relocate_section): Likewise.
1499 (_bfd_mips_elf_relocate_section): Likewise.
1500 (mips_elf_sort_hash_table): Only assert that have enough GOT
1501 space.
1502 (mips_elf_got16_entry): Match all 32 bits to the existing GOT
1503 entry if the relocation based on the new external argument.
1504 (mips_elf_create_dynamic_relocation): Assert that we have a
1505 section contents allocated where we can swap out the dynamic
1506 relocations.
1507 (mips_elf_calculate_relocation): Find the real hash-table entry
1508 correctly by using h->root.root.type. Only create a dynamic
1509 relocation entry if the symbol is defined in a shared library.
1510 Create an external GOT entry for the GOT16 relocation if the
1511 symbol was forced local.
1512 (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
1513 dynamic index if the symbol was forced local.
1514
1515 2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1516
1517 * elf32-mips.c: Fix typos in comments.
1518
1519 2000-06-19 Mark Kettenis <kettenis@gnu.org>
1520
1521 * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
1522 CORE_VERSION_1.
1523
1524 2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
1525
1526 * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
1527 * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
1528 BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
1529 * configure.in (bfd_elf32_m68hc12_vec): Recognize.
1530 (bfd_elf32_m68hc11_vec): Likewise.
1531 * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
1532 Supports 68hc11 & 68hc12 at the same time.
1533 * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
1534 bfd_target_vector.
1535 (bfd_elf32_m68hc11_vec): Likewise.
1536 * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
1537 * archures.c (bfd_m68hc12_arch): Define and register in global list
1538 (bfd_m68hc11_arch): Likewise.
1539 * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
1540 BFD_RELOC_M68HC11_3B): Define.
1541 * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
1542 * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
1543
1544 2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
1545
1546 * elf_bfd.h (struct elf_backend_data): Add info argument to
1547 elf_backend_hide_symbol.
1548 (_bfd_elf_link_hash_hide_symbol): Likewise.
1549 * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
1550 * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
1551 * elflink.h (elf_link_add_object_symbols): Likewise.
1552 (elf_link_assign_sym_version): Likewise.
1553
1554 2000-06-18 H.J. Lu <hjl@gnu.org>
1555
1556 * coff-i386.c (coff_i386_reloc): Don't return in case of
1557 output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
1558 Compensate PE relocations when linking with non-PE object
1559 files to generate a non-PE executable.
1560
1561 2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
1562
1563 * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
1564 GOT entries if we're doing a static link or -Bsymbolic link.
1565
1566 2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
1567
1568 * elflink.h (elf_link_adjust_relocs): Check for and call backend
1569 specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
1570 available.
1571 (elf_link_output_relocs): Likewise.
1572 (elf_reloc_link_order): Likewise.
1573
1574 2000-06-16 Nicholas Duffek <nsd@redhat.com>
1575
1576 * archures.c (enum bfd_architecture): #define constants for
1577 PowerPc and RS6000 machine numbers.
1578 * bfd-in2.h: Regenerate.
1579 * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
1580 to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
1581 and RS6000 machine numbers using #defined constants from
1582 archures.c.
1583 * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
1584 machine numbers using #defined constants from archures.c. Add
1585 entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
1586 64-bit words in 620 entry.
1587 * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
1588 RSC, and RS2.
1589 (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
1590
1591 2000-06-16 Nicholas Duffek <nsd@cygnus.com>
1592
1593 * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
1594 * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
1595 * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
1596
1597 2000-06-16 Nicholas Duffek <nsd@redhat.com>
1598
1599 * bfd-in.h (bfd_family_coff): Define.
1600 * bfd-in2.h: Regenerate.
1601 * coffgen.c (coff_count_linenumbers, coff_symbol_from,
1602 coff_find_nearest_line): Check COFFness using bfd_family_coff()
1603 instead of bfd_target_coff_flavour.
1604 * cofflink.c (_bfd_coff_final_link): Likewise.
1605 * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
1606 exclude XCOFF files.
1607 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
1608 Likewise.
1609 * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
1610 * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
1611 * xcofflink.c (XCOFF_XVECP): Delete.
1612 (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
1613 bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
1614 bfd_xcoff_record_link_assignment,
1615 bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
1616 check for bfd_target_xcoff_flavour.
1617
1618 2000-06-16 Nicholas Duffek <nsd@redhat.com>
1619
1620 * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
1621 files on AIX 4.3.
1622 (read_hdr): New function.
1623 (rs6000coff_core_p): Store mstsave or __context64 struct instead
1624 of trying to extract individual registers. Set abfd->arch_info
1625 to match the architecture that created the core file.
1626 (rs6000coff_get_section_contents): Delete.
1627 * xcoff-target.h (rs6000coff_get_section_contents): Delete.
1628
1629 2000-06-14 H.J. Lu <hjl@gnu.org>
1630
1631 * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
1632 is NULL.
1633
1634 2000-06-13 H.J. Lu <hjl@gnu.org>
1635
1636 * configure: Regenerate.
1637
1638 Tue Jun 13 01:28:57 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
1639
1640 * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
1641 armpei_little_vec.
1642
1643 2000-06-08 David O'Brien <obrien@FreeBSD.org>
1644
1645 * configure.in (VERSION): Update to show this is the CVS mainline.
1646
1647 2000-06-07 Alan Modra <alan@linuxcare.com.au>
1648
1649 * elf32-d10v.c: Include elf/d10v.h
1650 (enum reloc_type): Delete.
1651 * elf32-d30v.c: Include elf/d30v.h
1652 (enum reloc_type): Delete.
1653
1654 * Makefile.am: Run "make dep-am" to regenerate dependencies.
1655 * Makefile.in: Regenerate.
1656
1657 * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
1658 (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
1659 move HOWTOs into elf_howto_table.
1660 (R_386_standard, R_386_ext_offset): Define.
1661 (R_386_ext, R_386_vt_offset, R_386_vt): Define.
1662 (elf_i386_reloc_type_lookup): Modify calculation of index into
1663 elf_howto_table since we've removed the padding.
1664 (elf_i386_info_to_howto_rel): Likewise.
1665 (elf_i386_relocate_section): Likewise.
1666
1667 2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
1668
1669 * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
1670
1671 2000-06-05 H.J. Lu <hjl@gnu.org>
1672
1673 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
1674 an error when seeing an undefined symbol with hidden/internal
1675 attribute. It is handled in *_relocate_section ().
1676
1677 2000-06-05 H.J. Lu <hjl@gnu.org>
1678
1679 * elflink.h (elf_fix_symbol_flags): Follow the link for the
1680 indirect symbol for the ELF_LINK_NON_ELF bit.
1681 (elf_link_output_extsym): Don't output the indirect symbol even
1682 if the ELF_LINK_NON_ELF bit is set.
1683
1684 2000-06-01 J.T. Conklin <jtc@redback.com>
1685
1686 * config.bfd (i[3456]86-*-netbsdelf*): New target.
1687 (i[3456]86-*-netbsdaout*): New target.
1688 (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
1689 (i[3456]86-*-openbsd*): Likewise.
1690
1691 Tue May 30 15:39:04 2000 Andrew Cagney <cagney@b1.cygnus.com>
1692
1693 * trad-core.c: From hpux-core.c, include <dirent.h> or
1694 <sys/ndir.h> when possible.
1695
1696 2000-05-31 Nick Clifton <nickc@cygnus.com>
1697
1698 * opintl.h (_(String)): Explain why dgettext is used instead
1699 of gettext.
1700
1701 2000-05-31 Ulrich Drepper <drepper@redhat.com>
1702
1703 * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
1704 definitions. We must not assume they are sorted in the file
1705 according to their index numbers.
1706
1707 2000-05-31 Alan Modra <alan@linuxcare.com.au>
1708
1709 * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
1710 selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
1711 R_PARISC_DIR17F are for absolute branches; Handle them as such.
1712
1713 2000-05-30 Nick Clifton <nickc@cygnus.com>
1714
1715 * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
1716 80960CA, 80960MC as valid machine names.
1717
1718 2000-05-30 H.J. Lu <hjl@gnu.org>
1719
1720 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
1721 visibility bits if the symbol is undefined. Correctly handle
1722 weak undefined symbols with hidden and internal attributes.
1723
1724 * elflink.h (elf_link_add_object_symbols): Always turn the
1725 symbol into local if it has the hidden or internal attribute.
1726
1727 2000-05-29 Philip Blundell <philb@gnu.org>
1728
1729 * ppcboot.c: Add packed attribute if compiling with GCC.
1730
1731 2000-05-29 Anatoly Vorobey <mellon@pobox.com>
1732
1733 * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
1734
1735 2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
1736
1737 * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
1738 elfcore_grok_psinfo): Add code to allow debugging a 32-bit
1739 corefile on a 64-bit (Sparc Solaris) host. Also clean up
1740 a few old comments.
1741
1742 2000-05-26 Alan Modra <alan@linuxcare.com.au>
1743
1744 * Makefile.am: Update dependencies with "make dep-am"
1745 * Makefile.in: Regenerate.
1746
1747 * sysdep.h (gettext, dgettext, dcgettext, textdomain,
1748 bindtextdomain): Replace defines with those from intl/libgettext.h
1749 to quieten gcc warnings.
1750
1751 2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
1752
1753 * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
1754
1755 * archive.c (normalize, bfd_bsd_truncate_arname,
1756 bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
1757 file names with backslashes.
1758
1759 * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
1760 before opening it.
1761
1762 * sysdep.h: Include filenames.h.
1763
1764 2000-05-26 Alan Modra <alan@linuxcare.com.au>
1765
1766 * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
1767
1768 2000-05-26 Jakub Jelinek <jakub@redhat.com>
1769
1770 * elf64-sparc.c (sparc64_elf_relax_section): New.
1771 (sparc64_elf_relocate_section): Optimize tail call into branch always
1772 if possible.
1773 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1774 (elf32_sparc_relax_section): New.
1775
1776 2000-05-26 Jakub Jelinek <jakub@redhat.com>
1777
1778 * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
1779 Remove unusued variables.
1780 (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
1781 (sparc64_elf_merge_private_bfd_data): Fix shared library case from
1782 previous fix, so that shared libs really don't influence targets
1783 extension mask and memory model.
1784
1785 2000-05-23 H.J. Lu <hjl@gnu.org>
1786
1787 * elf64-alpha.c (elf64_alpha_relocate_section): Check
1788 h->root.other not h->other.
1789 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1790
1791 * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
1792
1793 2000-05-23 H.J. Lu <hjl@gnu.org>
1794
1795 * elf32-i386.c (elf_i386_relocate_section): Don't allow the
1796 undefined symbol with the non-default visibility attributes.
1797 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
1798 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1799 * elf32-i370.c (i370_elf_relocate_section): Likewise.
1800 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1801 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
1802 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
1803 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1804 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1805 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1806 * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
1807 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1808
1809 2000-05-22 Richard Henderson <rth@cygnus.com>
1810
1811 * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
1812 PCREL22, PCREL64I. Zero size of special relocs.
1813 (elf64_ia64_reloc_type_lookup): Likewise.
1814 (USE_BRL, oor_brl, oor_ip): New.
1815 (elf64_ia64_relax_section): New.
1816 (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
1817 (elf64_ia64_install_value): Likewise, plus PCREL21BI.
1818 (elf64_ia64_relocate_section): Likewise.
1819 (bfd_elf64_bfd_relax_section): New.
1820 * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
1821 (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
1822 * bfd-in2.h, libbfd.h: Regenerate.
1823
1824 2000-05-22 Nick Clifton <nickc@cygnus.com>
1825
1826 * configure.in : Add peigen.lo to MIPS PE targets.
1827 * configure: Regenerate.
1828
1829 2000-05-22 Momchil Velikov <velco@fadata.bg>
1830
1831 * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
1832 only if it is known for both input and output bfds. Separate
1833 error message strings as in some languages, it may be necessary
1834 to change more than one place in the string to change between
1835 'big' and 'little'.
1836
1837 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
1838 endianess checks, call _bfd_generic_verify_endian_match() instead.
1839
1840 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
1841
1842 * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
1843
1844 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
1845 endianess before checking bfd flavours.
1846
1847 2000-05-22 H.J. Lu <hjl@gnu.org>
1848
1849 * elflink.h (elf_link_output_extsym): Clear the visibility
1850 field for symbols not defined locally.
1851
1852 2000-05-18 Alan Modra <alan@linuxcare.com.au>
1853
1854 * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
1855 re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
1856 (hppa_rebuild_insn): Mask immediate bits here instead.
1857 * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
1858
1859 2000-05-18 Momchil Velikov <velco@fadata.bg>
1860
1861 * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
1862 relocs for an executable, ensure that they are virtual addresses.
1863
1864 Thu May 18 10:55:47 2000 Jeffrey A Law (law@cygnus.com)
1865
1866 * config.bfd (hppa*64*-*-hpux11*): New target triplet.
1867
1868 2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
1869 Rick Gorton <gorton@scrugs.lkg.dec.com>
1870
1871 * elflink.h: Add emitrelocations support: when enabled, relocation
1872 information and relocation sections are put into final output
1873 executables. If the emitrelocations flag is set, do the following:
1874 (elf_bfd_final_link): Emit relocation sections.
1875 (elf_link_input_bfd): Compute relocation section contents.
1876 (elf_gc_sections): Don't clean relocation sections.
1877
1878 2000-05-16 Catherine Moore <clm@cygnus.com>
1879
1880 * som.c (som_decode_symclass): Recognize weak symbols.
1881
1882 2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
1883
1884 * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
1885 read idata section only from dataoff.
1886 (pe_print_edata): Correctly check for valid eat_member.
1887
1888 Tue May 16 00:04:11 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
1889
1890 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
1891
1892 2000-05-14 Philip Blundell <philb@gnu.org>
1893
1894 * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
1895
1896 2000-05-12 Alan Modra <alan@linuxcare.com.au>
1897
1898 * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
1899
1900 * peigen.c (pe_print_idata): Look for .idata section and print
1901 info even if data directory has zero entries. Read idata section
1902 starting from dataoff, and adjust all data offsets to suit. Cast
1903 all bfd_vma vars to unsigned long before passing to fprintf.
1904 * peigen.c (pe_print_edata): Similarly, look for .edata section
1905 and print info even if data directory has zero entries. Cast
1906 all bfd_vma vars to unsigned long before passing to fprintf.
1907
1908 From Szabolcs Szakacsits <szaka@F-Secure.com>
1909 * peigen.c (pe_print_idata): Use bfd_section_size rather than data
1910 directory size which may be bogus.
1911 * peigen.c (pe_print_edata): Similarly.
1912
1913 2000-05-09 Alan Modra <alan@linuxcare.com.au>
1914
1915 * elf.c (bfd_section_from_shdr): Don't set use_rela_p if rela
1916 section is empty.
1917 (copy_private_bfd_data): Allow for space possibly taken up by elf
1918 headers when calculating segment physical address from lma.
1919
1920 2000-05-08 Alan Modra <alan@linuxcare.com.au>
1921
1922 * versados.c (versados_scan): Init stringlen and pass_2_done.
1923
1924 * trad-core.c (trad_unix_core_file_p): Return
1925 bfd_error_wrong_format rather than bfd_error_file_truncated.
1926
1927 * peigen.c (_bfd_pei_swap_aouthdr_out): Pass ImageBase to
1928 add_data_entry. DataDirectory virtual address is relative.
1929 (pe_print_idata): Account for relative DataDirectory virtual
1930 addresses. Don't trash datasize inside POWERPC_LE_PE code.
1931 (pe_print_edata): Similarly.
1932
1933 From Szabolcs Szakacsits <szaka@F-Secure.com>
1934 * peigen.c (dir_names): Add Delay Import Directory.
1935 (pe_print_idata): Always search for bfd section containing
1936 idata address rather than looking up section name. Print this
1937 section name rather than .idata.
1938 (pe_print_edata): Similarly. Also print some fields as %08lx.
1939 (_bfd_pe_print_private_bfd_data_common): Print Reserved1 field as
1940 Win32Version.
1941
1942 Fri May 5 20:44:40 2000 Clinton Popetz <cpopetz@cygnus.com>
1943
1944 * xcoff.h: Rename to xcoff-target.h
1945 * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
1946 * coff-rs6000.c: Ditto.
1947 * coff64-rs6000.c: Ditto.
1948 * coff-pmac.c: Ditto.
1949 * Makefile.in: Regenerate.
1950
1951 Fri May 5 16:51:03 2000 Clinton Popetz <cpopetz@cygnus.com>
1952
1953 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
1954 Change U802TOC64MAGIC to U803XTOCMAGIC.
1955
1956 2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
1957
1958 * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
1959 * bfd-in.h: Prototype bfd_elf_get_arch_size.
1960 * bfd-in2.h: Prototype bfd_elf_get_arch_size.
1961
1962 2000-05-04 Alan Modra <alan@linuxcare.com.au>
1963
1964 * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
1965
1966 2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1967
1968 * elflink.h (elf_link_add_object_symbols): Reset dynindx for
1969 hidden and internal symbols.
1970 (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
1971 visibility.
1972 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
1973 assign a PLT or GOT entry to symbols with hidden and
1974 internal visibility.
1975
1976 2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
1977
1978 * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
1979 the .bss section.
1980 * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1981
1982 2000-05-02 H.J. Lu <hjl@gnu.org>
1983
1984 * elf.c (prep_headers): Use ELFOSABI_NONE instead of
1985 ELFOSABI_SYSV.
1986
1987 2000-05-02 Alan Modra <alan@linuxcare.com.au>
1988
1989 * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
1990 * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
1991 dependencies.
1992 * Makefile.in: Regenerate.
1993
1994 Mon May 1 16:56:47 2000 Jim Wilson <wilson@cygnus.com>
1995
1996 * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
1997 (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
1998 (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
1999 (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
2000 * Makefile.in: Rebuild.
2001
2002 2000-05-02 Alan Modra <alan@linuxcare.com.au>
2003
2004 * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
2005 doesn't work very well.
2006
2007 * elf-hppa.h (elf_hppa_internal_shdr): Define.
2008 (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
2009 Set hdr->s_type to 1 if ARCH_SIZE == 32.
2010 (_bfd_elf_hppa_gen_reloc_type): Add prototype.
2011 (elf_hppa_info_to_howto): Likewise.
2012 (elf_hppa_info_to_howto_rel): Likewise.
2013 (elf_hppa_reloc_type_lookup): Likewise.
2014 (elf_hppa_is_local_label_name): Likewise.
2015 (elf_hppa_fake_sections): Likewise.
2016 (elf_hppa_final_write_processing): Likewise.
2017 (elf_hppa_howto_table): Fully initialise all entries.
2018 (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
2019 (elf_hppa_info_to_howto): Likewise.
2020 (elf_hppa_info_to_howto_rel): Likewise.
2021 (elf_hppa_reloc_type_lookup): Likewise.
2022 (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
2023 elf_hppa_unmark_useless_dynamic_symbols,
2024 elf_hppa_remark_useless_dynamic_symbols,
2025 elf_hppa_record_segment_addrs, elf_hppa_final_link,
2026 elf_hppa_relocate_section, elf_hppa_final_link_relocate,
2027 elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
2028 elf32-hppa.c mess is cleaned up.
2029 (elf_hppa_final_link_relocate): Make insn and r_type unsigned
2030 int. Delete r_field. In case R_PARISC_PCREL21L, don't set
2031 r_field then call hppa_field_adjust inline func with variable
2032 r_field arg, instead call hppa_field_adjust with fixed arg.
2033 In case R_PARISC_PCREL22F, don't set r_field.
2034 (elf_hppa_relocate_insn): Change args and return type to unsigned
2035 int. Call re_assemble_* funcs to do the work.
2036
2037 * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
2038 sign extending.
2039
2040 * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
2041 extending.
2042 (sign_extend): Mask first before sign extending.
2043 (low_sign_extend): Rewrite without condition expression.
2044 (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
2045 dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
2046 (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
2047 assemble_17, assemble_21, sign_unext, low_sign_unext): Return
2048 result as function return value rather than through pointer arg.
2049 Accept unsigned int args, and return unsigned int.
2050 (re_assemble_3): New. Combines function of dis_assemble_3 with
2051 re-assembly of opcode and immediate.
2052 (re_assemble_12): Likewise.
2053 (re_assemble_16): Likewise.
2054 (re_assemble_17): Likewise.
2055 (re_assemble_21): Likewise.
2056 (re_assemble_22): Likewise.
2057 (hppa_field_adjust): Rewrite and document, paying attention to
2058 size of types and signed/unsigned issues.
2059 (get_opcode): Shift before masking.
2060 (FDLW): Rename to FLDW.
2061 (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
2062 (hppa_rebuild_insn): Change args and return value to unsigned
2063 int. Make use of re_assemble_*. Correct case 11.
2064
2065 * dep-in.sed: Handle ../opcodes/.
2066 * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
2067 elf64-hppa.h, hppa_stubs.h, xcoff.h.
2068 (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
2069 Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
2070 elfarm-nabi.lo dependencies outside of auto-dependency area.
2071 Regenerate dependencies.
2072 * Makefile.in: Regenerate.
2073
2074 * configure.in (TRAD_HEADER): Test non-null before
2075 AC_DEFINE_UNQUOTED.
2076 * configure: Regenerate.
2077
2078 * reloc.c: Fix mis-spelling in comment.
2079
2080 2000-05-01 Alan Modra <alan@linuxcare.com.au>
2081
2082 * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
2083 * vms.c (vms_openr_next_archived_file): Return NULL.
2084
2085 Fri Apr 28 21:34:44 2000 Clinton Popetz <cpopetz@cygnus.com>
2086
2087 * coffcode.h Copy changes mistakenly done to libcoff.h in
2088 4/24/2000 patch.
2089
2090 2000-04-29 Andreas Jaeger <aj@suse.de>
2091
2092 * libbfd-in.h: Correctly check GCC version.
2093 * bfd-in.h: Likewise.
2094 * libhppa.h: Likewise.
2095 * libbfd.h: Regenerate.
2096 * bfd-in2.h: Regenerate.
2097
2098 Fri Apr 28 14:58:37 2000 Clinton Popetz <cpopetz@cygnus.com>
2099
2100 * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
2101 coffdu-rs6000.{lo,c}.
2102 (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
2103 on xcoff.h
2104 * Makefile.in: Regenerate.
2105 * xcoff.h: New file.
2106 * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
2107 * coff-rs6000.c: Move all declarations and defines that are
2108 common to the xcoff backends into xcoff.h
2109 * coff64-rs6000.c: Ditto,
2110
2111 Fri Apr 28 08:35:21 2000 Clinton Popetz <cpopetz@cygnus.com>
2112
2113 * coff-mips.c (mips_ecoff_backend_data): Add initialization of
2114 _bfd_coff_force_symnames in strings and
2115 _bfd_coff_debug_string_prefix_length to their default values.
2116 * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
2117
2118 Fri Apr 28 08:05:12 2000 Clinton Popetz <cpopetz@cygnus.com>
2119
2120 * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
2121 _bfd_coff_force_symnames in strings and
2122 _bfd_coff_debug_string_prefix_length to their default values.
2123
2124 2000-04-27 Alan Modra <alan@linuxcare.com.au>
2125
2126 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
2127 Check local_got_refcounts before dereferencing.
2128
2129 * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
2130 before deciding we don't need R_PPC_PLT32 relocation.
2131 (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
2132 dereferencing.
2133
2134 * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
2135
2136 * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
2137 .plt entries.
2138 (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
2139 (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
2140 (elf_i386_relocate_section): Allow for .plt to go missing.
2141 (elf_i386_finish_dynamic_symbol): Use same test to decide if we
2142 can use a relative reloc for got as elf_i386_relocate_section.
2143 (bfd_elf32_bfd_final_link): Define to use gc form of final link.
2144
2145 Wed Apr 26 16:31:28 2000 Clinton Popetz <cpopetz@cygnus.com>
2146
2147 * config.bfd: Remove extraneous bfd_powerpc_64_arch.
2148
2149 Mon Apr 24 15:20:35 2000 Clinton Popetz <cpopetz@cygnus.com>
2150
2151 * Makefile.am (coff64-rs6000.lo): New rule.
2152 * Makefile.in: Regenerate.
2153 * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
2154 xcoff_is_local_label_name, xcoff_rtype2howto,
2155 xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
2156 xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
2157 xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
2158 (NO_COFF_SYMBOLS): Define.
2159 (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
2160 xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
2161 internally.
2162 (MINUS_ONE): New macro.
2163 (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
2164 relocation.
2165 (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
2166 coff_SWAP_aux_out): Map to the new functions.
2167 * coff64-rs6000.c: New file.
2168 * libcoff.h (bfd_coff_backend_data): Add new fields
2169 _bfd_coff_force_symnames_in_strings and
2170 _bfd_coff_debug_string_prefix_length.
2171 (bfd_coff_force_symnames_in_strings,
2172 bfd_coff_debug_string_prefix_length): New macros for above fields.
2173 * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
2174 Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
2175 of using coff_swap_sym_in directly.
2176 (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
2177 (coff_set_flags) Set magic for XCOFF64.
2178 (coff_compute_section_file_positions): Add symbol name length to
2179 string section length if bfd_coff_debug_string_prefix_length is
2180 true.
2181 (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
2182 (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
2183 using coff_swap_lineno_in directly.
2184 (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
2185 and _bfd_coff_debug_string_prefix_length fields.
2186 * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
2187 symbol names into strings table when
2188 bfd_coff_force_symnames_in_strings is true.
2189 * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
2190 SET_RELOC_VADDR): New macros.
2191 (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
2192 (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
2193 code.
2194 (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
2195 changes within RS6000COFF_C specific code.
2196 (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
2197 MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
2198 * reloc.c (bfd_perform_relocation, bfd_install_relocation):
2199 Extend existing hack on target name.
2200 * xcofflink.c (XCOFF_XVECP): Extend existing hack on
2201 target name.
2202 * coff-tic54x.c (ticof): Keep up to date with new fields
2203 in bfd_coff_backend_data.
2204 * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
2205 targ_selvecs to include rs6000coff64_vec for rs6000.
2206 * configure.in: Add rs6000coff64_vec case.
2207 * cpu-powerpc.c: New bfd_arch_info_type.
2208
2209 Mon Apr 24 02:17:31 2000 Jeffrey A Law (law@cygnus.com)
2210
2211 * config.bfd: Only disable elf32-hppa vectors, not all of the
2212 BSD and OSF configuration support. Provide (disabled) clauses
2213 for PA64 support.
2214 * configure.in: Add clause for PA64 support.
2215 * configure: Rebuilt.
2216
2217 * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
2218 (bfd_elf64_hppa_vec): Declare.
2219
2220 * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
2221 (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
2222 (elf64-hppa.lo): Add dependencies.
2223 * Makefile.in: Rebuilt.
2224
2225 * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
2226
2227 Mon Apr 24 02:14:29 2000 Jason Eckhardt <jle@cygnus.com>
2228
2229 * libhppa.h (dis_assemble_16): New function.
2230 (pa_arch): Added pa20w element.
2231
2232 Mon Apr 24 01:49:03 2000 Ulrich Drepper <drepper@cygnus.com>
2233
2234 * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
2235 bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
2236 bfd_elf64_slurp_reloc_table.
2237
2238 * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
2239 definitions to get external names.
2240 (elf_write_relocs): Renamed from write_relocs and make global.
2241 (elf_slurp_reloc_table): Make global.
2242 (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
2243
2244 * archive.c (hpux_uid_gid_encode): New function.
2245 (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
2246 defined and the ID is greater than 99999.
2247 (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
2248 special uid/gid fields into 32 bit values.
2249
2250 2000-04-21 Matthew Green <mrg@cygnus.com>
2251
2252 * config.bfd: Add NetBSD/sparc64 support.
2253
2254 Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
2255 David Mosberger <davidm@hpl.hp.com>
2256 Timothy Wall <twall@cygnus.com>
2257 Jim Wilson <wilson@cygnus.com>
2258
2259 * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
2260 (ALL_MACHINES_CFILES): Add cpu-ia64.c.
2261 (BFD64_BACKENDS): Add elf64-ia64.lo.
2262 (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
2263 (cpu-ia64.lo, elf64-ia64.lo): New rules.
2264 * Makefile.in: Rebuild.
2265 * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
2266 (bfd_ia64_arch): Declare.
2267 (bfd_archures_list): Add bfd_ia64_arch.
2268 * bfd-in2.h: Rebuild.
2269 * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
2270 * configure: Rebuild.
2271 * configure.host: (ia64-*-linux*): New host.
2272 * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
2273 bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
2274 * elf.c (prep_headers): Add bfd_arch_ia64.
2275 * libbfd.h: Rebuild.
2276 * reloc.c: Add IA-64 relocations.
2277 * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
2278 Declare.
2279 (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
2280 * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
2281
2282 2000-04-21 Richard Henderson <rth@cygnus.com>
2283
2284 * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
2285 contents when performing a partial link.
2286 (bfd_elf_d30v_reloc_21): Likewise.
2287
2288 2000-04-20 H.J. Lu <hjl@gnu.org>
2289
2290 * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
2291 patch to symbols defined by a shared object.
2292 * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
2293
2294 2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
2295
2296 K&R compiler fixes.
2297 * dwarf2.c (concat_filename): Avoid string literal concatenation.
2298 * ieee.c (ieee_get_symtab): Don't initialise union in struct.
2299
2300 Mon Apr 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
2301
2302 * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
2303 (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
2304 (coff-ia64.lo): Add dependency.
2305 * Makefile.in: Regenerate.
2306 * coff-ia64.c: New file.
2307 * efi-app-ia32.c: Ditto.
2308 * efi-app-ia64.c: Ditto.
2309 * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
2310 (coff_set_flags): Ditto.
2311 (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
2312 * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
2313 * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
2314 * configure: Regenerate.
2315 * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
2316 (PUT_OPTHDR_IMAGE_BASE): Ditto.
2317 (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2318 (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
2319 (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2320 (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
2321 (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2322 (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
2323 (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2324 (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
2325 (GET_PDATA_ENTRY): Ditto.
2326 * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
2327 data_start. Use above macros to read fields that are 64 bit wide for
2328 COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
2329 (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
2330 FileAlignment and SectionAlignment to minimum alignment if they
2331 are zero.
2332 (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
2333 Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
2334 (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
2335 Use above macros to write fields that are 64 bit wide for
2336 COFF_WITH_PEP64.
2337 (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
2338 5*4 otherwise. This should be right for IA-32 and IA-64, but may
2339 be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
2340 value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
2341 begin address, end address, and unwind info address only. Use
2342 GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
2343 print addresses.
2344 (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
2345 HIGH3ADJ relocation names.
2346 (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
2347 * targets.c: Declare bfd_efi_app_ia32_vec and
2348 bfd_efi_app_ia64_vec.
2349 (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
2350 bfd_efi_app_ia64_vec.
2351
2352 2000-04-17 Timothy Wall <twall@cygnus.com>
2353
2354 * bfd-in2.h: Add prototypes for tic54x load page access.
2355 * bfd-in.h: Regenerate.
2356 * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
2357 in customized _set_arch_mach function.
2358 * coffcode.h (coff_set_alignment_hook): Set section load page if
2359 the appropriate macro is defined.
2360 (write_object_contents): Read section load page.
2361
2362 2000-04-13 Alan Modra <alan@linuxcare.com.au>
2363
2364 * elf32-hppa.h: Update copyright date.
2365
2366 * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
2367 * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
2368
2369 * elf32-d30v.c (MAX32): Don't use LL suffix.
2370 (MIN32): Define in terms of MAX32.
2371 (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
2372
2373 * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
2374 expression.
2375
2376 * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
2377
2378 2000-04-12 Alan Modra <alan@linuxcare.com.au>
2379
2380 * dep-in.sed: Match space before file name, not after.
2381 * Makefile.am: Regenerate dependencies.
2382 * Makefile.in: Regenerate.
2383
2384 * reloc.c (_bfd_relocate_contents): In complain_overflow_bitfield
2385 case, allow address wrap-around stupidly removed 2000-03-17. Sign
2386 extend without an if statement.
2387
2388 2000-04-11 Alan Modra <alan@linuxcare.com.au>
2389
2390 * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
2391 signed quantites.
2392 * elf32-mips.c (gprel16_with_gp): Likewise.
2393 * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
2394 here using -0x40000, not (int)0xfffc0000.
2395 (elf32_hppa_size_of_stub): Likewise.
2396
2397 2000-04-11 Timothy Wall <twall@cygnus.com>
2398
2399 * coff-tic54x.c: Now builds with all targets.
2400 * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
2401 * Makefile.in: Regenerate.
2402 * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
2403 unitialized variable.
2404
2405 Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
2406
2407 * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
2408 --enable-build-warnings option.
2409 * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
2410 * Makefile.in, configure: Re-generate.
2411
2412 2000-04-07 Nick Clifton <nickc@cygnus.com>
2413
2414 * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
2415 BFD_RELOC_THUMB_PCREL_BLX.
2416
2417 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
2418 R_ARM_XPC25 and R_ARM_THM_PC22.
2419
2420 * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
2421 R_ARM_XPC25 and R_ARM_THM_XPC22.
2422 (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
2423 R_ARM_[XPC25|THM_XPC22].
2424
2425 * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
2426 elf/arm-oabi.h to elf/arm.h
2427
2428 * Makefile.am: Fix dependency for elfarm-oabi.c
2429 * Makefile.in: Regenerate.
2430
2431 * bfd-in2.h: Regenerate.
2432 * libbfd.h: Regenerate.
2433
2434 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
2435
2436 * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
2437 and restore it on failure. Release newly allocated tdata on
2438 failure.
2439
2440 Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
2441
2442 * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
2443 (decode_line_info): Set it. Report error if unit->line_offset is
2444 equal to or larger than it.
2445
2446 2000-04-07 Timothy Wall <twall@cygnus.com>
2447
2448 * targets.c: Added vecs for tic54x.
2449 * reloc.c: Added relocs for tic54x.
2450 * libbfd.h: Regenerated.
2451 * configure: Add TI COFF vecs for tic54x.
2452 * configure.in: Ditto.
2453 * config.bfd (targ_cpu): Recognize new tic54x target.
2454 * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
2455 * bfd-in2.h: Add tic54x target and relocations.
2456 * Makefile.am, Makefile.in: Add tic54x target.
2457 * archures.c (bfd_archures_list): Add tic54x target.
2458 * coff-tic54x.c: New.
2459 * cpu-tic54x.c: New.
2460
2461 2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
2462
2463 * elfcore.h (elf_core_file_p): call backend_object_p which
2464 thereby gets an opportunity to update the arch/machine type.
2465
2466 2000-04-06 Timothy Wall <twall@cygnus.com>
2467
2468 * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
2469 class. Handle SEC_CLINK and SEC_BLOCK flags.
2470 * section.c: Add SEC_CLINK and SEC_BLOCK flags.
2471 * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
2472
2473 2000-04-06 Nick Clifton <nickc@cygnus.com>
2474
2475 * elf32-arm.h (elf32_arm_set_private_flags): Only check for
2476 EF_INTERWORK if this is an unknown EABI.
2477 (elf32_arm_merge_private_bfd_data): Check EABI version
2478 numbers. Only check EF_xxx flags if the EABI version number
2479 is unknown.
2480 (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
2481 if the EABI version number is unknown.
2482 (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
2483 if the EABI version number is unknown.
2484
2485 Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
2486
2487 * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
2488 BFD_RELOC_SH_LOOP_END.
2489 * elf32-sh.c (sh_elf_howto_tab): Change special_func to
2490 sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
2491 Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
2492 (sh_elf_reloc_loop): New function.
2493 (sh_elf_reloc): No need to test for always-to-be-ignored relocs
2494 any more.
2495 (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
2496 (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
2497 * bfd-in2.h, libbfd.h: Regenerate.
2498
2499 2000-04-04 Alan Modra <alan@linuxcare.com.au>
2500
2501 * po/bfd.pot: Regenerate.
2502
2503 * Makefile.am: Remove extraneous mkdep comment.
2504 (MKDEP): Use gcc -MM rather than mkdep.
2505 (DEP): Quote when passing vars to sub-make. Add warning
2506 message to end.
2507 (DEP1): Rewrite for "gcc -MM".
2508 (CLEANFILES): Add DEP2.
2509 Update dependencies.
2510 * Makefile.in: Regenerate.
2511
2512 2000-04-03 Kevin Buettner <kevinb@redhat.com>
2513
2514 * configure.in: Added corefile support for AIX 4.3. In particular,
2515 AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
2516 compiling rs6000-core.c.
2517 * configure: Regenerated.
2518
2519 2000-04-03 H.J. Lu <hjl@gnu.org>
2520
2521 * cache.c (bfd_open_file): Unlink the output file only if
2522 it has non-zero size.
2523
2524 2000-04-01 Ken Block USG <block@zk3.dec.com>
2525
2526 * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
2527 relative relocations for non-loaded sections in shared objects.
2528 (elf64_alpha_check_relocs): Similarly.
2529
2530 Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
2531
2532 * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
2533 BFD_RELOC_16 to switch for extended relocs.
2534 (MY_swap_ext_reloc_in): New.
2535 (MY_swap_ext_reloc_out): New.
2536 (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
2537 than NAME(aout,swap_ext_reloc_in) for extended relocs.
2538 (NAME(aout,squirt_out_relocs)): Similarly use
2539 MY_swap_ext_reloc_out.
2540 (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
2541
2542 2000-04-03 Kazu Hirata <kazu@hxi.com>
2543
2544 * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
2545 the R_PCRWORD_B case.
2546
2547 2000-03-31 Thomas de Lellis <tdel@wrs.com>
2548
2549 * srec.c : Set CHUNK size to 16 bytes to prevent download failures
2550 on some targets.
2551 * ihex.c : Ditto.
2552
2553 Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
2554
2555 * elf32-m32r.c (m32r_elf_generic_reloc): new function. All
2556 HOWTO references to bfd_elf_generic_reloc, that have
2557 partial_inplace == true, now use the new function. The function
2558 is based on the recent rewrite of m32r_elf_lo16_reloc(), and
2559 extends its fixes to the R_M32R_{16,24,32} relocs.
2560 The new logic in m32r_elf_lo16_reloc() has been removed, and
2561 it instead calls the new routine to obtain that functionality.
2562
2563 2000-03-27 Alan Modra <alan@linuxcare.com.au>
2564
2565 * elf32-avr.c (elf32_avr_gc_mark_hook, elf32_avr_gc_sweep_hook,
2566 elf32_avr_check_relocs, avr_final_link_relocate,
2567 elf32_avr_relocate_section, bfd_elf_avr_final_write_processing,
2568 elf32_avr_object_p): Add prototypes.
2569 (elf32_avr_gc_mark_hook): Add default for h->root.type.
2570 (bfd_elf_avr_final_write_processing): Make static.
2571
2572 2000-03-27 Denis Chertykov <denisc@overta.ru>
2573
2574 * cpu-avr.c: New file. BFD support routines for AVR architecture.
2575 * archures.c (bfd_architecture): Add AVR architecture.
2576 (bfd_archures_list): Add reference to AVR architecture info.
2577 * elf.c (prep_headers): Handle bfd_arch_avr.
2578 * reloc.c: Add various AVR relocation enums.
2579 * targets.c (bfd_elf32_avr_vec): Declare and add to target vector
2580 list.
2581 * Makefile.am: Add support for AVR elf.
2582 * configure.in: Likewise.
2583 * config.bfd: Likewise.
2584 * Makefile.in: Regenerate.
2585 * configure: This too.
2586 * bfd-in2.h: And this.
2587 * libbfd.h: And this.
2588
2589 2000-03-24 H.J. Lu <hjl@gnu.org>
2590
2591 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
2592 (elf64_alpha_find_reloc_at_ofs): Likewise.
2593
2594 2000-03-17 Alan Modra <alan@linuxcare.com.au>
2595
2596 * reloc.c (bfd_check_overflow): In case complain_overflow_bitfield,
2597 flag an overflow if the bitfield is outside -2**n to 2**n-1. The
2598 allowable range used to be -2**(n-1) to 2**n-1.
2599 * reloc.c (_bfd_relocate_contents): Same here. Also replace
2600 "boolean overflow" with "bfd_reloc_status_type flag".
2601
2602 2000-03-14 Doug Evans <dje@casey.transmeta.com>
2603
2604 * elf32-m32r.c (m32r_elf_lo16_reloc): Rewrite.
2605
2606 2000-03-14 Kazu Hirata <kazu@hxi.com>
2607
2608 * reloc16.c (bfd_coff_reloc16_relax_section): Count the total number
2609 of shrinks properly, including the last reloc.
2610
2611 2000-03-13 Kazu Hirata <kazu@hxi.com>
2612
2613 * coff-h8300.c (h8300_reloc16_extra_cases): Fix the sanity
2614 check for R_MOVL2.
2615
2616 2000-03-11 Alan Modra <alan@linuxcare.com.au>
2617
2618 * ieee.c (ieee_archive_p): Return bfd_error_wrong_format on
2619 a format mismatch rather than an "error" from bfd_read such as
2620 bfd_error_file_truncated.
2621
2622 2000-03-10 Geoff Keating <geoffk@cygnus.com>
2623
2624 * elf32-mips.c (_bfd_mips_elf_relocate_section): Do proper
2625 sign-extension and big-endian compensation for
2626 R_MIPS_64 even in ld -r.
2627
2628 2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
2629
2630 * elf32-mips.c (mips_elf_next_relocation): Rename from
2631 mips_elf_next_lo16_relocation, and generalize to look
2632 for any relocation type.
2633 (elf_mips_howto_table): Make R_MIPS_PC16 pcrel_offset.
2634 (elf_mips_gnu_rel_hi16): Howto for R_MIPS_GNU_REL_HI16.
2635 (elf_mips_gnu_rel_lo16): Howto for R_MIPS_GNU_REL_LO16.
2636 (elf_mips_gnu_rel16_s2): Howto for R_MIPS_GNU_REL16_S2.
2637 (elf_mips_gnu_pcrel64): Howto for R_MIPS_PC64.
2638 (elf_mips_gnu_pcrel32): Howto for R_MIPS_PC32.
2639 (bfd_elf32_bfd_reloc_type_lookup): Add new relocs.
2640 (mips_rtype_to_howto): Likewise.
2641 (mips_elf_calculate_relocation): Handle new relocs.
2642 (_bfd_mips_elf_relocate_section): REL_HI16/REL_LO16 relocs
2643 are paired. The addend for R_MIPS_GNU_REL16_S2
2644 is shifted right two bits.
2645
2646 2000-03-10 Alan Modra <alan@linuxcare.com.au>
2647
2648 * reloc.c (bfd_perform_relocation): Undo emacs formatting of
2649 comment, and ensure it doesn't happen again.
2650 (bfd_install_relocation): Same here.
2651 (_bfd_relocate_contents): Don't bother assigning unused signmask
2652 shift result. Fix typos in comments.
2653 Remove trailing whitespace throughout file.
2654
2655 2000-03-07 Doug Evans <dje@casey.transmeta.com>
2656
2657 * reloc.c (reloc_howto_struct): Fix partial_inplace comment.
2658 * bfd-in2.h: Rebuild.
2659
2660 2000-03-06 Nick Clifton <nickc@cygnus.com>
2661
2662 * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
2663 sym_ptr_ptr fields.
2664 (SIZEOF_ILF_SYM_PTR_TABLE): Define.
2665 (SIZEOF_ILF_STRINGS): Redefine.
2666 (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
2667 relative reloc, as opposed to a section relative reloc.
2668 (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
2669 not C_LABEL.
2670 Add length of symbol's prefix to string pointer.
2671 Store a pointer to the symbol in the symbol pointer table.
2672 (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
2673 Initialise the symbol pointer table.
2674 Store the hint in the Hint/Name table.
2675 Make the jump reloc be symbol realtive, not section relative.
2676 Create an import symbol for imported code.
2677
2678 2000-03-06 Catherine Moore <clm@cygnus.com>
2679
2680 * elf.c (swap_out_syms): Check for null type_ptr.
2681
2682 2000-03-01 Hans-Peter Nilsson <hp@axis.com>
2683
2684 * aout-target.h (MY(write_object_contents)): Remove unused
2685 and unusable "#if CHOOSE_RELOC_SIZE".
2686 * pc532-mach.c (MY(write_object_contents)): Ditto.
2687 * netbsd.h (MY(write_object_contents)): Ditto.
2688 * hp300hpux.c (MY(write_object_contents)): Ditto.
2689 * freebsd.h (MY(write_object_contents)): Ditto.
2690 * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
2691
2692 2000-02-29 H.J. Lu <hjl@gnu.org>
2693
2694 * peicode.h (jtab): Make it static.
2695
2696 * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
2697 defined and COFF_IMAGE_WITH_PE is not defined.
2698 (_bfd_sh_align_load_span): Defined as sh_align_load_span if
2699 COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
2700
2701 2000-03-01 Nick Clifton <nickc@cygnus.com>
2702
2703 * coff-arm.c (bfd_arm_process_before_allocation): Make
2704 'symndx' signed to prevent compile time warning.
2705
2706 * coff-mcore.c: Remove unused prototype for pe_object_p.
2707
2708 * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
2709 functions that are not used when COFF_IMAGE_WITH_PE is
2710 defined.
2711 (struct sh_opcode): Change type of 'flags' field to unsigned
2712 long so that it can hold the USESAS flag.
2713
2714 * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
2715
2716 * elf-m10300.c (mn10300_elf_relax_section): Initialise
2717 'sym_sec'.
2718
2719 * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
2720 parameters.
2721 Remove unusued variables and code.
2722 (elf_backend_add_symbol_hook): Fix prototype.
2723
2724 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
2725 'srelgot'.
2726
2727 * elf32-mcore.c (mcore_elf_relocate_section): Initialise
2728 'oldinst'.
2729
2730 * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
2731 parameters.
2732 Remove unusued variables and code.
2733 (elf_backend_add_symbol_hook): Fix prototype.
2734
2735 * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
2736
2737 * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
2738 to unused function parameter.
2739
2740 * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
2741 parameters.
2742 Use EMPTY_HOWTO to initialise empty howto slots.
2743 Remove unused variables.
2744
2745 * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
2746
2747 2000-03-01 H.J. Lu <hjl@gnu.org>
2748
2749 * aoutx.h (aout_link_input_section_std): Pass "true" to
2750 the undefined_symbol callback.
2751 (aout_link_input_section_ext): Likewise.
2752 * bout.c (get_value): Likewise.
2753 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
2754 * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
2755 Likewise.
2756 (alpha_relocate_section): Likewise.
2757 * coff-arm.c (coff_arm_relocate_section): Likewise.
2758 * coff-i960.c (coff_i960_relocate_section): Likewise.
2759 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
2760 * coff-mips.c (mips_relocate_section): Likewise.
2761 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
2762 * coff-sh.c (sh_relocate_section): Likewise.
2763 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
2764 * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
2765 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
2766 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2767 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
2768 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2769 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2770 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2771 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2772 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2773 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2774 * elf32-v850.c (v850_elf_relocate_section): Likewise.
2775 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
2776 * elflink.h (elf_link_output_extsym): Likewise.
2777 * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
2778 * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
2779 * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
2780
2781 * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
2782 undefined_symbol callback when building shared library with
2783 -Bsymbolic and undefined symbols are allowed. Otherwise, pass
2784 "true".
2785 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
2786 * elf32-i386.c (elf_i386_relocate_section): Likewise.
2787 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2788 * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
2789 (elf32_mips_get_relocated_section_content): Likewise.
2790 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2791 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2792 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2793 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2794
2795 2000-02-28 Nick Clifton <nickc@cygnus.com>
2796
2797 * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
2798 * Makefile.in: Regenerate.
2799
2800 * configure.in: Add support for mips and sh pe vectors.
2801 * configure: regenerate.
2802
2803 * config.bfd: Add support for arm-wince, mips-pe and sh-pe
2804 targets.
2805
2806 * targets.c: Add mips and sh pe vectors.
2807
2808 * libpei.h (coff_final_link_postscript): Only define if not
2809 already defined.
2810
2811 * coffcode.h: Add support for WinCE magic numbers.
2812
2813 * peigen.c (pe_print_reloc): Update comment and rearrange
2814 appending of newline character.
2815
2816 * peicode.h: Add support for Image Library Format.
2817 (pe_ILF_vars): Structure containing data used by ILF code.
2818 (pe_ILF_make_a_section): New function. Create a section based
2819 on ILF data.
2820 (pe_ILF_make_a_reloc): New function. Create a reloc based on
2821 ILF data.
2822 (pe_ILF_make_a_symbol): New function. Create a symbol based
2823 on ILF data.
2824 (pe_ILF_save_relocs): New function. Store the relocs created
2825 by pe_ILF_make_a_reloc in a section.
2826 (pe_ILF_build_a_bfd): New function. Create a BFD describing
2827 an ILF object.
2828 (pe_ILF_object_p): New function. Return a bfd_target pointer
2829 for an ILF object.
2830 (pe_bfd_object_p): If an ILF object is detected call
2831 pe_ILF_object_p on it.
2832
2833 * coff-arm.c: Add support for WinCE relocs which are different
2834 from normal ARM COFF relocs.
2835 * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
2836
2837 * coff-sh.c: Add support for sh-pe target.
2838 * pe-sh.c: New file. Support code for sh-pe target.
2839 * pei-sh.c: New file. Support code for sh-pe target.
2840
2841 * pe-mips.c: New file. Support code for mips-pe target.
2842 * pei-mips.c: New file. Support code for mips-pe target.
2843
2844 2000-02-27 Jakub Jelinek <jakub@redhat.com>
2845
2846 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Don't bump
2847 architecture if the object causing the bump is dynamic.
2848 * elf64-sparc.c (sparc64_elf_merge_private_bfd_data): Likewise,
2849 and also don't it for memory ordering.
2850 (sparc64_elf_write_relocs): Take src_rela out of the loop.
2851
2852 2000-02-27 Ian Lance Taylor <ian@zembu.com>
2853
2854 * dwarf2.c (read_abbrevs): Use _raw_size directly rather than
2855 calling bfd_get_section_size_before_reloc.
2856 (decode_line_info): Likewise.
2857 (_bfd_dwarf2_find_nearest_line): Likewise.
2858
2859 2000-02-27 Eli Zaretskii <eliz@is.elta.co.il>
2860
2861 * Makefile.am (stamp-lib): Use $(LIBTOOL) --config to get the
2862 name of the libtool directory.
2863 * Makefile.in: Rebuild.
2864
2865 Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
2866
2867 * som.c (SOM_HOWTO): Define.
2868 (som_hppa_howto_table): Use it.
2869
2870 2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
2871
2872 * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
2873
2874 * config.bfd: Enable 64 bit support for Solaris7+/sparc.
2875
2876 2000-02-24 Catherine Moore <clm@cygnus.com>
2877
2878 * som.c (som_misc_symbol_info): Add field
2879 secondary_def.
2880 (som_bfd_derive_misc_symbol_info): Initialize
2881 secondary_def.
2882 (som_build_and_write_symbol_table): Keep track
2883 of secondary_def field.
2884 (som_slurp_symbol_table): Set BSF_WEAK symbol flag
2885 if secondary_def field is set.
2886 (som_bfd_ar_write_symbol_stuff): Initialize
2887 secondary_def.
2888
2889 2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
2890
2891 * dwarf2.c (read_address): Read 16-bits addresses.
2892 (parse_comp_unit): Accept addr_size == 2.
2893
2894 2000-02-23 Alan Modra <alan@spri.levels.unisa.edu.au>
2895
2896 * bfd-in.h: Update copyright date.
2897
2898 2000-02-23 Linas Vepstas <linas@linas.org>
2899
2900 * cpu-i370.c: New file.
2901 * elf32-i370.c: New file.
2902 * archures.c (enum bfd_architecture): Add bfd_arch_i370.
2903 (bfd_i370_arch): New.
2904 (bfd_archures_list): Add bfd_i370_arch.
2905 * elf.c (prep_headers): Add bfd_arch_i370.
2906 * Makefile.am: Add support for IBM 370 elf.
2907 * config.bfd: Likewise.
2908 * configure.in: Likewise.
2909 * libbfd.h (bfd_reloc_code_real_names): Likewise.
2910 * reloc.c (bfd_reloc_code_type): Likewise.
2911 * targets.c: Likewise.
2912
2913 * Makefile.in: Regenerate.
2914 * configure: Regenerate.
2915 * bfd-in2.h: Regenerate.
2916
2917 2000-02-22 Ian Lance Taylor <ian@zembu.com>
2918
2919 * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
2920 invalid relocation types, and change them to R_386_NONE.
2921
2922 2000-02-22 H.J. Lu <hjl@gnu.org>
2923
2924 * elflink.h (elf_link_add_object_symbols): If a version symbol is
2925 not defined, don't add a second ELF_VER_CHR.
2926
2927 * elflink.h (elf_bfd_final_link): Call output_extsym for global
2928 symbols converted to local symbols even when stripping all
2929 symbols.
2930 (elf_link_output_extsym): Process global symbols converted to
2931 local symbols even if they are being stripped.
2932
2933 2000-02-21 Alan Modra <alan@spri.levels.unisa.edu.au>
2934
2935 * archures.c (bfd_octets_per_byte): Return unsigned int.
2936 (bfd_arch_mach_octets_per_byte): Ditto.
2937 * libbfd.c (bfd_read, bfd_seek): Quell signed vs. unsigned
2938 comparison warning.
2939 * section.c (bfd_get_section_size_before_reloc): Quell signed
2940 vs. unsigned comparison warning.
2941 (bfd_get_section_size_after_reloc): Same here. Fix parentheses too.
2942 * trad-core.c (trad_unix_core_file_p): Correct 2000-01-27
2943 change. What was I thinking?
2944 * bfd-in2.h: Regenerate.
2945
2946 * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
2947 (elf_gc_sections): Same here.
2948 (elf_gc_common_finalize_got_offsets): And here.
2949
2950 2000-02-21 Ian Lance Taylor <ian@zembu.com>
2951
2952 ELF HPPA doesn't work at present; remove it until it does.
2953 * config.bfd: Comment out setting targ_defvec to
2954 bfd_elf32_hppa_vec.
2955 * Makefile.am: Rebuild dependencies.
2956 (BFD32_BACKENDS): Remove elf32-hppa.lo.
2957 (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
2958 (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
2959 * Makefile.in: Rebuild.
2960 * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
2961
2962 2000-02-18 Geoff Keating <geoffk@cygnus.com>
2963
2964 * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
2965 is no bfd_free(). Revert bfd_free part of previous change.
2966
2967 2000-02-18 Geoff Keating <geoffk@cygnus.com>
2968
2969 * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
2970 arrays.
2971 (coff_compute_section_file_positions): Use bfd_free to pair
2972 bfd_malloc.
2973 (coff_write_object_contents): Likewise.
2974
2975 * coff-rs6000.c (xcoff_howto_table_16): New variable.
2976 (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
2977
2978 2000-02-18 Ulrich Drepper <drepper@cygnus.com>
2979
2980 * coff-rs6000.c (XCOFFARMAGBIG): New macro.
2981 (xcoff_ar_file_hdr_big): New structure.
2982 (SIZEOF_AR_FILE_HDR_BIG): New macro.
2983 (xcoff_ar_hdr_big): New structure.
2984 (SIZEOF_AR_HDR_BIG): New macro.
2985 (xcoff_big_format_p): New macro.
2986 (xcoff_ardata_big): New macro.
2987 (arch_xhdr_big): New macro.
2988 (xcoff_slurp_armap): Handle large archives.
2989 (xcoff_archive_p): Detect large archives.
2990 (xcoff_read_ar_hdr): Handle large archives.
2991 (xcoff_openr_next_archived_file): Handle large archives.
2992 (xcoff_generic_stat_arch_elt): Handle large archives.
2993 (xcoff_write_armap_old): Rename from xcoff_write_armap.
2994 (xcoff_write_armap_big): New function.
2995 (xcoff_write_armap): New function, dispatch to _old or _big.
2996 (xcoff_write_archive_contents_old): Rename from
2997 xcoff_write_archive_contents.
2998 (xcoff_write_archive_contents_big): New function.
2999 (xcoff_write_archive_contents): New function, dispatch to _old or
3000 _big.
3001
3002 2000-02-18 Richard Henderson <rth@cygnus.com>
3003
3004 * elf-bfd.h (struct elf_link_hash_table): Remove copy_indirect
3005 and hide_symbol members.
3006 (elf_link_hash_copy_indirect): Remove.
3007 (elf_link_hash_hide_symbol): Remove.
3008 (struct elf_backend_data): Add elf_backend_copy_indirect_symbol
3009 and elf_backend_hide_symbol.
3010 (_bfd_elf_link_hash_copy_indirect): Declare.
3011 (_bfd_elf_link_hash_hide_symbol): Declare.
3012 * elf.c (_bfd_elf_link_hash_copy_indirect): Remove table argument.
3013 (_bfd_elf_link_hash_hide_symbol): Likewise.
3014 (_bfd_elf_link_hash_table_init): Don't init killed members.
3015 * elflink.h (elf_link_add_object_symbols): Use the bed function
3016 pointers not elf_link_hash_{copy_indirect,hide_symbol}.
3017 (elf_link_assign_sym_version): Likewise.
3018 * elfxx-target.h (elf_backend_copy_indirect_symbol): Default.
3019 (elf_backend_hide_symbol): Likewise.
3020 (elfNN_bed): Update for new members.
3021
3022 2000-02-17 Kevin Buettner <kevinb@redhat.com>
3023
3024 * rs6000-core.c (CORE_DATA_SIZE_FIELD, CORE_COMM_FIELD, SAVE_FIELD,
3025 STACK_END_ADDR): Define for new core file format.
3026 (LOADER_OFFSET_FIELD, LOADER_REGION_SIZE, CORE_DUMP): New defines
3027 for handling the vagaries of the various core file structures used
3028 by AIX over the years.
3029 (rs6000coff_core_p, rs6000coff_core_file_matches_executable,
3030 Rs6kCorData): Use above defines to adapt code to use AIX 4.3's
3031 core_dumpx structure.
3032
3033 Thu Feb 17 00:04:48 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
3034
3035 * archures.c (bfd_mach_sh2, bfd_mach_sh_dsp): New macros.
3036 (bfd_mach_sh3_dsp): Likewise.
3037 (bfd_mach_sh4): Reinstate.
3038 (bfd_default_scan): Recognize 7410, 7708, 7729 and 7750.
3039 * bfd-in2.h: Regenerate.
3040 * coff-sh.c (struct sh_opcode): flags is no longer short.
3041 (USESAS, USESAS_REG, USESR8, SETSAS, SETSAS_REG): New macros.
3042 (sh_opcode41, sh_opcode42): Integrate as sh_opcode41.
3043 (sh_opcode01, sh_opcode02, sh_opcode40): Add sh-dsp opcodes.
3044 (sh_opcode41, sh_opcode4, sh_opcode80): Likewise.
3045 (sh_opcodes): No longer const.
3046 (sh_dsp_opcodef0, sh_dsp_opcodef): New arrays.
3047 (sh_insn_uses_reg): Check for USESAS and USESR8.
3048 (sh_insn_sets_reg, sh_insns_conflict): Check for SETSAS.
3049 (_bfd_sh_align_load_span): Return early for SH4.
3050 Modify sh_opcodes lookup table for sh-dsp / sh3-dsp.
3051 Take into account that field b of a parallel processing insn
3052 could be mistaken for a separate insn.
3053 * cpu-sh.c (arch_info_struct): New array elements for
3054 sh2, sh-dsp and sh3-dsp.
3055 Reinstate element for sh4.
3056 (SH2_NEXT, SH_DSP_NEXT, SH3_DSP_NEXT): New macros.
3057 (SH4_NEXT): Reinstate.
3058 (SH3_NEXT, SH3E_NEXT): Adjust.
3059 * elf-bfd.h (_sh_elf_set_mach_from_flags): Declare.
3060 * elf32-sh.c (sh_elf_set_private_flags): New function.
3061 (sh_elf_copy_private_data, sh_elf_set_mach_from_flags): Likewise.
3062 (sh_elf_merge_private_data): New function.
3063 (elf_backend_object_p, bfd_elf32_bfd_set_private_bfd_flags): Define.
3064 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3065 (bfd_elf32_bfd_merge_private_bfd_data): Change to
3066 sh_elf_merge_private_data.
3067
3068 2000-02-13 Richard Henderson <rth@cygnus.com>
3069
3070 * elf-bfd.h (struct elf_link_hash_table): Add copy_indirect and
3071 hide_symbol members.
3072 (elf_link_hash_copy_indirect): New.
3073 (elf_link_hash_hide_symbol): New.
3074 * elflink.h (elf_link_add_object_symbols): Break out copy from
3075 indirect new new symbol to elf.c.
3076 (elf_link_assign_sym_version): Break out privatization of
3077 non-exported symbol to elf.c.
3078 * elf.c (_bfd_elf_link_hash_copy_indirect): New.
3079 (_bfd_elf_link_hash_hide_symbol): New.
3080 (_bfd_elf_link_hash_table_init): Init copy_indirect and hide_symbol.
3081
3082 2000-02-13 Ian Lance Taylor <ian@zembu.com>
3083
3084 * section.c (_bfd_strip_section_from_output): Add info parameter.
3085 If it passed as non-NULL, use it to check whether any input BFD
3086 has an input section which uses this output section. Change all
3087 callers.
3088 * bfd-in2.h: Rebuild.
3089
3090 * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
3091 bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
3092 1999-11-29.
3093 * bfd-in2.h: Rebuild.
3094
3095 2000-02-10 Timothy Wall <twall@cygnus.com>
3096
3097 * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
3098 allow final modifications of swapped-in symbol.
3099 (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
3100 * coffcode.h (coff_write_relocs): Use macro
3101 SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
3102 symbol index should be set to -1.
3103
3104 Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
3105
3106 * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
3107 USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
3108 * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
3109 * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
3110 sh_insns_uses_or_sets_freg): New functions.
3111 * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
3112 * (sh_insns_conflict): Use new functions and new macros to
3113 detect conflicts when two instructions both set same integer registers,
3114 both set same fp register, and both set special register.
3115
3116 2000-02-09 Timothy Wall <twall@cygnus.com>
3117
3118 * coffgen.c (coff_real_object_p): Set arch/mach info prior to
3119 swapping in sections, so that the swapping routines have access to
3120 the arch/mach info.
3121
3122 2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
3123
3124 * coff-go32.c: Update comment. Update copyright.
3125
3126 2000-01-27 Thomas de Lellis <tdel@windriver.com>
3127
3128 * syms.c (bfd_decode_symclass)
3129 Two new class characters were added - 'V' and 'v'. The
3130 meaning of 'W' is now restricted to just weak non-object
3131 symbols. This allows differentiation between, for example,
3132 weak functions vs weak objects. nm for example now dumps:
3133 'W' = weak global
3134 'w' = weak unresolved
3135 'V' = weak global object
3136 'v' = weak unresolved object
3137
3138 (bfd_is_undefined_symclass): New function. Return true if the
3139 given symbol class represents and undefined/unresolved symbol.
3140
3141 (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
3142 unresolved symbols.
3143
3144 * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
3145
3146 * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
3147 STT_ARM_16BIT flag set, but it is not attached to a data object
3148 return STT_ARM_16BIT so that it will be treated as code by the
3149 disassembler.
3150
3151 2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
3152
3153 * coff-i386.c (i3coff_object_p): Remove prototype.
3154 Update copyright.
3155
3156 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
3157 to name. Update copyright.
3158
3159 * trad-core.c (trad_unix_core_file_p): Cast core_regsec
3160 assignment to avoid warning. Update copyright.
3161
3162 2000-01-24 Robert Lipe (robertl@sco.com)
3163
3164 * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
3165 instead of using GNU C extension.
3166
3167 2000-01-21 Nick Clifton <nickc@cygnus.com>
3168
3169 * libbfd.c (bfd_read): Do not attempt to get a negativly sized
3170 amount from a bfd_in_memory structure.
3171 (bfd_seek): Do not allow seeks past the end of a bfd_in_memory
3172 structure.
3173
3174 2000-01-14 Nick Clifton <nickc@cygnus.com>
3175
3176 * linker.c (default_indirect_link_order): oops - fix incorrectly
3177 applied patch from Tim Wall.
3178
3179 2000-01-13 Timothy Wall (twall@tiac.net>
3180
3181 * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
3182 = scnhsz, filhsz, relsz, aoutsz, etc)
3183
3184 * coffswap.h: Ditto.
3185
3186 2000-01-13 Nick Clifton <nickc@cygnus.com>
3187
3188 * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
3189 interwork thumb to arm stub.
3190
3191 2000-01-13 Timothy Wall (twall@tiac.net>
3192
3193 * archures.c (bfd_octets_per_byte): New function: Return
3194 target byte size.
3195 (bfd_arch_mach_octets_per_byte): New function: Return target
3196 byte size.
3197
3198 * section.c: Distinguish between octets and bytes for usage of
3199 _cooked_size, _raw_size, and output_offset. Clarify
3200 description of bfd_set_section_contents.
3201
3202 * bfd-in2.h: Regenerate.
3203
3204 * coffgen.c: Indicate that the offset parameter is in bytes, not
3205 octets.
3206
3207 * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
3208 where appropriate to get the octet offset when calling
3209 bfd_set_section_contents.
3210 (bfd_coff_reloc_link_order): Ditto.
3211
3212 * linker.c (bfd_generic_reloc_link_order): Ditto.
3213 (_bfd_default_link_order): Ditto.
3214
3215 * reloc.c (bfd_perform_relocation): Distinguish between octets
3216 and bytes. Use octets when indexing into octet data; use bytes
3217 when calculating target addresses.
3218 (bfd_install_relocation): Ditto.
3219
3220 * srec.c (srec_write_section): Ditto.
3221
3222 2000-01-13 Nick Clifton <nickc@cygnus.com>
3223
3224 * coff-mcore.c (COFF_DEFAULT_SECTION_ALIGNMENT_POWER): Change from
3225 3 to 2. This allows 4 byte sized sections, which is necessary for
3226 dlltool to build functioning DLLs.
3227
3228 2000-01-10 Philip Blundell <pb@futuretv.com>
3229
3230 * config.bfd (arm*-*-linux-gnu*): Match instead of arm*-*-linux-gnu.
3231 (arm*-*-conix*): New target.
3232
3233 2000-01-10 Egor Duda <deo@logos-m.ru>
3234
3235 * config.bfd: Include elf32_i386 vector to target list for cygwin
3236 and mingw.
3237
3238 * config.in: Undefine HAVE_WIN32_PSTATUS_T.
3239 * configure.in: Test for structure win32_pstatus_t in
3240 <sys/procfs.h>
3241 * configure: Regenerate.
3242
3243 * elf.c (elfcore_grok_win32pstatus): New function: process
3244 win32_pstatus_t notes in elf core file.
3245 (elfcore_grok_note): Detect win32_pstatus notes.
3246
3247 2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
3248
3249 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
3250 visibility.
3251 * elflink.h (elf_link_add_object_symbols): Combine visibilities.
3252 * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
3253
3254 1999-12-29 Richard Henderson <rth@cygnus.com>
3255
3256 * elflink.h (bfd_elf,size_dynamic_sections): Don't export all
3257 if no dynamic sections created.
3258
3259 1999-12-27 Nick Clifton <nickc@cygnus.com>
3260
3261 * peicode.h (pe_bfd_object_p): Only define for PE format
3262 targets.
3263
3264 1999-12-17 Nick Clifton <nickc@cygnus.com>
3265
3266 * coff-i386.c (i3coff_object_p): Delete.
3267 (i386coff_vec): Replace reference to i3coff_object_p with a
3268 reference to coff_object_p.
3269
3270 * coff-mcore.c (pe_object_p): Delete.
3271
3272 * peicode.h (pe_bfd_object_p): New function: Detect the
3273 presence of a PE format COFF object file. Also detect and
3274 warn about the presence of LINK6 format Image Library Format
3275 object files.
3276
3277 1999-12-16 Nick Clifton <nickc@cygnus.com>
3278
3279 * coff-arm.c (NUM_ELEM): New macro.
3280 (NUM_RELOCS): New macro: The number of known ARM relocs.
3281 (RTYPE2HOWTO): Return NULL if the reloc type is out of range.
3282 (coff_arm_rtype_to_howto): Return NULL if the reloc type is out
3283 of range.
3284 (bfd_arm_process_before_allocation): Produce a warning message if
3285 an out of range symbol index is encountered.
3286
3287 1999-12-14 Nick Clifton <nickc@cygnus.com>
3288
3289 * elflink.h (is_global_symbol_definition): New Function: Return
3290 true iff the symbol is being given a global definition in this
3291 bfd.
3292 (elf_link_is_defined_archive_symbol): Do not bother processing
3293 symbols for an archive element that has already been included
3294 in the link.
3295 Use is_global_symbol_definition().
3296
3297 1999-12-09 Andrew Cagney <cagney@cygnus.com>
3298
3299 * config.bfd: Add support for sparc-*-netbsdelf* and
3300 sparc-*-netbsdaout*.
3301
3302 1999-12-13 Nick Clifton <nickc@cygnus.com>
3303
3304 * elflink.h (elf_link_is_defined_archive_symbol): Check to see
3305 if the symbol is in the common section.
3306
3307 1999-12-10 Nick Clifton <nickc@cygnus.com>
3308
3309 * elflink.h (elf_link_is_defined_archive_symbol): New
3310 function: Decide if a symbol, in an archive map is there
3311 because it is defined in the archive element, or because it is
3312 just another common declaration of it.
3313 (elf_link_add_archive_symbols): Use
3314 elf_link_is_defined_archive_symbol to decide if an archive
3315 element contain a reference to a common symbol should be
3316 linked in or not.
3317
3318 1999-12-10 Nick Clifton <nickc@cygnus.com>
3319
3320 * elflink.h: Revert previous patch.
3321 * targets.c: Revert previous patch.
3322 * libbfd-in2.h: Revert previous patch.
3323 * libbfd.h: Revert previous patch.
3324 * elfxx-target.h: Revert previous patch.
3325 * archive.c: Revert previous patch.
3326 * aout-target.h: Revert previous patch.
3327 * aout-tic30.h: Revert previous patch.
3328 * bfd.c: Revert previous patch.
3329 * coff-alpha.c: Revert previous patch.
3330 * coff-rs6000.c: Revert previous patch.
3331 * elf64-mips.c: Revert previous patch.
3332 * ieee.c: Revert previous patch.
3333 * libecoff.h: Revert previous patch.
3334 * oasys.c: Revert previous patch.
3335 * som.c: Revert previous patch.
3336 * vms.c: Revert previous patch.
3337
3338 1999-12-09 Nick Clifton <nickc@cygnus.com>
3339
3340 * elflink.h (elf_link_add_archive_symbols): Add an archive
3341 element even if contains a symbol which is currently only
3342 considered to be a common.
3343
3344 * targets.c (struct bfd_target): Add new field
3345 _bfd_allow_commons_in_armap.
3346 * bfd-in2.h:Regenerate.
3347
3348 * libbfd-in2.h (_bfd_noarchive_allow_commons_in_armap):
3349 Define.
3350 (_bfd_archive_bsd_allow_commons_in_armap): Define.
3351 * libbfd.h: Regenerate.
3352
3353 * elfxx-target.h: If using COFF archive map, override
3354 definition of allow_commons_in_armap and replace with
3355 bfd_false.
3356
3357 * archive.c (bfd_compute_and_write_armap): Do not place common
3358 symbols into the archive map unless _bfd_allow_commons_in_armap
3359 returns true.
3360
3361 * aout-target.h (MY_allow_commons_in_armap): Define.
3362 * aout-tic30.h (MY_allow_commons_in_armap): Define.
3363 * bfd.c (bfd_allow_commons_in_armap): Define.
3364 * coff-alpha.h (alpha_ecoff_allow_commons_in_armap): Define.
3365 * coff-rs6000.h (xcoff_allow_commons_in_armap): Define.
3366 * elf64-mips.c (bfd_elf64_allow_commons_in_armap): Define.
3367 * ieee.c (ieee_ecoff_allow_commons_in_armap): Define.
3368 * libecoff.h (_bfd_ecoff_allow_commons_in_armap): Define.
3369 * oasys.c (oasys_allow_commons_in_armap): Define.
3370 * som.c (som_allow_commons_in_armap): Define.
3371 * vms.c (vms_allow_commons_in_armap): Define.
3372
3373 1999-12-07 Jim Blandy <jimb@cygnus.com>
3374
3375 Add support for SSE registers in ELF core files.
3376 * elf.c (elfcore_make_note_pseudosection): New function.
3377 (elfcore_grok_prfpreg): Use it.
3378 (elfcore_grok_prxfpreg): New function.
3379 (elfcore_grok_note): Recognize Linux NT_PRXFPREG notes.
3380
3381 1999-12-03 Ian Lance Taylor <ian@zembu.com>
3382
3383 * elf32-mips.c (mips_elf_calculate_relocation): Divide R_MIPS_PC16
3384 value by 4 before storing it back in the field. From
3385 Koundinya. K <kk@ddeorg.soft.net>.
3386
3387 Tue Nov 30 22:41:14 1999 Jeffrey A Law (law@cygnus.com)
3388
3389 * archures.c (bfd_mach_am33): Define.
3390 * bfd-in2.h: Rebuilt.
3391 * cpu-m10300.c (bfd_am33_arch): Add to the mn103 architecture list
3392 * elf-m10300.c (mn10300_elf_relax_section): Handle am33 instructions.
3393 (compute_function_info): Handle additional registers saved by
3394 movm on the am33.
3395 (elf_mn10300_mach): Handle E_MN10300_MACH_AM33.
3396 (_bfd_mn10300_elf_final_write_processing): Handle bfd_mach_am33.
3397
3398 1999-11-29 Jim Blandy <jimb@cygnus.com>
3399
3400 * elf.c (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3401 functions.
3402 * bfd-in2.h (bfd_get_elf_phdrs, bfd_get_elf_phdr_upper_bound): New
3403 declarations.
3404
3405 1999-11-27 Michael Meissner <meissner@cygnus.com>
3406
3407 * reloc.c (BFD_RELOC_ALPHA_USER_LITERAL): New relocation for
3408 internal use within gas for alpha explicit relocations.
3409 (BFD_RELOC_ALPHA_USER_LITUSE_BASE): Ditto.
3410 (BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF): Ditto.
3411 (BFD_RELOC_ALPHA_USER_LITUSE_JSR): Ditto.
3412 (BFD_RELOC_ALPHA_USER_GPDISP): Ditto.
3413 (BFD_RELOC_ALPHA_USER_GPRELHIGH): Ditto.
3414 (BFD_RELOC_ALPHA_USER_GPRELLOW): Ditto.
3415
3416 * elf64-alpha.c (elf64_alpha_reloc_map): Add mappings for
3417 BFD_RELOC_ALPHA_USER_*.
3418
3419 * bfd-in2.h: Regenerate.
3420 * libbfd.h: Regenerate.
3421
3422 1999-11-26 Fred Fish <fnf@cygnus.com>
3423
3424 * elf.c (elfcore_read_notes): Add prototype for static function.
3425 (_bfd_elf_make_section_from_phdr): Renamed from bfd_section_from_phdr.
3426 (bfd_section_from_phdr): Replacement function that calls
3427 _bfd_elf_make_section_from_phdr for generic segment types and
3428 backend fucntion pointed to by elf_backend_section_from_phdr for
3429 backend specific segment types.
3430 (_bfd_elfcore_section_from_phdr): Remove call to elfcore_read_notes,
3431 now called by _bfd_elf_make_section_from_phdr. Note that this func
3432 is now just a stub between the caller and bfd_section_from_phdr.
3433
3434 * elf-bfd.h (struct elf_backend_data): Add new function pointer
3435 elf_backend_section_from_phdr.
3436 (elf_backend_section_from_phdr): Add prototype.
3437
3438 * elfxx-target.h (elf_backend_section_from_phdr): Define default.
3439 (elfNN_bed): Add elf_backend_section_from_phdr.
3440
3441 1999-11-25 Nick Clifton <nickc@cygnus.com>
3442
3443 * coff-arm.c (bfd_arm_get_bfd_for_interworking): Add
3444 SEC_CODE and SEC_READONLY flags to glue sections.
3445
3446 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Add
3447 SEC_CODE and SEC_READONLY flags to glue sections.
3448
3449 1999-11-20 Nick Clifton <nickc@cygnus.com>
3450
3451 * coff-mcore.c (coff_mcore_relocate_section): Fix typo in previous
3452 delta.
3453
3454 1999-11-19 Catherine Moore <clm@cygnus.com>
3455
3456 * elf32-m68k.c (elf_cpu32_plt0_entry): Fix encoding.
3457 (elf_cpu32_plt_entry): Likewise.
3458
3459 1999-11-18 Nick Clifton <nickc@cygnus.com>
3460
3461 * coff-mcore.c (coff_mcore_rtype_to_howto): Special case handling
3462 for RVA relocs.
3463 (coff_mcore_relocate_section): Initialise addend to 0.
3464 Special case processing of RVA reloc.
3465
3466 1999-11-17 Richard Henderson <rth@cygnus.com>
3467
3468 * elf-bfd.h (struct elf_backend_data): Reorder collect and
3469 type_change_ok; add sign_extend_vma.
3470 * elf32-mips.c (elf_backend_sign_extend_vma): Define.
3471 * elfcode.h (elf_swap_symbol_in): Mind be->sign_extend_vma.
3472 (elf_swap_shdr_in, elf_swap_phdr_in): Likewise.
3473 * elfxx-target.h (elf_backend_sign_extend_vma): Default.
3474 (elfNN_bed): Follow struture changes.
3475
3476 1999-11-09 Ian Lance Taylor <ian@zembu.com>
3477
3478 * libbfd.c (bfd_read): Check result of read against desired result
3479 using !=, not <.
3480 (_bfd_generic_get_section_contents): Set bfd_error if the seek is
3481 invalid compared to the section size.
3482
3483 * ieee.c (ieee_slurp_debug): Get the length of the debug
3484 information right if there is no data part.
3485
3486 Tue Nov 2 01:44:41 1999 Jeffrey A Law (law@cygnus.com)
3487
3488 * som.c (som_fixup_formats): Improve handling of R_AUX_UNWIND,
3489 R_LINETAB, R_LINETAB_ESC, and R_COMMENT.
3490
3491 1999-10-28 Ian Lance Taylor <ian@zembu.com>
3492
3493 * elflink.h (elf_bfd_final_link): Make last_local signed.
3494
3495 1999-10-27 Ian Lance Taylor <ian@zembu.com>
3496
3497 * stabs.c (_bfd_link_section_stabs): Make sure .stabstr section
3498 starts with a zero.
3499
3500 Sat Oct 23 17:36:12 1999 Andrew Cagney <cagney@b1.cygnus.com>
3501
3502 * archures.c: Add definitions bfd_mach_d10v, bfd_mach_d10v_ts2 and
3503 bfd_mach_d10v_ts3.
3504 * cpu-d10v.c (d10v_ts3_info, d10v_ts2_info): Add.
3505 * bfd-in2.h: Regenerate.
3506
3507 1999-10-15 Andrew Haley <aph@cygnus.com>
3508
3509 * dwarf1.c (parse_die): Fail to parse a die if its length is zero.
3510
3511 Sun Oct 17 17:19:00 1999 Jeffrey A Law (law@cygnus.com)
3512
3513 * libhppa.h (bfd_hppa_insn2fmt): Change to return an int.
3514
3515 1999-10-08 Ian Lance Taylor <ian@zembu.com>
3516
3517 * elflink.h (elf_merge_symbol): When overriding a weak symbol with
3518 a defined symbol in a shared library, clear the DEF_DYNAMIC flag
3519 too.
3520
3521 Fri Oct 8 13:03:45 1999 Geoffrey Keating <geoffk@cygnus.com>
3522
3523 * elf32-mips.c (mips_elf_calculate_relocation): R_MIPS_LITERAL
3524 relocs also need the GP value.
3525 (_bfd_mips_elf_relocate_section): Handle unpaired LO16 relocs
3526 properly. Handle sign-extension for R_MIPS_64 correctly. Correct
3527 the GP value for R_MIPS_LITERAL relocs too. Handle
3528 R_MIPS_64 relocs properly on big-endian MIPS.
3529 (mips_elf_sign_extend): Behave properly with 'long long'.
3530 (mips_elf_highest): Correct typo.
3531
3532 Mon Oct 4 17:49:45 1999 Nick Clifton <nickc@cygnus.com>
3533
3534 * cpu-m32r.c (arch_info_struct): New static global.
3535 (bfd_m32r_arch): Refer to it.
3536 * elf32-m32r.c (m32r_elf_object_p): Recognize E_M32RX_ARCH.
3537 (m32r_elf_print_private_bfd_data): Ditto.
3538 (m32r_elf_final_write_processing): Handle bfd_mach_m32rx.
3539 * archures.c (bfd_mach_m32rx): Define it.
3540 * bfd-in2.h: Rebuild.
3541
3542 1999-09-28 Fred Fish <fnf@cygnus.com>
3543
3544 * targets.c (cisco_core_vec): Replaced with two new vecs ...
3545 (cisco_core_big_vec): Add new bigendian vec.
3546 (cisco_core_little_vec): Add new little endian vec.
3547
3548 * cisco-core.c (CRASH_INFO): Fixed offset replaced with ...
3549 (crash_info_locs): Add array of possible offsets.
3550 (MASK_ADDR): Mask to apply to crash info offset.
3551 (crashinfo_external): Add textbase, database, bssbase and
3552 turn into a typedef.
3553 (cisco_core_file_validate): Renamed from cisco_core_file_p.
3554 Many small changes to account for additional hardware versions.
3555 Pick a reasonable size for ".reg" section. Add a ".crash"
3556 section to allow access to crashinfo_external struct.
3557 (cisco_core_file_p): New version of this function that
3558 iterates over crash_info_locs, calling cisco_core_file_validate.
3559 (cisco_core_vec): Old big endian only vec replaced with ...
3560 (cisco_core_big_vec): Add big endian version.
3561 (cisco_core_little_vec): Add little endian version.
3562
3563 * configure.in (cisco_core_vec): Split to two new vectors ...
3564 (cisco_core_big_vec): New target vector.
3565 (cisco_core_little_vec): New target vector.
3566 * configure: Regenerate.
3567 * config.bfd (targ): For m68*-*-aout* targ, change cisco_core_vec
3568 to cisco_core_big_vec in targ_selvecs.
3569
3570 1999-09-28 Geoffrey Keating <geoffk@cygnus.com>
3571
3572 * elf32-mips.c (mips_elf_relocate_hi16): Unused, delete.
3573 (mips_elf_relocate_got_local): Unused, delete.
3574 (mips_elf_relocate_global_got): Unused, delete.
3575
3576 1999-09-24 Fred Fish <fnf@cygnus.com>
3577
3578 * elf.c (bfd_section_from_phdr): Add typename variable. Use p_type
3579 to initialize it to something meaningful. Then use it to generate
3580 more useful segment names.
3581
3582 Sun Sep 19 12:16:47 1999 Jeffrey A Law (law@cygnus.com)
3583
3584 * som.c (NO_PCREL_MODES): Define if the system does not define
3585 R_SHORT_PCREL_MODE.
3586 (hppa_som_gen_reloc_type): Handle both short and long pcrel branches.
3587 (som_write_fixups): Eliminate redundant pcrel mode relocs. Handle
3588 R_LONG_PCREL_MODE and R_SHORT_PCREL_MODE
3589 * libhppa.h (dis_assemble_22): New function.
3590 (bfd_hppa_insn2fmt): Handle long branch.
3591
3592 * libhppa.h (bfd_hppa_insn2fmt): Decode and handle formats found
3593 in PA2.0.
3594
3595 1999-09-17 Alan Modra <alan@spri.levels.unisa.edu.au>
3596
3597 * coff-i386.c (coff_i386_reloc_type_lookup): Support BFD_RELOC_16,
3598 BFD_RELOC_16_PCREL, BFD_RELOC_8, BFD_RELOC_8_PCREL relocs.
3599 (reloc_howto_type howto_table): Tidy comments and whitespace.
3600
3601 1999-09-17 Nick Clifton <nickc@cygnus.com>
3602
3603 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Undo
3604 previous delta. Set sec->gc_mark instead.
3605
3606 Thu Sep 16 11:21:13 1999 Catherine Moore <clm@cygnus.com>
3607
3608 * elf32-m68k.c (elf_cpu32_plt0_entry): Use a1 instead of a0.
3609 (elf_cpu32_plt_entry): Likewise.
3610
3611 Thu Sep 16 10:48:17 1999 Jeffrey A Law (law@cygnus.com)
3612
3613 * elf-hppa.h (elf_hppa_final_write_processing): Turn on TRAPNIL.
3614
3615 * elf-hppa.h (elf_hppa_final_link): If unable to find __gp in the
3616 symbol table, then just compute a suitable value (but do not
3617 create a __gp symbol).
3618
3619 * elf-hppa.h (elf_hppa_relocate_section): Allow undefined
3620 symbols when building shared libraries.
3621 (elf_hppa_final_link_relocate): Correct handling of PCREL
3622 relocations against undefined symbols.
3623
3624 1999-09-16 Nick Clifton <nickc@cygnus.com>
3625
3626 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Mark
3627 interworking sections as linker created so that they will not
3628 be removed by garbage collection.
3629
3630 Wed Sep 15 02:31:57 1999 Jeffrey A Law (law@cygnus.com)
3631
3632 * elf-hppa.h (elf_hppa_final_link): Revamp __gp handling.
3633 (elf_hppa_final_link_relocate): Consistently create an absolute
3634 address, then subtract out the value of __gp.
3635
3636 1999-09-14 Michael Meissner <meissner@cygnus.com>
3637
3638 * configure.in (Canonicalization of target names): Remove adding
3639 ${CONFIG_SHELL} in front of $ac_config_sub, since autoconfig 2.14
3640 generates $ac_config_sub with a ${CONFIG_SHELL} already.
3641 * configure: Regenerate.
3642
3643 1999-09-14 Nick Clifton <nickc@cygnus.com>
3644
3645 * elf32-m32r.c (ELF_MAXPAGESIZE): Change to 0x1 (at request of
3646 Mitsubishi).
3647
3648 Mon Sep 13 20:01:47 1999 Jeffrey A Law (law@cygnus.com)
3649
3650 * elf-hppa.h (elf_hppa_record_segment_addrs): New function.
3651 (elf_hppa_final_link): Initialize text_segment_base and
3652 data_segment_base.
3653 (elf_hppa_final_link_relocate): Handle SEGREL relocations.
3654
3655 * elf-hppa.h (elf_hppa_final_link): Remove unused variables.
3656 (elf_hppa_final_link_relocate): Likewise.
3657 (elf_hppa_relocate_insn): Likewise.
3658 (elf_hppa_relocate_section): Initialize HOWTO.
3659
3660 1999-09-13 Donn Terry <donn@interix.com>
3661
3662 * coffcode.h (styp_to_sec_flags): Further refinement of COMDAT
3663 handling to support both GNU and MS objects.
3664
3665 * coffcode.h (coff_write_object_contents): Don't check reloc_count
3666 when determining whether to set F_RELFLG.
3667
3668 1999-09-13 Philip Blundell <pb@nexus.co.uk>
3669
3670 * elf32-arm.h (elf32_arm_final_link_relocate): Don't range-check
3671 PC24 relocs if the target is an undefined weak symbol.
3672 (arm_add_to_rel): Fix compiler warning.
3673 (elf32_arm_plt0_entry): Correct comments.
3674
3675 1999-09-13 Alan Modra <alan@spri.levels.unisa.edu.au>
3676
3677 * elfcode.h (write_relocs): Check for the_bfd NULL when handling
3678 an absolute symbol in REL relocs.
3679
3680 Sun Sep 12 23:47:58 1999 Jeffrey A Law (law@cygnus.com)
3681
3682 * elf-hppa.h (elf_hppa_final_link_relocate): Handle SECREL32.
3683 Stub SEGREL32. Return an error for any relocation not handled.
3684
3685 1999-09-12 Ian Lance Taylor <ian@zembu.com>
3686
3687 * cofflink.c (coff_link_add_symbols): Look for special MSVC string
3688 constant symbols, and avoid multiple definition errors on them.
3689
3690 1999-09-12 Donn Terry <donn@interix.com>
3691
3692 * libbfd.c (bfd_log2): Rewrite to avoid infinite loop if most
3693 significant bit is set.
3694
3695 1999-09-11 Ian Lance Taylor <ian@zembu.com>
3696
3697 * coff-ppc.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3698
3699 * elfcode.h (write_relocs): Handle an absolute symbol in REL
3700 relocs as we do for RELA relocs.
3701
3702 1999-09-11 Donn Terry <donn@interix.com>
3703
3704 * libpei.h (_bfd_pei_final_link_postscript): Declare.
3705 (coff_final_link_postscript): Define.
3706 * peigen.c (_bfd_pei_swap_aouthdr_out): Don't set value for data
3707 directory entries here.
3708 (_bfd_pei_final_link_postscript): New function.
3709
3710 * peigen.c (_bfd_pei_swap_scnhdr_out): Remove code which sets
3711 section flags based on the section name.
3712
3713 * peicode.h (coff_swap_scnhdr_in): If COFF_IMAGE_WITH_PE, the
3714 get the overflow of the s_nlnno field from the s_nreloc field.
3715 * peigen.c (_bfd_pei_swap_scnhdr_out): If doing a final link, swap
3716 the s_nlnno overflow of the .text section into the s_nreloc
3717 field.
3718
3719 * peigen.c (add_data_entry): Declare.
3720 (pei_swap_aouthdr_out): Get image size right. Set linker version
3721 more intuitively.
3722 (pei_swap_scnhdr_out): Test for UNINIT section, not .bss.
3723 (pe_print_idata): Code cleanup, print more info, get rid of (now)
3724 extraneous ImageBase.
3725 (pe_print_edata): Likewise.
3726 (pe_print_pdata): Likewise. Print exception entries.
3727 (pe_print_reloc): Likewise. Print MIPS_JMPADDR.
3728 (tbl): Make const, add "UNKNOWN".
3729 (_bfd_pe_print_private_bfd_data_common): Print timestamp.
3730 (_bfd_pe_bfd_copy_private_bfd_data_common): Don't copy deleted
3731 section data directory.
3732 (_bfd_pe_bfd_copy_private_section_data): Copy pe_flags.
3733
3734 * libpei.h (_bfd_pe_bfd_get_symbol_info): Declare.
3735 * peigen.c (_bfd_pe_bfd_get_symbol_info): New function.
3736 * peicode.h (coff_get_symbol_info): Define.
3737
3738 * config.bfd (i[3456]86-*-interix*): Set targ_cflags to
3739 -DSTRICT_PE_FORMAT.
3740 * coffcode.h (styp_to_sec_flags): Check STRICT_PE_FORMAT rather
3741 than __INTERIX.
3742 (coff_classify_symbol): Re-revert 1999-08-08 patch if
3743 STRICT_PE_FORMAT.
3744
3745 * libpei.h: New file, broken out of peicode.h.
3746 * peigen.c: New file, broken out of peicode.h.
3747 * peicode.h: A bunch of code moved out to libpei.h and peigen.c.
3748 * configure.in: Add peigen.lo to list of files required for each
3749 PE target.
3750 * Makefile.am: Rebuild dependencies.
3751 (BFD32_BACKENDS): Add peigen.lo.
3752 (BFD32_BACKENDS_CFILES): Add peigen.c.
3753 (SOURCE_HFILES): Add libpei.h.
3754 * configure, Makefile.in: Rebuild.
3755
3756 * peicode.h (coff_swap_scnhdr_in): Don't check for a special
3757 section name of _BSS; check IMAGE_SCN_CNT_UNINITIALIZED_DATA
3758 instead. Don't clear the s_paddr field for an uninitialized data
3759 section.
3760
3761 * coffcode.h (coff_mkobject_hook): Set timestamp field in
3762 coff_data_type to f_timdat.
3763 * peicode.h (pe_mkobject_hook): Likewise.
3764
3765 * peicode.h (coff_swap_filehdr_in): Check the NT executable magic
3766 number if COFF_IMAGE_WITH_PE.
3767
3768 * coffcode.h (coff_mkobject_hook): If COFF_WITH_PE, set HAS_DEBUG
3769 to the reverse of IMAGE_FILE_DEBUG_STRIPPED.
3770 (coff_write_object_contents): Set IMAGE_FILE_DEBUG_STRIPPED if
3771 there is no SEC_DEBUGGING section.
3772 * peicode.h (pe_mkobject_hook): Set HAS_DEBUG to the reverse of
3773 IMAGE_FILE_DEBUG_STRIPPED.
3774
3775 * pe-i386.c (COFF_LONG_FILENAMES): Define.
3776 (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3777 * pei-i386.c (COFF_LONG_FILENAMES): Define.
3778 (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
3779
3780 * coffswap.h (IMAGE_BASE): Don't define.
3781 * pei-arm.c (IMAGE_BASE): Don't define.
3782 * pei-i386.c (IMAGE_BASE): Don't define.
3783 * pei-mcore.c (IMAGE_BASE): Don't define.
3784 * pei-ppc.c (IMAGE_BASE): Don't define.
3785
3786 * cofflink.c (_bfd_coff_link_input_bfd): When writing out a
3787 symbol, switch on the class when determining whether to modify the
3788 value. For PE, don't modify the value of a C_FCN symbol not named
3789 .bf.
3790
3791 * libbfd-in.h (_bfd_abort): Declare.
3792 (abort): Define.
3793 * bfd.c (_bfd_abort): New function.
3794 * libbfd.h: Rebuild.
3795
3796 * coffcode.h (coff_set_alignment_hook): Delete POWERPC_LE_PE
3797 special handling.
3798
3799 * cofflink.c (_bfd_coff_link_input_bfd): If a symbol is stripped,
3800 don't write out the associated line numbers.
3801
3802 * cofflink.c (_bfd_coff_write_global_sym): Handle section symbol
3803 aux entries.
3804
3805 * cofflink.c (coff_link_add_symbols): Don't warn about symbol type
3806 changes when the base type is unknown.
3807
3808 * coffgen.c (coff_print_symbol): Fix printing of aux record for
3809 function symbols.
3810
3811 * syms.c (BSF_DEBUGGING_RELOC): Define.
3812 * coffcode.h (coff_slurp_symbol_table): If PE, set BSF_DEBUGGING
3813 for C_FCN/C_EFCN symbols, and set BSF_DEBUGGING_RELOC for such
3814 symbols named .bf.
3815 * coffgen.c (fixup_symbol_value): Relocate a symbol which has
3816 BSF_DEBUGGING_RELOC set.
3817 * bfd-in2.h: Rebuild.
3818
3819 1999-09-10 Ian Lance Taylor <ian@zembu.com>
3820
3821 * ecoff.c (bfd_debug_section): Update initialization for new
3822 comdat_info field.
3823 (_bfd_ecoff_styp_to_sec_flags): Add section parameter.
3824 * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Update declaration.
3825
3826 1999-09-10 H.J. Lu <hjl@gnu.org>
3827
3828 * coff-alpha.c (alpha_ecoff_backend_data): Initialize the new
3829 _bfd_filnmlen field.
3830 * coff-mips.c (mips_ecoff_backend_data): Likewise.
3831
3832 Fri Sep 10 00:35:14 1999 Jeffrey A Law (law@cygnus.com)
3833
3834 * elf-hppa.h (elf_hppa_final_link_relocate): Create .opd entries
3835 for FPTR relocs involving local symbols.
3836
3837 * elf-hppa.h (elf_hppa_final_link_relocate): Get the right
3838 value for the stub address in a call through a stub.
3839 Install the value for a local symbol directly into the DLT
3840 instead of generating a reloc. Correctly handle FPTR64 relocs.
3841
3842 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): New function.
3843 (elf_hppa_remark_useless_dynamic_symbols): Similarly.
3844 (elf_hppa_final_link): Call them.
3845
3846 1999-09-10 Ian Lance Taylor <ian@zembu.com>
3847
3848 * elflink.h (elf_fix_symbol_flags): Move weakdef handling here...
3849 (elf_adjust_dynamic_symbol): ...from here.
3850
3851 Wed Sep 8 17:56:11 1999 Jeffrey A Law (law@cygnus.com)
3852
3853 * elf-hppa.h (elf_hppa_howto_table); There is no DIR64WR, DIR64DR
3854 relocation, remove them. SECREL64->LTOFF16WF.
3855 (elf_hppa_final_link_relocate): Handle LTOFF* relocations. Handle
3856 DIR* relocations.
3857 (elf_hppa_relocate_insn): Similarly.
3858
3859 * elf-hppa.h (elf_hppa_final_link_relocate): Handle PLTOFF* relocs.
3860 (elf_hppa_relocate_insn): Similarly.
3861
3862 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DPREL* and
3863 GPREL* relocations.
3864 (elf_hppa_relocate_insn): Similarly.
3865
3866 * elf-hppa.h (elf_hppa_link_final_relocate): Fix typos.
3867 Handle LTOFF_TP* relocs.
3868 (elf_hppa_relocate_insn): Similarly.
3869
3870 * elf-hppa.h (elf_hppa_final_link_relocate): Handle PCREL* relocs.
3871 Consistently deal with addends. Handle DLTIND14F and DLTREL14F.
3872 (elf_hppa_relocate_insn): Handle PCREL* relocs.
3873
3874 * elf-hppa.h (elf_hppa_final_link_relocate): Handle LT_OFF_FPTR*,
3875 DIR32, DIR64 and FPTR64 relocations.
3876 (elf_hppa_relocate_insn): Similarly.
3877
3878 * elf-hppa.h (elf_hppa_final_link): Set the value of __gp to the
3879 address of the .PARISC.global section.
3880 (elf_hppa_relocate_section): Lookup and pass the PA64 hash
3881 table entry elf_hppa_final_link_relocate. Do not give a warning
3882 for a reloc against an external symbol if it has a PA64 hash
3883 table entry.
3884 (elf_hppa_final_link_relocate): Significantly rework. Handle
3885 DLTIND relocations. Compute the final value of the relocation
3886 before passing the value of elf_hppa_relocate_insn.
3887 (elf_hppa_relocate_insn): Revamp to handle just bit tiwiddling
3888 relocation support. Handle DLTIND relocation requests just like
3889 DLTREL relocation requests. Simplify branch handling.
3890
3891 1999-09-08 Ulrich Drepper <drepper@cygnus.com>
3892
3893 * elf-hppa.h (elf_hppa_relocate_section): Catch problems with
3894 non-allocated section as done in i386 version.
3895 (elf_hppa_final_link_relocate): Uncomment R_PARISC_14F in switch
3896 statement since this is no know relocation.
3897
3898 Tue Sep 7 17:25:12 1999 Jeffrey A Law (law@cygnus.com)
3899
3900 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14F
3901 relocs.
3902 (elf_hppa_relocate_insn): Similarly.
3903
3904 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14WR and
3905 DLTREL14WD relocs.
3906 (elf_hppa_relocate_insn): Similarly.
3907
3908 * elf-hppa.h (elf_hppa_final_link_relocate): Handle DLTREL14R and
3909 DLTREL21L relocs. Pass the output bfd to elf_hppa_relocate_insn.
3910 Pass the relocate type rather than the insn format to
3911 elf_hppa_relocate_insn.
3912 (elf_hppa_relocate_insn): Make switch dependent on relocation type
3913 rather than the opcode. Handle DLTREL21L and DLTREL14R relocs.
3914
3915 1999-09-07 Ian Lance Taylor <ian@zembu.com>
3916
3917 * coffcode.h (bfd_coff_backend_data): Add _bfd_filnmlen field.
3918 (bfd_coff_filnmlen): Define.
3919 (bfd_coff_std_swap_table): Initialize new field.
3920 * coffgen.c (coff_fix_symbol_name): Use bfd_coff_filnmlen rather
3921 than FILNMLEN.
3922 (coff_write_symbols): Likewise.
3923 (coff_get_normalized_symtab): Likewise.
3924 * coff-sh.c (bfd_coff_small_swap_table): Initialize new field.
3925 * libcoff.h: Rebuild.
3926
3927 1999-09-06 Donn Terry <donn@interix.com>
3928
3929 * coffcode.h (sort_by_secaddr): New static function if
3930 COFF_IMAGE_WITH_PE.
3931 (coff_compute_section_file_positions): If COFF_IMAGE_WITH_PE, sort
3932 sections by VMA when assigning target_index values. Always set
3933 virt_size.
3934
3935 * libcoff-in.h (struct pei_section_tdata): Add pe_flags field.
3936 * coffcode.h (coff_set_alignment_hook) [COFF_WITH_PE version]: Set
3937 pe_flags field.
3938 * libcoff.h: Rebuild.
3939
3940 * coffcode.h (coff_set_custom_section_alignment): Add const to
3941 declaration to match definition.
3942 (coff_write_object_contents): Don't set F_AR32W(R)? if
3943 COFF_WITH_PE.
3944
3945 * coff-i386.c (in_reloc_p): Add declaration.
3946 (i386coff_vec): Simplify initialization of
3947 application_section_flags.
3948
3949 * coffcode.h (sec_to_styp_flags): Write separate COFF_WITH_PE
3950 version. Move COFF_WITH_PE specific code to new version.
3951 (stype_to_sec_flags): Likewise. Add section parameter.
3952 * coffgen.c (make_a_section_from_file): Set target_index before
3953 calling styp_to_sec_flags. Pass section to styp_to_sec_flags.
3954 * libcoff.h: Rebuild.
3955
3956 * syms.c (stt): Add some PE/PEI section names.
3957 (bfd_decode_symclass): Return 'w', not 'U', for a weak undefined
3958 symbol.
3959 (bfd_symbol_info): Check for 'w'.
3960
3961 * section.c (struct bfd_comdat_info): Define.
3962 (asection): Add comdat field.
3963 (STD_SECTION): Initialize comdat field.
3964 (bfd_make_section_anyway): Likewise.
3965 * bfd-in2.h: Rebuild.
3966
3967 1999-09-06 Andreas Schwab <schwab@suse.de>
3968
3969 * elflink.h (elf_link_add_object_symbols): Copy NON_GOT_REF flag
3970 to version symbols.
3971
3972 1999-09-06 Nick Clifton <nickc@cygnus.com>
3973
3974 * elflink.h (elf_gc_record_vtentry): Use bfd_zmalloc and
3975 bfd_realloc instead of calloc and realloc.
3976
3977 1999-09-04 Steve Chamberlain <sac@pobox.com>
3978
3979 * cpu-pj.c: New file.
3980 * elf32-pj.c: New file.
3981 * config.bfd (pj*): New cpu.
3982 (pj-*-*, pjl-*-*): New targets.
3983 * configure.in (bfd_elf32_pj_vec): New target vector.
3984 (bfd_elf32_pjl_vec): New target vector.
3985 * archures.c (bfd_arch_pj): Define.
3986 * elf.c (prep_headers): Handle bfd_arch_pj.
3987 * reloc.c: Define BFD_RELOC_PJ_* relocations.
3988 * targets.c (bfd_elf32_pj_vec, bfd_elf32_pjl_vec): Declare and add
3989 to target vector list.
3990 * Makefile.am: Rebuild dependencies.
3991 (ALL_MACHINES): Add cpu-pj.lo.
3992 (ALL_MACHINES_CFILES): Add cpu-pj.c.
3993 (BFD32_BACKENDS): Add elf32-pj.lo.
3994 (BFD32_BACKENDS_CFILES): Add elf32-pj.c.
3995 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
3996
3997 1999-09-04 Ian Lance Taylor <ian@zembu.com>
3998
3999 * elf-bfd.h (ELF_LINK_NON_GOT_REF): Define.
4000 * elflink.h (elf_adjust_dynamic_symbol): Copy REF_REGULAR_NONWEAK
4001 and NON_GOT_REF from weak defined symbol to real symbol.
4002 * elf32-i386.c (elf_i386_check_relocs): Set NON_GOT_REF.
4003 (elf_i386_adjust_dynamic_symbol): If NON_GOT_REF is not set, don't
4004 create a COPY reloc.
4005 * elf32-sparc.c (elf32_sparc_check_relocs): Set NON_GOT_REF.
4006 (elf32_sparc_adjust_dynamic_symbol): If NON_GOT_REF is not set,
4007 don't create a COPY reloc.
4008
4009 1999-09-03 Ian Lance Taylor <ian@zembu.com>
4010
4011 * elflink.h (elf_bfd_final_link): When counting relocations, don't
4012 count those in sections we are not including in the link.
4013
4014 Thu Sep 2 17:41:20 1999 Jeffrey A Law (law@cygnus.com)
4015
4016 * elflink.h (elf_link_add_object_symbols): Work around bogus SH_LINK
4017 field in hpux11 shared libraries.
4018
4019 1999-09-02 Nick Clifton <nickc@cygnus.com>
4020
4021 * elflink.h (elf_gc_record_vtentry): Fix memory leak.
4022
4023 Wed Sep 1 13:34:29 1999 Jeffrey A Law (law@cygnus.com)
4024
4025 * elf-hppa.h (elf_hppa_add_symbol_hook): New function.
4026 (elf_hppa_final_link, elf_hppa_relocate_section): Likewise.
4027 (elf_hppa_final_link_relocate, elf_hppa_relocate_insn): Likewise.
4028
4029 1999-08-31 Alexandre Petit-Bianco <apbianco@cygnus.com>
4030
4031 * elflink.h (record_link_assignment): When possible, keep the
4032 original type of the symbol.
4033
4034 Mon Aug 30 15:26:48 1999 Jeffrey A Law (law@cygnus.com)
4035
4036 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Allow both
4037 R_PARISC_DIR32 and R_PARISC_DIR64 regardless of how the
4038 tools were configured.
4039 * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Declare.
4040
4041 1999-08-26 Mark Mitchell <mark@codesourcery.com>
4042
4043 * elf32-mips.c (_bfd_mips_elf_check_relocs): Don't allocate local
4044 GOT entries for GOT16 relocations; they're not required.
4045
4046 1999-08-24 Nick Clifton <nickc@cygnus.com>
4047
4048 From a patch submitted by Roland McGrath <roland@baalperazim.frob.com>
4049
4050 * config.bfd (arm-*-netbsd*): New target.
4051 * configure.in (armnetbsd_vec): New target vector.
4052 * configure: Regenerate
4053 * targets.c (bfd_target_vector): Add &armnetbsd_vec.
4054
4055 * Makefile.am (BFD32_BACKENDS): Add armnetbsd.lo.
4056 (ALL_MACHINES_CFILES): Add armnetbsd.c.
4057 (armnetbsd.lo): New rule with deps.
4058 * Makefile.in: Regenerate.
4059
4060 * armnetbsd.c: New file: Definitions specific to arm-netbsd
4061 target.
4062
4063 Tue Aug 24 00:25:58 1999 Jeffrey A Law (law@cygnus.com)
4064
4065 * som.c (som_slurp_symbol_table): Fix typo in comment.
4066
4067 Fri Aug 20 17:01:23 1999 Jeffrey A Law (law@cygnus.com)
4068
4069 * elf-hppa.h (elf_hppa_fake_sections): Compute section indices
4070 here instead of using elf_section_data...
4071
4072 1999-08-19 Nick Clifton <nickc@cygnus.com>
4073
4074 * coff-mcore.c (mcore_emit_base_file_entry): New function: Emit
4075 relocations into the base file.
4076 (coff_mcore_relocate_section): Call mcore_emit_base_file_entry if
4077 we are building a base file.
4078
4079 1999-08-19 Nick Clifton <nickc@cygnus.com>
4080
4081 * elf32-arm.h (arm_add_to_rel): New function. Add a value to
4082 a REL style reloc.
4083 (elf32_arm_relocate_section): Use arm_add_to_rel to increment
4084 REL relocs when performing a partial relocation.
4085
4086 1999-08-18 Donn Terry <donn@interix.com>
4087
4088 * cofflink.c: Move definitions of N_TMASK, et. al., out of
4089 _bfd_coff_link_input_bfd into top level.
4090
4091 * coff-i386.c (coff_i386_reloc): Handle R_IMAGEBASE.
4092 (RTYPE2HOWTO): Return NULL if reloc type is out of range.
4093 (coff_i386_rtype_to_howto): Likewise.
4094 * coffcode.h (coff_slurp_symbol_table): Change a -2 to N_DEBUG.
4095 Completely ignore symbols which are all zero.
4096 (dummy_reloc16_estimate): Add return 0.
4097 * cofflink.c (_bfd_coff_link_input_bfd): Rename inner scope
4098 variable copy to name_copy to avoid shadowing outer scope
4099 variable.
4100 * libcoff-in.h (coff_data_type): Change raw_syment_count field
4101 from unsigned int to unsigned long. Add timestamp field.
4102 * libcoff.h: Rebuild.
4103
4104 1999-08-17 H.J. Lu <hjl@gnu.org>
4105
4106 * elf32-hppa.c (bfd_elf32_bfd_is_local_label_name): Fix typo in
4107 macro definition.
4108
4109 1999-08-17 Ian Lance Taylor <ian@zembu.com>
4110
4111 * elf32-mips.c (_bfd_mips_elf_add_symbol_hook): Set BSF_DYNAMIC
4112 for special section symbols.
4113 * elflink.h (elf_merge_symbol): If we have no old BFD, check
4114 BSF_DYNAMIC on the section symbol to see whether the old BFD is
4115 dynamic.
4116
4117 1999-08-15 Mark Mitchell <mark@codesourcery.com>
4118
4119 * elf32-mips.c (mips_elf_calculate_relocation): Fix unfortunate
4120 coincidence of variable names between old and new code.
4121
4122 1999-08-12 Nick Clifton <nickc@cygnus.com>
4123
4124 * elf32-arm.h (elf32_arm_to_thumb_stub): Make 'offset' parameter
4125 into a bfd_vma and 'addend' parameter a 'bfd_signed_vma'.
4126 (elf32_thumb_to_arm_stub): Make 'offset' parameter into a bfd_vma
4127 and 'addend' parameter a 'bfd_signed_vma'.
4128 (elf32_arm_final_link_relocate): Do not involve stubs in
4129 R_ARM_THM_PC22 relocs relative to section symbols, they are long
4130 jumps, not function calls.
4131
4132 1999-08-11 Robin Farine <advanc@dial.eunet.ch>
4133
4134 * elf32-arm.h (elf32_arm_final_link_relocate): Check for overflow
4135 in R_ARM_PC24 relocs.
4136
4137 Tue Aug 10 12:48:09 1999 Jeffrey A Law (law@cygnus.com)
4138
4139 * elf-hppa.h (elf_hppa_fake_sections): New function.
4140 * elf32-hppa.c (elf_backend_fake_sections): Define.
4141
4142 * elf-hppa.h (elf_hppa_final_write_processing): Update for
4143 recent changes to the arch_info structure.
4144
4145 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle
4146 R_HPPA_SEGBASE and R_HPPA_SEGREL32.
4147 * cpu-hppa.c (bfd_hppa20w_arch): New entry in architecture info
4148 list.
4149
4150 Tue Aug 10 00:34:29 1999 Mark P. Mitchell <mark@codesourcery.com>
4151 Ralf Baechle <ralf@uni-koblenz.de>
4152
4153 * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Always
4154 output DT_MIPS_GOTSYM.
4155 (_bfd_mips_elf_finish_dynamic_sections): Use the same value as
4156 DT_MIPS_SYMTABNO if there are no global GOT symbols.
4157
4158 Tue Aug 10 00:21:08 1999 Mark P. Mitchell <mark@codesourcery.com>
4159
4160 * elf32-mips.c (mips_elf_create_dynamic_relocation): Change
4161 prototype. Handle local symbols. Add commentary.
4162 (mips_elf_calculate_relocation): Adjust accordingly.
4163 (_bfd_mips_elf_check_relocs): Handle local symbols in R_MIPS_32
4164 relocations.
4165
4166 * elflink.h (elf_bfd_final_link): Tweak last change.
4167
4168 1999-08-09 Mark Mitchell <mark@codesourcery.com>
4169
4170 * elflink.h (elf_link_size_reloc_section): Use the counts in the
4171 elf-section data to allocate just the right amount of relocation
4172 space. Don't allocate the hash space twice.
4173 (elf_bfd_final_link): Calculate the amount of space to allocate in
4174 each relocation section.
4175
4176 Mon Aug 9 17:37:30 1999 Jeffrey A Law (law@cygnus.com)
4177
4178 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case 32): When in
4179 64bit mode, generate a section relative relocation for a 32bit
4180 wide relocation.
4181 (elf_hppa_is_local_label_name): New function.
4182 * elf32-hppa.c (elf_hppa_is_local_label_name): Deleted. To be
4183 shared between 32bit and 64bit port.
4184
4185 1999-08-09 Mark Mitchell <mark@codesourcery.com>
4186
4187 * elf32-mips.c (elf_mips_howto_table): Fix src_mask for
4188 R_MIPS_GOT16 and R_MIPS_CALL16.
4189 (mips_elf_got16_entry): Use mips_elf_high to calculate the value
4190 to use when looking for a preexisting GOT entry.
4191
4192 1999-08-09 Jakub Jelinek <jj@ultra.linux.cz>
4193
4194 * elf64-sparc.c (sparc64_elf_relocate_section): Back out part of
4195 the Sep. 4th, 1998 change. glibc 2.0.x dynamic linker had bug,
4196 not binutils.
4197 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4198
4199 1999-08-09 Geoff Keating <geoffk@cygnus.com>
4200
4201 * elflink.h (elf_link_output_extsym): Don't output a weak
4202 reference to an undefined symbol just because it was defined weak
4203 in a shared object.
4204
4205 1999-08-09 Eli Zaretskii <eliz@is.elta.co.il>
4206
4207 * coffgen.c (coff_find_nearest_line): When looking for file, use
4208 last best match rather than first. If address is beyond last line
4209 number record, don't return the last line as the correct value.
4210
4211 1999-08-08 Ian Lance Taylor <ian@zembu.com>
4212
4213 * section.c (SEC_SMALL_DATA): Rename from SEC_SHORT.
4214 * bfd-in2.h: Rebuild.
4215
4216 1999-08-08 Mark Elbrecht <snowball3@bigfoot.com>
4217
4218 * libcoff-in.h (struct coff_section_alignment_entry): Define.
4219 * coffcode.h (coff_set_custom_section_alignment): New static
4220 function.
4221 (coff_section_alignment_table): New static array.
4222 (coff_new_section_hook): Use coff_set_customer_section_alignment.
4223 * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4224 * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Define.
4225 * libcoff.h: Rebuild.
4226
4227 1999-08-08 Ian Lance Taylor <ian@zembu.com>
4228
4229 * Makefile.am: Rename .dep* files to DEP*. Change DEP variable to
4230 MKDEP.
4231 * Makefile.in: Rebuild.
4232
4233 1999-08-08 Mumit Khan <khan@xraylith.wisc.edu>
4234
4235 * section.c (SEC_SHARED): Define.
4236 * coffcode.h (sec_to_styp_flags): Handle SEC_SHARED.
4237 (styp_to_sec_flags): Likewise.
4238 * peicode.h (coff_swap_scnhdr_out): Likewise.
4239 * bfd-in2.h: Rebuild.
4240
4241 1999-08-08 Ian Lance Taylor <ian@zembu.com>
4242
4243 * coffcode.h (coff_classify_symbol): Comment out part of
4244 1999-08-05 change which breaks cygwin DLLs.
4245
4246 * acinclude.m4 (BFD_BINARY_FOPEN): Change -windows to -windows*.
4247 * aclocal.m4, configure: Rebuild.
4248
4249 1999-08-06 Ian Lance Taylor <ian@zembu.com>
4250
4251 * section.c (global_syms): Only initialize union field if
4252 __STDC__.
4253
4254 1999-08-04 Mark Mitchell <mark@codesourcery.com>
4255
4256 * elf32-mips.c (mips_elf_got16_entry): Don't multiply GOT index by
4257 the size of a GOT entry here.
4258 (mips_elf_calculate_relocation): Don't create a local GOT entry
4259 for the symbol in a GOT16 relocation; just for it's high-order bit
4260 (_bfd_mips_elf_relocate_section): Fix thinko.
4261
4262 1999-08-05 Ian Lance Taylor <ian@zembu.com>
4263
4264 Based on patches from Donn Terry <donn@interix.com>:
4265 * coffcode.h (enum coff_symbol_classification): Define.
4266 (bfd_coff_backend_data): Rename _bfd_coff_sym_is_global to
4267 _bfd_coff_classify_symbol. Change return type.
4268 (bfd_coff_classify_symbol): Rename from bfd_coff_sym_is_global.
4269 (coff_slurp_symbol_table): Use coff_classify_symbol.
4270 (coff_classify_symbol): New static function.
4271 (coff_sym_is_global): Never define.
4272 (bfd_coff_std_swap_table): Initialize with coff_classify_symbol.
4273 * cofflink.c (coff_link_check_ar_symbols): Use
4274 bfd_coff_classify_symbol rather than bfd_coff_sym_is_global.
4275 (coff_link_add_symbols): Likewise.
4276 (_bfd_coff_link_input_bfd): Likewise.
4277 * coff-sh.c (bfd_coff_small_swap_table): Initialize with
4278 coff_classify_symbol.
4279 * libcoff.h: Rebuild.
4280
4281 Wed Aug 4 18:08:07 1999 Jeffrey A Law (law@cygnus.com)
4282
4283 * libhppa.h (R_HPPA_LTPSEL, R_HPPA_RTPSEL): New field selectors
4284 (e_ltpsel, e_rtpsel): Similarly.
4285
4286 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle 21bit e_ltpsel
4287 and 14bit ertpsel. Handle 64bit psel.
4288
4289 1999-08-04 Mark Mitchell <mark@codesourcery.com>
4290
4291 * elf32-mips.c (_bfd_mips_elf_relocate_section): Tweak HI16/LO16
4292 handling for REL relocations. And only left-shift R_MIPS26
4293 relocation addends where necessary.
4294
4295 1999-08-03 Mark Mitchell <mark@codesourcery.com>
4296
4297 * elf32-mips.c (mips_elf_next_lo16_addend): Rename to ...
4298 (mips_elf_next_lo16_relocation): Don't compute the addend here.
4299 Just return the relocation found.
4300 (mips_elf_relocate_section): Pull the LO16 addend out of the
4301 section itself when using REL relocations.
4302
4303 * elf32-mips.c (mips_elf_calculate_relocation): Restore
4304 _DYNAMIC_LINK handling and handling of undefined symbols in shared
4305 libraries.
4306
4307 1999-08-03 Ian Lance Taylor <ian@zembu.com>
4308
4309 * elf32-ppc.c (ppc_elf_relocate_section): Don't use the relocation
4310 value of a symbol in a SEC_DEBUGGING section. Warn when doing a
4311 relocation against a symbol in an input section with no output
4312 section. From Daniel Jacobowitz <drow@false.org>.
4313
4314 * coff-stgo32.c (go32_stubbed_coff_object_p): Remove; not used.
4315
4316 * acinclude.m4 (BFD_CC_FOR_BUILD): Change to use conftest, and to
4317 look for generated file correctly.
4318 * aclocal.m4, configure: Rebuild.
4319
4320 1999-08-02 Mark Mitchell <mark@codesourcery.com>
4321
4322 * elf32-mips.c (_bfd_mips_elf_relocate_section): Handle R_MIPS_26
4323 and R_MIPS16_26 relocations correctly when relocating.
4324 (_bfd_mips_elf_check_relocs): Don't assume that R_MIPS_CALL_HI16
4325 and R_MIPS_CALL_LO16 are for global symbols.
4326
4327 1999-08-02 Jakub Jelinek <jj@ultra.linux.cz>
4328
4329 * elflink.h (elf_bfd_final_link): Copy the whole isym, not just
4330 some fields.
4331 * elf64-sparc.c (sparc64_elf_output_arch_syms): Declare used
4332 variables and initialize them.
4333
4334 1999-08-01 Mark Mitchell <mark@codesourcery.com>
4335
4336 * elf32-mips.c (_bfd_mips_elf_final_link): Handle the case where
4337 there are no global symbols requiring GOT entries.
4338 (_bfd_mips_elf_size_dynamic_sections): Likewise.
4339 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4340 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4341
4342 * elf32-mips.c (mips_elf_calculate_relocation): Undefined weak
4343 symbols are considered to have the value zero.
4344 (_bfd_mips_elf_relocate_section): Don't try to perform a
4345 relocation for an undefined symbol.
4346 (_bfd_mips_elf_check_relocs): Allocate locate GOT space for local
4347 GOT16 relocations.
4348
4349 1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
4350
4351 * elf64-sparc.c (sparc64_elf_build_plt): Cosmetic change - ABI
4352 wants ba,a,pt %xcc instead of %icc.
4353 Emit correct .PLT0-(.PLTN+4) initial value into the pointer slots
4354 of large PLT entries.
4355 (sparc64_elf_plt_ptr_offset): Fix calculation.
4356 (sparc64_elf_finish_dynamic_symbol): Negative value of R_SPARC_JMP_SLOT
4357 addend should be relative to load address, not .plt section start.
4358 (sparc64_elf_size_info): Sparc64 uses 32bit .hash entries.
4359
4360 1999-07-30 Jakub Jelinek <jj@ultra.linux.cz>
4361
4362 * elf-bfd.h (struct elf_backend_data): Add
4363 print_symbol_all and output_arch_syms backend methods.
4364 * elfxx-target.h: Likewise.
4365 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create,
4366 sparc64_elf_add_symbol_hook, sparc64_elf_output_arch_syms,
4367 sparc64_elf_get_symbol_type, sparc64_elf_symbol_processing): New
4368 functions.
4369 (sparc64_elf_size_dynamic_sections): Leave space for STT_REGISTER
4370 symbols in .dynsym, add their names into .dynstr. Put those symbols
4371 into dynlocal.
4372 (sparc64_elf_finish_dynamic_sections): Fix up DT_SPARC_REGISTER
4373 pointers to STT_REGISTER symbols in dynsym section.
4374 (sparc64_elf_print_symbol_all): New function.
4375 * elf.c (bfd_elf_print_symbol): Allow special backend symbol
4376 printing using the print_symbol_all hook.
4377
4378 1999-07-30 Catherine Moore <clm@cygnus.com>
4379
4380 * elf32-arm.h (elf32_arm_check_relocs): Use r_offset for
4381 R_ARM_GNU_VTENTRY.
4382
4383 1999-07-29 Richard Henderson <rth@cygnus.com>
4384
4385 * elf32-mips.c (_bfd_mips_elf_final_link): Only re-sort dynsyms if
4386 dynamic_sections_created.
4387
4388 1999-07-29 Richard Henderson <rth@cygnus.com>
4389
4390 * elf32-mips.c (mips_info_to_howto_rel): Split out switch to ...
4391 (mips_rtype_to_howto): ... new function.
4392 (_bfd_mips_elf_relocate_section): Use it.
4393
4394 1999-07-28 Mark Mitchell <mark@codesourcery.com>
4395
4396 * elf32-mips.c (_bfd_mips_elf_relocate_section): Fix typo.
4397
4398 1999-07-27 Nick Clifton <nickc@cygnus.com>
4399
4400 Patch generated by Bernd Schmidt. <bernds@cygnus.co.uk>
4401
4402 * coff-arm.c (coff_arm_is_local_label_name): Change to strip
4403 out only symbols that start with LOCAL_LABEL_PREFIX followed by 'L'.
4404
4405 1999-07-23 Donn Terry <donn@interix.com>
4406
4407 * libcoff-in.h (coff_link_hash_entry): Add coff_link_hash_flags
4408 field, and define COFF_LINK_HASH_PE_SECTION_SYMBOL.
4409 * cofflink.c (coff_link_add_symbols): If PE, handle section
4410 symbols specially.
4411 * libcoff.h: Rebuild.
4412
4413 * config.bfd (i[3456]86-*-interix*): New target.
4414
4415 1999-07-21 Mark Elbrecht <snowball3@bigfoot.com>
4416
4417 * coffcode.h (styp_to_sec_flags): If COFF_LONG_SECTION_NAMES and
4418 COFF_SUPPORT_GNU_LINKONCE, mark sections whose names begin with
4419 .gnu.linkonce with SEC_LINKONCE and SEC_LINK_DUPLICATES_DISCARD.
4420 * coff-go32.c: (COFF_LONG_SECTION_NAMES): Define.
4421 (COFF_SUPPORT_GNU_LINKONCE): Define.
4422 * coff-stgo32.c: (COFF_LONG_SECTION_NAMES): Define.
4423 (COFF_SUPPORT_GNU_LINKONCE): Define.
4424
4425 1999-07-21 Ian Lance Taylor <ian@zembu.com>
4426
4427 From Mark Elbrecht:
4428 * makefile.dos: Remove; obsolete.
4429 * configure.bat: Remove; obsolete.
4430
4431 1999-07-21 H.J. Lu <hjl@gnu.org>
4432
4433 * config.bfd (i[3456]86-*-vxworks*): Add targ_underscore=yes.
4434
4435 1999-07-21 Philippe De Muyter <phdm@macqel.be>
4436
4437 * cofflink.c (_bfd_coff_generic_relocate_section): Issue an error
4438 message and fail if a symbol index is out of range.
4439
4440 1999-07-21 Ian Lance Taylor <ian@zembu.com>
4441
4442 * elf32-mips.c (mips_elf_calculate_relocation): Get the GP value
4443 when looking at a R_MIPS_GOT16 relocation.
4444
4445 1999-07-20 Nick Clifton <nickc@cygnus.com>
4446
4447 * coff-m88k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4448
4449 Mon Jul 19 14:03:44 1999 Mark P. Mitchell <mark@codesourcery.com>
4450
4451 * elf32-mips.c (_bfd_mips_elf_final_link): Restore setting of GP
4452 removed in previous change.
4453 (_bfd_mips_elf_relocate_section): Adjust GP relative relocations
4454 in relocateable output.
4455
4456 1999-07-19 Ian Lance Taylor <ian@zembu.com>
4457
4458 * coff-m88k.c (m88kbcs_vec): Initialize new field of bfd_target
4459 structure.
4460
4461 * elflink.h (elf_merge_symbol): Do merge symbols from the same BFD
4462 if they appear to be specially created by the linker.
4463
4464 1999-07-19 Nick Clifton <nickc@cygnus.com>
4465
4466 * targets.c (alternative_target): New field in bfd_target
4467 structure.
4468 (bfd_search_for_target): New function: Find a target that
4469 satisifies a search function.
4470 * bfd-in2.h: Regenerate.
4471
4472 * elfxx-target.h: Initialise the alternative_target field of
4473 the bfd_target structures to point to the other target (if
4474 defined).
4475 * nlm-target.h: Initialise the alternative_target field of
4476 the bfd_target structures to point to the other target (if
4477 defined).
4478
4479 * coffcode.h (CREATE_BIG_COFF_TARGET_VEC): New macro.
4480 (CREATE_LITTLE_COFF_TARGET_VEC): New macro.
4481
4482 * aix386-core.c: Initialise new field of bfd_target structure.
4483 * aout-adobe.c: Initialise new field of bfd_target structure.
4484 * aout-arm.c: Initialise new field of bfd_target structure.
4485 * aout-target.h: Initialise new field of bfd_target structure.
4486 * aout-tic30.c: Initialise new field of bfd_target structure.
4487 * binary.c: Initialise new field of bfd_target structure.
4488 * bout.c: Initialise new field of bfd_target structure.
4489 * cisco-core.c: Initialise new field of bfd_target structure.
4490 * coff-a29k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4491 * coff-alpha.c: Initialise new field of bfd_target structure.
4492 * coff-apollo.c: Use CREATE_BIG_COFF_TARGET_VEC.
4493 * coff-arm.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4494 * coff-h8300.c: Use CREATE_BIG_COFF_TARGET_VEC.
4495 * coff-h8500.c: Use CREATE_BIG_COFF_TARGET_VEC.
4496 * coff-i386.c: Initialise new field of bfd_target structure.
4497 * coff-i860.c: Initialise new field of bfd_target structure.
4498 * coff-i960.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4499 * coff-m68k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4500 * coff-mcore.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4501 * coff-mips.c: Initialise new field of bfd_target structure.
4502 * coff-ppc.c: Initialise new field of bfd_target structure.
4503 * coff-rs6000.c: Initialise new field of bfd_target structure.
4504 * coff-sh.c: Use CREATE_{BIG|LITTLE}_COFF_TARGET_VEC.
4505 * coff-sparc.c: Use CREATE_BIG_COFF_TARGET_VEC.
4506 * coff-tic30.c: Initialise new field of bfd_target structure.
4507 * coff-tic80.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4508 * coff-w65.c: Use CREATE_LITTLE_COFF_TARGET_VEC.
4509 * coff-we32k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4510 * coff-z8k.c: Use CREATE_BIG_COFF_TARGET_VEC.
4511 * hppabsd-core.c: Initialise new field of bfd_target structure.
4512 * hpux-core.c: Initialise new field of bfd_target structure.
4513 * i386msdos.c: Initialise new field of bfd_target structure.
4514 * i386os9k.c: Initialise new field of bfd_target structure.
4515 * ieee.c: Initialise new field of bfd_target structure.
4516 * ihex.c: Initialise new field of bfd_target structure.
4517 * irix-core.c: Initialise new field of bfd_target structure.
4518 * mipsbsd.c: Initialise new field of bfd_target structure.
4519 * netbsd-core.c: Initialise new field of bfd_target structure.
4520 * oasys.c: Initialise new field of bfd_target structure.
4521 * osf-core.c: Initialise new field of bfd_target structure.
4522 * ppcboot.c: Initialise new field of bfd_target structure.
4523 * ptrace-core.c: Initialise new field of bfd_target structure.
4524 * sco5-core.c: Initialise new field of bfd_target structure.
4525 * som.c: Initialise new field of bfd_target structure.
4526 * srec.c: Initialise new field of bfd_target structure.
4527 * tekhex.c: Initialise new field of bfd_target structure.
4528 * trad-core.c: Initialise new field of bfd_target structure.
4529 * versados.c: Initialise new field of bfd_target structure.
4530 * vms.c: Initialise new field of bfd_target structure.
4531
4532 1999-07-19 Andreas Schwab <schwab@suse.de>
4533
4534 * elflink.h (elf_bfd_final_link): Remove unused variables rel_hash
4535 and rel_hdr.
4536
4537 Sat Jul 17 02:28:28 1999 Mark P. Mitchell <mark@codesourcery.com>
4538
4539 * elflink.h (elf_link_adjust_relocs): New function.
4540 (elf_bfd_final_link): Use it.
4541 (elf_link_input_bfd): Deal with the fact that there can be
4542 two relocation sections for a single section.
4543 (elf_reloc_link_order): Likewise.
4544
4545 * elf32-mips.c (_bfd_mips_elf_final_link): Don't set GP for
4546 a relocateable object.
4547 (_bfd_mips_elf_relocate_section): Handle relocateable links.
4548
4549 1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
4550
4551 * elf64-sparc.c (sparc64_elf_info_to_howto): Use ELF64_R_TYPE_ID.
4552 (sparc64_elf_get_reloc_upper_bound,
4553 sparc64_elf_get_dynamic_reloc_upper_bound,
4554 sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
4555 sparc64_elf_canonicalize_dynamic_reloc, sparc64_elf_write_relocs):
4556 New functions.
4557 (sparc64_elf_check_relocs, sparc64_elf_relocate_section): Use
4558 ELF64_R_TYPE_ID/DATA where appropriate.
4559
4560 1999-07-16 Jakub Jelinek <jj@ultra.linux.cz>
4561
4562 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Remove
4563 DT_SPARC_PLTFMT.
4564
4565 1999-07-16 Ian Lance Taylor <ian@zembu.com>
4566
4567 * elf32-mips.c (mips_elf_local_relocation_p): New static
4568 function.
4569 (mips_elf_next_lo16_addend): Call bfd_set_error on failure.
4570 (mips_elf_calculate_relocation): Use mips_elf_local_relocation_p.
4571 Always set *require_jalxp.
4572 (mips_elf_stub_section_p): Mark abfd parameter as unused.
4573 (_bfd_mips_elf_relocate_section): Only look for LO16 following
4574 GOT16 if the GOT16 is against a local symbol. Don't return false
4575 for an undefined symbol. If there is an overflow, assert that we
4576 have a name.
4577
4578 1999-07-16 Andreas Schwab <schwab@suse.de>
4579
4580 * elflink.h (elf_link_record_local_dynamic_symbol): Remove unused
4581 variables `link' and `elfsec'.
4582 (elf_bfd_final_link): Remove unused variable `os'.
4583
4584 Thu Jul 15 17:55:31 1999 Mark P. Mitchell <mark@codesourcery.com>
4585
4586 * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Don't require
4587 a PT_PHDR program headers.
4588 (_bfd_mips_elf_final_link): Don't assume there are going to be
4589 section symbols when we're not building a shared object.
4590 (_bfd_mips_elf_check_relocs): Make sure we have a GOT when
4591 we need one.
4592
4593 1999-07-15 J.T. Conklin <jtc@redback.com>
4594
4595 * config.bfd (i[3456]86-*-vxworks*): New target.
4596
4597 1999-07-15 Mark Mitchell <mark@codesourcery.com>
4598
4599 * elf32-mips.c (mips_elf_stub_section_p): New function.
4600 (mips_elf_calculate_relocation): Handle MIPS16 stub functions.
4601 (mips_elf_relocate_section): Adjust calling sequence for
4602 mips_elf_calculate_relocation and mips_elf_perform_relocation.
4603 (mips_elf_perform_relocation): Turn `jal' into `jalx' where
4604 required.
4605
4606 1999-07-15 Ian Lance Taylor <ian@zembu.com>
4607
4608 * configure.in: Bump version number to 2.9.5.
4609 * configure: Rebuild.
4610
4611 Thu Jul 15 02:56:15 1999 Jeffrey A Law (law@cygnus.com)
4612
4613 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type, case R_HPPA): Handle
4614 64bit format.
4615 (_bfd_elf_hppa_gen_reloc_type, case R_GOTOFF): Use base reloc type
4616 to derive final type instead of hardwiring a selection.
4617
4618 1999-07-14 Mark Mitchell <mark@codesourcery.com>
4619
4620 * elf32-mips.c (mips_elf_obtain_contents): Swap 16-bit halves of
4621 things relocated by R_MIPS16_GPREL.
4622 (mips_elf_perform_relocation): Likewise.
4623
4624 Wed Jul 14 15:23:19 1999 Jim Wilson <wilson@cygnus.com>
4625
4626 * elfxx-target.h (elfNN_bed): Add elf_backend_want_dynbss.
4627
4628 1999-07-14 Richard Henderson <rth@cygnus.com>
4629
4630 * elf32-mips.c (struct mips_got_info): Add global_gotno.
4631 (_bfd_mips_elf_size_dynamic_sections): Set it.
4632 (_bfd_mips_elf_final_link): Re-sort; verify the got did not grow.
4633 (mips_elf_sort_hash_table): Set max_non_got_dynindex based off
4634 new argument max_local.
4635
4636 1999-07-14 Mark Mitchell <mark@codesourcery.com>
4637
4638 * elf32-mips.c (mips_elf_obtain_contents): Swap the 16-bit
4639 subwords when handling an R_MIPS16_26 relocation.
4640 (mips_elf_perform_relocation): Don't be paranoid abour right-shift
4641 semantics.
4642
4643 * elf32-mips.c (elf_mips16_gprel_howto): Adjust src_mask and
4644 dst_mask to match reality.
4645 (_bfd_mips_elf_calculate_relocation): Handle R_MIPS16_GPREL.
4646 (mips_elf_obtain_contents): Use bfd_get.
4647 (mips_elf_perform_relocation): Handle R_MIPS16_GPREL.
4648 (mips_elf_relocate_section): Likewise.
4649
4650 1999-07-13 Mark Mitchell <mark@codesourcery.com>
4651
4652 * elf32-mips.c (mips_elf_calculate_relocation): Handle R_MIPS16_26.
4653 (mips_elf_relocate_section): Adjust calling sequence for
4654 mips_elf_perform_relocation.
4655 (mips_elf_perform_relocation): Take additional argument. Handle
4656 R_MIPS16_26. Use bfd_put for convenience.
4657
4658 1999-07-13 Richard Henderson <rth@cygnus.com>
4659
4660 * elf.c (assign_file_positions_for_segments): Thinko last change.
4661 Always overwrite p_flags.
4662
4663 1999-07-13 Richard Henderson <rth@cygnus.com>
4664
4665 * elf-bfd.h (struct elf_backend_data): Add want_dynbss.
4666 * elflink.c (_bfd_elf_create_dynamic_sections): Only create
4667 .dynbss and .rel[a].bss if want_dynbss.
4668 * elfxx-target.h (elf_backend_want_dynbss): Provide default.
4669
4670 1999-07-13 Richard Henderson <rth@cygnus.com>
4671
4672 * elf.c (assign_file_positions_for_segments): Don't overwrite p_flags.
4673
4674 1999-07-13 Richard Henderson <rth@cygnus.com>
4675
4676 * elf-bfd.h (struct elf_link_local_dynamic_entry): New.
4677 (struct elf_link_hash_table): Add dynlocal.
4678 (_bfd_elf_link_lookup_local_dynindx): Prototype.
4679 (_bfd_elf_link_adjust_dynindx): Delete.
4680 (_bfd_elf_link_renumber_dynsyms): Prototype.
4681 (_bfd_elf,link_record_local_dynamic_symbol): Prototype.
4682 * elfcode.h (elf_link_record_local_dynamic_symbol): New alias.
4683 * elflink.c (_bfd_elf_link_adjust_dynindx): Delete.
4684 (_bfd_elf_link_lookup_local_dynindx): New function.
4685 (elf_link_renumber_hash_table_dynsyms): New function.
4686 (_bfd_elf_link_renumber_dynsyms): New function.
4687 * elflink.h (elf_link_record_local_dynamic_symbol): New function.
4688 (struct elf_assign_sym_version_info): Delete removed_dynamic.
4689 (bfd_elf,size_dynamic_sections): Use _bfd_strip_section_from_output
4690 instead of elf_link_remove_section_and_adjust_dynindices.
4691 Remove removed_dynamic code. Use _bfd_elf_link_renumber_dynsyms.
4692 (elf_link_assign_sym_version): Remove removed_dynamic code.
4693 (elf_link_renumber_dynsyms): Delete.
4694 (elf_bfd_final_link): Install section and local symbols into .dynsym.
4695
4696 * elf32-m68k.c (elf_m68k_adjust_dynindx): Delete.
4697 (elf_m68k_size_dynamic_sections): Don't set section dynindicies.
4698 (elf_m68k_finish_dynamic_sections): Don't write section dynsyms.
4699 * elf32-mips.c: Similarly.
4700 * elf32-ppc.c: Similarly.
4701 * elf32-sparc.c: Similarly.
4702 * elf64-alpha.c: Similarly.
4703 * elf64-sparc.c: Similarly.
4704
4705 1999-07-13 Mark Mitchell <mark@codesourcery.com>
4706
4707 * elf32-mips.c (mips_elf_calculate_relocation): Do not complain
4708 when _gp_disp is undefined. Do not check R_MIPS_LO16 for overflow
4709 when the relocation is against _gp_disp.
4710
4711 1999-07-12 Mark Mitchell <mark@codesourcery.com>
4712
4713 * dwarf2.c (read_attribute): Support DW_FORM_ref8.
4714 * elf32-mips.c (mips_elf_link_hash_entry): Change mips_32_relocs
4715 to possibly_dynamic_relocs. Adjust usage throughout code.
4716 (elf_mips_howto_table): Handle R_MIPS_64 correctly.
4717 (elf_mips_ctor64_howto): Likewise.
4718 (mips_elf_calculate_relocation): Handle R_MIPS_64 like R_MIPS_32.
4719 Adjust indentation.
4720 (mips_elf_relocate_section): Handle R_MIPS_64 in 32-bit mode.
4721 (_bfd_mips_elf_check_relocs): Handle R_MIPS_64 like R_MIPS_32.
4722 Use MIPS_ELF_GOT_SIZE to calculate the size of GOT entries.
4723 * elf64-mips.c (elf_backend_may_use_rel_p): Define.
4724
4725 1999-07-12 Ian Lance Taylor <ian@zembu.com>
4726
4727 * Makefile.am: Rebuild dependencies.
4728 * Makefile.in: Rebuild.
4729
4730 * bfd-in.h: Remove tests of COFF_IMAGE_WITH_PE.
4731 * bfd-in2.h: Rebuild.
4732
4733 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
4734 as appropriate. Use EMPTY_HOWTO as appropriate. Fill in
4735 structure initializations. Add casts.
4736 * reloc.c (EMPTY_HOWTO): Define.
4737 * bfd-in2.h: Rebuild.
4738 * coff-h8300.c (h8300_reloc16_extra_cases): Remove useless
4739 comparisons against 0.
4740 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Change
4741 previous_ibfd_e_flags to unsigned long.
4742 * vms.h (struct vms_private_data_struct): Change section_count to
4743 unsigned.
4744 * vms-gsd.c (_bfd_vms_slurp_gsd): Change psect_idx to unsigned.
4745 (_bfd_vms_write_gsd): Change symnum to unsigned.
4746 * vms-hdr.c (_bfd_vms_write_hdr): Change symnum to unsigned.
4747 * vms-tir.c (etir_sta): Change psect to unsigned.
4748 (alloc_section): Change idx to unsigned.
4749 (tir_sta, tir_ctl): Change psect to unsigned.
4750 (_bfd_vms_write_tir): Change len and before to bfd_size_type.
4751 * vms.c (priv_section_count): Change to unsigned.
4752
4753 1999-07-12 Andreas Schwab <schwab@suse.de>
4754
4755 * elf32-m68k.c: Add some ATTRIBUTE_UNUSED.
4756 * m68klinux.c: Likewise.
4757
4758 1999-07-12 Ian Lance Taylor <ian@zembu.com>
4759
4760 * Many files: Changes to avoid gcc warnings: Remove unused local
4761 variables. Add default case to enum switches.
4762 * coff-arm.c (bfd_arm_allocate_interworking_sections): Only
4763 compile if not COFF_IMAGE_WITH_PE.
4764 (record_arm_to_thumb_glue, record_thumb_to_arm_glue): Likewise.
4765 (bfd_arm_get_bfd_for_interworking): Likewise.
4766 (bfd_arm_process_before_allocation): Likewise.
4767 * epoc-pei-arm.c: Don't rename bfd_arm functions.
4768 * pei-arm.c: Likewise.
4769 * elf32-mips.c (mips_elf_link_hash_table_create): Don't declare.
4770 (MIPS_ELF_ADD_DYNAMIC_ENTRY): Correct last change.
4771 (mips_elf_got16_entry): Put parens around & in body of ==.
4772 (mips_elf_calculate_relocation): Correct test for empty string.
4773 * vms-gsd.c: Use _bfd_error_handler rather than fprintf to
4774 stderr.
4775 * vms-misc.c (_bfd_vms_length_hash_symbol): Correct sprintf
4776 format.
4777
4778 1999-07-11 Ian Lance Taylor <ian@zembu.com>
4779
4780 * Many files: Changes to avoid gcc warnings: Add ATTRIBUTE_UNUSED
4781 as appropriate. Fill in structure initializations. Add variable
4782 initializations. Add casts.
4783 * dwarf1.c (parse_line_table): Change eachLine to unsigned long.
4784 (dwarf1_unit_find_nearest_line): Change i to unsigned long.
4785
4786 * elf.c (bfd_elf_hash): Change parameter from unsigned char * to
4787 char *.
4788 * elf-bfd.h (bfd_elf_hash): Update declaration.
4789 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove casts
4790 when calling bfd_elf_hash.
4791
4792 1999-07-11 Mark Mitchell <mark@codesourcery.com>
4793
4794 * libbfd.c (bfd_put_8): Make it of type `void'.
4795 * bfd-in2.h: Regenerated.
4796 * elf32-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Conditionalize
4797 for 32-bit hosts.
4798 (_bfd_mips_elf_final_link): Likewise.
4799
4800 * elflink.h (elf_link_read_relocs_from_section): Be type-correct.
4801
4802 Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
4803
4804 * config.bfd (hppa*-*-linux-gnu*): New target
4805
4806 1999-07-07 Mark Mitchell <mark@codesourcery.com>
4807
4808 * elf-bfd.h (_bfd_mips_elf_section_from_shdr): Constify.
4809 (_bfd_mips_elf_create_dynamic_sections): New function.
4810 (_bfd_mips_elf_add_symbol_hook): Likewise.
4811 (_bfd_mips_elf_adjust_dynamic_symbol): Likewise.
4812 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
4813 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
4814 (_bfd_mips_elf_gc_mark_hook): Likewise.
4815 (_bfd_mips_elf_gc_sweep_hook): Likewise.
4816 (_bfd_mips_elf_always_size_sections): Likewise.
4817 (_bfd_mips_elf_size_dynamic_sections): Likewise.
4818 (_bfd_mips_elf_check_relocs): Likewise.
4819 (_bfd_mips_elf_link_hash_table_create): Likewise.
4820 (_bfd_mips_elf_print_private_data): Likewise.
4821 (_bfd_mips_elf_link_output_symbol_hook): Likewise.
4822 (_bfd_mips_elf_final_link): Likewise.
4823 (_bfd_mips_elf_additional_program_headers): Likewise.
4824 (_bfd_mips_elf_modify_segment_map): Likewise.
4825 (_bfd_mips_elf_relocate_section): Likewise.
4826 * elf32-mips.c (mips_elf32_object_p): Move contents into
4827 _bfd_mips_elf_object_p.
4828 (mips_elf_additional_program_headers): Rename to
4829 _bfd_mips_elf_additional_program_headers.
4830 (mips_elf_modify_segment_map): Rename to
4831 _bfd_mips_elf_modify_segment_map.
4832 (elf_mips_abi_name): Change prototype.
4833 (mips_elf32_section_from_shdr): Merge into
4834 _bfd_mips_elf_section_from_shdr.
4835 (mips_elf32_section_processing): Merge into
4836 _bfd_mips_elf_section_processing.
4837 (mips_elf_final_link): Rename to _bfd_mips_elf_final_link. Invoke
4838 the right back-end ELF linker.
4839 (mips_elf_relocate_section): Rename to
4840 _bfd_mips_elf_relocate_section. Clean up. Adjust for 64-bit code.
4841 (mips_elf_link_output_symbol_hook): Rename to
4842 _bfd_mips_elf_link_output_symbol_hook.
4843 (mips_elf_create_dynamic_section): Rename to
4844 _bfd_mips_elf_create_dynamic_section.
4845 (mips_elf_check_relocs): Rename to _bfd_mips_elf_check_relocs.
4846 Adjust for 64-bit code. Use mips_elf_got_section.
4847 (mips_elf_adjust_dynamic_symbol): Rename to
4848 _bfd_mips_elf_adjust_dynamic_symbol. Use
4849 mips_elf_allocate_dynamic_relocations.
4850 (mips_elf_finish_dynamic_symbol): Rename to
4851 _bfd_mips_elf_finish_dynamic_symbol. Use mips_elf_got_section.
4852 Adjust for 64-bit code.
4853 (mips_elf_finish_dynamic_sections): Rename to
4854 _bfd_mips_elf_finish_dynamic_sections. Adjust for 64-bit code.
4855 (mips_elf_always_size_sections): Rename to
4856 _bfd_mips_elf_always_size_sections.
4857 (mips_elf_add_symbol_hook): Rename to
4858 _bfd_mips_elf_add_symbol_hook.
4859 (mips_elf_next_lo16_addend): Constify.
4860 (mips_elf_calculate_relocation): Likewise.
4861 (mips_elf_obtain_contents): Likewise.
4862 (mips_elf_perform_relocation): Likewise.
4863 (mips_elf_create_dynamic_relocation): Likewise.
4864 (mips_elf_allocate_dynamic_relocations): New function.
4865 (MIPS_ELF_REL_DYN_SECTION_NAME): New macro.
4866 (MIPS_ELF_REL_SIZE): Likewise.
4867 (MIPS_ELF_DYN_SIZE): Likewise.
4868 (MIPS_ELF_GOT_SIZE): Likewise.
4869 (MIPS_ELF_SYM_SIZE): Likewise.
4870 (MIPS_ELF_LOG_FILE_ALIGN): Likewise.
4871 (MIPS_ELF_GET_WORD): Likewise.
4872 (MIPS_ELF_PUT_WORD): Likewise.
4873 (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
4874 (STUB_LW): Conditionalize for 64-bit value.
4875 (elf_mips_howto_table): Add R_MIPS_HIGHER and R_MIPS_HIGHEST
4876 entries.
4877 (_bfd_mips_elf_merge_private_bfd_data): Merge e_ident[EI_CLASS].
4878 Check it for inconsistency.
4879 (_bfd_mips_elf_print_private_bfd_data): Print ABI=64 for 64-bit
4880 ABI.
4881 (_bfd_mips_elf_fake_sections): Remove duplicate handling of
4882 .msym.
4883 (mips_elf_global_got_index): Use MIPS_ELF_GOT_SIZE.
4884 (mips_elf_got_offset_from_index): Use misp_elf_got_section.
4885 (mips_elf_create_local_got_entry): Use MIPS_ELF_GOT_SIZE.
4886 (mips_elf_local_got_index): Likewise.
4887 (mips_elf_got_page): Likewise.
4888 (mips_elf_got_info): Likewise.
4889 (mips_elf_create_dynamic_relocation): Handle 32-bit/64-bit split.
4890 (ELF_DYNAMIC_INTERPRETER): Handle 64-bit code.
4891 (mips_elf_create_dynamic_sections): Use MIPS_ELF_LOG_FILE_ALIGN,
4892 instead of constant `2'.
4893 (mips_elf_create_got_section): Tidy. Use MIPS_ELF_GOT_SIZE.
4894 (mips_elf_create_msym_section): Use MIPS_ELF_LOG_FILE_ALIGN.
4895 (mips_elf_size_dynamic_sections): Use
4896 MIPS_ELF_REL_DYN_SECTION_NAME, MIPS_ELF_GOT_SIZE,
4897 MIPS_ELF_ADD_DYNAMIC_ENTRY. Remove #if 0'd code.
4898 Adjust all releveant entries in elf backend table.
4899 * elf64-mips.c (mips_elf64_section_from_shdr): Remove.
4900 (mips_elf64_section_processing): Likewise.
4901 Adjust elf backend entries to use _bfd_mips_elf variants now
4902 publicly available.
4903
4904 * elflink.h (elf_link_create_dynamic_sections): Handle non-standard
4905 hash-entry sizes.
4906 (size_dynamic_sections): Likewise.
4907 (elf_link_output_extsym): Likewise.
4908 * elf.c: (elf_fake_sections): Likewise.
4909 * libbfd.c (bfd_get): New macro.
4910 (bfd_put): Likewise.
4911 * bfd-in2.h: Regenerated.
4912
4913 1999-07-07 Mark Mitchell <mark@codesourcery.com>
4914
4915 * elf-bfd.h (elf_size_info): Add hash_entry_size,
4916 int_rels_per_ext_rel, swap_dyn_out, swap_reloc_in, swap_reloc_out,
4917 wap_reloca_in, and swap_reloca_out.
4918 * elflink.h (elf_link_read_relocs_from_section): Adjust to handle
4919 multiple internal relocations per external relocation.
4920 (link_read_relocs): Likewise.
4921 (elf_bfd_final_link): Likewise.
4922 (elf_link_input_bfd): Likewise.
4923 (elf_gc_mark): Likewise.
4924 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4925 * elfcode.h (elf_swap_dyn_out): Adjust type to match
4926 elf_swap_dyn_in.
4927 (size_info): Add entries for new fields.
4928 * elf64-mips.c (mips_elf64_swap_reloc_out): Enable.
4929 (mips_elf64_be_swap_reloc_in): New function.
4930 (mips_elf64_be_swap_reloc_out): Likewise.
4931 (mips_elf64_be_swap_reloca_in): Likewise.
4932 (mips_elf64_be_swap_reloca_out): Likewise.
4933 (mips_elf64_size_info): Add entries for new fields.
4934
4935 1999-07-07 Ian Lance Taylor <ian@zembu.com>
4936
4937 * elflink.h (elf_bfd_final_link): Assert that section reloc_count
4938 field equals the new rel_count field.
4939 (elf_link_input_bfd): When doing a relocateable link, use the new
4940 rel_count field rather than the reloc_count field.
4941 (elf_reloc_link_order): Likewise.
4942 (elf_finish_pointer_linker_section): Likewise.
4943
4944 Based on patch from H.J. Lu <hjl@gnu.org>:
4945 * elflink.h (elf_merge_symbol): Permit a non-weak definition in a
4946 shared library to override a weak definition in a regular object.
4947
4948 Tue Jul 6 10:23:39 1999 Jeffrey A Law (law@cygnus.com)
4949
4950 * libhppa.h: Revert July 2, 1999 patch.
4951
4952 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): T mode selectors
4953 need to generate DLTIND relocations, not DLTREL relocations.
4954
4955 1999-07-05 Nick Clifton <nickc@cygnus.com>
4956
4957 * coffcode.h (coff_set_arch_mach_hook): Recognise arm 5
4958 architectures.
4959 (coff_set_flags): Recognise arm 5 architectures.
4960
4961 * cpu-arm.c: Add support for strongarm and arm9 cpus.
4962 Add support for armv5 architecture.
4963
4964 * archures.c: Add bfd_mach_arm_5 and bfd_mach_arm_5T.
4965
4966 * reloc.c: Add new, assembler only, ARM reloc:
4967 BFD_RELOC_ARM_ADRL_IMMEDIATE.
4968
4969 * bfd-in2.h: Regenerate.
4970
4971 1999-07-02 Mark Mitchell <mark@codesourcery.com>
4972
4973 * dwarf2.c (parse_comp_unit): Add ABBREV_LENGTH parameter.
4974 (_bfd_dwarf2_find_nearest_line): Add ADDR_SIZE parameter.
4975 * elf.c (_bfd_elf_find_nearest_line): Pass it.
4976 * elf32-arm.h (elf32_arm_find_nearest_line): Likewise.
4977 * elf32-mips.c (ABI_64_P): New macro.
4978 (IRIX_COMPAT): We are IRIX6-compatible if ABI_64_P.
4979 (_bfd_mips_elf_find_nearest_line): Adjust call to
4980 _bfd_dwarf2_find_nearest_line.
4981 * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
4982 * libbfd.h: Regenerated.
4983
4984 1999-07-02 Ian Lance Taylor <ian@zembu.com>
4985
4986 * config.bfd: Add * at the end of i[3456]86-*-unixware.
4987
4988 Fri Jul 2 12:21:10 1999 Jeffrey A Law (law@cygnus.com)
4989
4990 * libhppa.h (HPPA_R_ARG_RELOC): Delete.
4991 (HPPA_R_CONSTANT, HPPA_R_ADDEND): Likewise.
4992
4993 1999-07-01 Mark Mitchell <mark@codesourcery.com>
4994
4995 * elf-bfd.h (bfd_elf_section_data): Add rel_count and rel_count2
4996 fields.
4997 (_bfd_elf_init_reloc_shdr): New function.
4998 * elf.c (_bfd_elf_new_section_hook): Use bfd_zalloc, rather than
4999 bfd_alloc followed by memset.
5000 (_bfd_elf_init_reloc_shdr): New function, split out from ...
5001 (elf_fake_sections): Here.
5002 (assign_section_numbers): Assign section numbers for the second
5003 relocation section, if required.
5004 * elflink.h (elf_link_output_relocs): New function.
5005 (elf_link_size_reloc_section): Likewise.
5006 (elf_bfd_final_link): Use elf_link_size_reloc_section.
5007 (elf_link_input_bfd): Use elf_link_output_relocs.
5008
5009 * elf32-mips.c (_bfd_mips_elf_fake_sections): Use
5010 _bfd_elf_init_reloc_shdr to initialize rel_hdr2.
5011
5012 Thu Jul 1 13:58:48 1999 Jeffrey A Law (law@cygnus.com)
5013
5014 * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle R_PCREL_CALL
5015 with 22bit format.
5016
5017 1999-06-28 Mark Mitchell <mark@codesourcery.com>
5018
5019 * elf32-mips.c (mips_elf_got_info): Move declaration before
5020 prototypes. Change global_gotsym to be a pointer to a hash entry,
5021 rather than a number index.
5022 (mips_elf_link_hash_entry): Move declaration before prototypes.
5023 (mips_elf_irix6_finish_dynamic_symbol): New function.
5024 (mips_elf_sign_extend): Likewise.
5025 (mips_elf_high): Likewise.
5026 (mips_elf_higher): Likewise.
5027 (mips_elf_highest): Likewise.
5028 (mips_elf_global_got_index): Likewise.
5029 (mips_elf_local_got_index): Likewise.
5030 (mips_elf_got_offset_from_index): Likeiwse.
5031 (mips_elf_record_global_got_symbol): Likewise.
5032 (mips_elf_got_page): Likewise.
5033 (mips_elf_next_lo16_addend): Likewise.
5034 (mips_elf_calculate_relocation): Likewise.
5035 (mips_elf_obtain_contents): Likewise.
5036 (mips_elf_perform_relocation): Likewise.
5037 (mips_elf_assign_gp): Likewise.
5038 (mips_elf_sort_hash_table_f): Likewise.
5039 (mips_elf_sort_hash_table): Likewise.
5040 (mips_elf_got_section): Likewise.
5041 (mips_elf_got_info): Likewise.
5042 (mips_elf_create_local_got_entry): Likewise.
5043 (mips_elf_got16_entry): Likewise.
5044 (mips_elf_create_dynamic_relocation): Likewise.
5045 (elf_mips_howto_table): Add description of R_MIPS_SCN_DISP.
5046 (mips_elf_final_gp): Use mips_elf_assign_gp.
5047 (_bfd_mips_elf_symbol_processing): Don't move SHN_COMMON symbols
5048 into SHN_SCOMMON automatically on IRIX6.
5049 (mips_elf_add_symbol_hook): Likewise.
5050 (mips_elf_relocate_section): Rewrite, using
5051 mips_elf_calculate_relocation and mips_elf_perform_relocation.
5052 (mips_elf_create_dynamic_section): Use MIPS_ELF_STUB_SECTION_NAME.
5053 Don't deal with .rld_map on IRIX6.
5054 (mips_elf_create_got_section): Adjust use of global_gotsym. Set
5055 section flags appropriately for .got.
5056 (mips_elf_check_relocs): Handle IRIX6 relocations making use of
5057 the got. Call mips_elf_record_global_got_symbol and allocate
5058 local got space appropriately.
5059 (mips_elf_size_dynamic_sections): Use bfd_byte *, not unsigned
5060 char *. Rework calculation of GOT size. Sort dynamic symbol
5061 table entries so entries that do not require GOT entries appear at
5062 the beginning. Don't use DT_MIPS_HIPAGENO on IRIX6. Remove dead
5063 code dealing with DT_INIT and DT_FINI. Remove fiddling with
5064 global_gotsym.
5065 (mips_elf_finish_dynamic_symbol): Adjust creation of global GOT
5066 entries.
5067 (mips_elf_finish_dynamic_symbol): Use
5068 mips_elf_irix6_finish_dynamic_symbol.
5069 (mips_elf_finish_dynamic_sections): Correct off-by-one error
5070 setting DT_MIPS_UNREFEXTNO. Adjust setting of DT_MIPS_GOTSYM for
5071 change to global_gotsym. Set DT_MIPS_OPTIONS on IRIX6.
5072
5073 1999-06-30 Ian Lance Taylor <ian@zembu.com>
5074
5075 * elf32-mips.c (mips_elf_final_link): Don't set CPIC when doing a
5076 relocateable link. From Ralf Baechle <ralf@uni-koblenz.de>.
5077
5078 1999-06-04 Philip Blundell <philb@gnu.org>
5079
5080 * elf32-arm.h (elf_backend_got_header_size): Define.
5081 (elf_backend_plt_header_size): Likewise.
5082
5083 1999-06-28 Jim Pick <jim@jimpick.com>
5084
5085 * elf32-arm.h (elf32_arm_relocate_section): Mind no_undefined
5086
5087 Tue Jun 29 02:25:03 1999 Jeffrey A Law (law@cygnus.com)
5088
5089 * elf-hppa.c (elf_hppa_howto_table): Use bfd_elf_generic_reloc as
5090 relocation function.
5091 * elf32-hppa.c (hppa_elf_reloc): Kill unused/unwanted function.
5092
5093 1999-06-27 Mark Mitchell <mark@codesourcery.com>
5094
5095 * elf32-mips.c (MIPS_ELF_SRDATA_SECTION_NAME): New macro.
5096 (MIPS_ELF_OPTIONS_SECTION_NAME): Likewise.
5097 (MIPS_ELF_STUB_SECTION_NAME): Likewise.
5098 (_bfd_mips_elf_section_from_shdr): Use them.
5099 (_bfd_mips_elf_fake_sections): Likewise. Add .srdata to the list
5100 of GP-relative sections.
5101 (_bfd_mips_elf_set_section_contents): Use them.
5102 (_bfd_mips_elf_section_processing): Share code between .sdata and
5103 .lit4/.lit8 sections. Set appropriate flags for .srdata.
5104 (mips_elf_additional_program_headers): Add handling for
5105 PT_MIPS_OPTIONS segment on IRIX6.
5106 (mips_elf_modify_segment_map): Likeiwse.
5107 (mips_elf_final_link): Set EF_MIPS_CPIC when required by the ABI.
5108 Include the options sections on IRIX6. Don't look for GP-relative
5109 sections by name; use SHF_MIPS_GPREL instead.
5110 (ELF_DYNAMIC_INTERPRETER): Adjust to use /usr/lib32/libc.so.1 for
5111 the N32 ABI.
5112 (mips_elf_create_dynamic_sections): Don't muck about with section
5113 alignments and such on IRIX6.
5114 (mips_elf_adjust_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5115 (mips_elf_size_dynamic_sections): Likewise. Adjust to handle the
5116 fact that ELF_DYNAMIC_INTERPRETER is no longer a constant. Use
5117 bfd_zalloc rather than bfd_alloc and memset.
5118 (mips_elf_finish_dynamic_symbol): Use MIPS_ELF_STUB_SECTION_NAME.
5119 Don't assert the existence of .rld_map on IRIX6.
5120 (mips_elf_finish_dynamic_sections): Use MIPS_ELF_STUB_SECTION_NAME.
5121
5122 * elf32-mips.c (mips_elf_adjust_dynindx): Remove.
5123 (mips_elf_size_dynamic_sections): Use _bfd_elf_link_adjust_dynindx
5124 instead.
5125
5126 1999-06-26 Mark Mitchell <mark@codesourcery.com>
5127
5128 * elf32-mips.c (mips_elf_swap_msym_in): New function.
5129 (mips_elf_swap_msym_out): New function.
5130 (mips_elf_create_msym_section): Likewise.
5131 (MIPS_ELF_MSYM_SECTION_NAME): New macro.
5132 (_bfd_mips_elf_final_write_processing): Set sh_link for .msym.
5133 (_bfd_mips_elf_section_from_shdr): Reject an SHT_MIPS_MSYM
5134 section not named .msym.
5135 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_MSYM_SECTION_NAME, not
5136 .msym directly. Set appropriate attributes for the .msym
5137 section.
5138 (mips_elf_link_hash_entry): Add min_dyn_reloc_index field.
5139 (mips_elf_link_hash_newfunc): Clear it.
5140 (mips_elf_create_dynamic_sections): Create the .msym section
5141 on IRIX6.
5142 (mips_elf_size_dynamic_sections): Allocate space for the
5143 .msym section. Add a DT_MIPS_MSYM entry.
5144 (mips_elf_finish_dynamic_symbol): Write out a .msym entry for
5145 the symbol.
5146 (mips_elf_finish_dynamic_sections): Assign a value for
5147 DT_MIPS_MSYM. Add .msym entries for the section symbols as well.
5148
5149 * elf32-mips.c (irix_compat_t): New enumeration.
5150 (ABI_N32_P): New macro.
5151 (IRIX_COMPAT): Likewise.
5152 (SGI_COMPAT): Implement in terms of IRIX_COMPAT.
5153 (mips_elf_relocate_section): Fix typo.
5154
5155 1999-06-26 Mumit Khan <khan@xraylith.wisc.edu>
5156
5157 * peicode.h (coff_swap_scnhdr_out): Mark non readonly BFD sections
5158 as writable PE sections.
5159
5160 1999-06-26 David Mosberger <davidm@hpl.hp.com>
5161
5162 * dwarf2.c (struct arange): New type.
5163 (struct comp_unit): Replace LOW and HIGH by member ARANGE.
5164 (arange_add): New function.
5165 (decode_line_info): Keep track of address ranges that a compilation
5166 unit covers.
5167 (comp_unit_contains_address): Return true if address is contained
5168 in _any_ of the address ranges associated with a compilation unit.
5169 (_bfd_dwarf2_find_nearest_line): Call comp_unit_find_nearest_line
5170 on the first comp_unit that contains the address.
5171
5172 1999-06-26 David Mosberger <davidm@hpl.hp.com>
5173
5174 * dwarf2.c (struct dwarf2_debug): Add member dwarf_line_buffer.
5175 (decode_line_info): Add variable STASH and initialize it to point
5176 to the per-bfd dwarf2_debug info. Remove static variable
5177 dwarf_line_buffer and use stash->dwarf_line_buffer in its place.
5178
5179 1999-06-26 Ian Lance Taylor <ian@zembu.com>
5180
5181 * elflink.h (elf_link_output_extsym): It's OK for a -Bsymbolic
5182 shared library to have an undefined symbol.
5183
5184 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5185 * elf32-ppc.c (ppc_elf_relocate_section): Fix last patch.
5186
5187 Thu Jun 24 20:59:11 1999 Jeffrey A Law (law@cygnus.com)
5188
5189 * elf-hppa.c (elf_hppa_final_write_processing): New function.
5190 * elf32-hppa.c: Remove everything related to symbol extension
5191 sections & records. Use the common elf_hppa_final_write_processing.
5192
5193 1999-06-22 Mark Mitchell <mark@codesourcery.com>
5194
5195 * elflink.h (size_dynamic_sections): Use user-specified init/fini
5196 functions instead of _init/_fini if requested.
5197
5198 1999-06-23 Ian Lance Taylor <ian@zembu.com>
5199
5200 * elf.c (bfd_section_from_shdr): Avoid crashing on a bogus sh_link
5201 field.
5202
5203 1999-06-22 Ian Lance Taylor <ian@zembu.com>
5204
5205 From Franz Sirl <Franz.Sirl-kernel@lauterbach.com>:
5206 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set unused dynindx
5207 field to 0, not -1.
5208 (ppc_elf_finish_dynamic_sections): Check for positive section
5209 dynindx field, rather than comparing against -1.
5210 (ppc_elf_relocate_section): Only return false if undefined_symbol
5211 or reloc_overflow fail, not always upon encountering an error.
5212
5213 1999-06-22 Mark Mitchell <mark@codesourcery.com>
5214
5215 * elflink.h (link_read_relocs): Explicitly cast external_relocs to
5216 bfd_byte * before performing pointer arithmetic.
5217
5218 Tue Jun 22 13:06:25 1999 Jeffrey A Law (law@cygnus.com)
5219
5220 * elf-hppa.h: New file. Common stuff for elf32 and elf64 PA
5221 support.
5222 * elf32-hppa.c: Include elf-hppa.h.
5223 (ARCH_SIZE): Define.
5224 (elf_hppa_reloc_type_lookup): Delete. Found in the common code
5225 now.
5226 (elf32_hppa_info_to_howto): Similarly.
5227 (elf_hppa_howto_table): Similarly.
5228 (elf_hppa_reloc_type_lookup): Similarly.
5229 (hppa_elf_gen_reloc_type): Similarly.
5230 * elf32-hppa.h (ELF_HOWTO_TALBE, N_PARISC_RELOCS): Delete.
5231
5232 1999-06-22 Nick Clifton <nickc@cygnus.com>
5233
5234 * elf32-v850.c (v850_elf_final_link_relocate): Catch overflow
5235 handling R_V850_22_PCREL relocation.
5236
5237 1999-06-21 Ian Lance Taylor <ian@zembu.com>
5238
5239 * coff-arm.c (arm_emit_base_file_entry): Explicitly declare return
5240 type.
5241
5242 Sun Jun 20 14:13:57 1999 Richard Henderson <rth@cygnus.com>
5243
5244 * section.c (_bfd_strip_section_from_output): Ignore sections
5245 DISCARDed by the link script.
5246
5247 1999-06-19 Ian Lance Taylor <ian@zembu.com>
5248
5249 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5250 Remove unused local variable spp.
5251
5252 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Don't crash if
5253 the entry symbol is not set.
5254
5255 Fri Jun 18 04:24:57 1999 Richard Henderson <rth@cygnus.com>
5256
5257 * elf64-alpha.c (elf64_alpha_relocate_section): Don't adjust
5258 GPDISP or LITUSE in a relocatable link.
5259
5260 Thu Jun 17 21:24:43 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5261
5262 * dwarf1.c (alloc_dwarf1_unit): Allocate using bfd_zalloc.
5263 * (alloc_dwarf1_func): Likewise.
5264
5265 Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com)
5266
5267 * libhppa.h: Fix various formatting errors.
5268 (assemble_3); Rewrite using CATENATE.
5269 (assemble_17): Fix various bugs.
5270
5271 1999-06-16 Nick Clifton <nickc@cygnus.com>
5272
5273 * elf32-mcore.c (R_MCORE_RAW): Fix definition.
5274
5275 1999-06-15 Richard Henderson <rth@cygnus.com>
5276
5277 * section.c (SEC_SHORT): Define.
5278 * bfd-in2.h: Rebuild.
5279
5280 1999-06-13 Mark Mitchell <mark@codesourcery.com>
5281
5282 * elflink.h (elf_link_remove_section_and_adjust_dynindices):
5283 Remove abfd parameter. Use _bfd_strip_section_from_output.
5284 (bfd_elf_size_dynamic_sections): Adjust callers accordingly.
5285
5286 * elf-bfd.h (_bfd_elf_link_adjust_dynindx): New function.
5287 * elflink.c (_bfd_elf_link_adjust_dynindx): Define it.
5288 * elflink.h (elf_link_remove_section_and_adjust_dynindices): New
5289 function.
5290 (bfd_elf_size_dynamic_sections): Use it.
5291
5292 1999-06-13 Alan Modra <alan@spri.levels.unisa.edu.au>
5293
5294 * elf32-i386.c (elf_howto_table): Change R_386_PC8 from
5295 complain_overflow_bitfield to complain_overflow_signed.
5296
5297 1999-06-13 Mark Mitchell <mark@codesourcery.com>
5298
5299 * elflink.h (elf_link_read_relocs_from_section): New function,
5300 split out from ...
5301 (elf_link_read_relocs): Here. Use it for both relocation
5302 sections.
5303
5304 1999-06-12 Mark Mitchell <mark@codesourcery.com>
5305
5306 * elfcode.h (elf_slurp_reloc_table_from_section): Don't assume
5307 asect->reloc_count is valid.
5308
5309 1999-06-12 Ian Lance Taylor <ian@zembu.com>
5310
5311 * elf32-mips.c (mips_elf32_section_processing): Permit a
5312 SHT_MIPS_REGINFO section to have a size of 0.
5313
5314 1999-06-12 David O'Brien <obrien@freebsd.org>
5315
5316 * config.bfd (alpha*-*-freebsd*): New target.
5317 (i[3456]86-*-freebsd*): Now defaults to ELF.
5318
5319 1999-06-11 Ian Lance Taylor <ian@zembu.com>
5320
5321 * reloc.c (_bfd_relocate_contents): Permit bitfield relocations to
5322 wrap if the relocation covers the high bit of an address.
5323
5324 * dwarf2.c (decode_line_info): Remove unused variable first_time.
5325
5326 1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
5327
5328 * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
5329 instead of R_SPARC_max.
5330 (sparc64_elf_info_to_howto): Likewise.
5331 * elf32_sparc.c (elf32_sparc_relocate_section): Likewise.
5332 (elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
5333
5334 1999-06-07 Richard Henderson <rth@cygnus.com>
5335
5336 * section.c (_bfd_strip_section_from_output): Remove output
5337 sections with no initial link_order.
5338
5339 1999-06-07 Nick Clifton <nickc@cygnus.com>
5340
5341 * elf32-m88k.c (ELF_MAXPAGESIZE): Define.
5342
5343 Mon Jun 7 11:49:43 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5344
5345 * Makefile.am (SOURCE_HFILES): Add missing headers.
5346 * Makefile.in: Regenerated.
5347
5348 1999-06-06 Mark Mitchell <mark@codesourcery.com>
5349
5350 * elf32-mips.c (_bfd_mips_elf_print_private_data): Recognize
5351 the N32 ABI.
5352
5353 1999-06-04 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
5354
5355 * elf32-ppc.c (ppc_elf_relocate_section): Don't barf on out of
5356 range undefweak symbols.
5357 * hash.c: Add missing comma after @xref{}
5358 * linker.c: Likewise.
5359
5360 1999-06-04 Nick Clifton <nickc@cygnus.com>
5361
5362 * elfxx-target.h (ELF_MAXPAGESIZE): Produce an error message
5363 if not defined.
5364 * elf32-gen.c (ELF_MAXPAGESIZE): Define.
5365 * elf32-i860.c (ELF_MAXPAGESIZE): Define.
5366 * elf32-i960.c (ELF_MAXPAGESIZE): Define.
5367 * elf64-gen.c (ELF_MAXPAGESIZE): Define.
5368
5369 1999-06-04 Ian Lance Taylor <ian@zembu.com>
5370
5371 * Makefile.am: Rebuild dependencies.
5372 (BFD32_BACKENDS): Add dwarf1.lo.
5373 (BFD32_BACKENDS_CFILES): Add dwarf1.c.
5374 * Makefile.in: Rebuild.
5375
5376 1999-06-04 Nick Clifton <nickc@cygnus.com>
5377
5378 * Makefile.am: Add epoc-arm-pe target.
5379 * Makefile.in: Regenerate.
5380 * pe-arm.c: Only redefine interworking function names if they have
5381 not already been redefined.
5382 * pei-arm.c: Only redefine interworking function names if they have
5383 not already been redefined.
5384 * epoc-pe-arm.c: Redefine interworking function names to avoid a
5385 name space clash.
5386 * epoc-pei-arm.c: Redefine interworking function names to avoid a
5387 name space clash.
5388
5389 1999-06-03 Nick Clifton <nickc@cygnus.com>
5390
5391 * elfxx-target.h (ELF_MAXPAGESIZE): Default to 0x1000 not 1.
5392
5393 Fri Jun 4 10:05:11 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5394
5395 * elf.c (elf_fake_sections): Undo change of 1999-05-10.
5396
5397 Fri Jun 4 03:10:49 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5398
5399 * elf32-sh.c (sh_elf_relax_delete_bytes): Fix setting of
5400 start / stop for recalculating of r_addend of R_SH_SWITCH*.
5401
5402 Fri Jun 4 02:53:13 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5403
5404 * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH32
5405 in other text sections.
5406
5407 Fri Jun 4 02:29:34 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
5408
5409 * libbfd.c (_bfd_generic_verify_endian_match): New function.
5410 * libbfd-in.h (_bfd_generic_verify_endian_match): Declare.
5411 * libbfd.h: Regenerate.
5412 * coff-sh.c (sh_merge_private_data): Delete.
5413 (coff_bfd_merge_private_bfd_data): Change to
5414 _bfd_generic_verify_endian_match.
5415 (elf32-sh.c): bfd_elf32_bfd_merge_private_bfd_data: Define.
5416
5417 1999-06-03 Ulrich Drepper <drepper@cygnus.com>
5418
5419 * elf32-arm.h: Fix typo: change ELF_MAXPAGE_SIZE to ELF_MAXPAGESIZE.
5420
5421 1999-06-03 Ian Lance Taylor <ian@zembu.com>
5422
5423 * bfd-in.h (bfd_elf32_arm_allocate_interworking_sections): Correct
5424 prototype.
5425 (bfd_elf32_arm_process_before_allocation): Likewise.
5426 * bfd-in2.h: Rebuild.
5427
5428 1999-06-03 David Mosberger <davidm@hpl.hp.com>
5429
5430 * dwarf2.c (struct line_info): Add member END_SEQUENCE to keep
5431 track of end_sequence markers.
5432 (add_line_info): Add END_SEQUENCE arg.
5433 (decode_line_info): Don't try to infer lo_pc and hi_pc from the
5434 debug-line info---it doesn't work right if a compilation unit
5435 consists of multiple discontiguous code-sequences. It would be
5436 worthwhile to optimize for the common case where a compilation
5437 unit results in a contiguous set of code sequences, but this is
5438 quite tricky to get right for arbitrary DWARF2 files.
5439 (lookup_address_in_line_info_table): Don't use the last line entry
5440 for a compilation unit for anything with an address higher than
5441 this line entry. Also, check for end_sequence markers to
5442 correctly handle discontinuities.
5443 (_bfd_dwarf2_find_nearest_line): When checking previously loaded
5444 compilation units, check all compilation units with each->high==0
5445 just like when reading compilation units.
5446
5447 * dwarf2.c (decode_line_info): Initialize table->files and
5448 table->last_line to NULL to avoid segfaults due to random
5449 values in these members.
5450 (concat_filename): Check for out-of-range file number before
5451 indexing filename table. Segfaults suck.
5452
5453 * dwarf2.c (decode_line_info): Don't truncate address to least
5454 significant 32 bits (breaks 64 bit targets).
5455 (lookup_address_in_function_table): Ditto.
5456 (comp_unit_contains_address): Ditto.
5457
5458 1999-06-02 Mark Mitchell <Mark Mitchell <mark@codesourcery.com>>
5459
5460 * elf32-mips.c (elf_mips_howto_table): Add R_MIPS_JALR.
5461 * elf64-mips.c (mips_elf64_howto_table_rel): Likewise.
5462 (mips_elf64_howto_table_rela): Likewise.
5463
5464 * elfcode.h (elf_slurp_reloc_table_from_section): New function,
5465 split out from ...
5466 (elf_slurp_reloc_table): Here. Use it to handle the case where a
5467 single section has two associated relocation sections.
5468
5469 1999-06-02 Mark Salter <msalter@cygnus.com>
5470
5471 * coffcode.h (coff_set_alignment_hook): Set lma from s_vaddr if
5472 COFF_WITH_PE defined.
5473
5474 1999-06-02 Nick Clifton <nickc@cygnus.com>
5475
5476 * pe-arm.c: Rename global arm interworking functions to avoid name
5477 collision when all targets BFD is built.
5478 * pei-arm.c: Ditto.
5479
5480 1999-05-31 Mark Mitchell <mark@codesourcery.com>
5481
5482 * elf-bfd.h (elf_backend_data): Remove use_rela_p. Add
5483 may_use_rel_p, may_use_rela_p, default_use_rela_p.
5484 (bfd_elf_section_data): Add use_rela_p.
5485 * elf.c (bfd_section_from_shdr): Set use_rela_p appropriately.
5486 (_bfd_elf_new_section_hook): Likewise.
5487 (elf_fake_sections): Use may_use_rela_p, etc., instead of
5488 use_rela_p.
5489 (_bfd_elf_copy_private_section_data): Copy use_rela_p.
5490 * elfcode.h (write_relocs): Determine whether or not use rela
5491 relocs based on the relocation section header.
5492 * elflink.c (_bfd_elf_create_dynamic_sections): Use default_use_rela_p
5493 instead of use_rela_p.
5494 * elfxx-target.h (elf_backend_may_use_relp): New macro.
5495 (elf_backend_may_use_rela_p): Likewise.
5496 (elf_backend_default_use_rela_p): Likewise.
5497 (elfNN_bed): Use them.
5498
5499 Wed Jun 2 12:38:49 1999 Miodrag Vallat <miodrag@multimania.com>
5500
5501 * hosts/alphalinux.h (TRAD_CORE_EXTRA_SIZE_ALLOWED): Expand to 4096.
5502
5503 Tue Jun 1 17:57:58 1999 Mark P. Mitchell <mitchell@n02.acl.lanl.gov>
5504
5505 * reloc.c (BFD_RELOC_MIPS_SUB): New relocation.
5506 (BFD_RELOC_MIPS_GOT_PAGE): Likewise.
5507 (BFD_RELOC_MIPS_GOT_OFST): Likewise.
5508 (BFD_RELOC_MIPS_GOT_DISP): Likewise.
5509 * bfd-in2.h: Regenerated.
5510 * libbfd.h: Likewise.
5511 * elf32-mips.c (mips_info_to_howto_rela): New function.
5512 (USE_REL): Adjust for new conventions.
5513 (MINUS_ONE): New macro.
5514 (elf_mips_howto_table): Add R_MIPS_SUB.
5515 (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE, MIPS_GOT_OFST,
5516 and MIPS_GOT_DISP.
5517 (mips_elf_final_write_processing): Set sh_link, not sh_info, for a
5518 .MIPS.content section.
5519 (_bfd_mips_elf_fake_sections): Treat all sections that begin
5520 with .MIPS.content as .MIPS.content sections. Set
5521 SHF_MNIPS_NOSTRIP for such section.
5522 (elf_info_to_howto): Define to mips_info_to_howto_rela.
5523 * elf64-mips.c (mips_r): Add entries for MIPS_SUB, MIPS_GOT_PAGE,
5524 MIPS_GOT_OFST, and MIPS_GOT_DISP.
5525
5526 Wed Jun 2 11:51:12 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5527
5528 * vms-misc.c (_bfd_vms_hash_newfunc): Fix use of uninitialized
5529 variable.
5530
5531 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Avoid ambigous
5532 `else'.
5533
5534 1999-05-30 Philip Blundell <philb@gnu.org>
5535
5536 * elf32-arm.h (elf32_arm_relocate_section): Reinstate change of
5537 1993-03-25 (!!). Take into account the bitmasks for the reloc so
5538 the addend does not overflow into the rest of the word.
5539
5540 1999-05-29 Nick Clifton <nickc@cygnus.com>
5541
5542 * bfd-in.h: Amend prototype for
5543 bfd_elf32_arm_process_before_allocation .
5544 * bfd-in.h: Regenerate.
5545
5546 * elfarm-oabi.c (NUM_ELEM): New macro: Compute the number of
5547 elements in a fixed sized array.
5548 (ARM_ELF_ABI_VERSION): Define.
5549 (ARM_ELF_OS_ABI_VERSION): Define.
5550 (R_ARM_THM_ABS5): Fix rightshift and size.
5551 (R_ARM_THM_PC22): Fix size.
5552 (R_ARM_PLT32): Define Howto.
5553 (find_howto): New function: Locate a howto based on a reloc
5554 number.
5555 (elf32_arm_info_to_howto): Use find_howto if necessary.
5556 (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5557 bfd_reloc_code_real_type.
5558 (elf32_arm_reloc_map[]): Add entries for BFD_RELOC_VTABLE_INHERIT
5559 and BFD_RELOC_VTABLE_ENTRY.
5560 (elf32_arm_reloc_type_lookup): Use find_howto if necessary.
5561
5562 * elfarm-nabi.c (NUM_ELEM): New macro: Compute the number of
5563 elements in a fixed sized array.
5564 (ARM_ELF_ABI_VERSION): Define.
5565 (ARM_ELF_OS_ABI_VERSION): Define.
5566 (R_ARM_THM_ABS5): Fix rightshift and size.
5567 (R_ARM_THM_PC22): Fix size.
5568 (elf32_arm_info_to_howto_rel): Rename to elf32_arm_info_to_howto.
5569 (elf32_arm_reloc_map): Change type of field bfd_reloc_val to
5570 bfd_reloc_code_real_type.
5571
5572 * elf32-arm.h (struct elf32_arm_link_hash_table): Add new field:
5573 no_pipeline_knowledge.
5574 (elf32_arm_link_hash_create): Initialise new field to zero.
5575 (bfd_elf32_arm_process_before_allocation): Add new paraemter:
5576 no_pipeline_knowledge. Use this parameter to initialise the field
5577 in the globals data structure.
5578 (elf32_arm_final_link_relocate): Only add in pipeline offset if
5579 no_pipeline_knowledge is false and the binary is from an old
5580 toolchain.
5581 (elf32_arm_merge_private_data): Generate an error if an attempt is
5582 made to link together big endian and little endian code.
5583 (elf32_arm_post_process_headers): New function: Initialise the
5584 EI_OSABI and EI_ABIVERSION fields of the newly created ELF program
5585 header.
5586 (elf_backend_post_process_headers): Define.
5587
5588 1999-05-28 Nick Clifton <nickc@cygnus.com>
5589
5590 * elf-bfd.h (struct elf_backend_data): Add new field:
5591 elf_backend_post_process_headers.
5592
5593 * elfxx-target.h (elf_backend_post_process_headers): Define to
5594 NULL if not already defined.
5595 (elfNN_bed): Initialise elf_backend_post_process_headers field.
5596
5597 * elf.c (prep_headers): Set the EI_OSABI and EI_ABIVERSION fields
5598 to zero.
5599 (_bfd_elf_compute_section_file_positions): Call
5600 elf_backend_post_process_headers if defined.
5601
5602 1999-05-28 Ian Lance Taylor <ian@zembu.com>
5603
5604 * configure.in: Check whether getuid and getgid exist.
5605 * archive.c: Define getuid and getgid as macros if HAVE_GETUID or
5606 HAVE_GETGID are not defined, respectively.
5607 (bfd_write_armap): Don't special case on _WIN32 for getuid and
5608 getgid.
5609 * configure.host: Set ac_cv_func_get{ug}id for *-*-windows*.
5610 * configure, config.in: Rebuild.
5611
5612 1999-05-28 Martin Dorey <mdorey@madge.com>
5613
5614 * elf32-i960.c: New file.
5615 * elf.c (prep_headers): Handle bfd_arch_i960.
5616 * targets.c (bfd_target_vector): Add &bfd_elf32_i960_vec.
5617 * config.bfd (i960-*-elf*): New target.
5618 * configure.in (bfd_elf32_i960_vec): New target vector.
5619 * Makefile.am (BFD32_BACKENDS): Add elf32-i960.lo.
5620 (BFD32_BACKENDS_CFILES): Add elf32-i960.c.
5621 * Makefile.in, aclocal.m4, configure: Rebuild.
5622
5623 1999-05-27 Nick Clifton <nickc@cygnus.com>
5624
5625 * elfarm-oabi.c (elf32_arm_howto_table): Add entry for
5626 R_ARM_PLT32.
5627 (find_howto): New function: Find entries in the
5628 elf32_arm_howto_table.
5629 (elf32_arm_info_to_howto): Use find_howto if the entry cannot be
5630 computed simply.
5631 (elf32_arm_reloc_type_lookup): Add lookup for
5632 BFD_RELOC_ARM_PLT32.
5633
5634 1999-05-25 Philip Blundell <pb@nexus.co.uk>
5635
5636 * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
5637 (elf32_arm_link_hash_table_create): Use above function as the
5638 constructor for hash table entries.
5639 (elf32_arm_relocate_section): Avoid crash when there is no output
5640 section.
5641 (elf32_arm_final_link_relocate): New parameter h.
5642 (elf32_arm_relocate_section): Pass symbol hash entry to above
5643 routine.
5644 (elf32_arm_gc_sweep_hook, elf32_arm_check relocs): Correct
5645 comments.
5646
5647 1999-05-25 Catherine Moore <clm@cygnus.com>
5648
5649 * coff-arm.c (coff_arm_relocate_section): Don't emit
5650 base file entries for pc-relative values.
5651
5652 1999-05-25 DJ Delorie <dj@cygnus.com>
5653
5654 * peicode.h (coff_swap_sym_in): When we create the actual section
5655 to reflect the not-there section C_SECTION symbols refer to,
5656 change the symbol class to C_STAT as the section is now really
5657 there.
5658
5659 1999-05-24 Philip Blundell <pb@nexus.co.uk>
5660
5661 * elf32-arm.h (elf32_arm_relocate_section): Undo change of
5662 1999-03-25.
5663
5664 Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
5665
5666 * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed
5667 F_PIC_INT to F_PIC.
5668 * coffcode.h (coff_set_arch_mach_hook): Added F_ARM_2a, and
5669 F_ARM_3M labels. Changed F_PIC_INT to F_PIC.
5670
5671 1999-05-16 Nick Clifton <nickc@cygnus.com>
5672
5673 * coff-mcore.c (in_reloc_p): Reinstate.
5674
5675 1999-05-15 Nick Clifton <nickc@cygnus.com>
5676
5677 * reloc.c (BFD_RELOC_MCORE_RVA): Define.
5678 * bfd-in2.h: Regenerate.
5679 * coff-mcore.c (in_reloc_p): Remove defintion.
5680 (mcore_coff_howto): Add IMAGE_REL_MCORE_RVA.
5681 (mcore_coff_reloc_type_lookup): Map BFD_RELOC_RVA to
5682 IMAGE_REL_MCORE_RVA.
5683 (coff_mcore_rtype_to_howto): Add special processing for
5684 IMAGE_REL_MCORE_RVA.
5685 (coff_mcore_relocate_section): Add support for
5686 IMAGE_REL_MCORE_RVA.
5687 * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
5688 (mcore_elf_reloc_type_lookup): Map BFD_RELOC_RVA to
5689 R_MCORE_RELATIVE.
5690 (mcore_elf_relocate_section): Delete redundant case labels.
5691
5692 Fri May 14 10:59:55 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
5693
5694 * elf32-arm.h (elf32_arm_relocate_section): Fix operator
5695 precedence between bit-and and comparison.
5696
5697 Thu May 13 09:45:23 1999 Joel Sherrill (joel@OARcorp.com)
5698
5699 * config.bfd (i[3456]86*-*-rtems*, m68k*-*-rtems*): Added to
5700 list of target formats (targ_selvecs).
5701 (i[3456]86*-*-rtemself*, mips*el-*-rtems*): New targets.
5702 (powerpcle*-*rtems*, sh-*-rtemself*): New targets.
5703
5704 1999-05-10 DJ Delorie <dj@cygnus.com>
5705
5706 * ecoff.c (_bfd_ecoff_write_armap): give the symtab element a
5707 reasonable mode until "ar x" is smart enough to skip it (fixes
5708 gcc/libgcc.a builds on mips-ecoff targets
5709
5710 * coffcode.h (styp_to_sec_flags): Explain how COMDATs are supposed
5711 to work. Hack to support MS import libraries, which use different
5712 COMDAT types than GNU.
5713 (coff_slurp_symbol_table): C_SECTION symbols are local; they refer
5714 to implied zero-length sections (see peicode below)
5715 * coffgen.c (coff_get_normalized_symtab): Properly read long MS
5716 filename symbols, which use one *or more* auxents.
5717 * coffswap.h (coff_swap_aux_in): ditto
5718 * peicode.h (coff_swap_sym_in): Build the implied zero-length
5719 sections
5720
5721 Tue May 11 15:51:58 1999 Jeffrey A Law (law@cygnus.com)
5722
5723 * elf32-v850.c (v850_elf_howto_table): Make partial_inplace false
5724 for all relocations.
5725
5726 1999-05-10 Catherine Moore <clm@cygnus.com>
5727
5728 * bfd-in.h (bfd_arm_allocate_interworking_sections): Static
5729 if COFF_IMAGE_WITH_PE.
5730 (bfd_arm_process_before_allocation): Likewise.
5731 (bfd_arm_get_bfd_for_interworking): Likewise.
5732 * coff-arm.c: Likewise.
5733 * bfd-in2.h: Regenerate.
5734 * configure.in (armpe_little_vec): Remove coff-arm.lo.
5735 (armpe_big_vec): Likewise.
5736 * configure: Rebuild.
5737
5738 1999-05-10 Nick Clifton <nickc@cygnus.com>
5739
5740 * elf.c (elf_fake_sections): Check for .rel. as start of rel
5741 section, not just .rel. Same for .rela.
5742
5743 1999-05-07 Nick Clifton <nickc@cygnus.com>
5744
5745 * coff-mcore.c (coff_mcore_relocate_section): Replace assert about
5746 endianism with an error message.
5747
5748 Thu May 6 17:09:09 1999 Fred Fish <fnf@be.com>
5749
5750 * dwarf2.c (read_abbrevs): Change cast of dwarf_abbrev_buffer
5751 assignment from "unsigned char *" to "char *".
5752 (decode_line_info): Likewise for dwarf_line_buffer assignment.
5753
5754 1999-05-05 Catherine Moore <clm@cygnus.com>
5755
5756 * coff-arm.c (coff_arm_relocate_section): Add one to
5757 address of ARM_RVA32 thumb functions.
5758
5759 1999-05-05 Catherine Moore <clm@cygnus.com>
5760
5761 * elf32-m68k.c (elf32_m68k_set_private_flags): New.
5762 (elf32_m68k_copy_private_bfd_data): New.
5763 (elf32_m68k_merge_private_bfd_data): New.
5764 (elf32_m68k_print_private_bfd_data): New.
5765 (CPU32_FLAG): Define.
5766 (PLT_CPU32_ENTRY_SIZE): Define.
5767 (elf_cpu32_plt0_entry): Declare.
5768 (elf_cpu32_plt_entry): Declare.
5769 (elf_m68k_adjust_dynamic_symbol): Generate cpu32 plt entries.
5770 (elf_m68k_finish_dynamic_symbol): Likewise.
5771 (elf_m68k_finish_dynamic_sections): Likewise.
5772 (elf_backend_plt_header_size): Remove definition.
5773 (bfd_elf32_bfd_copy_private_bfd_data): Define.
5774 (bfd_elf32_bfd_merge_private_bfd_data): Define.
5775 (bfd_elf32_bfd_set_private_flags): Define.
5776 (bfd_elf32_bfd_print_private_bfd_data): Define.
5777
5778 Mon May 3 09:24:49 1999 Jeffrey A Law (law@cygnus.com)
5779
5780 * som.c (som_fixup_formats): Fix comments for R_SHORT_PCREL_MODE
5781 and R_LONG_PCREL_MODE.
5782
5783 1999-04-29 Nick Clifton <nickc@cygnus.com>
5784
5785 * coff-mcore.c (coff_mcore_relocate_section): Fix typos.
5786
5787 Fri Apr 28 16:36:19 1999 Stan Cox <scox@cygnus.com>
5788
5789 * elf32-sh.c (sh_elf_relocate_section): Include relocation addend
5790 in relocation calculation.
5791
5792 1999-04-26 Tom Tromey <tromey@cygnus.com>
5793
5794 * aclocal.m4, configure: Updated for new version of libtool.
5795
5796 1999-04-21 Nick Clifton <nickc@cygnus.com>
5797
5798 * coff-mcore.c: Add support for mcore relocs.
5799
5800 1999-04-20 Gavin Romig-Koch <gavin@cygnus.com>
5801
5802 * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): Scrap the
5803 incorrect use EF_MIPS_xxBITPTRS.
5804
5805 1999-04-18 Ian Lance Taylor <ian@zembu.com>
5806
5807 * elf64-alpha.c (elf64_alpha_relax_section): Remove unused local
5808 variable insn.
5809
5810 * bfd-in2.h: Rebuild.
5811 * libbfd.h: Rebuild.
5812
5813 Sat Apr 17 20:55:15 1999 Catherine Moore <clm@cygnus.com>
5814
5815 * coff-arm.c (coff_arm_rtype_to_howto): Remove ARM26D transform.
5816 (coff_arm_relocate_section): Add ARM26D transform. Only
5817 change to ARM26D for relocateable links.
5818
5819 1999-04-16 Gavin Romig-Koch <gavin@cygnus.com>
5820
5821 * elf32-mips.c (_bfd_mips_elf_print_private_bfd_data): New.
5822 (bfd_elf32_bfd_print_private_bfd_data): New.
5823
5824 1999-04-15 Doug Evans <devans@casey.cygnus.com>
5825
5826 * elf32-arm.h (elf32_arm_final_link_relocate): For R_ARM_THM_ABS5,
5827 refetch addend if USE_REL, add many comments regarding current state.
5828 For R_ARM_THM_PC22, refetch addend if USE_REL, simplify.
5829 * elfarm-nabi.c (elf32_arm_howto_table): For R_ARM_THM_ABS5, fix
5830 size and rightshift. For R_ARM_THM_PC22, fix bitsize.
5831 * elfarm-oabi.c (elf32_arm_howto_table): Ditto.
5832
5833 Wed Apr 14 14:33:08 1999 Richard Henderson <rth@cygnus.com>
5834
5835 * elf32-mips.c (_bfd_mips_elf_read_ecoff_info): Zero `debug'.
5836 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Likewise.
5837
5838 1999-04-13 David Mosberger <davidm@hpl.hp.com>
5839
5840 * dwarf2.c (decode_line_info): Don't truncate address to least
5841 significant 32 bits (breaks 64 bit targets).
5842 (lookup_address_in_function_table): Ditto.
5843 (comp_unit_contains_address): Ditto.
5844
5845 Tue Apr 13 21:27:19 1999 Catherine Moore <clm@cygnus.com>
5846
5847 * coff-arm.c (arm_emit_base_file_entry): New routine.
5848 (A2T3_OFFSET): Define.
5849 (T2A3_OFFSET): Define.
5850 (coff_arm_relocate_section): Emit base file entries for interworking
5851 stubs.
5852
5853 1999-04-13 Philip Blundell <philb@gnu.org>
5854
5855 * elfarm-nabi.c (elf32_arm_howto_table): Add dummy entries for
5856 relocs 17 through 19.
5857
5858 Sun Apr 11 01:25:17 1999 Richard Henderson <rth@cygnus.com>
5859
5860 * elfcode.h: Remove fnmatch.h.
5861 * elflink.h (elf_link_assign_sym_version): Call back to ld
5862 instead of calling fnmatch.
5863
5864 * config.bfd (i?86-*-beoself): Include pe vecs.
5865
5866 Sun Apr 11 01:14:06 1999 Richard Henderson <rth@cygnus.com>
5867
5868 * elf32-i386.c (elf_i386_finish_dynamic_sections): Allow .plt
5869 to go missing.
5870
5871 1999-04-10 Richard Henderson <rth@cygnus.com>
5872
5873 * elf32-i386.c (elf_i386_relocate_section): Mind no_undefined
5874 when trying to resolve dynamic symbol references.
5875 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
5876 * elf32-mips.c (mips_elf_relocate_section): Likewise.
5877 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
5878 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5879 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
5880 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5881 * elflink.h (elf_link_output_extsym): Likewise.
5882
5883 Sat Apr 10 15:12:09 1999 Richard Henderson <rth@cygnus.com>
5884
5885 * section.c (_bfd_strip_section_from_output): New function moved from
5886 * elf64-alpha.c (elf64_alpha_strip_section_from_output): ... here.
5887 * elf32-i386.c (elf_i386_size_dynamic_sections): Use it.
5888 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
5889 * elf32-mips.c (mips_elf_size_dynamic_sections): Likewise.
5890 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
5891 * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
5892 * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
5893 * bfd-in2.h: Update.
5894
5895 1999-04-09 Ian Lance Taylor <ian@zembu.com>
5896
5897 * elf64-sparc.c: Fix incorrect calls to bfd_check_overflow.
5898
5899 1999-04-08 Nick Clifton <nickc@cygnus.com>
5900
5901 * coff-mcore.c: New File: Support for mcore-pe targets.
5902 * cpu-mcore.c: New File: Support for mcore targets.
5903 * elf32-mcore.c: New File: Support for mcore-elf target.
5904 * pe-mcore.c: New File: Definitions for mcore-pe target.
5905 * pei-mcore.c: New File: Definitions for mcore-pei target.
5906 * Makefile.am: Add support for MCore targets.
5907 * Makefile.in: Regenerate.
5908 * config.bfd: Add support for MCore targets.
5909 * configure.in: Add support for MCore targets.
5910 * configure: Regenerate.
5911 * archures.c: Add support for MCore architecture.
5912 * bfd-in2.h: Regenerate.
5913 * coffcode.h: Add support for mcore-pe targets.
5914 * elf.c: Add support for mcore-elf target.
5915 * reloc.c: Add support for MCore relocs.
5916 * targets.c: Add support for MCore targets.
5917
5918 1999-04-07 Nick Clifton <nickc@cygnus.com>
5919
5920 * elfarm-nabi.c (elf32_arm_howto_table): Add entries for
5921 R_ARM_XPC25 and R_ARM_THM_XPC22.
5922 (elf32_arm_reloc_map): Remove redundant entries.
5923
5924 1999-04-06 Ian Lance Taylor <ian@zembu.com>
5925
5926 * sysdep.h (LC_MESSAGES): Never define.
5927
5928 1999-04-06 Chris Torek <torek@bsdi.com>
5929
5930 * reloc.c (bfd_check_overflow): Add addrsize parameter. Change
5931 all callers. Rewrite completely.
5932 (_bfd_relocate_contents): Rewrite overflow checking.
5933 * bfd-in2.h: Rebuild.
5934
5935 1999-04-05 Ian Lance Taylor <ian@zembu.com>
5936
5937 From Gabriel Paubert <paubert@iram.es>:
5938 * elf32-ppc.c (ppc_elf_howto_raw): Set R_PPC_GOT16_LO,
5939 R_PPC_PLT16_LO and R_PPC_SECTOFF_LO to be complain_overflow_dont.
5940 Set R_PPC_PLT16_HA, R_PPC_SECTOFF_HA and R_PPC_EMB_NADDR16_HA to
5941 have a rightshift of 16 and use ppc_elf_addr16_ha_reloc.
5942 * ppcboot.c (ppcboot_vec): Use little endian routines for
5943 headers.
5944
5945 * elf.c (elfcore_strndup): Only define if it will be used.
5946 * elf32-ppc.c (ppc_elf_relax_section): Remove unused locals irel
5947 and irelend.
5948 (ppc_elf_check_relocs): Remove unused local i.
5949 (ppc_elf_gc_mark_hook): Add default case to switch.
5950
5951 From Bernd Nitzler <nitzler@kagcpd01.ag01.kodak.COM>:
5952 * srec.c (srec_scan): Accept \r in symbol definitions.
5953 (srec_object_p): Set HAS_SYMS if we saw any symbols.
5954 (symbolsrec_object_p): Likewise.
5955
5956 1999-04-04 Don Bowman <don@pixsci.com>
5957
5958 * config.bfd: Add mips*el-*-vxworks* and mips*-*-vxworks*.
5959
5960 1999-04-04 Ian Lance Taylor <ian@zembu.com>
5961
5962 * dwarf1.c (parse_line_table): Remove unused locals last_pc and
5963 last_line.
5964 * elf-bfd.h (_bfd_elfcore_section_from_phdr): Declare.
5965 * elf32-i386.c (elf_i386_gc_mark_hook): Add default case to
5966 switch.
5967 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Remove unused
5968 local i.
5969 * syms.c (_bfd_stab_section_find_nearest_line): Remove unused
5970 local val.
5971
5972 1999-03-31 Nick Clifton <nickc@cygnus.com>
5973
5974 * config.bfd: Add support for arm-epoc-pe target.
5975 * configure.in: Add support for arm-epoc-pe target.
5976 * configure: Regenerate.
5977 * targets.c: Add support for arm-epoc-pe target.
5978 * coff-arm.c: Allow header files to override definition of
5979 TARGET_UNDERSCORE and USER_LABEL_PREFIX.
5980 * pe-arm.h: Allow previous header files to override definition of
5981 TARGET_LITTLE_SYM and TARGET_BIG_SYM.
5982 * pei-arm.h: Allow previous header files to override definition of
5983 TARGET_LITTLE_SYM and TARGET_BIG_SYM.
5984 * epoc-pe-arm.c: New file. Support arm-epoc-pe target.
5985 * epoc-pei-arm.c: New file. Support arm-epoc-pei target.
5986
5987 1999-03-30 Nick Clifton <nickc@cygnus.com>
5988
5989 * elf.c (elf_map_symbols): Handle the case where section
5990 symbols are generated for content-less sections which are
5991 not mapped to the output file.
5992
5993 * linker.c: Replace direct references to fields in BFD structure
5994 with accessor macros.
5995
5996 * elflink.h: Replace direct references to fields in BFD structure
5997 with accessor macros.
5998
5999 1999-03-25 Philip Blundell <pb@nexus.co.uk>
6000
6001 * config.bfd: Eliminate redundancy in checks for Linux/ARM.
6002
6003 * elf32-arm.h (elf32_arm_relocate_section): Take the rightshift into
6004 account when adjusting section symbols during a partial link.
6005
6006 1999-03-24 Nick Clifton <nickc@cygnus.com>
6007
6008 * coff-sparc.c (struct coff_reloc_map): Change type of field
6009 'bfd_reloc_val' to bfd_reloc_code_real_type.
6010 * elf-m10200.c (struct mn10200_reloc_map): Ditto.
6011 * elf-m10300.c (struct mn10300_reloc_map): Ditto.
6012 * elf32-arc.c (struct arc_reloc_map): Ditto.
6013 * elf32-d10v.c (struct d10v_reloc_map): Ditto.
6014 * elf32-d30v.c (struct d30v_reloc_map): Ditto.
6015 * elf32-fr30.c (struct fr30_reloc_map): Ditto.
6016 * elf32-m32r.c (struct m32r_reloc_map): Ditto.
6017 * elf32-sh.c (struct elf_reloc_map): Ditto.
6018 * elf32-sparc.c (struct elf_reloc_map): Ditto.
6019 * elf32-v850.c (struct v850_reloc_map): Ditto.
6020 * elf64-sparc.c (struct elf_reloc_map): Ditto.
6021 * elfarm-nabi.c (struct elf32_arm_reloc_map): Ditto.
6022 * elfarm-oabi.c (struct elf32_arm_reloc_map): Ditto.
6023
6024 1999-03-17 Martin Hunt <hunt@cygnus.com>
6025
6026 * syms.c (_bfd_stab_section_find_nearest_line): Changed this
6027 function so source-level assembly works. If multiple N_SOs
6028 are seen without and N_FUNs, create an indextable entry with
6029 a NULL function name.
6030
6031 1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
6032
6033 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data) Allow merging
6034 of certian similar cpus.
6035
6036 1999-03-16 Gavin Romig-Koch <gavin@cygnus.com>
6037
6038 * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6039 Add the 5000. Change the architecture for the 5400 to mips4.
6040 (elf_mips_mach): Add r5000.
6041
6042 1999-03-11 Doug Evans <devans@casey.cygnus.com>
6043
6044 * cpu-i960.c (scan_i960_mach): Recognize i960:ka_sa and i960:kb_sb.
6045
6046 1999-03-11 Nick Clifton <nickc@cygnus.com>
6047
6048 * binary.c (binary_set_section_contents): Generate warning about
6049 huge file offsets for any section that will occupy file space, not
6050 just those that are loadable.
6051
6052 1999-02-24 Jim Blandy <jimb@zwingli.cygnus.com>
6053
6054 * libbfd.h: Regenerate after Nick Clifton's Feb 17 changes.
6055
6056 1999-02-22 Jim Lemke <jlemke@cygnus.com>
6057
6058 * elf32-ppc.c: Add ppc_elf_relax_section() for the ld option mpc860c0.
6059
6060 Mon Feb 22 18:26:51 1999 Ian Lance Taylor <ian@cygnus.com>
6061
6062 * elf-bfd.h (ELF_LINK_HASH_REF_REGULAR_NONWEAK): Define.
6063 * elflink.h: Revert all changes since Feb 16. Instead:
6064 (elf_link_add_object_symbols): Set REF_REGULAR_NONWEAK flag if
6065 appropriate. Copy it to version symbols.
6066 (elf_fix_symbol_flags): Set REF_REGULAR_NONWEAK for non ELF
6067 symbols if appropriate.
6068 (elf_adjust_dynamic_symbol): Set REF_REGULAR_NONWEAK for weakdef
6069 symbol if appropriate.
6070 (elf_link_output_extsym): If symbol is marked as undefined, and
6071 has no nonweak references, mark it as weak undefined.
6072
6073 Fri Feb 19 16:01:12 1999 Ian Lance Taylor <ian@cygnus.com>
6074
6075 * elflink.h (elf_merge_symbol): When overriding a dynamic
6076 definition with a weak undefined symbol, set NEEDS_PLT if it is a
6077 function.
6078 (elf_link_add_object_symbols): Don't copy the other field if we
6079 are overridding.
6080
6081 Thu Feb 18 18:07:43 1999 Ian Lance Taylor <ian@cygnus.com>
6082
6083 * elflink.h (elf_merge_symbol): Do not merge any symbol from a
6084 shared object with a weak undefined symbol.
6085
6086 1999-02-18 Nick Clifton <nickc@cygnus.com>
6087
6088 * elfarm-nabi.c: Set partial_inplace back to false.
6089
6090 1999-02-17 Nick Clifton <nickc@cygnus.com>
6091
6092 * coff-arm.c (TARGET_UNDERSCORE): Re-enable.
6093 (USER_LABEL_PREFIX): Set to "_".
6094
6095 The following patches are from: Scott Bambrough
6096 <scottb@corelcomputer.com>
6097
6098 * libaout.h (M_ARM6_NETBSD): Set to 143.
6099
6100 * reloc.c: Add ARM PIC relocs: BFD_RELOC_ARM_GOT12,
6101 BFD_RELOC_ARM_GOT32, BFD_RELOC_ARM_JUMP_SLOT, BFD_RELOC_ARM_COPY,
6102 BFD_RELOC_ARM_GLOB_DAT, BFD_RELOC_ARM_PLT32,
6103 BFD_RELOC_ARM_RELATIVE, BFD_RELOC_ARM_GOTOFF, BFD_RELOC_ARM_GOTPC.
6104 * bfd-in2.h: Regenerate.
6105
6106 * elfarm-nabi.c (elf32_arm_howto_table): Set partial_inplace to
6107 'true' as REL relocs are now being used. Add new PIC relocs:
6108 R_ARM_COPY, R_ARM_GLOB_DAT, R_ARM_JUMP_SLOT, R_ARM_RELATIVE,
6109 R_ARM_GOTOFF, R_ARM_GOTPC, R_ARM_GOT32, R_ARM_PLT32.
6110
6111 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Check byte order
6112 of targets.
6113 (elf32_arm_final_link_relocate): Change parameters so that entire
6114 reloc is passed. Add support for PIC relocs.
6115 (elf32_arm_relocate_section): Pass entire reloc to
6116 elf32_arm_final_link_relocate.
6117 (elf32_arm_check_relocs): Handle new PIC relocs.
6118 (elf32_arm_adjust_dynamic_symbol): New function.
6119 (elf32_arm_size_dynamic_sections): New function.
6120 (elf32_arm_discard_copies): New function.
6121 (elf32_arm_finish_dynamic_symbol): New function.
6122 (elf32_arm_finish_dynamic_sections): New function.
6123 (ELF_MAXPAGE_SIZE): Define.
6124 (bfd_elf32_bfd_reloc_type_lookup): Define.
6125 (elf_backend_relocate_section): Define.
6126 (elf_backend_adjust_dynamic_symbol): Define.
6127 (elf_backend_create_dynamic_sections): Define.
6128 (elf_backend_finish_dynamic_symbol): Define.
6129 (elf_backend_finish_dynamic_sections): Define.
6130 (elf_backend_size_dynamic_sections): Define.
6131 (elf_backend_plt_readonly): Define.
6132 (elf_backend_want_got_plt): Define.
6133 (elf_backend_want_plt_sym): Define.
6134
6135 Wed Feb 17 12:02:26 1999 Stan Cox <scox@cygnus.com>
6136
6137 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Make reginfo
6138 sections SEC_LINK_ONCE and SEC_LINK_DUPLICATES_SAME_SIZE.
6139 (_bfd_mips_elf_fake_sections): Likewise.
6140
6141 Wed Feb 17 12:07:23 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6142
6143 * elfarm-oabi.c (bfd_elf32_arm_allocate_interworking_sections,
6144 bfd_elf32_arm_get_bfd_for_interworking,
6145 bfd_elf32_arm_process_before_allocation): Define to avoid clash
6146 with elfarm-nabi.c.
6147
6148 * elf32-arm.h: Don't declare elf32_arm_info_to_howto.
6149 (elf32_thumb_to_arm_stub, elf32_arm_to_thumb_stub,
6150 elf32_arm_find_nearest_line): Make them static.
6151
6152 Tue Feb 16 22:44:37 1999 Ian Lance Taylor <ian@cygnus.com>
6153
6154 * elflink.h (elf_merge_symbol): Add pflags parameter. Change all
6155 callers. Do not merge a definition from a shared object with a
6156 weak undefined symbol.
6157 (elf_link_add_object_symbols): Do not change the symbol type or
6158 size if the old symbol overrides the new one.
6159
6160 1999-02-08 Nick Clifton <nickc@cygnus.com>
6161
6162 * config.bfd: Add support for strongarm target.
6163
6164 Mon Feb 8 11:18:14 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6165
6166 * elf32-m68k.c (reloc_map): Use the correct types for the struct
6167 fields instead of unsigned char.
6168
6169 Fri Feb 5 00:22:36 1999 Ian Lance Taylor <ian@cygnus.com>
6170
6171 * Makefile.am: Rebuild dependencies.
6172 * Makefile.in: Rebuild.
6173
6174 Thu Feb 4 22:30:13 1999 Ian Lance Taylor <ian@cygnus.com>
6175
6176 * configure.in: Change AC_PREREQ to 2.13. Remove AM_CYGWIN32.
6177 Change AM_EXEEXT to AC_EXEEXT and AM_PROG_INSTALL to
6178 AC_PROG_INSTALL. Add comments to uses of AC_DEFINE.
6179 * acinclude.m4: Add comments to uses of AC_DEFINE.
6180 * acconfig.h: Remove.
6181 * configure: Rebuild with current autoconf/automake.
6182 * aclocal.m4: Likewise.
6183 * config.in: Likewise.
6184 * Makefile.in: Likewise.
6185
6186 1999-02-04 DJ Delorie <dj@cygnus.com>
6187
6188 * libbfd.c (real_read): don't call fread for zero bytes. This
6189 covers up a bug (or misuse of bfd) that's exposed by Solaris.
6190
6191 Thu Feb 4 12:38:10 1999 Stan Cox <scox@cygnus.com>
6192
6193 * elf32-mips.c (mips_elf_relocate_section): Insure that the target
6194 of a jump is in the current 256 MB region.
6195
6196 Thu Feb 4 12:15:38 1999 Ian Lance Taylor <ian@cygnus.com>
6197
6198 * format.c (bfd_check_format_matches): Change last patch to only
6199 take effect for the binary target.
6200
6201 Wed Feb 3 19:40:12 1999 Ian Lance Taylor <ian@cygnus.com>
6202
6203 * elf32-i386.c (elf_i386_reloc_type_lookup): Add BFD_RELOC_CTOR.
6204
6205 Wed Feb 3 15:02:44 1999 Catherine Moore <clm@cygnus.com>
6206
6207 * elf32-fr30.c (fr30_elf_check_relocs): New routine.
6208
6209 Tue Feb 2 21:38:28 1999 Ian Lance Taylor <ian@cygnus.com>
6210
6211 * format.c (bfd_check_format_matches): If the target was
6212 previously specified, don't check other targets when checking for
6213 an archive file.
6214
6215 Tue Feb 2 18:16:43 1999 Catherine Moore <clm@cygnus.com>
6216
6217 * elf32-arm.h (elf32_arm_reloc_map): Removed.
6218 (elf32_arm_reloc_type_lookup): Removed
6219 * elfarm-nabi.c (elf32_arm_reloc_map): New.
6220 (elf32_arm_reloc_type_lookup): New.
6221 * elfarm-oabi.c (elf32_arm_reloc_map): New.
6222 (elf32_arm_reloc_type_lookup): New.
6223
6224 Mon Feb 1 19:49:21 1999 Catherine Moore <clm@cygnus.com>
6225
6226 * elfarm-nabi.c: Renamed from elf32-arm-newabi.c.
6227 * elfarm-oabi.c: Renamed from elf32-arm-oldabi.c
6228 * Makefile.am: Use new files.
6229 * Makefile.in: Regenerate.
6230 * configure.in: Use new files.
6231 * configure: Regenerate.
6232
6233 1999-02-01 Nick Clifton <nickc@cygnus.com>
6234
6235 * elf32-fr30.c (fr30_elf_gc_mark_hook): New function.
6236 (fr30_elf_gc_sweep_hook): New function.
6237 (elf_backend_can_gc_sections): Define.
6238
6239 Mon Feb 1 12:21:47 1999 Catherine Moore <clm@cygnus.com>
6240
6241 * targets.c (bfd_target_vector): Add bfd_elf32_littlearm_oabi_vec
6242 and bfd_elf32_bigarm_oabi_vec.
6243
6244 Mon Feb 1 11:46:31 1999 Catherine Moore <clm@cygnus.com>
6245
6246 * Makefile.am (elf32-arm-oldabi.lo): New.
6247 (elf32-arm-newabi.lo): New.
6248 * Makefile.in: Regenerate.
6249 * config.bfd (thumb-*-elf): Remove definition of targ_underscore.
6250 (arm-*-elf): Likewise.
6251 (arm-*-oabi): New.
6252 (thumb-*-oabi): New.
6253 * configure: Regenerate.
6254 * configure.in (bfd_elf32_littlearm_oabi_vec): New.
6255 (bfd_elf32_bigarm_oabi_vec): New.
6256 * elf32-arm-newabi.c: New.
6257 * elf32-arm-oldabi.c: New.
6258 * elf32-arm.c: Removed.
6259 * elf32-arm.h: New.
6260
6261 Mon Feb 1 11:52:12 1999 Frank Ch. Eigler <fche@cygnus.com>
6262
6263 * binary.c (binary_set_section_contents): Omit warnings for
6264 unloadable sections.
6265
6266 1999-01-31 Michael Meissner <meissner@cygnus.com>
6267
6268 * config.bfd (powerpc{,le}-*-vxworks*): Add aliases to
6269 powerpc{,le}-*-eabi.
6270
6271 1999-01-29 Nick Clifton <nickc@cygnus.com>
6272
6273 * dwarf2.c (read_unsigned_leb128): Remove unused variables.
6274 * dwarf2.c (read_signed_leb128): Remove unused variables.
6275
6276 Fri Jan 29 00:47:21 1999 H.J. Lu <hjl@gnu.org>
6277
6278 * elf.c (assign_file_positions_for_segments): Only adjust
6279 p_align when needed.
6280
6281 Thu Jan 28 20:05:22 1999 Ian Lance Taylor <ian@cygnus.com>
6282
6283 * binary.c (binary_set_section_contents): Don't return early for a
6284 non-loadable section, in case the first section is non-loadable.
6285 Don't set the low lma for a SEC_NEVER_LOAD section. From Maciej
6286 W. Rozycki <macro@ds2.pg.gda.pl>.
6287
6288 1999-01-28 Nick Clifton <nickc@cygnus.com>
6289
6290 * elf32-fr30.c (fr30_reloc_map): Add R_FR30_GNU_VTINHERIT and
6291 R_FR30_GNU_VTENTRY relocs.
6292
6293 Thu Jan 28 11:08:16 1999 Catherine Moore <clm@cygnus.com>
6294
6295 * elflink.h (elf_link_output_sym): Zero syms which are
6296 part of sections which have been excluded.
6297
6298 Wed Jan 27 13:35:35 1999 Stan Cox <scox@cygnus.com>
6299
6300 * coff-arm.c (_bfd_coff_arm_set_private_flags): Changed F_PIC
6301 to F_PIC_INT.
6302 * coffcode.h (coff_set_arch_mach_hook): Removed F_ARM_2a and
6303 F_ARM_3M labels. Changed F_PIC to F_PIC_INT.
6304
6305 1999-01-27 Nick Clifton <nickc@cygnus.com>
6306
6307 * elf32-fr30.c (fr30_elf_howto_table): Fix name of R_FR30_48
6308 relocation.
6309 (fr30_final_link_relocate): Use computed value as result of
6310 relocation.
6311
6312 1999-01-26 Frank Ch. Eigler <fche@cygnus.com>
6313
6314 * binary.c (binary_set_section_contents): Emit warning for
6315 huge file offsets due to widely-dispersed section LMAs.
6316
6317 Mon Jan 18 03:35:35 1999 Ian Lance Taylor <ian@cygnus.com>
6318
6319 * elf.c (assign_file_positions_for_segments): If not D_PAGED,
6320 align first section to largest section alignment, not first
6321 section alignment.
6322
6323 1999-01-04 Jason Molenda (jsm@bugshack.cygnus.com)
6324
6325 * configure.in: Require autoconf 2.12.1 or higher.
6326
6327 Tue Dec 22 15:21:41 1998 Catherine Moore <clm@cygnus.com>
6328
6329 * archures.c (bfd_mach_i386_i386_intel_syntax): Define.
6330 * bfd-in2.h: Likewise.
6331 * cpu-i386.c (bfd_i386_arch_intel_syntax): New.
6332
6333 1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
6334
6335 * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
6336 * cpu-mips.c: Add support for and independent 4111.
6337 * elf32-mips.c (elf_mips_mach): E_MIPS_MACH_4111 -> bfd_mach_mips4111.
6338 (_bfd_mips_elf_final_write_processing):
6339 bfd_mach_mips4111 -> E_MIPS_ARCH_3 | E_MIPS_MACH_4111.
6340
6341 1998-12-15 Gavin Romig-Koch <gavin@cygnus.com>
6342
6343 * elf32-mips.c (elf_mips_abi_name): New.
6344 (_bfd_mips_elf_merge_private_bfd_data): Compare EF_MIPS_ABI flags.
6345
6346 1998-12-12 Gavin Romig-Koch <gavin@cygnus.com>
6347
6348 * elf32-mips.c (_bfd_mips_elf_final_write_processing):
6349 Handle bfd_mach_mips4300.
6350
6351 1998-12-11 Ulrich Drepper <drepper@cygnus.com>
6352
6353 * elf32-i386.c: Remove leaked development code from patch
6354 1998-12-10 by Richard Henderson.
6355
6356 1998-12-10 Richard Henderson <rth@cygnus.com>
6357
6358 * elf32-i386.c (elf_i386_relocate_section): Don't fail relocations
6359 in debug sections for symbol defined externally.
6360
6361 Thu Dec 10 10:58:38 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
6362
6363 * targets.c (bfd_target_vector): Remove duplicate entry for
6364 tekhex_vec.
6365
6366 1998-12-09 Nick Clifton <nickc@cygnus.com>
6367
6368 * elf32-fr30.c (fr30_elf_howto_table): Set src_mask fields to 0
6369 since we are using RELAs.
6370
6371 Tue Dec 8 22:15:48 1998 Ian Lance Taylor <ian@cygnus.com>
6372
6373 SCO Open Server Release 5 core file support, from Jouke Numan
6374 <jnuman@hiscom.nl>:
6375 * sco5-core.c: New file.
6376 * configure.in (i[3456]86-*-sco3.2v5*): Use sco5-core.lo.
6377 (sco5-core.lo): Define SCO5_CORE in COREFLAG.
6378 * Makefile.am: Rebuild dependencies.
6379 (OPTIONAL_BACKENDS): Add sco5-core.lo.
6380 (OPTIONAL_BACKENDS_CFILES): Add sco5-core.c.
6381 * bfd.c (struct _bfd): Add sco5_core_data field to tdata.
6382 * targets.c (sco5_core_vec): Add to target list if SCO5_CORE.
6383 * bfd-in2.h, configure, Makefile.in: Rebuild.
6384
6385 Tue Dec 8 19:38:42 1998 Mark Klein <mklein@dis.com>
6386
6387 * config.bfd (hppa*-*-mpeix*): New target.
6388 * configure.in: Add AC_HEADER_DIRENT.
6389 (hppa*-*-mpeix*): New target.
6390 * configure.host (hppa*-*-mpeix*): New host.
6391 * hpux-core.c: Check HOST_HPPAMPEIX. Use HAVE_DIRENT_H and
6392 friends rather than just including <sys/dir.h>.
6393 * som.h (struct som_symbol): Add hppa_priv_level and apto
6394 tc_data. Change all users.
6395 (struct somdata): Add comp_unit field.
6396 (obj_som_compilation_unit): Define.
6397 (bfd_som_attach_compilation_unix): Declare.
6398 * som.c: Check HOST_HPPAMPEIX.
6399 (struct som_misc_symbol_info): Add new field priv_level.
6400 (som_object_setup): Add current_offset parameter. Change all
6401 callers.
6402 (setup_sections): Likewise.
6403 (som_object_p): For EXECLIBMAGIC, read the lst header.
6404 (som_write_symbol_strings): Add compilation_unit parameter.
6405 Change all callers.
6406 (som_finish_writing): Write out compilation_unit.
6407 (som_bfd_derive_misc_symbol_info): Set priv_level.
6408 (som_build_and_write_symbol_table): Set xleast field to 3.
6409 (som_slurp_symbol_table): Set symbol priv_level.
6410 (bfd_som_attach_compilation_unit): New function.
6411 (som_bfd_ar_write_symbol_stuff): Set xleast field to 3. Set
6412 priv_level into symbol_value.
6413 * configure, config.in: Rebuild.
6414
6415 Tue Dec 8 16:21:35 1998 Ian Lance Taylor <ian@cygnus.com>
6416
6417 * hpux-core.c (hpux_core_core_file_p): Change call to nonexistent
6418 warning function to call _bfd_error_handler instead.
6419
6420 * libbfd.c (COERCE32): Cast through unsigned long and long to
6421 avoid bug in old version of gcc.
6422
6423 * elf64-alpha.c (elf64_alpha_additional_program_headers): Remove.
6424 (elf_backend_additional_program_headers): Don't define.
6425
6426 1998-12-08 Nick Clifton <nickc@cygnus.com>
6427
6428 * elf32-fr30.c (fr30_final_link_relocate): Fix PC relative
6429 relocations to include offset of 2 included in the insns, and the
6430 offset of the relocs within the section.
6431
6432 Wed Dec 2 15:03:59 1998 David Taylor <taylor@texas.cygnus.com>
6433
6434 The following changes were made by David Taylor
6435 <taylor@texas.cygnus.com>, Edith Epstein
6436 <eepstein@sophia.cygnus.com>, Jim Blandy
6437 <jimb@zwingli.cygnus.com>, and Elena Zannoni
6438 <ezannoni@kwikemart.cygnus.com> as part of the project to merge in
6439 changes originally made by HP; HP did not create ChangeLog
6440 entries.
6441
6442 * aclocal.m4, configure, Makefile.in: Rebuilt using latest
6443 automake macro library.
6444
6445 * hpux-core.c (hpux_core_core_file_p): this function now
6446 understands HPUX 10.30 thread info. Yes, the thread stacks can be
6447 found in the corefile! Also, in hpux_core_core_file_p, if we
6448 encounter a section with an unknown type, don't punt. Instead,
6449 just skip it. Also, count the number of sections of known type
6450 that we encounter. If we encounter at least one good one, then
6451 we'll declare that the file is a core file. If we encounter any
6452 unknown ones but some known ones, then we'll issue a warning (but
6453 still declare it to be a core file). Also, correctly decide when a
6454 file is not a core.
6455 (PROC_INFO_HAS_THREAD_ID): define if CORE_ANON_SHMEM defined.
6456 (CORE_ANON_SHMEM): define if not defined.
6457 (hpux_core_struct): add members lwpid and user_tid.
6458 (core_kernel_thread_id, core_user_thread_id): new macros.
6459 (make_bfd_asection): use bfd_alloc to allocate room for a copy of
6460 the name before storing it in the bfd.
6461 (hpux_core_core_file_p): handle threads.
6462
6463 * libhppa.h (GET_FIELD): protect against redefinition.
6464 (HPPA_WIDE): define.
6465 (GET_FIELD): define.
6466 (GET_BIT): define.
6467 (MASK): define.
6468 (CATENATE): define.
6469 (ELEVEN): define.
6470 (sign_extend): redefine.
6471 (assemble_6): define.
6472 (assemble_12): rewrite.
6473 (assemble_16): define.
6474 (assemble_16a): define.
6475 (assemble_17): rewrite.
6476 (assemble_22): define.
6477
6478 1998-12-07 Nick Clifton <nickc@cygnus.com>
6479
6480 * elf32-fr30.c (fr30_final_link_relocate): Using signed
6481 relocations for signed values.
6482
6483 Sun Dec 6 16:30:33 1998 Ian Lance Taylor <ian@cygnus.com>
6484
6485 * mipsbsd.c (MY(set_arch_mach)): Make static.
6486 * aoutx.h (NAME(aout,machine_type)): For bfd_arch_mips, use
6487 bfd_mach_mips* macros rather than simple numbers.
6488
6489 COFF weak symbol support, based on patches from Mark Elbrecht
6490 <snowball3@usa.net>:
6491 * coffcode.h (coff_slurp_symbol_table): Handle C_WEAKEXT.
6492 * coffgen.c (coff_renumber_symbols): Handle weak symbols.
6493 (coff_write_alien_symbol): Likewise.
6494 * cofflink.c (coff_link_check_ar_symbols): Likewise.
6495 (coff_link_add_symbols): Likewise.
6496 (_bfd_coff_link_input_bfd): Likewise.
6497 (_bfd_coff_write_global_sym): Likewise.
6498
6499 * elf.c (copy_private_bfd_data): Always initialize the
6500 includes_phdrs field.
6501
6502 * elflink.h (elf_fix_symbol_flags): Check for case where a non-ELF
6503 file defines a symbol first mentioned in an ELF file.
6504
6505 * bfd-in.h: Always define BFD_HOST_64_BIT and BFD_HOST_U_64_BIT if
6506 possible, rather than only if BFD64.
6507 * elflink.h (compute_bucket_count): Just check BFD_HOST_U_64_BIT,
6508 not __GNUC__.
6509 * bfd-in2.h: Rebuild.
6510
6511 * srec.c (srec_set_section_contents): Correct test to avoid
6512 switching to 4 byte addresses after seeing a second section which
6513 requires 3 byte addresses. From Joel Schantz
6514 <joel.schantz@argosys.boeing.com>.
6515
6516 * config.bfd (m68*-*-gnu*): New target. From Aymeric Vincent
6517 <aymeric.vincent@emi.u-bordeaux.fr>.
6518
6519 1998-12-04 Jim Blandy <jimb@zwingli.cygnus.com>
6520
6521 * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Fix logic to
6522 decide whether the output file is -mrelocatable-lib,
6523 -mrelocatable, or neither. (gdb.base/nodebug.exp)
6524
6525 1998-12-03 Nick Clifton <nickc@cygnus.com>
6526
6527 * elf32-fr30.c: Add support for R_FR30_48 reloc.
6528 * reloc.c: Add BFD_RELOC_FR30_48 relocation.
6529 * bfd-in2.h: Regenerate.
6530 * libbfd.h: Regenerate
6531
6532 Wed Dec 2 00:58:37 1998 Ian Lance Taylor <ian@cygnus.com>
6533
6534 * elflink.h (elf_adjust_dynamic_symbol): Warn on an attempt to
6535 link against a dynamic symbol with no type or size.
6536
6537 1998-12-01 Ulrich Drepper <drepper@cygnus.com>
6538
6539 * elf32-i386.c (i386_check_relocs) [R_386_32]: Don't emit
6540 relocation for section which does not get loaded.
6541 (elf_i386_relocate_section) [R_386_32]: Likewise.
6542
6543 Tue Dec 1 11:33:33 1998 Jim Wilson <wilson@cygnus.com>
6544
6545 * coff-h8300.c (h8300_bfd_link_add_symbols): Make reloc_size,
6546 reloc_count and i long instead of unsigned long. Handle error
6547 return from bfd_canonicalize_reloc.
6548
6549 1998-12-01 Nick Clifton <nickc@cygnus.com>
6550
6551 * elf32-v850.c (v850_elf_relocate_section): Detect the absence of
6552 a hash table.
6553
6554 Mon Nov 30 15:28:09 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
6555
6556 * elf32-sh.c (elf/sh.h): Include.
6557 sh_reloc_type: Delete. Changed all references to elf_sh_reloc_type.
6558 (sh_elf_howto_tab): Add HOWTO for R_SH_SWITCH8.
6559 (sh_reloc_map): Map BFD_RELOC_8_PCREL to R_SH_SWITCH8.
6560 (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
6561 * Makefile.in: Add dependency of elf32-sh.lo on $(INCDIR)/elf/sh.h.
6562
6563 Fri Nov 27 17:51:38 1998 Geoff Keating <geoffk@ozemail.com.au>
6564
6565 * elflink.h (compute_bucket_count): Don't allow minsize==0, it
6566 causes division by zero later on.
6567
6568 Thu Nov 26 11:19:35 1998 Dave Brolley <brolley@cygnus.com>
6569
6570 * elf32-fr30.c (fr30_elf_pc9_reloc,fr30_elf_pc12_reloc): Not
6571 needed.
6572
6573 1998-11-25 DJ Delorie <dj@cygnus.com>
6574
6575 * coff-i386.c (i3coff_object_p): Remove hack. Use new emulation
6576 hook now.
6577
6578 Tue Nov 24 10:25:27 1998 Nick Clifton <nickc@cygnus.com>
6579
6580 * elf32-fr30.c (fr30_elf_relocate_section): Call
6581 fr30_final_link_relocate.
6582 (fr30_final_link_relocate): New function: Handle I20 and I32
6583 relocs.
6584 (fr30_elf_i32_reloc): New function: Handle I32 relocs.
6585 (fr30_elf_pc9_reloc): New function: Handle 9_PCREL relocs.
6586 (fr30_elf_pc12_reloc): New function: Handle 12_PCREL relocs.
6587
6588 * elf32-v850.c (v850_elf_relocate_section): Reset hi16s reloc
6589 chain to empty.
6590
6591 The following changes are based on a patch submitted by Gianluca
6592 Moro <glctr@abc.it>:
6593
6594 (v850_elf_perform_relocation): Only update a hi16s reloc if it has
6595 not already been updated.
6596 (find_remembered_hi16s_reloc): New parameter 'already_found'
6597 returns state of remembered hi16s reloc.
6598 (remember_hi16s_reloc): Set 'found' field to false.
6599 (hi16s_location): Add 'found' field.
6600
6601 1998-11-23 DJ Delorie <dj@cygnus.com>
6602
6603 * coff-i386.c (bfd_pe_dll_not_recognized_hack): the linker wants
6604 to see .DLL files as unrecognized.
6605 (i3coff_object_p): Sorry, had to hack it to not recognize these
6606 files (pei-i386) on request.
6607
6608 1998-11-23 DJ Delorie <dj@cygnus.com>
6609
6610 * opncls.c (bfd_make_readable): need more cleanup for symbols and
6611 relents. Call bfd_check_format to reinitialize.
6612
6613 Fri Nov 20 14:21:36 1998 Nick Clifton <nickc@cygnus.com>
6614
6615 * elf32-fr30.c (fr30_elf_relocate_section): Remove spurious
6616 warnings.
6617
6618 Thu Nov 19 14:42:15 1998 Geoffrey Noer <noer@cygnus.com>
6619
6620 * aclocal.m4: regenerate
6621 * configure: regenerate
6622
6623 Tue Nov 17 20:23:35 1998 Richard Henderson <rth@cygnus.com>
6624
6625 * elf-bfd.h (struct elf_link_hash_entry): Add vtable_entries_size.
6626 * elf.c (_bfd_elf_link_hash_newfunc): Clear it.
6627 * elflink.h (elf_gc_propagate_vtable_entries_used): Copy it, and
6628 respect it as an upper bound on what memory to reference.
6629 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6630 (elf_gc_record_vtentry): Handle as-yet undefined vtables. Set and
6631 update vtable_entries_size appropriately.
6632
6633 Tue Nov 17 15:28:31 1998 Nick Clifton <nickc@cygnus.com>
6634
6635 * elf32-fr30.c (fr30_reloc_type_lookup): Used integers to hold
6636 reloc number.
6637
6638 Mon Nov 16 22:19:21 1998 DJ Delorie <dj@cygnus.com>
6639
6640 * archive.c (bfd_ar_hdr_from_filesystem): support BFD_IN_MEMORY
6641 bfds; they have no "file" so we fake it.
6642 * bfd-in2.h: add bfd_make_writable and bfd_make_readable (regen)
6643 * libbfd.c (bfd_write): Allow writing to BFD_IN_MEMORY bfds by
6644 resizing the memory buffer.
6645 * opncls.c (bfd_make_writable): New function; lets you write a
6646 bfd_create'd bfd to an in-memory buffer.
6647 (bfd_make_readable): New function; lets you read back that buffer
6648 as if it were from bfd_openr. Used to build generated archive
6649 members (winsup's ld's dlltool)
6650
6651 Mon Nov 16 19:15:19 1998 Dave Brolley <brolley@cygnus.com>
6652
6653 * po/bfd.pot: Regenerated.
6654
6655 Mon Nov 16 10:57:06 1998 Nick Clifton <nickc@cygnus.com>
6656
6657 * elf32-v850.c (hi16s_location): Replaced fixed size array with
6658 linked list.
6659
6660 Sun Nov 15 20:28:25 1998 Richard Henderson <rth@cygnus.com>
6661
6662 * elf64-alpha.c (elf64_alpha_relax_section): Search for the proper
6663 element of the gotentry list for local symbols too.
6664 (elf64_alpha_relocate_section): Unify local and global handling.
6665 Assert that gotent->use_count > 0.
6666
6667 Sat Nov 14 15:16:01 1998 Ian Lance Taylor <ian@cygnus.com>
6668
6669 * configure.in (vms_alpha_vec): Rename from evax_alpha_vec, and
6670 update for file name changes of July 2, 1998.
6671 (vms_vax_vec): New.
6672 * configure: Rebuild.
6673
6674 Thu Nov 12 19:19:54 1998 Dave Brolley <brolley@cygnus.com>
6675
6676 * po/bfd.pot: Regenerated.
6677
6678 Tue Nov 10 16:17:06 1998 Geoffrey Noer <noer@cygnus.com>
6679
6680 * acinclude.m4, config.bfd: detect cygwin* instead of cygwin32*.
6681 * aclocal.m4, configure: regenerate
6682
6683 Tue Nov 10 15:13:59 1998 Nick Clifton <nickc@cygnus.com>
6684
6685 * elf.c (prep_headers): Add support for bfd_arch_fr30.
6686
6687 Tue Nov 10 13:37:36 1998 Felix Lee <flee@cygnus.com>
6688
6689 * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE,
6690 BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): didn't define macro when value
6691 was cached.
6692 * aclocal.m4, configure: regenerated.
6693
6694 Tue Nov 10 14:31:01 1998 Catherine Moore <clm@cygnus.com>
6695
6696 * elf32-d10v.c (reloc_type): Add R_D10V_GNU_VTINHERIT and
6697 R_D10V_GNU_VTENTRY relocs.
6698 (elf_d10v_howto_table): Likewise.
6699 (d10v_reloc_map d10v_reloc_map): Likewise.
6700 (elf32_d10v_gc_mark_hook): New.
6701 (elf32_d10v_gc_sweep_hook): New.
6702 (elf32_d10v_check_relocs): New.
6703 (elf32_d10v_relocate_section): New.
6704 (elf_backend_relocate_section): Define.
6705 (elf_backend_can_gc_sections): Define.
6706
6707 Sat Nov 7 18:07:51 1998 Peter Schauer <peter.schauer@regent.e-technik.tu-muenchen.de>
6708
6709 * Makefile.am (BFD32_BACKENDS): Move vms files here...
6710 (BFD64_BACKENDS): ...from here.
6711 (BFD32_BACKENDS_CFILES): Move vms files here...
6712 (BFD64_BACKENDS_CFILES): ...from here.
6713 * Makefile.in: Rebuild.
6714
6715 Wed Nov 4 15:58:48 1998 Nick Clifton <nickc@cygnus.com>
6716
6717 * Makefile.am: Add FR30 target.
6718 * Makefile.in: Add FR30 target.
6719 * archures.c: Add support for FR30.
6720 * config.bfd: Add support for FR30.
6721 * configure.in: Add support for FR30.
6722 * reloc.c: Add support for FR30 relocations.
6723 * targets.c: Add support for FR30 relocations.
6724 * bfd-in2.h: Regenerate.
6725 * configure: Regenerate.
6726 * libbfd.h: Regenerate.
6727 * cpu-fr30.c: New file.
6728 * elf32-fr30.c: New file.
6729
6730 Mon Nov 2 14:59:33 1998 Geoffrey Noer <noer@cygnus.com>
6731
6732 * configure.in: detect cygwin* instead of cygwin32*
6733 * configure: regenerate
6734
6735 Sun Nov 1 19:32:28 1998 Jeffrey A Law (law@cygnus.com)
6736
6737 * elf-m10300.c (mn10300_elf_relax_section): Do not use alloca,
6738 use bfd_malloc and free instead and check return value from bfd_malloc.
6739
6740 Sun Nov 1 16:20:35 1998 Ian Lance Taylor <ian@cygnus.com>
6741
6742 * libbfd-in.h (_bfd_dwarf1_find_nearest_line): Declare.
6743 * libbfd.h: Rebuild.
6744
6745 * elf32-mips.c (mips_elf_dynsym_sec_names): Comment out.
6746 (SIZEOF_MIPS_DYNSYM_SECNAMES): Likewise.
6747 (MIPS_TEXT_DYNSYM_SECN): Likewise.
6748 (_bfd_mips_elf_fake_sections): Don't set sh_info field of a .hash
6749 section.
6750 (struct mips_elf_link_hash_table): Remove dynsym_sec_strindex
6751 field.
6752 (mips_elf_link_hash_table_create): Don't initialize
6753 dynsym_sec_strindex.
6754 (mips_elf_gc_mark_hook): Add default case to avoid warning.
6755 (mips_elf_size_dynamic_sections): Generate a section symbol for
6756 every output section.
6757 (mips_elf_finish_dynamic_sections): Count all sections for
6758 DT_MIPS_UNREFEXTNO.
6759 (mips_elf_finish_dynamic_sections): Use dynamic symbols for all
6760 output sections.
6761
6762 Sun Nov 1 12:46:53 1998 Geoff Keating <geoffk@ozemail.com.au>
6763
6764 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Allocate two slots
6765 for later PLT entries in large PLTs.
6766 (ppc_elf_finish_dynamic_symbol): Allow for the extra slots.
6767
6768 Sat Oct 31 20:10:09 1998 Jeffrey A Law (law@cygnus.com)
6769
6770 * elf32-ppc.c (ppc_elf_reload_section): Fix typo.
6771
6772 1998-10-26 15:58 Ulrich Drepper <drepper@cygnus.com>
6773
6774 * elf-bfd.h (struct elf_link_hash_entry): Add new field elf_hash_value.
6775 * elflink.h (elf_collect_hash_codes): New function. This function is
6776 called for each exported symbol and we compute the ELF hash value for
6777 it.
6778 (compute_bucket_value): New function. It is called from
6779 size_dynamic_sections to determine the hash table size. When we are
6780 optimizing a better, but slower, algorithm is used.
6781 (size_dynamic_sections): Call compute_bucket_value.
6782
6783 * elf.c (bfd_elf_hash): Optimize the hash function a bit.
6784
6785 Mon Oct 19 20:03:21 1998 Catherine Moore <clm@cygnus.com>
6786
6787 * elf32-sh.c: Add HOWTO entries for R_SH_GNU_VTINHERIT and
6788 R_SH_GNU_VTENTRY.
6789 (sh_elf_gc_mark_hook): New.
6790 (sh_elf_gc_sweep_hook): New.
6791 (sh_elf_check_relocs): New.
6792 (elf_backend_can_gc_sections): Define.
6793
6794 Mon Oct 19 16:57:05 1998 Felix Lee <flee@cygnus.com>
6795
6796 * acinclude.m4: undo previous gettext change
6797 * aclocal.m4: rebuild with right version of aclocal.
6798
6799 Mon Oct 19 01:47:21 1998 Felix Lee <flee@cygnus.com>
6800
6801 * acinclude.m4, aclocal.m4: move gettext-related fragments from
6802 aclocal.m4 to acinclude.m4, so they don't get lost.
6803
6804 * elfcore.h: rewrite for better corefile support.
6805 * elf.c (elfcore_*): new functions.
6806 * elf-bfd.h (elf_obj_tdata): new structure members.
6807 * acconfig.h, acinclude.m4, configure.in: add feature-tests for
6808 flavor of procfs.
6809 * aclocal.m4, config.in, configure, Makefile.in: regenerated.
6810
6811 Fri Oct 16 14:07:45 1998 Catherine Moore <clm@cygnus.com>
6812
6813 * elf32-m32r.c: Add HOWTO entries for R_M32R_GNU_VTINHERIT
6814 and R_M32R_GNU_VTENTRY.
6815 (elf_backend_can_gc_sections): Define.
6816 (m32r_elf_check_relocs): New.
6817 (m32r_elf_gc_mark_hook): New.
6818 (m32r_elf_gc_sweep_hook): New.
6819 (m32r_elf_relocate_section): Handle VT relocs.
6820
6821 Mon Oct 12 14:18:40 1998 Nick Clifton <nickc@cygnus.com>
6822
6823 * coff-arm.c (arm_relocate_section): Remove redundant test.
6824
6825 * bfd-in2.h (struct reloc_howto_struct): Improve comment to make
6826 cleat that the 'bitsize' field is the size of the bitfield AFTER
6827 relocation not before.
6828
6829 * elf32-m32r.c (R_M32R_18_PCREL): Fix size of bitfield.
6830
6831 * coff-mips.c (mips_relocate_hi): Cope with missing refhi or reflo
6832 relocs.
6833
6834 Tue Oct 6 09:20:44 1998 Catherine Moore <clm@cygnus.com>
6835
6836 * elf32-sparc.c: Add HOWTO entries for R_SPARC_GNU_VTINHERIT and
6837 R_SPARC_GNU_VTENTRY.
6838 (elf32_sparc_check_relocs): Handle them.
6839 (elf32_sparc_reloc_type_lookup): Likewise.
6840 (elf32_sparc_relocate_section): Likewise.
6841 (elf32_sparc_gc_mark_hook): New.
6842 (elf32_sparc_gc_sweep_hook): New.
6843
6844 Mon Oct 5 14:55:30 1998 Jeffrey A Law (law@cygnus.com)
6845
6846 * som.c (som_finish_writing): Perform some sanity checks when
6847 writing an executable or shared library.
6848
6849 Mon Oct 5 12:02:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
6850
6851 * dwarf1.c : New file. Adds _bfd_dwarf1_find_nearest_line.
6852 * configure.in (elf): Add dwarf1.lo.
6853 * elf_bfd.h (elf_ob_tdata): Add dwarf1_find_line_info.
6854 * elf.c (_bfd_elf_find_nearest_line): Add call to
6855 _bfd_dwarf1_find_nearest_line.
6856 * elf32-mips.c (_bfd_mips_elf_find_nearest_line):
6857 Add call to _bfd_dwarf1_find_nearest_line.
6858 * configure: Rebuilt.
6859
6860 Mon Oct 5 10:06:22 1998 Catherine Moore <clm@cygnus.com>
6861
6862 * elflink.h (elf_gc_sections): Do not allow garbage
6863 collection if dynamic sections have been created.
6864
6865 Mon Oct 5 09:07:37 1998 Catherine Moore <clm@cygnus.com>
6866
6867 * elf32-v850.c: Add HOWTO entries for R_V850_GNU_VTINHERIT and
6868 R_V850_GNU_VTENTRY.
6869 (v850_elf_check_relocs): Handle VTINHERIT and VTENTRY relocs.
6870 (v850_elf_perform_relocation): Likewise.
6871 (v850_elf_final_link_relocate): Likewise.
6872 (v850_elf_relocate_section): Likewise.
6873 (v850_elf_gc_sweep_hook): New routine.
6874 (v850_elf_gc_mark_hook): New routine.
6875 (elf_backend_can_gc_sections): Define.
6876
6877 Mon Oct 5 09:04:25 1998 Catherine Moore <clm@cygnus.com>
6878
6879 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Don't assume
6880 that dynobj exists.
6881
6882 Sun Oct 4 23:29:34 1998 David Edelsohn <edelsohn@mhpcc.edu>
6883
6884 * rs6000-core.c (rs6000coff_core_file_matches_executable_p):
6885 Declare size as bfd_size_type.
6886 (rs6000coff_get_section_contents): Declare count as bfd_size_type.
6887
6888 Sun Oct 4 20:38:29 1998 Jeffrey A Law (law@cygnus.com)
6889
6890 * cpu-hppa.c (bfd_hppa20_arch): Define. Link it into the bfd_hppa_arch
6891 structure.
6892 * som.c (CPU_PA_RISC2_0): Define.
6893 (_PA_RISC2_0_ID): Likewise.
6894 (som_finish_writing): Use CPU_PA_RISC2_0 for the system_id as needed.
6895
6896 Sun Oct 4 21:19:09 1998 Ian Lance Taylor <ian@cygnus.com>
6897
6898 * elflink.h (elf_link_add_object_symbols): When a versioned symbol
6899 has a base which is already defined, only add the referenced
6900 symbol to the dynamic symbol table if it is defined or referenced
6901 by a regular file.
6902
6903 * elf32-i386.c (elf_i386_info_to_howto_rel): Handle vtable relocs
6904 correctly.
6905
6906 1998-09-27 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6907
6908 * elflink.h (elf_link_add_object_symbols): Undo last change.
6909
6910 Wed Sep 23 16:09:31 1998 Richard Henderson <rth@cygnus.com>
6911
6912 * elflink.h (elf_link_add_object_symbols): Don't record a dynamic
6913 symbol for the indirect alias to a versioned symbol.
6914
6915 Mon Sep 21 12:15:22 1998 Catherine Moore <clm@cygnus.com>
6916
6917 * elf32-i386.c (elf32_i386_vtinherit_howto): New.
6918 (elf32_i386_vtentry_howto): New.
6919 (elf_i386_reloc_type_lookup): Return elf32_i386_vtentry_howto
6920 or elf32_i386_vtinherit_howto on lookup.
6921
6922 Sun Sep 20 00:48:07 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
6923
6924 * elf32-m68k.c: Include "elf/m68k.h". Remove definition of enum
6925 reloc_type. Rename R_68K__max to R_68K_max.
6926 (howto_table): Use _bfd_elf_rel_vtable_reloc_fn for a VTENTRY
6927 reloc.
6928
6929 Sun Sep 20 00:09:25 1998 Chris Torek <torek@bsdi.com>
6930
6931 * libbfd.c (bfd_getb32): Rewrite expression to get better code.
6932 (bfd_getl32, bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
6933
6934 * libbfd.c (bfd_log2): Cast to bfd_vma before shifting, not
6935 after.
6936
6937 Sat Sep 19 22:42:23 1998 Doug Rabson <dfr@nlsystems.com>
6938
6939 * elflink.h (elf_link_add_object_symbols): Ensure that the warning
6940 message has a null byte terminator.
6941
6942 Fri Sep 18 14:35:29 1998 Nick Clifton <nickc@cygnus.com>
6943
6944 * elf32-v850.c (v850_elf_perform_relocation): Ignore contents of
6945 word subject to R_V850_32 relocation.
6946
6947 Thu Sep 17 17:20:36 1998 Nick Clifton <nickc@cygnus.com>
6948
6949 * dwarf2.c: Add comment describing problem computing line numbers
6950 for undefined symbols at link time.
6951
6952 Thu Sep 17 16:03:28 1998 Richard Henderson <rth@cygnus.com>
6953
6954 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't
6955 transform a defweak into a plt entry.
6956 (elf64_alpha_calc_dynrel_sizes): Allow room for secondary
6957 plt entry references to receive a RELATIVE reloc.
6958 (elf64_alpha_finish_dynamic_symbol): Fill them in.
6959 (elf64_alpha_relocate_section): Assert we don't overrun
6960 the allocated relocation space.
6961
6962 Wed Sep 16 18:03:13 1998 Nick Clifton <nickc@cygnus.com>
6963
6964 * elf.c (swap_out_syms): Always treat section symbols as
6965 special, even if they are attached to a common section.
6966
6967 Wed Sep 16 10:34:13 1998 Nick Clifton <nickc@cygnus.com>
6968
6969 * elf32-v850.c (v850_elf_symbol_processing): Move symbols in
6970 sections with v850 common section attributes into named v850
6971 common sections.
6972 (v850_elf_add_symbol_hook): Move symbols in sections with v850
6973 common section attributes into named v850 common sections.
6974
6975 Wed Sep 16 11:26:49 CDT 1998 Catherine Moore <clm@cygnus.com>
6976
6977 * elf32-arm.c (elf32_arm_gc_mark_hook): Remove print
6978 statement.
6979
6980 1998-09-15 Geoff Keating <geoffk@ozemail.com.au>
6981
6982 * elf32-ppc.c (ppc_elf_relocate_section): Reverse output_offset
6983 part of Vladimir's change of 1998-08-19. Make a R_PPC_SDAREL16
6984 reloc to the wrong section a warning, not an error. .dynsbss
6985 is not an output section, so there is no need to check for it.
6986
6987 Tue Sep 15 12:40:05 1998 Catherine Moore <clm@cygnus.com>
6988
6989 * elf-bfd.h: Add argument to elf_backend_get_symbol_type.
6990
6991 Tue Sep 15 08:34:40 1998 Catherine Moore <clm@cygnus.com>
6992
6993 * elf.c (swap_out_syms): Pass type to elf_backend_get_symbol_type.
6994 * elf32-arm.c: Add HOWTO entries for R_ARM_GNU_VTINHERIT and
6995 R_ARM_GNU_VTENTRY.
6996 (elf32_arm_gc_mark_hook): New.
6997 (elf32_arm_gc_sweep_hook): New.
6998 (elf32_arm_check_relocs): New.
6999 (elf32_arm_final_link_relocate): Handle VTINHERIT and VTENTRY
7000 relocations.
7001 (elf32_arm_relocate_section): Handle VTINHERIT and VTENTRY
7002 relocations.
7003
7004 1998-09-10 Geoff Keating <geoffk@ozemail.com.au>
7005
7006 * elf32-ppc.c (ppc_elf_relocate_section): If dynobj is NULL,
7007 assume there is no PLT or GOT.
7008
7009 Wed Sep 9 14:24:12 1998 Nick Clifton <nickc@cygnus.com>
7010
7011 * elf32-arm.c (elf32_arm_find_nearest_line): New function: just
7012 like _elf_bfd_find_nearest_line() except that STT_ARM_TFUNC is
7013 also accepted as a function symbol type.
7014
7015 Mon Sep 7 13:24:03 1998 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
7016
7017 * rs6000-core.c (_LONG_LONG): Define for AIX 4.x only.
7018
7019 Sat Sep 5 20:40:18 1998 Ian Lance Taylor <ian@cygnus.com>
7020
7021 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): Correct definition to
7022 match definition of _bfd_gc_sections field.
7023 * libbfd.h: Rebuild.
7024
7025 Fri Sep 4 13:54:23 1998 David Miller <davem@dm.cobaltmicro.com>
7026
7027 * elf32-sparc.c (elf32_sparc_relocate_section): Properly adjust
7028 the addend of a dynamic relocation referencing a section.
7029 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7030 (sparc64_elf_finish_dynamic_symbol): Fix the PLT relocation offset.
7031
7032 Thu Sep 3 17:28:50 1998 Richard Henderson <rth@cygnus.com>
7033
7034 * elflink.h (bfd_elfNN_size_dynamic_sections): Verify that the
7035 bed has a size_dynamic_sections routine before trying to use it.
7036
7037 Mon Aug 31 14:49:22 1998 Richard Henderson <rth@cygnus.com>
7038
7039 * elf32-mips.c (elf_mips_gnu_vtentry_howto): Use
7040 _bfd_elf_rel_vtable_reloc_fn.
7041
7042 Mon Aug 31 10:23:40 1998 Catherine Moore <clm@cygnus.com>
7043
7044 * Makefile.am: Add elf32-arm.c.
7045 * Makefile.in: Rebuild.
7046 * elf-bfd.h: Add elf_backend_get_symbol_type.
7047 * elf.c (swap_out_syms): If defined, call
7048 elf_backend_get_symbol_type.
7049 * elf32-arm.c: Define elf_backend_get_symbol_type.
7050 (elf32_arm_get_symbol-type): New routine.
7051 (record_thumb_to_arm_glue): Change to use STT_ARM_TFUNC.
7052 (bfd_elf32_arm_process_before_allocation): Change to
7053 check for STT_ARM_TFUNC.
7054 (elf32_arm_final_link_relocate): Likewise.
7055 * elfxx-target.h: Add elf_backend_get_symbol_type.
7056
7057 Fri Aug 28 19:44:07 1998 Richard Henderson <rth@cygnus.com>
7058
7059 * archures.c (bfd_mach_alpha_ev[456]): New.
7060 * cpu-alpha.c: Rework to match these types.
7061 * bfd-in2.h: Rebuild.
7062
7063 Fri Aug 28 19:38:53 1998 Richard Henderson <rth@cygnus.com>
7064
7065 * elf-bfd.h (_bfd_elf_rel_vtable_reloc_fn): Declare.
7066 * elf.c (_bfd_elf_rel_vtable_reloc_fn): New.
7067
7068 * elf32-i386.c (elf_howto_table): Add vtable relocs.
7069 (elf_i386_reloc_type_lookup): Recognize them.
7070 (elf_i386_check_relocs): Pass them off to generic code.
7071 (elf_i386_relocate_section): Ignore them.
7072 (elf_i386_gc_mark_hook, elf_i386_gc_sweep_hook): New.
7073 (elf_backend_can_gc_sections): True.
7074
7075 Thu Aug 20 15:03:45 1998 Nick Clifton <nickc@cygnus.com>
7076
7077 * elf32-arm.c (elf32_thumb_to_arm_stub): Check sym_sec is not NULL
7078 before looking at owner field.
7079 (elf32_arm_to_thumb_stub): Ditto.
7080 (elf32_arm_relocate_section): Compute name before calling
7081 elf32_arm_final_link_relocate().
7082
7083 Thu Aug 20 11:30:17 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
7084
7085 * elf.c: comment and formatting cleanups.
7086 * elfcore.h: ditto.
7087
7088 Wed Aug 19 15:43:26 1998 Michael Snyder <msnyder@cleaver.cygnus.com>
7089
7090 * elfcode.h (elf_object_p): Reject files of header type ET_CORE
7091 (core files are treated differently than object files).
7092 * elf-bfd.h (_bfd_elf_write_corefile_contents,
7093 bfd_elf_mkcorefile): declare.
7094 * elfxx-target.h (_bfd_elf_write_corefile_contents,
7095 bfd_elf_mkcorefile): add to bfd_target vector.
7096 * elfcore.h (elf_core_file_p): save the program header table,
7097 and set the bfd architecture from the elf file header.
7098 * elf.c (bfd_elf_mkcorefile): new function.
7099 (_bfd_elf_write_corefile_contents): new function.
7100 (assign_file_positions_for_segments): add cases for handling
7101 PT_NOTE segments. (assign_file_positions_except_relocs):
7102 core files should be handled the same as exec files.
7103 (prep_headers): identify core files as type ET_CORE.
7104 (copy_private_bfd_data): identify the sections belonging to
7105 the PT_NOTE segment.
7106
7107 * elf32-sparc.c (elf32_sparc_final_write_processing):
7108 add break statement to default case.
7109
7110 1998-08-19 Vladimir N. Makarov <vmakarov@cygnus.com>
7111
7112 * elf32-ppc.c (ppc_elf_relocate_section): Check that output
7113 section (not input) will be in sections ".sbss", ".sbss2",
7114 ".sdata", and ".sdata" for R_PPC_SDAREL16, R_PPC_EMB_SDA2REL,
7115 R_PPC_EMB_SDA21, R_PPC_EMB_RELSDA. In all these cases also ignore
7116 output_offset for correct evaluation of addend.
7117
7118 Tue Aug 18 11:48:12 1998 Catherine Moore <clm@cygnus.com>
7119
7120 * elf32-arm.c: Add prefix bfd_ to elf32_arm_get_bfd_for_interworking,
7121 elf32_arm_allocate_interworking_sections and
7122 elf32_arm_process_before_allocation.
7123
7124 Tue Aug 18 11:46:00 1998 Nick Clifton <nickc@cygnus.com>
7125
7126 * bfd-in.h: Ammend prototype for
7127 elf32_arm_process_before_allocation to remove surplus third
7128 argument.
7129
7130 * bfd-in2.h: Regenerate.
7131
7132 Sat Aug 15 20:55:08 1998 Richard Henderson <rth@cygnus.com>
7133
7134 * elf64-alpha.c (elf64_alpha_relax_section): Handle indirect symbols.
7135
7136 Fri Aug 14 09:12:28 1998 Stan Cox <scox@cygnus.com>
7137
7138 * aoutx.h (aout_link_input_section_ext): Use the relocation already
7139 calculated for RELOC_SPARC_REV32 case.
7140
7141 Thu Aug 13 14:02:02 1998 Catherine Moore <clm@cygnus.com>
7142
7143 * bfd-in.h: Add prototypes for elf32_arm_get_bfd_for_interworking,
7144 elf32_arm_allocate_interworking_sections and
7145 elf32_arm_process_before_allocation.
7146 * bfd-in2.h: Regenerated.
7147 * elf32-arm.c Define elf32_arm_link_hash_table.
7148 (insert_thumb_branch): New routine.
7149 (find_thumb_glue): New routine.
7150 (find_arm_glue): New routine.
7151 (record_arm_to_thumb_glue): New routine.
7152 (record_thumb_to_arm_glue): New routine.
7153 (elf32_arm_link_hash_table_create): New routine.
7154 (elf32_arm_get_bfd_for_interworking): New routine.
7155 (elf32_arm_allocate_interworking_sections) New routine.
7156 (elf32_arm_process_before_allocation) New routine.
7157 (elf32_thumb_to_arm_stub): New routine.
7158 (elf32_arm_to_thumb_stub): New routine.
7159 (elf32_print_private_bfd_data): Fix typo.
7160 (elf32_arm_final_link_relocate): Add argument sym_sec.
7161 Check for branches to thumb symbols in case R_ARM_PC24.
7162 Check for branches to arm symbols in case R_ARM_THM_PC22.
7163 (elf32_arm_relocate_section): Pass symbol section to
7164 elf32_arm_final_link_relocate.
7165
7166 Wed Aug 12 19:00:39 1998 Geoff Keating <geoffk@ozemail.com.au>
7167
7168 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Generate PLT
7169 entries unless the symbol is defined in the executable; in
7170 particular, undefined weak symbols get a PLT entry.
7171
7172 Wed Aug 12 14:48:33 1998 Ian Lance Taylor <ian@cygnus.com>
7173
7174 * libaout.h: Remove nested comment to avoid warning.
7175
7176 Wed Aug 12 08:10:11 1998 Catherine Moore <clm@cygnus.com>
7177
7178 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
7179 R_ARM_PC24 relocation.
7180
7181 Tue Aug 11 14:42:26 1998 Catherine Moore <clm@cygnus.com>
7182
7183 * elf32-arm.c (elf32_arm_final_link_relocate): Remove unused
7184 argument is_local. Add argument sym_flags. Check sym_flags
7185 in R_ARM_ABS32 case. Include addend for R_ARM_THM_PC22 case.
7186 (elf32_arm_relocate_section): Don't pass local sym and pass
7187 sym_flags to elf32_arm_final_link_relocate.
7188
7189 Mon Aug 10 20:38:39 1998 Richard Henderson <rth@cygnus.com>
7190
7191 * elf64-alpha.c (elf64_alpha_calc_dynrel_sizes): Correct last change
7192 to not count too few relocs for dynamicly linked executables.
7193
7194 Mon Aug 10 15:35:34 1998 Richard Henderson <rth@cygnus.com>
7195
7196 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Never consider
7197 symbols without a dynamic index dynamic. Consider all weak
7198 symbols dynamic.
7199 (elf64_alpha_strip_section_from_output): Don't assume 1-1
7200 correspondance between input and output sections.
7201
7202 Mon Aug 10 15:31:39 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7203
7204 * elflink.h (elf_gc_common_finalize_got_offsets): For backends
7205 that use a .got.plt section start the got offset at zero.
7206
7207 Mon Aug 10 17:31:21 1998 Ian Lance Taylor <ian@cygnus.com>
7208
7209 * ieee.c (ieee_write_processor): Correct the processor ID written
7210 out for bfd_arch_m68k, accommodating change of March 25.
7211
7212 Sun Aug 9 20:55:44 1998 Catherine Moore <clm@cygnus.com>
7213
7214 * elf32-arm.c (elf32_arm_final_link_relocate): Rework
7215 R_ARM_THM_RPC22 relocations.
7216
7217 Sat Aug 8 15:15:30 1998 Richard Henderson <rth@cygnus.com>
7218
7219 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Undef weak symbols
7220 are always dynamic.
7221 (elf64_alpha_calc_dynrel_sizes): Allow enough room for RELATIVE
7222 .got relocs in -Bsymbolic shared objects.
7223
7224 Wed Aug 5 15:48:08 1998 Nick Clifton <nickc@cygnus.com>
7225
7226 * elf32-arm.c: Add private flags to ELF header.
7227 (elf32_arm_print_private_bfd_data): New Function.
7228 (elf32_arm_set_private_flags): New Function.
7229 (elf32_arm_copy_private_flags): New Function.
7230 (elf32_arm_merge_private_bfd_data): New Function.
7231
7232 Mon Aug 3 17:10:15 1998 Ian Lance Taylor <ian@cygnus.com>
7233
7234 * elf32-sparc.c (elf32_sparc_check_relocs): Permit WPLT30 against
7235 a local symbol.
7236 (elf32_sparc_relocate_section): Likewise.
7237
7238 Sun Aug 2 03:19:23 1998 Richard Henderson <rth@cygnus.com>
7239
7240 * elf32-ppc.c (ppc_elf_check_relocs): Init sgot to NULL. Create the
7241 .got if any relocation referrs to _GLOBAL_OFFSET_TABLE_.
7242 (ppc_elf_relocate_section): Pull sgot and splt search to the start
7243 of the function. Recognize no .plt as static linking.
7244
7245 1998-08-01 Ulrich Drepper <drepper@cygnus.com>
7246
7247 * elf32-mips.c (_bfd_mips_elf_section_from_shdr): Don't pass
7248 ".liblist" string through gettext.
7249
7250 Fri Jul 31 16:38:14 1998 Catherine Moore <clm@cygnus.com>
7251
7252 * Makefile.am: Add support for elf32-arm.lo.
7253 * Makefile.in: Rebuild.
7254 * config.bfd (arm-*-elf): Define targ_defvec and targ_selvecs.
7255 (thumb-*-elf): Define targ_defvec and targ_selvecs.
7256 * configure.in: Handle bfd_elf32_littlearm_vec and bfd_elf32_bigarm_vec.
7257 * configure: Regenerate.
7258 * elf.c: (prep_headers): Support arch_type of EM_ARM.
7259 * targets.c: Support new targets bfd_elf32_bigarm_vec and
7260 bfd_target bfd_elf32_littlearm_vec.
7261 * elf32-arm.c: New file.
7262
7263 Tue Jun 28 19:05:28 1998 Stan Cox <scox@cygnus.com>
7264
7265 * libaout.h (M_SPARCLITE_LE): New machine.
7266 * sunos.c (MACHTYPE_OK): Add machine M_SPARCLITE_LE.
7267 * aoutf1.h (sunos_set_arch_mach): Add machine M_SPARCLITE_LE.
7268 (sunos_write_object_contents): Add machine bfd_mach_sparc_sparclite_le
7269 * aoutx.h (howto_table_ext): Add relocation R_SPARC_REV32.
7270 (NAME(aout,machine_type)) Add machine bfd_mach_sparc_sparclite_le
7271 (aout_link_input_section_ext): Add RELOC_SPARC_REV32 support.
7272 * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7273 elf32_sparc_relocate_section): Rename R_SPARC_32LE to be R_SPARC_REV32
7274 * libbfd.h (bfd_reloc_code_real_names): Rename BFD_RELOC_SPARC_32LE to
7275 be BFD_RELOC_SPARC_REV32.
7276 * reloc.c: Ditto.
7277 * config.bfd (sparc86x-*-aout): New
7278
7279 Fri Jul 24 13:54:19 1998 Nick Clifton <nickc@cygnus.com>
7280
7281 * linker.c (_bfd_generic_final_link): Allocate NULL symbol before
7282 actually mapping the output sections.
7283
7284 Fri Jul 24 11:24:29 1998 Jeffrey A Law (law@cygnus.com)
7285
7286
7287 * elf-m10300.c (mn10300_elf_howto): Add R_MN10300_24 entry.
7288 (mn10300_elf_reloc_map): Similarly.
7289 (mn10300_elf_final_link_relocate): Handle R_MN10300_24.
7290
7291 Fri Jul 24 12:36:04 1998 Ian Lance Taylor <ian@cygnus.com>
7292
7293 * elf32-mips.c (elf_mips_howto_table): Add reloc types used on
7294 Irix 6.
7295 (bfd_elf32_bfd_reloc_type_lookup): Add default case.
7296 * elf64-mips.c: Replace all uses of mips_elf64_reloc_type with
7297 elf_mips_reloc_type defined in elf/mips.h.
7298
7299 1998-07-24 Ulrich Drepper <drepper@cygnus.com>
7300
7301 * elf64-mips.c: Remove reloc_type definition completely. It's now
7302 in elf/mips.h.
7303
7304 Thu Jul 23 13:33:19 1998 Doug Evans <devans@canuck.cygnus.com>
7305
7306 * elf64-mips.c (mips_elf64_reloc_type): #if 0 out more relocations
7307 as they are defined in elf/mips.h now.
7308
7309 Thu Jul 23 11:29:43 1998 Jeffrey A Law (law@cygnus.com)
7310
7311
7312 * Re-add lost change:
7313 * elf-m10300.c (elf32_mn10300_link_hash_entry): Add new field
7314 "movm_stack_size".
7315 (mn10300_elf_relax_section): Include stack space for register saves
7316 in the imm8 field of a "call" instruction.
7317 (compute_function_info): Determine how much stack is allocated by
7318 the movm instruction. Fix typo.
7319 (elf32_mn10300_link_hash_newfunc): Initialize movm_stack_size.
7320
7321 Thu Jul 23 11:38:05 1998 Ian Lance Taylor <ian@cygnus.com>
7322
7323 * elf32-sparc.c (elf_backend_got_header_size): Define as 4.
7324 * elf64-sparc.c (elf_backend_got_header_size): Define as 8.
7325
7326 1998-07-22 Ulrich Drepper <drepper@cygnus.com>
7327
7328 * elf32-ppc.c: Change use of pp_reloc_type to elf_ppc_reloc_type.
7329
7330 Wed Jul 22 16:27:18 1998 Nick Clifton <nickc@cygnus.com>
7331
7332 * elf32-hppa.h: Let ELF header define the enum containing the
7333 external reloc numbers.
7334 * elf32-i386.h: Likewise.
7335
7336 1998-07-22 14:57 Ulrich Drepper <drepper@cygnus.com>
7337
7338 * elf-m10300.c: Let ELF header now define the macros to get the enum.
7339 * elf32-mips.c: Likewise.
7340 * elf32-ppc.c: Likewise.
7341
7342 Wed Jul 22 13:53:52 1998 Nick Clifton <nickc@cygnus.com>
7343
7344 * bfd-in2.h: Change type of 'class' parameter to 'unsigned int' in
7345 bfd_coff_set_symbol_class(), in order to avoid K&R compatability
7346 prblems.
7347 * bfd-in.h: Regenerate.
7348 * coffgen.c (bfd_coff_set_symbol_class): Change type of 'class'
7349 parameter to 'unsigned int' to avoid K&R compatability problems.
7350
7351 Wed Jul 22 16:43:24 1998 Ian Lance Taylor <ian@cygnus.com>
7352
7353 * ieee.c (ieee_find_nearest_line): Change filename_ptr and
7354 functionname_ptr to be const. Change line_ptr to be unsigned.
7355
7356 * coffcode.h (coff_link_output_has_begun): Simplify handling when
7357 macro is not defined. Change second parameter from bfd_link_info
7358 to coff_final_link_info. Add prototype.
7359 (coff_final_link_postscript): Simplify handling when macro is not
7360 defined. Add prototype.
7361
7362 1998-07-22 13:08 Ulrich Drepper <drepper@cygnus.com>
7363
7364 * elf-mn10300.c: Before include system specific ELF header define
7365 START_RELOC_NUMBERS, RELOC_NUMBER, and END_RELOC_NUMBERS.
7366 * elf32-mips.c: Likewise.
7367 * elf32-ppc.c: Likewise.
7368
7369 Wed Jul 22 13:46:51 1998 Ian Lance Taylor <ian@cygnus.com>
7370
7371 * elf64-mips.c (mips_elf64_reloc_type): Copy Ulrich's elf32-mips.c
7372 temporary patch over to elf64-mips.c as well.
7373
7374 1998-07-21 Ulrich Drepper <drepper@cygnus.com>
7375
7376 * elf32-mips.c (reloc_type): Temporarily disable definition of
7377 standard relocation since they are now defined in elf/mips.h.
7378
7379 Tue Jul 21 09:47:00 1998 Catherine Moore <clm@cygnus.com>
7380
7381 * elf-m10200.c (mn10200_elf_final_link_relocate):
7382 Modify range test for case R_MN10200_8.
7383
7384 * elf-m10300.c (mn10300_elf_final_link_relocate):
7385 Modify range test for case R_MN10300_8.
7386
7387 Mon Jul 20 18:50:54 1998 Richard Henderson <rth@cygnus.com>
7388
7389 * elf-bfd.h (struct elf_backend_data): Add got_ & plt_header_size.
7390 * elf32-i386.c (elf_backend_got_header_size): Define.
7391 (elf_backend_plt_header_size): Define.
7392 * elf32-m68k.c, elf32-mips.c, elf32-ppc.c: Likewise.
7393 * elf32-sparc.c, elf64-alpha.c, elf64-sparc.c: Likewise.
7394 * elfxx-target.h: Provide a default of zero.
7395 * elflink.c (_bfd_elf_create_got_section): Use got_header_size.
7396 * elflink.h (elf_gc_common_finalize_got_offsets): Likewise.
7397
7398 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't remove a PLT
7399 entry from an executable, even if the plt refcount goes to 0.
7400
7401 Mon Jul 20 12:47:26 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7402
7403 * aoutx.h (NAME(aout,find_nearest_line)): Also remember the
7404 directory name at the line number.
7405
7406 * elf.c (_bfd_elf_find_nearest_line): Also consider symbols
7407 with an unspecified type.
7408
7409 Wed Jul 15 11:20:01 1998 Ian Lance Taylor <ian@cygnus.com>
7410
7411 * sunos.c: Add undef of valid to avoid problem on SunOS.
7412
7413 Tue Jul 14 15:30:59 1998 Richard Henderson <rth@cygnus.com>
7414
7415 * config.bfd (i?86-pc-beos{pe,elf,}*): Recognize.
7416
7417 Tue Jul 14 11:22:21 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7418
7419 * elf32-m68k.c (elf_m68k_check_relocs): Also reference count
7420 R_68K_PCxx and R_68K_xx relocations. Make sure that
7421 ELF_LINK_HASH_NEEDS_PLT is always set for a PLT reloc reference.
7422 (elf_m68k_gc_sweep_hook): Also reference count R_68K_PCxx and
7423 R_68K_xx relocations.
7424 (elf_m68k_adjust_dynamic_symbol): Reset the plt offset of a symbol
7425 that has no plt entry.
7426 (elf_m68k_relocate_section): Ignore the plt offset in a static
7427 link.
7428 * elflink.h (elf_adjust_dynamic_symbol): Reset the plt offset for
7429 an ignored symbol.
7430 (elf_gc_common_finalize_got_offsets): Set the got offsets also in
7431 a static link.
7432
7433 * elf32-m68k.c (R_68K_GNU_VTINHERIT, R_68K_GNU_VTENTRY): New reloc
7434 types.
7435 (howto_table, reloc_map): Add entries for them.
7436 (elf_m68k_check_relocs): Handle them. Implement reference
7437 counting for got and plt entries.
7438 (elf_m68k_gc_mark_hook, elf_m68k_gc_sweep_hook): New functions.
7439 (elf_m68k_adjust_dynamic_symbol): Handle unreferenced plt
7440 symbols.
7441 (rtype_to_howto_rel, elf_info_to_howto_rel): Delete.
7442 (elf_m68k_relocate_section): Handle the new reloc types.
7443 (bfd_elf32_bfd_final_link, elf_backend_gc_mark_hook,
7444 elf_backend_gc_sweep_hook, elf_backend_can_gc_sections): Define.
7445 * elflink.h (elf_link_add_object_symbols): When creating an
7446 indirect reference for symbol versioning also copy the plt
7447 offset.
7448 (elf_fix_symbol_flags): When clearing the ELF_LINK_HASH_NEEDS_PLT
7449 flag also reset the plt offset.
7450 (elf_link_assign_sym_version): Likewise.
7451 (elf_gc_common_finalize_got_offsets): Increment the got offset by
7452 the size of the entry in bytes.
7453 (elf_gc_allocate_got_offsets): Likewise.
7454
7455 Tue Jul 14 11:18:14 1998 Ian Lance Taylor <ian@cygnus.com>
7456
7457 * elflink.h (elf_gc_sections): Return true rather than falling off
7458 the bottom.
7459
7460 * coffgen.c (bfd_coff_set_symbol_class): Call bfd_alloc, not
7461 xmalloc.
7462
7463 Mon Jul 13 11:06:31 1998 Nick Clifton <nickc@cygnus.com>
7464
7465 * coff-arm.c: Supress definition of TARGET_UNDERSCORE and add a
7466 comment describing when it should be enabled.
7467 Changed definition of USER_LABEL_PREFIX to "", to fall into line
7468 with GCC sources.
7469
7470 Mon Jul 13 13:06:54 1998 Ian Lance Taylor <ian@cygnus.com>
7471
7472 * ieee.c (ieee_slurp_external_symbols): Handle call optimization
7473 information ATN records.
7474
7475 Fri Jul 10 16:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
7476
7477 * ieee.c (ieee_slurp_external_symbols): Select an appropriate
7478 section for an absolute symbol in a fully linked file. Based on
7479 patch from Christian Holland <CHolland@de.lucent.com>.
7480
7481 Wed Jul 8 11:29:56 1998 Manfred Hollstein <manfred@s-direktnet.de>
7482
7483 * coff-m88k.c (m88k_special_reloc): Don't lose the information
7484 that a symbol is undefined.
7485
7486 Tue Jul 7 21:47:02 1998 Jeffrey A Law (law@cygnus.com)
7487
7488 * som.c (som_bfd_gc_sections): Define.
7489
7490 Mon Jul 6 11:35:50 1998 Nick Clifton <nickc@cygnus.com>
7491
7492 * coff-arm.c (aoutarm_std_reloc_howto): Do not complain about
7493 overflows in ARM_26D patches, since they have already been
7494 implmented. Patch submitted by Dr. R.J. Black <rjb@dcs.gla.ac.uk>
7495
7496 Sat Jul 4 12:25:36 1998 Ian Lance Taylor <ian@cygnus.com>
7497
7498 * coffcode.h (coff_write_object_contents): If we have any long
7499 section names, call coff_write_symbols even if there are no
7500 symbols.
7501
7502 Fri Jul 3 13:11:35 1998 Ian Lance Taylor <ian@cygnus.com>
7503
7504 * elf.c (copy_private_bfd_data): Only set phdr_included once for a
7505 PT_LOAD segment, rather than only setting it once for the entire
7506 file.
7507
7508 * elf.c (_bfd_elf_make_section_from_shdr): When setting the LMA,
7509 rather than ignoring every phdr with a p_paddr of 0, ignore all
7510 the phdrs if they all have a p_paddr of 0.
7511
7512 * stabs.c (_bfd_write_stab_strings): Check whether the .stabstr
7513 section was discarded from the link.
7514
7515 Fri Jul 3 14:39:05 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
7516
7517 * coff-sh.c (sh_insn_uses_freg): Ignore lowest bit of register number.
7518
7519 Fri Jul 3 14:35:48 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
7520
7521 * coff-sh.c (sh_insns_conflict): Load of fpscr conflicts with
7522 floating point operations.
7523
7524 Thu Jul 2 18:37:25 1998 Ian Lance Taylor <ian@cygnus.com>
7525
7526 * cofflink.c (_bfd_coff_link_input_bfd): Skip undefined global
7527 function symbols.
7528
7529 Thu Jul 2 14:59:42 1998 Klaus Kaempf <kkaempf@rmi.de>
7530
7531 Merge of vax/vms (read-only) support
7532 * configure.com: Support Vax target.
7533 * makefile.vms: Support Vax target.
7534 * vms.h: Renamed from evax.h, merged vax/vms (read-only) support.
7535 * vms.c: Renamed from evax-alpha.c, merged vax/vms (read-only)
7536 support.
7537 * vms-hdr.c: Renamed from evax-emh.c, merged vax/vms (read-only)
7538 support.
7539 * vms-gsd.c: Renamed from evax-egsd.c, merged vax/vms (read-only)
7540 support.
7541 * vms-tir.c: Renamed from evax-etir.c, merged vax/vms (read-only)
7542 support.
7543 * vms-misc.c: Renamed from evax-misc.c, merged vax/vms (read-only)
7544 support.
7545 * libbfd.c (real_read): Use unbuffered read on VMS/Vax.
7546 * targets.c (bfd_target_ovax_flavour): New flavour.
7547 (vms_alpha_vec): Renamed from evax_alpha_vec.
7548 (vms_vax_vec): New.
7549 (target_vector): Update accordingly.
7550 * config.bfd (alpha*-*-*vms*): Use vms_alpha_vec, not
7551 evax_alpha_vec.
7552 (vax*-*-*vms*): New target.
7553 * Makefile.am: Update for renamed files. Rebuild dependencies.
7554 * bfd-in2.h: Rebuild.
7555 * configure.in, Makefile.in, aclocal.m4: Rebuild.
7556
7557 Thu Jul 2 13:31:55 1998 Ian Lance Taylor <ian@cygnus.com>
7558
7559 Based on patch from Matt Semersky <matts@scd.hp.com>:
7560 * linker.c (_bfd_generic_final_link): Force a trailing NULL
7561 pointer on abfd->outsymbols.
7562 (generic_add_output_symbol): Handle NULL sym parameter.
7563
7564 Wed Jul 1 17:05:53 1998 Nick Clifton <nickc@cygnus.com>
7565
7566 * elf.c (copy_private_bfd_data): Add support for changing VMA or
7567 LMA of sections.
7568
7569 Wed Jul 1 16:58:50 1998 Ian Lance Taylor <ian@cygnus.com>
7570
7571 * coff-sh.c (sh_relax_delete_bytes): Correct address comparisons
7572 when handling 32 bit immediate relocs.
7573 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
7574
7575 Tue Jun 30 09:55:03 1998 Jeffrey A Law (law@cygnus.com)
7576
7577 * section.c (STD_SECTION): Account for recently added gc_mark
7578 field in struct asection.
7579
7580 * elf-m10300.c (bfd_mn10300_elf_merge_private_bfd_data): New function.
7581 (bfd_elf32_bfd_merge_private_bfd_data): Define.
7582
7583 Thu Jun 25 18:31:41 1998 Richard Henderson <rth@cygnus.com>
7584
7585 ELF Section-level Garbage Collection:
7586 * bfd.c (bfd_gc_sections): New.
7587 * aout-adobe.c: Hook to default implementation.
7588 * aout-target.h, aout-tic30.c, binary.c, bout.c: Likewise.
7589 * coff-alpha.c, coff-mips.c, coff-rs6000.c, coffcode.h: Likewise.
7590 * evax-alpha.c, i386msdos.c, i386os9k.c, ieee.c: Likewise.
7591 * ihex.c, nlm-target.h, oasys.c, ppcboot.c, srec.c: Likewise.
7592 * tekhex.c, versados.c: Likewise.
7593 * libbfd-in.h (_bfd_nolink_bfd_gc_sections): New.
7594 * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_gc_sections.
7595
7596 * reloc.c (BFD_RELOC_VTABLE_INHERIT, BFD_RELOC_VTABLE_ENTRY): New.
7597 (bfd_generic_gc_sections): New.
7598 * section.c (SEC_KEEP): New.
7599 (asection): Add gc_mark member.
7600
7601 * elfcode.h (elf_gc*): New name remappings.
7602 * elflink.h (elf_link_input_bfd): Don't set contents on stabs
7603 sections to be excluded.
7604 (elf_gc_mark, elf_gc_sweep, elf_gc_sweep_symbol): New.
7605 (elf_gc_propogate_vtable_entries_used): New.
7606 (elf_gc_smash_unused_vtentry_relocs): New.
7607 (elf_gc_sections, elf_gc_record_vtinherit, elf_gc_record_vtentry): New.
7608 (elf_gc_common_finalize_got_offsets): New.
7609 (elf_gc_allocate_got_offsets, elf_gc_common_final_link): New.
7610 * elfxx-target.h: Add and default gc hooks.
7611
7612 * elf-bfd.h (struct elf_link_hash_entry): Swap got_offset/plt_offset
7613 for unions.
7614 (struct elf_obj_tdata): Likewise for local_got_offsets.
7615 * elf.c, elf-i386.c, elf32-m68k.c, elf32-mips.c: Update all uses.
7616 * elf32-ppc.c, elf32-sparc.c, elf64-alpha.c: Likewise.
7617 * elf64-sparc.c, elflink.h: Likewise.
7618
7619 * elf-bfd.h (struct elf_link_hash_entry): Add vtable members.
7620 (ELF_LINK_HASH_MARK): Define.
7621 (struct elf_backend_data): Add GC hooks.
7622 * elf.c (_bfd_elf_link_hash_newfunc): Zero vtable members.
7623
7624 * elf-m10300.c (mn10300_elf_check_relocs): New.
7625 (mn10300_elf_gc_mark_hook): New.
7626 (R_MN10300_GNU_VTINHERIT, R_MN10300_GNU_VTENTRY): New.
7627 (elf_mn10300_howto, mn10300_reloc_map): Handle them.
7628 (mn10300_elf_final_link_relocate): Likewise.
7629 (mn10300_elf_relocate_section): Likewise.
7630 (elf_backend_can_gc_sections): Define.
7631 * elf32-mips.c (R_MIPS_GNU_VTINHERIT, R_MIPS_GNU_VTENTRY): New.
7632 (elf_mips_gnu_vtinherit_howto, elf_mips_gnu_vtentry_howto): New.
7633 (bfd_elf32_bfd_reloc_type_lookup): Handle them.
7634 (mips_info_to_howto_rel): Likewise.
7635 (mips_elf_relocate_section): Likewise.
7636 (mips_elf_check_relocs): Likewise.
7637 (mips_elf_gc_mark_hook, mips_elf_gc_sweep_hook): New.
7638 (elf_backend_can_gc_sections): Define.
7639 * elf32-ppc.c (R_PPC_GNU_VTINHERIT, R_PPC_GNU_VTENTRY): New.
7640 (ppc_elf_howto_raw): Handle them.
7641 (ppc_elf_reloc_type_lookup): Likewise.
7642 (ppc_elf_relocate_section): Likewise.
7643 (ppc_elf_check_relocs): Reference count .got and .plt entries.
7644 Handle new vtable relocs.
7645 (ppc_elf_adjust_dynamic_symbol): Recognize unused .plt entries.
7646 (ppc_elf_gc_mark_hook, ppc_elf_gc_sweep_hook): New.
7647 (elf_backend_can_gc_sections): Define.
7648
7649 Fri Jun 26 10:48:23 1998 Jeffrey A Law (law@cygnus.com)
7650
7651 * archures.c (bfd_mach_mn10300): Define.
7652 * elf-m10300.c: Include elf/mn10300.h
7653 (elf_mn10300_mach): New function.
7654 (_bfd_mn10300_elf_final_write_processing): Likewise.
7655 (_bfd_mn10300_elf_object_p): Likewise.
7656 (elf_backendfinal_write_processing): Define.
7657 (elf_backend_object_p): Likewise.
7658
7659 Thu Jun 25 18:31:08 1998 Nick Clifton <nickc@cygnus.com>
7660
7661 * elf32-v850.c (v850_elf_perform_relocation): Fix HI16_S
7662 relocation.
7663
7664 Wed Jun 24 17:17:57 1998 Ian Lance Taylor <ian@cygnus.com>
7665
7666 * elflink.h (elf_bfd_final_link): Loop over input_bfds using the
7667 link_next field, not the next field.
7668
7669 Sun Jun 21 19:38:39 1998 Ian Lance Taylor <ian@cygnus.com>
7670
7671 * elf.c (map_sections_to_segments): Check the section address
7672 against the phdr size both with and without a modulo of
7673 maxpagesize.
7674
7675 Fri Jun 19 17:08:18 1998 Ian Lance Taylor <ian@cygnus.com>
7676
7677 * elf32-mips.c (mips_elf_size_dynamic_sections): Only strip a
7678 linker created empty input section if the output section has the
7679 same name.
7680
7681 * elflink.h (elf_link_output_extsym): Print an error message if
7682 _bfd_elf_section_from_bfd_section fails.
7683
7684 * elf.c (_bfd_elf_section_from_bfd_section): Call bfd_set_error on
7685 failure.
7686
7687 Tue Jun 16 11:55:55 1998 Ian Lance Taylor <ian@cygnus.com>
7688
7689 * elf.c (copy_private_bfd_data): Improve handling of Solaris
7690 native linker output. Avoid putting an empty section in more than
7691 one segment.
7692
7693 Fri Jun 12 13:30:17 1998 Tom Tromey <tromey@cygnus.com>
7694
7695 * po/Make-in (all-yes): If maintainer mode, depend on .pot file.
7696 ($(PACKAGE).pot): Unconditionally depend on POTFILES.
7697
7698 Fri Jun 12 13:34:02 1998 Doug Evans <devans@canuck.cygnus.com>
7699
7700 * elf.c (swap_out_syms): New arg relocatable_p.
7701 Don't add section VMA to symbols for relocatable output.
7702 (_bfd_elf_compute_section_file_positions): Update call to
7703 swap_out_syms.
7704
7705 Mon Jun 8 15:20:57 1998 Nick Clifton <nickc@cygnus.com>
7706
7707 * elf32-v850.c (v850_elf_perform_relocation): Make comparisons
7708 against 'addend' be signed rather than unsigned.
7709
7710 Sat Jun 6 00:31:21 1998 Nick Clifton <nickc@cygnus.com>
7711
7712 * elf32-m32r.c: Add prototyps for static functions.
7713
7714 * coff-arm.c: Add prototypes for static functions.
7715
7716 Fri Jun 5 17:21:51 1998 Nick Clifton <nickc@cygnus.com>
7717
7718 * elf.c (elf_sort_sections): Sort by LMA first then VMA, since the
7719 LMA is used to order sections in a segment.
7720
7721 * elf32-v850.c: Add prototypes for static functions.
7722 Change type of addend parameter to bfd_vma in various functions.
7723
7724 Fri Jun 5 18:09:58 1998 Ian Lance Taylor <ian@cygnus.com>
7725
7726 * aoutx.h (howto_table_ext): Change RELOC_BASE13 to use
7727 complain_overflow_signed instead of complain_overflow_bitfield.
7728
7729 Fri Jun 5 15:11:11 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
7730
7731 * elf.c (elf_map_symbols): Don't add section VMA to symbol value
7732 when comparing against 0.
7733
7734 Wed Jun 3 17:52:49 1998 Ian Lance Taylor <ian@cygnus.com>
7735
7736 * Makefile.am (config.status): New target.
7737 * Makefile.in: Rebuild.
7738
7739 Wed Jun 3 12:18:24 1998 Stan Cox <scox@equinox.cygnus.com>
7740
7741 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Give an
7742 error if previous object endianness doesn't match current object.
7743
7744 Tue Jun 2 17:50:59 1998 Nick Clifton <nickc@cygnus.com>
7745
7746 * elf32-v850.c (v850_elf_print_private_bfd_data): Call
7747 _bfd_elf_print_private)bfd_data ().
7748
7749 Tue Jun 2 15:29:35 1998 Ian Lance Taylor <ian@cygnus.com>
7750
7751 * elflink.h (elf_merge_symbol): Don't always set type_change_ok
7752 and size_change_ok.
7753 (elf_link_add_object_symbols): Set type_change_ok and
7754 size_change_ok before calling elf_merge_symbol.
7755
7756 * elf32-mips.c (mips_elf_relocate_section): If we issue an
7757 undefined symbol error, don't also issue an overflow error.
7758
7759 Tue Jun 2 13:51:00 1998 Geoff Keating <geoffk@ozemail.com.au>
7760
7761 * elf32-ppc.c (ppc_elf_relocate_section): The target of an
7762 R_PPC_LOCAL24PC relocation should be local; if not, print an error
7763 message instead of crashing.
7764
7765 Mon Jun 1 18:23:12 1998 Yuli Barcohen <yuli.barcohen@telrad.co.il>
7766
7767 * archures.c (bfd_mach_cpu32): Define.
7768 (bfd_default_scan): Add case for 68060. Fix 68332 case to use
7769 bfd_mach_cpu32.
7770 * cpu-m68k.c (arch_info_struct): Add m68k:cpu32.
7771 * ieee.c: Include <ctype.h>.
7772 (ieee_object_p): Parse out process ID string to make it more
7773 likely to be acceptable for bfd_scan_arch.
7774 * bfd-in2.h: Rebuild.
7775
7776 Mon Jun 1 11:12:02 1998 Nick Clifton <nickc@cygnus.com>
7777
7778 * elf32-m32r.c (m32r_elf_print_private_bfd_data): Also call
7779 _bfd_elf_print_private_bfd_data() so that the program header will
7780 be displayed.
7781
7782 Mon Jun 1 12:14:28 1998 Ian Lance Taylor <ian@cygnus.com>
7783
7784 * peicode.h (coff_swap_sym_in): Check for C_SECTION rather than
7785 0x68. Reindent. Add some comments.
7786
7787 Fri May 29 09:58:08 1998 Nick Clifton <nickc@cygnus.com>
7788
7789 * elf.c (copy_private_bfd_data): Adjust physical address of
7790 segment in output BFD to contain LMAs of its sections.
7791
7792 Tue May 26 19:37:47 1998 Stan Cox <scox@equinox.cygnus.com>
7793
7794 * elf32-sparc.c (_bfd_sparc_elf_howto_table, sparc_reloc_map,
7795 elf32_sparc_relocate_section): Added R_SPARC_32LE for little
7796 endian data 32 bit relocations.
7797 (elf32_sparc_merge_private_bfd_data): Check if linking little
7798 endian objects with big endian objects.
7799 (elf32_sparc_object_p): Set bfd_mach_sparc_sparclite_le.
7800 (elf32_sparc_final_write_processing): Set EF_SPARC_LEDATA in e_flags.
7801 * libbfd.h (bfd_reloc_code_real_names): Added BFD_RELOC_SPARC_32LE.
7802 * reloc.c: Same.
7803 * cpu-sparc.c (arch_info_struct): Added sparc:sparclite_le
7804 * archures.c (bfd_mach_sparc_sparclite_le): New.
7805 * bfd-in2.h (BFD_RELOC_SPARC_32LE, bfd_mach_sparc_sparclite_le): New.
7806
7807 Thu May 21 16:59:28 1998 Nick Clifton <nickc@cygnus.com>
7808
7809 * peicode.h (add_data_entry): Fix precedence of operators in if ()
7810 statement.
7811
7812 Tue May 19 18:41:19 1998 Ian Lance Taylor <ian@cygnus.com>
7813
7814 * bfd-in.h: Move over patch to bfd-in2.h.
7815
7816 * reloc.c (bfd_check_overflow): Add casts before shifts which may
7817 not fit in 32 bits.
7818 (_bfd_relocate_contents): Likewise.
7819
7820 Mon May 18 14:44:15 1998 Nick Clifton <nickc@cygnus.com>
7821
7822 * peicode.h (add_data_entry): If the section has no private data
7823 then do not create a Data Dictionary entry for it.
7824
7825 Mon May 18 00:09:28 1998 Richard Henderson <rth@cygnus.com>
7826
7827 * elf64-alpha.c (elf64_alpha_relax_section): Set again on changes.
7828 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots,
7829 elf64_alpha_size_got_sections): Rewrite, handling multiple got
7830 subsections during relaxation more correctly.
7831
7832 Thu May 14 14:22:58 1998 Nick Clifton <nickc@cygnus.com>
7833
7834 * bfd-in2.h: Add new prototype: bfd_coff_set_symbol_class ().
7835 Add extra argument to bfd_arm_process_before_allocation ().
7836 * bfd-in.h: Reflect changes made in bfd-in2.h.
7837 * coffgen.c (bfd_coff_set_symbol_class): New function. Set the
7838 coff class of a BFD symbol.
7839 * coff-arm.c: Add support for interworking between Thumb code and
7840 non-interworking aware ARM code.
7841
7842 Sun May 10 22:33:59 1998 Jeffrey A Law (law@cygnus.com)
7843
7844 * po/Make-in (install-info): New target.
7845
7846 Thu May 7 17:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
7847
7848 * filemode.c: Remove; not used.
7849
7850 If sysdep.h includes a header file, don't include it again:
7851 * aix386-core.c: Don't include <stdio.h>, <stddef.h>, or
7852 <errno.h>.
7853 * aoutx.h: Don't include <string.h>. Use "sysdep.h" rather than
7854 <sysdep.h>.
7855 * archive.c: Don't include <string.h> or <errno.h>.
7856 * evax-alpha.c; Don't include <stdio.h>.
7857 * evax-egsd.c: Likewise.
7858 * evax-etir.c: Likewise.
7859 * evax-misc.c: Likewise.
7860 * evax-emh.c: Likewise. Also, don't include <sys/types.h>.
7861 * hppabsd-core.c: Don't include <stdio.h>, <sys/types.h>, or
7862 <errno.h>.
7863 * hpux-core.c: Likewise.
7864 * netbsd-core.c: Likewise.
7865 * som.c: Likewise.
7866 * libbfd.c: Don't include <sys/types.h>.
7867 * nlmcode.h: Don't include <string.h>.
7868 * osf-core.c: Don't include <string.h> or <stdio.h>.
7869 * ptrace-core.c: Don't include <stdio.h>, <sys/types.h>,
7870 <errno.h>, or <unistd.h>.
7871 * trad-core.c: Don't include <stdio.h> or <sys/types.h>.
7872
7873 Thu May 7 13:12:50 1998 Klaus Kaempf <kkaempf@progis.de>
7874
7875 * configure.com: If the version number can not be found in
7876 configure.in, set it to "unknown" rather than "2.8.1".
7877
7878 Wed May 6 09:46:05 1998 Gavin Koch <gavin@cygnus.com>
7879
7880 * elf32-mips.c (elf_mips_mach): New.
7881 (_bfd_mips_elf_object_p): Use elf_mips_mach.
7882 (_bfd_mips_elf_final_write_processing): Use the names
7883 of machines, rather than the numbers. Set both the ARCH
7884 and MACH in e_flags. Handle a few more specific machines.
7885 (_bfd_mips_elf_merge_private_bfd_data): Merge both
7886 EF_MIPS_ARCH and EF_MIPS_MACH.
7887
7888 Tue May 5 21:01:53 1998 Richard Henderson <rth@cygnus.com>
7889
7890 * syms.c (bfd_is_local_label): Revert last change.
7891 * srec.c (srec_write_symbols): Discard debugging symbols.
7892
7893 Tue May 5 23:36:06 1998 Ian Lance Taylor <ian@cygnus.com>
7894
7895 * som.c: Include <ctype.h>.
7896 * som.h: Don't include sysdep.h.
7897
7898 Tue May 5 18:29:24 1998 Tom Tromey <tromey@cygnus.com>
7899
7900 * libbfd.h: Rebuilt.
7901 * libbfd-in.h: Removed gettext includes and defines.
7902 * sysdep.h: Moved gettext-related includes and defines here.
7903
7904 Tue May 5 16:47:54 1998 Richard Henderson <rth@cygnus.com>
7905
7906 * srec.c (srec_write_symbols): Use bfd_is_local_label rather than
7907 an ad-hoc test. Kill bogus #if 0 code.
7908 * syms.c (bfd_is_local_label): Consider BSF_DEBUGGING symbols local.
7909
7910 Mon May 4 16:10:33 1998 Ian Lance Taylor <ian@cygnus.com>
7911
7912 * sunos.c (sunos_check_dynamic_reloc): Don't use the PLT address
7913 when generating a normal executable for a symbol defined in a
7914 regular file. When copying a reloc into the output file, adjust
7915 the addend for a PC relative reloc against a global symbol.
7916
7917 Mon May 4 10:08:18 1998 Tom Tromey <tromey@cygnus.com>
7918
7919 * libbfd.h: Rebuilt.
7920 * libbfd-in.h (_): Define as dgettext.
7921
7922 Mon May 4 11:02:23 1998 Ian Lance Taylor <ian@cygnus.com>
7923
7924 * coff-arm.c (coff_arm_relocate_section): Cast to bfd_signed_vma,
7925 not signed.
7926 * peicode.h (pe_saved_coff_bfd_print_private_bfd_data): Use PARAMS
7927 when declaring parameter types.
7928 (pe_saved_coff_bfd_copy_private_bfd_data): Likewise.
7929
7930 Wed Apr 29 15:35:03 1998 Ian Lance Taylor <ian@cygnus.com>
7931
7932 * config.bfd: If we include any ELF targets in targ_defvec and/or
7933 targ_selvecs, then add the generic ELF targets to targ_selvecs.
7934 * elf32-gen.c (dummy): New static const variable.
7935 (elf_generic_info_to_howto): New static function.
7936 (elf_generic_info_to_howto_rel): New static function.
7937 (elf_info_to_howto): Define as elf_generic_info_to_howto.
7938 (elf_info_to_howto_rel): Define as elf_generic_info_to_howto_rel.
7939 * elf64-gen.c: Same changes as elf32-gen.c.
7940 * elfcode.h (elf_object_p): For the generic target, ignore a
7941 failure of bfd_default_set_arch_mach. Fix indentation a bit.
7942
7943 Tue Apr 28 20:05:52 1998 Ian Lance Taylor <ian@cygnus.com>
7944
7945 * configure.in (WIN32LIBADD): Add -lintl on cygwin32.
7946 * configure: Rebuild.
7947
7948 Tue Apr 28 12:16:57 1998 Jason Molenda (crash@bugshack.cygnus.com)
7949
7950 * config.bfd: Update OSR5/Unixware patterns.
7951
7952 Mon Apr 27 18:02:24 1998 Richard Henderson <rth@cygnus.com>
7953
7954 * elf.c (assign_file_positions_for_segments): Allow for holes
7955 between sections added by a link script.
7956
7957 Mon Apr 27 11:49:55 1998 Ian Lance Taylor <ian@cygnus.com>
7958
7959 * configure.in: Change version number to 2.9.4
7960 * configure: Rebuild.
7961
7962 Based on patch from H.J. Lu <hjl@gnu.org>:
7963 * elf.c (bfd_elf_get_bfd_needed_list): New function.
7964 * bfd-in.h (bfd_elf_get_bfd_needed_list): Declare.
7965 * bfd-in2.h: Rebuild.
7966
7967 Sat Apr 25 20:07:53 1998 Richard Henderson <rth@cygnus.com>
7968
7969 * elf64-alpha.c (struct alpha_relax_info): Replace elfsym with other.
7970 Change all users.
7971
7972 Sat Apr 25 18:29:07 1998 Richard Henderson <rth@cygnus.com>
7973
7974 * elf64-alpha.c (struct alpha_relax_info): Add tsec & elfsym members.
7975 (elf64_alpha_relax_section): Fill them in.
7976 (elf64_alpha_relax_opt_call): Implement more than a stub.
7977 (elf64_alpha_add_symbol_hook): Don't set SEC_LOAD or default
7978 alignment on .scommon.
7979 (elf64_alpha_merge_gots): Merge use counts as well.
7980
7981 Sat Apr 25 14:07:29 1998 Richard Henderson <rth@cygnus.com>
7982
7983 * elf64-alpha.c (elf64_alpha_relax_section): Use the proper section
7984 for calculating a local symbol's address.
7985 (elf64_alpha_calc_got_offsets): Skip entries with 0 use count.
7986 Set the .got's cooked size as well as the raw size.
7987
7988 Fri Apr 24 09:16:00 1998 Nick Clifton <nickc@cygnus.com>
7989
7990 * elf32-v850.c (v850_elf_print_private_bfd_data): Add
7991 internationalisation of printed information.
7992
7993 * coff-arm.c (coff_arm_print_private_bfd_data): Add
7994 internationalisation of printed information.
7995
7996 Fri Apr 24 12:09:18 1998 Ian Lance Taylor <ian@cygnus.com>
7997
7998 * syms.c (struct indexentry): Change directory_name, file_name,
7999 and function_name fields to char *.
8000 (struct stab_find_info): Change cached_file_name field to char *.
8001
8002 Thu Apr 23 08:13:04 1998 Nick Clifton <nickc@cygnus.com>
8003
8004 * peicode.h (dir_names): Add missing N_() macros to dir_names array.
8005
8006 Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
8007
8008 * po/Make-in (MKINSTALLDIRS): Don't look in $(top_srcdir).
8009
8010 Wed Apr 22 17:48:48 1998 Ian Lance Taylor <ian@cygnus.com>
8011
8012 * Makefile.am (install-data-local): Make $(includedir).
8013 * Makefile.in: Rebuild.
8014
8015 Wed Apr 22 13:06:15 1998 Tom Tromey <tromey@cygnus.com>
8016
8017 * libbfd-in.h: Use `gettext' and not `dgettext' for now.
8018
8019 Wed Apr 22 12:53:40 1998 Ian Lance Taylor <ian@cygnus.com>
8020
8021 * Makefile.am (INCLUDES): Add -I$(srcdir)/../intl -I../intl.
8022 * Makefile.in: Rebuild.
8023
8024 * bfd-in2.h: Rebuild for Nick's changes.
8025
8026 Tue Apr 21 23:11:51 1998 Richard Henderson <rth@cygnus.com>
8027
8028 * archive.c (_bfd_generic_read_ar_hdr_mag): Fix lossage in last
8029 change wrt length == max_namelen.
8030
8031 Tue Apr 21 21:19:36 1998 Tom Tromey <tromey@scribbles.cygnus.com>
8032
8033 * Many files: Added gettext invocations around user-visible
8034 strings.
8035 * libbfd-in.h: Added gettext includes and defines.
8036 * acconfig.h (ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY,
8037 HAVE_LC_MESSAGES): Define.
8038 * configure.in: Call CY_GNU_GETTEXT. Create po/Makefile.in and
8039 po/Makefile.
8040 * Makefile.am (SUBDIRS): Added po.
8041 (POTFILES): New macro.
8042 (po/POTFILES.in): New target.
8043 (SOURCE_HFILES): New macro.
8044 (HFILES): Use it.
8045 * po/Make-in, po/POTFILES.in, po/bfd.pot: New files.
8046
8047 Tue Apr 21 13:38:18 1998 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
8048
8049 * elfcore.h (bfd_prstatus): Copy core_prstatus from the first
8050 NT_PRSTATUS note section encountered, it contains the status of
8051 the currently executing thread when the core file was written.
8052
8053 Tue Apr 21 10:00:12 1998 Nick Clifton <nickc@cygnus.com>
8054
8055 * libcoff.h: Add extra parameter to
8056 bfd_coff_link_output_has_begun overrideable function.
8057 * cofflink.c: Pass extra parameter to
8058 bfd_coff_link_output_has_begun function.
8059 * bfd-in.h: Add prototypes for exported ARM interworking
8060 functions.
8061 * peicode.h: ARM specific code reorganised to conform to BFD
8062 coding conventions.
8063 * coffcode.h: ARM specific code reorganised to conform to BFD
8064 coding conventions.
8065 * coff-arm.c: Code reorganised to conform to the BFD coding
8066 conventions. Global variables have been moved into an ARM
8067 specific hash table structure and a new function:
8068 bfd_arm_get_bfd_for_interworking() has been created which is
8069 called from the linker scripts.
8070
8071 Tue Apr 21 00:11:51 1998 Richard Henderson <rth@cygnus.com>
8072
8073 * archive.c (_bfd_generic_read_ar_hdr_mag): Simplify end-of-name test.
8074
8075 * elf64-alpha.c (elf64_alpha_find_reloc_at_ofs): Renamed from
8076 elf64_alpha_relax_find_reloc_ofs. Changed all callers.
8077 (elf64_alpha_add_symbol_hook): Put small commons in .scommon not .sbss.
8078 (elf64_alpha_size_got_sections): Don't merge .got sections twice.
8079
8080 Sat Apr 18 01:21:04 1998 Stan Cox <scox@cygnus.com>
8081
8082 * config.bfd: Added sparc86x support.
8083
8084 Fri Apr 17 22:29:04 1998 Ian Lance Taylor <ian@cygnus.com>
8085
8086 * elf32-mips.c (mips_elf_relocate_section): Do not complain about
8087 an out of range pc-relative jump/call to an undefined weak symbol.
8088
8089 Thu Apr 16 13:49:00 1998 Richard Henderson <rth@cygnus.com>
8090
8091 * elf64-alpha.c (elf64_alpha_do_reloc_gpdisp): Do all gpdisp
8092 comparisons signed.
8093
8094 Thu Apr 16 11:43:33 1998 Ian Lance Taylor <ian@cygnus.com>
8095
8096 * archive.c (bfd_generic_archive_p): If a slurp subroutine returns
8097 an error other than bfd_error_system_call, set the error to
8098 bfd_error_wrong_format.
8099
8100 * targets.c (bfd_target_vector) [SELECT_VECS not defined]: Add
8101 bfd_elf32_powerpcle_vec.
8102
8103 * elf.c (copy_private_bfd_data): If all the p_paddr fields in the
8104 program segments are zero, don't set p_paddr_valid.
8105
8106 Wed Apr 15 22:15:16 1998 Richard Henderson <rth@cygnus.com>
8107
8108 * elf64-alpha.c: Initial implementation of relaxation --
8109 (struct alpha_elf_link_hash_entry): Add use_count member.
8110 (elf64_alpha_check_relocs): Initialize and increment it.
8111 (elf64_alpha_can_merge_gots): Check it when considering merging.
8112 (elf64_alpha_merge_gots): Drop entries with zero use.
8113 (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8114 (elf64_alpha_always_size_sections): Split out got sizing ...
8115 (elf64_alpha_size_got_sections): ... here. New function.
8116 (elf64_alpha_relax_find_reloc_ofs): New function.
8117 (elf64_alpha_relax_with_lituse): Likewise.
8118 (elf64_alpha_relax_without_lituse): Likewise.
8119 (elf64_alpha_relax_opt_call): Likewise.
8120 (elf64_alpha_relax_section): Likewise.
8121 (elf64_alpha_add_symbol_hook): Likewise.
8122 (elf64_alpha_howto_table): Implement GPRELHIGH/LOW & IMMED_GP_16.
8123 (elf64_alpha_relocate_section): Likewise.
8124 (bfd_elf64_bfd_relax_section): Define.
8125 (elf_backend_add_symbol_hook): Likewise.
8126
8127 Wed Apr 15 16:08:46 1998 Richard Henderson <rth@cygnus.com>
8128
8129 * elf.c (prep_headers): Use new EM_SPARCV9 symbol.
8130 * elf64-sparc.c (ELF_MACHINE_CODE): Likewise.
8131 (ELF_MACHINE_ALT1): New. Set to EM_OLD_SPARC64.
8132
8133 Wed Apr 15 11:34:33 1998 Ian Lance Taylor <ian@cygnus.com>
8134
8135 * configure.in: Add -lkernel32 to WIN32LIBADD on cygwin32.
8136 * configure: Rebuild.
8137
8138 Mon Apr 13 16:46:27 1998 Ian Lance Taylor <ian@cygnus.com>
8139
8140 * Makefile.am (libbfd_la_LIBADD): Add @WIN32LIBADD@.
8141 (libbfd_la_LDFLAGS): Add @WIN32LDFLAGS@.
8142 * configure.in: Define and substitute WIN32LDFLAGS and
8143 WIN32LIBADD.
8144 * aclocal.m4: Rebuild with new libtool.
8145 * configure, Makefile.in: Rebuild.
8146
8147 Fri Apr 10 13:44:27 1998 Ian Lance Taylor <ian@cygnus.com>
8148
8149 * coffcode.h (coff_write_object_contents): Move a PE COMDAT symbol
8150 before any other symbols in the same section.
8151
8152 Wed Apr 8 14:50:23 1998 Michael Meissner <meissner@cygnus.com>
8153
8154 * config.bfd (powerpc*-*-*): Remove PowerPC NT support from ELF
8155 systems.
8156
8157 Tue Apr 7 16:25:31 1998 Gavin Romig-Koch <gavin@cygnus.com>
8158
8159 * dwarf2.c (comp_unit): Move it earlier in the source. Add
8160 addr_size.
8161 (read_address): Replace 'bdf*' argument with 'comp_unit*' argument.
8162 Use addr_size for address size, rather than sizeof(bfd_vma).
8163 (read_attribute): Replace bdf* argument with 'comp_unit*' argument.
8164 Fix call to read_address.
8165 (decode_line_info): Replace bdf* argument with 'comp_unit*' argument.
8166 Scrap other unneeded arguments. Fix call to read_address.
8167 (scan_unit_for_functions): Fix call to read_attribute.
8168 (parse_comp_unit): We now handle more values for addr_size.
8169 Set addr_size in unit. Fix call to read_attribute and
8170 decode_line_info.
8171
8172 Tue Apr 7 15:44:47 1998 Gavin Romig-Koch <gavin@cygnus.com>
8173
8174 * dwarf2.c (parse_comp_unit): Drop use of unit->name when it is null.
8175
8176 Tue Apr 7 12:35:18 1998 Ian Lance Taylor <ian@cygnus.com>
8177
8178 * archures.c (bfd_default_scan): Add m68k cases back to default
8179 switch, reverting patch of March 25, since IEEE support depends
8180 upon them.
8181
8182 Mon Apr 6 14:06:40 1998 Ian Lance Taylor <ian@cygnus.com>
8183
8184 * Makefile.am (diststuff): New target.
8185 * Makefile.in: Rebuild.
8186
8187 Sun Apr 5 16:21:44 1998 Jeffrey A Law (law@cygnus.com)
8188
8189 * som.c (som_bfd_ar_write_symbol_stuff): Fix computation of
8190 som_offset when we have an extended name table.
8191
8192 Sun Apr 5 16:04:39 1998 H.J. Lu <hjl@gnu.org>
8193
8194 * Makefile.am (stamp-lib): Check that .libs/libbfd.a exists before
8195 trying to copy it.
8196 * Makefile.in: Rebuild.
8197
8198 Fri Apr 3 11:09:42 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8199
8200 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Generate section
8201 symbols when creating a shared library.
8202 (elf_m68k_adjust_dynindx): New function, used by above code.
8203 (elf_m68k_finish_dynamic_sections): Initialize the section
8204 symbols.
8205 (elf_m68k_relocate_section): Change abort to BFD_ASSERT.
8206
8207 Wed Apr 1 16:04:02 1998 Nick Clifton <nickc@cygnus.com>
8208
8209 * coff-arm.c (in_reloc_p): Use ARM_RVA32 in place of constant
8210 value 11.
8211
8212 Wed Apr 1 13:36:58 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8213
8214 * elf32-m68k.c (elf_m68k_relocate_section, case R_68K_PLT*O): Fix
8215 assertion.
8216
8217 Tue Mar 31 00:12:12 1998 Jeffrey A Law (law@cygnus.com)
8218
8219 * elf-m10300.c (mn10300_elf_relax_section): Correctly handle
8220 absolute symbols.
8221
8222 Mon Mar 30 12:46:15 1998 Ian Lance Taylor <ian@cygnus.com>
8223
8224 * configure.in: Set version to 2.9.1.
8225 * configure: Rebuild.
8226
8227 * Branched binutils 2.9.
8228
8229 Mon Mar 30 12:20:50 1998 Brent Baccala <baccala@freesoft.org>
8230
8231 * syms.c (ENABLE_CACHING): Define.
8232 (struct indexentry): Define.
8233 (struct stab_cache): Remove.
8234 (cmpindexentry): New static function.
8235 (struct stab_find_info): Add new fields: indextable,
8236 indextablesize, cached_indexentry, cached_offset, cached_stab, and
8237 cached_file_name. Remove fields: file_cache, function_cache, and
8238 line_cache.
8239 (_bfd_stab_section_find_nearest_line): Rewrite to build a sorted
8240 index table and search it.
8241
8242 Mon Mar 30 10:39:34 1998 Ian Lance Taylor <ian@cygnus.com>
8243
8244 * elf.c (_bfd_elf_copy_private_section_data): Call
8245 copy_private_bfd_data once we've seen the last SEC_ALLOC section.
8246
8247 * cpu-mips.c: Remove trailing comma at end of enumeration list.
8248
8249 Sat Mar 28 16:33:02 1998 Ian Lance Taylor <ian@cygnus.com>
8250
8251 * coff-arm.c: Define all globally visible variables and functions
8252 only when COFF_WITH_PE is not defined.
8253 * configure.in (armpe_little_vec, armpe_big_vec): Add
8254 coff-arm.lo.
8255 * configure: Rebuild.
8256
8257 Fri Mar 27 16:06:02 1998 Ian Lance Taylor <ian@cygnus.com>
8258
8259 Fix some gcc -Wall warnings:
8260 * aout-arm.c (MY(fix_pcrel_26)): Add casts to avoid warnings.
8261 * archive.c (_bfd_generic_read_ar_hdr_mag): Likewise.
8262 * archures.c (bfd_default_scan): Likewise.
8263 * bfd.c (bfd_scan_vma): Likewise.
8264 * binary.c (mangle_name): Likewise
8265 * coff-arm.c (aoutarm_fix_pcrel_26): Likewise.
8266 * coff-sh.c (sh_relocate_section): Likewise.
8267 * coff-stgo32.c (create_go32_stub): Likewise.
8268 * coffcode.h (coff_slurp_line_table): Likewise.
8269 * ecoff.c (_bfd_ecoff_write_armap): Likewise.
8270 * elf.c (_bfd_elf_make_section_from_shdr): Likewise.
8271 (assign_file_positions_for_segments): Likewise.
8272 * elf32-mips.c (mips_elf_relocate_section): Likewise.
8273 * elf32-ppc.c (ppc_elf_add_symbol_hook): Likewise.
8274 * oasys.c (oasys_write_sections): Likewise.
8275 * ppcboot.c (ppcboot_object_p): Likewise.
8276 (mangle_name): Likewise.
8277 * riscix.c (riscix_fix_pcrel_26): Likewise.
8278 * srec.c (srec_scan): Likewise.
8279 * stabs.c (_bfd_write_section_stabs): Likewise.
8280 * sunos.c (sunos_add_dynamic_symbols): Likewise.
8281 * aout-ns32k.c (_bfd_ns32k_relocate_contents): Add default case to
8282 switch. Declare parameters for function pointers.
8283 * archures.c (bfd_default_scan): Add braces to avoid ambiguous if
8284 warning.
8285 * elf.c (elf_sort_sections): Likewise.
8286 * coff-arm.c (coff_thumb_pcrel_common): Initialize relocation.
8287 Add default cases to switches.
8288 (coff_arm_relocate_section): Remove unused local variables.
8289 Always set rstat.
8290 (coff_arm_bfd_set_private_flags): Change flag variable to type
8291 flagword.
8292 * coff-mips.c (mips_relocate_section): Initialize use_lo.
8293 * coff-ppc.c (ppc_record_toc_entry): Change i to unsigned int.
8294 (dump_toc): Change cat to const, and initialize it.
8295 * coff-sh.c (sh_relax_delete_bytes): Initialize start and voff.
8296 * elf32-sh.c (sh_elf_relax_delete_bytes): Likewise.
8297 (sh_elf_relocate_section): Initialize r_symndx.
8298 * coffcode.h (coff_compute_section_file_positions): Only declare
8299 old_sofar if ALIGN_SECTIONS_IN_FILE.
8300 (coff_write_object_contents): Initialize csym.
8301 * coffgen.c (coff_pointerize_aux): Make type and class unsigned.
8302 * cpu-ns32k.c (_bfd_ns32k_get_displacement): Add default case to
8303 switch.
8304 * dwarf2.c: Include libiberty.h.
8305 (read_2_signed_bytes, read_4_signed_bytes): Comment out.
8306 (decode_line_info): Remove unused local variables.
8307 * elf32-m32r.c (m32r_elf_sda16_reloc): Likewise.
8308 (m32r_elf_relocate_section): Likewise.
8309 * elf32-v850.c (v850_elf_store_addend_in_insn): Likewise.
8310 (v850_elf_reloc): Likewise.
8311 * elf-bfd.h (elf_linker_section_t): Make alignment unsigned.
8312 (struct elf_obj_tdata): Make cverdefs and cverrefs unsigned.
8313 * elf.c (assign_file_positions_for_segments): Always set adjust.
8314 * elf32-d30v.c (bfd_elf_d30v_reloc): Initialize tmp_addr. Fully
8315 parenthesize expression.
8316 * elf32-m32r.c (m32r_elf_relocate_section): Always initialize h.
8317 (m32r_elf_object_p): Return a value.
8318 (m32r_elf_print_private_bfd_data): Change fprintf format string.
8319 * elf32-mips.c (mips_elf_final_link): Initialize last.
8320 (mips_elf_finish_dynamic_sections): Initialize last and dindx.
8321 * elf32-v850.c (v850_elf_object_p): Return a value.
8322 (v850_elf_print_private_bfd_data): Change fprintf format string.
8323 * elfcode.h (elf_slurp_symbol_table): Change symcount and i to
8324 unsigned long.
8325 * elflink.h (elf_link_add_object_symbols): Change vernum to
8326 unsigned int, and initialize it. Change fprintf format string.
8327 (NAME(bfd_elf,size_dynamic_sections)): Cast -1 to bfd_size_type
8328 when setting or comparing to soname_indx.
8329 (elf_create_pointer_linker_section): Change num_symbols to
8330 unsigned int.
8331 * libcoff-in.h (coff_data_type): Change flags to flagword.
8332 * peicode.h (pe_print_idata): Initialize idx. Change j to
8333 bfd_size_type. Initialize hint_member. Remove useless test to
8334 time_stamp.
8335 (pe_print_edata): Change num_functions and num_names in struct
8336 EDT_type to unsigned long. Remove cast. Change fprintf format
8337 string.
8338 * ppcboot.c (ppcboot_object_p): Change i to size_t.
8339 * reloc.c (bfd_get_reloc_size): Change return type to unsigned
8340 int.
8341 * reloc16.c (bfd_coff_reloc16_relax_section): Change shrinks to
8342 int *. Update uses. Change j to long.
8343 * bfd-in2.h, libcoff.h: Rebuild.
8344
8345 Fri Mar 27 10:10:46 1998 Catherine Moore <clm@cygnus.com>
8346
8347 * elf32-v850.c Remove definition of USE_REL.
8348 (v850_elf_info_to_howto_rela): New function.
8349 (v850_elf_perform_relocation): Renamed from
8350 v850_elf_store_addend_in_insn. Removed replace argument.
8351 (v850_elf_reloc): store the relocation in the addend field instead
8352 of the insn.
8353 (v850_elf_final_link_relocate): Now calls
8354 v850_elf_perform_relocation.
8355 (v850_elf_relocate_section): Remove code to generate REL
8356 relocations.
8357
8358 Thu Mar 26 13:32:17 1998 Ian Lance Taylor <ian@cygnus.com>
8359
8360 * coffcode.h (coff_new_section_hook): Set the type and storage
8361 class in the native symbol information allocated for a new section
8362 symbol.
8363
8364 Thu Mar 26 10:13:41 1998 Nick Clifton <nickc@cygnus.com>
8365
8366 * peicode.h: Chain together calls to
8367 coff_bfd_copy_private_bfd_data and
8368 coff_bfd_print_private_bfd_data.
8369
8370 * coff-arm.c: Add prototypes for
8371 coff_arm_bfd_print_private_bfd_data and
8372 coff_arm_bfd_copy_private_bfd_data.
8373
8374 Wed Mar 25 15:45:55 1998 Nick Clifton <nickc@cygnus.com>
8375
8376 * coffcode.h (coff_mkobject_hook): Set private falgs even for a PE
8377 build.
8378
8379 * peicode.h: Call arm-coff private data functions after handling
8380 pe private data.
8381
8382 * coff-arm.c: Turn statics into globals so that they can be shared
8383 both pe and pei backends.
8384
8385 Wed Mar 25 15:19:38 1998 Ian Lance Taylor <ian@cygnus.com>
8386
8387 * aoutf1.h (sunos_set_arch_mach): Use bfd_mach_m68* rather than
8388 plain numbers.
8389 (sunos_write_object_contents): Likewise.
8390 * aoutx.h (NAME(aout,machine_type)): Likewise.
8391 * coffcode.h (coff_set_arch_mach_hook): Likewise.
8392
8393 Wed Mar 25 13:59:24 1998 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
8394
8395 * archures.c (bfd_mach_m68*): Add definitions for various m68k
8396 variants.
8397 (bfd_default_scan): Remove m68k special cases.
8398 * bfd-in2.h: Rebuild.
8399 * mipsbsd.c (MY(write_object_contents)): Use bfd_mach_m68* rather
8400 than plain numbers.
8401 * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
8402 * cpu-m68k.c (arch_info_struct): Likewise. Add entry for
8403 m68k:68000.
8404 (bfd_m68k_arch): Set mach field to zero to signal no explicit
8405 selection, change printable_name to just "m68k" and make that the
8406 default instead of m68k:68020.
8407
8408 * aout-tic30.c (NAME): Define this to avoid multiple definitions
8409 from aoutx.h.
8410 (MY_get_section_contents): Define as aout_32_get_section_contents
8411 rather than NAME(aout,get_section_contents).
8412
8413 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Fix cast.
8414
8415 * evax-alpha.c (evax_set_arch_mach): Only accept bfd_arch_alpha
8416 and call bfd_default_set_arch_mach to do the real work.
8417
8418 Wed Mar 25 10:41:35 1998 Richard Henderson <rth@cygnus.com>
8419
8420 * bout.c (BALX): Include return register g14 as part of the insn.
8421 (BALX_MASK): New.
8422 (calljx_callback): Use it.
8423
8424 Wed Mar 25 11:19:28 1998 Ian Lance Taylor <ian@cygnus.com>
8425
8426 * libbfd-in.h (BFD_ALIGN): Cast this parameter to bfd_vma.
8427 * libbfd.h: Rebuild.
8428
8429 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Change
8430 byte_count to unsigned int.
8431 (mn10300_elf_relax_section): Initialize internal_relocs. Remove
8432 unused local variables.
8433
8434 * evax-alpha.c (evax_close_and_cleanup): Remove unused local
8435 variables er and er1.
8436
8437 * cpu-v850.c: Include <ctype.h>.
8438 (scan): Case isdigit argument to unsigned char.
8439
8440 From Yan Meroth <YAN.MEROTH@st.com>:
8441 * ihex.c (ihex_scan): Add extbase variable so that getting an
8442 extended linear address record does not ignore any previous
8443 extended address.
8444 (ihex_write_object_contents): When writing out an extended linear
8445 address record, zero out any previous extended address.
8446
8447 Tue Mar 24 16:09:43 1998 Manfred Hollstein <manfred@s-direktnet.de>
8448
8449 * ieee.c (do_one): Check section before dereferencing it.
8450 (ieee_canonicalize_reloc): Likewise with src->relent.sym_ptr_ptr.
8451 (ieee_generic_stat_arch_elt): Likewise with abfd->my_archive.
8452
8453 Mon Mar 23 18:51:47 1998 Joel Sherrill <joel@OARcorp.com>
8454
8455 * config.bfd: (sh*-*-rtems*): Switched from ELF to COFF.
8456
8457 Mon Mar 23 14:23:36 1998 Nick Clifton <nickc@cygnus.com>
8458
8459 * coff-arm.c: Add interworking functions to pe backends.
8460
8461 Fri Mar 20 18:47:20 1998 Ian Lance Taylor <ian@cygnus.com>
8462
8463 * configure.in: Use AM_DISABLE_SHARED.
8464 * aclocal.m4, configure: Rebuild with libtool 1.2.
8465
8466 Fri Mar 20 11:25:41 1998 Nick Clifton <nickc@cygnus.com>
8467
8468 * coff-arm.c (coff_arm_relocate_section): Better error messages
8469 when interowrking conflucts occur. Courtesy of Jonathan Walton
8470 and Tony Thompson.
8471 (aoutarm_std_reloc_howto): Fixed bitsize fields of rightshifted
8472 relocations. Patch courtesy of Jonathan Walton and Tony
8473 Thompson.
8474
8475 Fri Mar 20 02:26:43 1998 Richard Henderson <rth@cygnus.com>
8476
8477 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Revert
8478 part of Feb 22 change controling when to override the existing
8479 symbol with the .plt entry.
8480
8481 Wed Mar 18 09:26:25 1998 Nick Clifton <nickc@cygnus.com>
8482
8483 * config.bfd (targ_cpu): Add thumb-pe target.
8484
8485 * coffcode.h (OTHER_GLOBAL_CLASS): Support thumb external
8486 functions in PE build.
8487
8488 Sun Mar 8 23:37:26 1998 Stan Cox <scox@equinox.cygnus.com>
8489
8490 * config.bfd (sparclite-*-elf*): Added.
8491
8492 Mon Feb 23 19:31:19 1998 Ian Lance Taylor <ian@cygnus.com>
8493
8494 * configure.in: Add elf.lo to elf shell variable.
8495 * Makefile.am (BFD_LIBS): Remove elf.lo.
8496 (BFD_LIBS_CFILES): Remove elf.c.
8497 (BFD32_BACKENDS): Add elf.lo.
8498 (BFD32_BACKENDS_CFILES): Add elf.c.
8499 * configure, Makefile.in: Rebuild.
8500
8501 1998-02-23 15:53 Richard Henderson <rth@cygnus.com>
8502
8503 * elf32-i386.c (elf_i386_relocate_section): A pc-relative
8504 relocation against a non-local symbol should not have a dynamic
8505 relocation.
8506
8507 Mon Feb 23 16:17:08 1998 Ian Lance Taylor <ian@cygnus.com>
8508
8509 * peicode.h (coff_swap_filehdr_in): Don't set BFD flag HAS_SYMS in
8510 COFF filehdr flags.
8511 (pe_print_private_bfd_data): Print PE flags. From Mikey
8512 <jeffdb@netzone.com>.
8513
8514 Sun Feb 22 20:39:00 1998 Richard Henderson <rth@cygnus.com>
8515
8516 * elf32-sparc.c (elf32_sparc_adjust_dynamic_symbol): Don't create
8517 a plt entry when we can determine that we authoritatively define
8518 the symbol.
8519
8520 Sun Feb 22 20:33:05 1998 Richard Henderson <rth@cygnus.com>
8521
8522 * configure.in (COREFILE selection): Remove sparc-*-linux*. They
8523 don't actually use trad-core, but a SunOS-style core file handled
8524 by gdb directly.
8525 * hosts/sparclinux.h: Remove.
8526
8527 Wed Feb 18 15:31:06 1998 Ian Lance Taylor <ian@cygnus.com>
8528
8529 * peicode.h (pe_print_idata): If there is no .idata section, look
8530 for the import tables in some other section. Make the initial
8531 label line up better with the data. Print the import address
8532 table even if there is no import name table. If the import
8533 address table holds actual addresses, print them.
8534
8535 Tue Feb 17 12:58:34 1998 Ian Lance Taylor <ian@cygnus.com>
8536
8537 * libbfd.c (bfd_seek): If fseek fails, save errno around call to
8538 bfd_tell. If errno is EINVAL, set bfd_error_file_truncated, not
8539 bfd_error_system_call.
8540
8541 Fri Feb 13 13:11:33 1998 Ian Lance Taylor <ian@cygnus.com>
8542
8543 * Makefile.am (AUTOMAKE_OPTIONS): Define.
8544 * configure, Makefile.in, aclocal.m4: Rebuild with automake 1.2e.
8545
8546 From H.J. Lu <hjl@gnu.org>:
8547 * Makefile.am (libbfd_la_LDFLAGS): Define.
8548 * Makefile.in: Rebuild.
8549
8550 Thu Feb 12 17:31:11 1998 Ian Lance Taylor <ian@cygnus.com>
8551
8552 NetBSD patches from Gordon W. Ross <gwr@mc.com>:
8553 * netbsd.h (MACHTYPE_OK): Define.
8554 (MY(write_object_contents)): Use DEFAULT_ARCH and DEFAULT_MID when
8555 calling N_SET_MACHTYPE, rather than having a switch.
8556 * libaout.h (enum machine_type): Add M_PMAX_NETBSD, M_VAX_NETBSD,
8557 and M_ALPHA_NETBSD.
8558 * i386netbsd.c (MACHTYPE_OK): Don't define.
8559 (DEFAULT_MID): Define.
8560 * m68k4knetbsd.c (SEGMENT_SIZE): Don't define.
8561 (MACHTYPE_OK): Don't define.
8562 (DEFAULT_MID): Define.
8563 * m68knetbsd.c: (MACHTYPE_OK): Don't define.
8564 (DEFAULT_MID): Define.
8565 * ns32knetbsd.c (MACHTYPE_OK): Don't define.
8566 (DEFAULT_MID): Define.
8567 * sparcnetbsd.c (MACHTYPE_OK): Don't define.
8568 (DEFAULT_MID): Define.
8569
8570 NetBSD patches from Gordon W. Ross <gwr@mc.com>:
8571 * vaxnetbsd.c: New file.
8572 * netbsd-core.c: Clean up. Remove unused macros. Use netbsd
8573 rather than netbsd_core.
8574 * targets.c (vaxnetbsd_vec): Declare.
8575 (bfd_target_vector): Add vaxnetbsd_vec. If NETBSD_CORE is
8576 defined, add netbsd_core_vec.
8577 * configure.in: Set COREFILE for alpha*-*-netbsd* and
8578 powerpc-*-netbsd* to netbsd-core.lo. If COREFILE is
8579 netbsd-core.lo, set COREFLAG to -DNETBSD_CORE.
8580 * config.bfd (alpha*-*-netbsd*): New target.
8581 * Makefile.am: Rebuild dependencies.
8582 (BFD32_BACKENDS): Add vaxnetbsd.lo.
8583 (BFD32_BACKENDS_CFILES): Add vaxnetbsd.c.
8584 * configure, Makefile.in: Rebuild.
8585
8586 * configure.host: Remove the old shared library build stuff. We
8587 now use libtool instead.
8588
8589 Wed Feb 11 17:13:09 1998 Richard Henderson <rth@cygnus.com>
8590
8591 * tekhex.c (tekhex_write_object_contents): Call tekhex_init.
8592
8593 Tue Feb 10 19:23:28 1998 H.J. Lu <hjl@gnu.org>
8594
8595 * configure.in: Take stab-syms.lo out of sparclinux_vec list.
8596 * configure: Rebuild.
8597
8598 Tue Feb 10 15:16:38 1998 Nick Clifton <nickc@cygnus.com>
8599 * elf32-v850.c (remember_hi16s_reloc): New function.
8600 (find_remembered_hi16s_reloc): New function.
8601 (v850_elf_store_addend_in_insn): Use the above new functions to
8602 match up HI6S relocs with LO16 relocs.
8603
8604 Tue Feb 10 15:01:39 1998 Ian Lance Taylor <ian@cygnus.com>
8605
8606 * configure.in: Change -linux* to -linux-gnu*.
8607 * config.bfd, configure.host: Likewise.
8608 * configure: Rebuild.
8609
8610 Mon Feb 9 19:40:59 1998 Nick Clifton <nickc@cygnus.com>
8611
8612 * elf32-v850.c (v850_elf_store_addend_in_insn): Fix another
8613 LO16/HI16S bug and improve comments about what is going on.
8614
8615 Sat Feb 7 15:27:03 1998 Ian Lance Taylor <ian@cygnus.com>
8616
8617 * configure, aclocal.m4: Rebuild with new libtool.
8618
8619 Fri Feb 6 14:48:20 1998 Nick Clifton <nickc@cygnus.com>
8620
8621 * elf32-v850.c (v850_elf_merge_private_bfd_data): Do not complain
8622 when merging v850 code into v850e/v850ea code. Do not initialise
8623 output flags if the input is the default architecture.
8624
8625 Fri Feb 6 11:50:22 1998 Jeffrey A Law (law@cygnus.com)
8626
8627 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): For BFD_RELOC_CTOR
8628 get the size from bfd_arch_bits_per_address instead of directly
8629 from the isa.
8630
8631 Thu Feb 5 14:21:34 1998 Michael Meissner <meissner@cygnus.com>
8632
8633 * libbfd-in.h (BFD_ALIGN): If rounding up would cause the address
8634 to wrap, just return all 1's bits instead.
8635 * libbfd.h: Regenerate.
8636
8637 Thu Feb 5 11:51:05 1998 Ian Lance Taylor <ian@cygnus.com>
8638
8639 * coff-i386.c (coff_pe_i386_relocate_section): New static function
8640 if COFF_WITH_PE.
8641 (coff_relocate_section): If COFF_WITH_PE, define as
8642 coff_pe_i386_relocate_section.
8643 * coffcode.h (coff_write_object_contents): If COFF_IMAGE_WITH_PE,
8644 skip empty sections, to match coff_write_object_contents.
8645
8646 * elf64-mips.c (mips_elf64_swap_reloca_out): Swap out r_addend,
8647 rather than swapping out r_offset twice. From Luke Deller
8648 <luked@cse.unsw.edu.au>.
8649
8650 Wed Feb 4 19:11:28 1998 Ian Lance Taylor <ian@cygnus.com>
8651
8652 * configure.in: Set libtool_enable_shared rather than
8653 libtool_shared. Remove diversion hack.
8654 * configure, Makefile.in, doc/Makefile.in, aclocal.m4: Rebuild
8655 with new libtool.
8656
8657 Wed Feb 4 16:10:21 1998 Brent Baccala <baccala@freesoft.org>
8658
8659 * syms.c (struct stab_cache): Define.
8660 (struct stab_find_info): Remove cached_offset, cached_stab,
8661 cached_str, and cached_stroff fields. Add file_cache,
8662 function_cache, and line_cache fields.
8663 (_bfd_stab_section_find_nearest_line): Use extensive caching to
8664 speed up searches.
8665
8666 Wed Feb 4 13:34:22 1998 Ian Lance Taylor <ian@cygnus.com>
8667
8668 * peicode.h (pe_print_idata): Check for import of ordinal rather
8669 than name.
8670 (pe_print_edata): If there is no .edata section, look for the
8671 export data in some other section.
8672
8673 Mon Feb 2 20:05:42 1998 Jason Molenda (crash@bugshack.cygnus.com)
8674
8675 * configure.in: Change version to 2.8.4.
8676 * configure: Regenerated.
8677
8678 Mon Feb 2 17:39:39 1998 Steve Haworth <steve@pm.cse.rmit.EDU.AU>
8679
8680 Add tms320c30 support:
8681 * cpu-tic30.c: New file.
8682 * aout-tic30.c: New file.
8683 * coff-tic30.c: New file.
8684 * archures.c (bfd_arch_tic30): Define.
8685 (bfd_tic30_arch): Declare.
8686 (bfd_archures_list): Add bfd_tic30_arch.
8687 * targets.c (bfd_target_vector): Add tic30_aout_vec and
8688 tic30_coff_vec.
8689 * reloc.c (BFD_RELOC_TIC30_LDP): Define.
8690 * coffcode.h (coff_set_arch_mach_hook): Add tic30 case.
8691 (coff_set_flags): Likewise.
8692 * config.bfd (tic30-*-*aout*, tic30-*-*coff*): New targets.
8693 * configure.in (tic30_aout_vec, tic30_coff_vec): New vectors.
8694 * Makefile.am: Rebuild dependencies.
8695 (ALL_MACHINES): Add cpu-tic30.lo.
8696 (ALL_MACHINES_CFILES): Add cpu-tic30.c.
8697 (BFD32_BACKENDS): Add aout-tic30.lo and coff-tic30.lo.
8698 (BFD32_BACKENDS_CFILES): Add aout-tic30.c and coff-tic30.c.
8699 * configure, Makefile.in, bfd-in2.h, libbfd.h: Rebuild.
8700
8701 Mon Feb 2 12:25:12 1998 Nick Clifton <nickc@cygnus.com>
8702
8703 * elf32-v850.c (v850_elf_store_addend_in_insn): Allow HI16_S reloc
8704 to lag behind LO16 reloc by a couple of instructions.
8705
8706 Mon Feb 2 14:09:46 1998 Ian Lance Taylor <ian@cygnus.com>
8707
8708 * Makefile.am ($(srcdir)/bfd-in2.h): Add dummy command to force
8709 make to reexamine the file timestamp.
8710 ($(srcdir)/libbfd.h, $(srcddir)/libcoff.h): Likewise.
8711
8712 * elf64-alpha.c (ELF_MAXPAGESIZE): Change to 0x10000 from
8713 0x100000.
8714
8715 Fri Jan 30 19:07:07 1998 Geoff Keating <geoffk@ozemail.com.au>
8716
8717 * elf32-ppc.c (ppc_elf_create_dynamic_sections): New procedure
8718 to create .dynsbss and .rela.sbss sections.
8719 (ppc_elf_adjust_dynamic_symbol): Put space for small data to be
8720 copied from dynamic objects into .sbss.
8721 (ppc_elf_size_dynamic_sections): Strip .rela.sbss if we don't
8722 use it. Correct typo of .rela.sdata2.
8723 (ppc_elf_finish_dynamic_symbol): Generate reloc to where we
8724 put the data, which may now be in .sbss.
8725 (ppc_elf_relocate_section): A SDAREL16 reloc can be in dynsbss.
8726 (elf_backend_create_dynamic_sections): Define as
8727 ppc_elf_create_dynamic_sections.
8728
8729 * elf32-ppc.c (ppc_elf_check_relocs): Don't emit R_PPC_REL* relocs
8730 against _GLOBAL_OFFSET_TABLE_.
8731 (ppc_elf_relocate_section): Don't emit R_PPC_REL32 relocs in
8732 shared libraries which refer to local symbols. Make sure that the
8733 test for allocating space for a reloc in a shared object is the
8734 same as the test for emitting a reloc.
8735
8736 Thu Jan 29 15:55:35 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
8737
8738 * config.bfd (i[3456]-*-mingw32*): New target.
8739 * acinclude.m4 (BFD_BINARY_OPEN): Check for mingw32.
8740 * aclocal.m4, configure: Rebuild.
8741
8742 Wed Jan 28 13:41:26 1998 Ian Lance Taylor <ian@cygnus.com>
8743
8744 * elf.c (_bfd_elf_close_and_cleanup): Only check the strtab if we
8745 have a bfd_object.
8746
8747 Tue Jan 27 21:43:55 1998 Richard Henderson <rth@cygnus.com>
8748
8749 Sparc v9 ABI compliant PLT:
8750 * elf64-sparc.c (PLT_HEADER_SIZE): V9 ABI uses 4 entries.
8751 (plt_templates, sparc64_elf_build_plt_entry): Delete.
8752 (LARGE_PLT_THRESHOLD): New define.
8753 (GOT_RESERVED_ENTRIES): V9 ABI only uses 1.
8754 (sparc64_elf_build_plt): New function.
8755 (sparc64_elf_plt_entry_offset): Likewise.
8756 (sparc64_elf_plt_ptr_offset): Likewise.
8757 (sparc64_elf_adjust_dynamic_symbol): Change h->plt_offset to
8758 contain the index for convenience. Skip the initial entries
8759 in .rela.plt.
8760 (sparc64_elf_size_dynamic_sections): Zero the allocated contents
8761 memory for the benefit of .rela.plt.
8762 (sparc64_elf_relocate_section): Call sparc64_elf_plt_entry_offset.
8763 (sparc64_elf_finish_dynamic_symbol): Kill template stuff. Use
8764 sparc64_elf_plt_entry_offset & sparc64_elf_plt_ptr_offset for reloc.
8765 (sparc64_elf_finish_dynamic_sections): DT_PLTGOT points to .plt.
8766 Call sparc64_elf_build_plt.
8767 (elf_backend_want_got_plt): No.
8768 (elf_backend_plt_readonly): No.
8769 (elf_backend_plt_alignment): 8.
8770
8771 * elf.c (_bfd_elf_close_and_cleanup): New function; free the shstrtab.
8772 * elf-bfd.h (_bfd_elf_close_and_cleanup): Declare it.
8773 * elfxx-target.h (bfd_elfNN_close_and_cleanup): Arrange for it
8774 to be called.
8775
8776 Tue Jan 27 21:45:15 1998 Jeffrey A Law (law@cygnus.com)
8777
8778 * archures.c (bfd_mach_mips*): Add definitions for various MIPS
8779 processors.
8780 * cpu-mips.c (arch_info_struct): Add mips variants.
8781 * bfd-in2.h: Rebuilt.
8782
8783 Tue Jan 27 15:06:04 1998 Nick Clifton <nickc@cygnus.com>
8784
8785 * coff-arm.c (coff_arm_relocate_section): Preserve the contents of
8786 t2a3_b_insn.
8787
8788 Tue Jan 27 12:47:27 1998 Robert Lipe <robertl@dgii.com>
8789
8790 * config.bfd (i[3456]86-sco3.2v5*): ELF now the default.
8791 (i[3456]86sco3.2v5*coff): New target.
8792
8793 Mon Jan 26 15:41:30 1998 Ian Lance Taylor <ian@cygnus.com>
8794
8795 * bfd-in2.h: Rebuild with changes to chew--tab expansion.
8796
8797 Thu Jan 22 21:26:48 1998 Richard Henderson <rth@cygnus.com>
8798
8799 * bfd.c (bfd_get_error_handler): Add orthogonal function.
8800 * bfd-in2.h: Regenerate.
8801
8802 Thu Jan 22 21:13:39 1998 Richard Henderson <rth@cygnus.com>
8803
8804 * tekhex.c (tekhex_write_object_contents): Check for no symbols.
8805
8806 Wed Jan 21 21:19:03 1998 Ian Lance Taylor <ian@cygnus.com>
8807
8808 * coff-i386.c (coff_i386_rtype_to_howto): If COFF_WITH_PE, don't
8809 adjust addend for an output common symbol (from Jimmy Blair
8810 <jimmyb@wrs.com>). If COFF_WITH_PE, adjust addend for PC relative
8811 defined symbol to counteract adjustment made in generic relocation
8812 code.
8813
8814 * dwarf2.c: Include sysdep.h, not stdio.h and stdlib.h.
8815
8816 Wed Jan 21 21:16:06 1998 Manfred Hollstein <manfred@s-direktnet.de>
8817
8818 * coff-m88k.c (GET_SCNDHR_NRELOC): Fix typo in macro name.
8819 (GET_SCNDHR_NLNNO): Likewise.
8820
8821 Mon Jan 19 12:49:52 1998 Ian Lance Taylor <ian@cygnus.com>
8822
8823 * cpu-sh.c (arch_info_struct): Correct next field of sh3e.
8824
8825 Wed Jan 14 17:23:27 1998 Nick Clifton <nickc@cygnus.com>
8826
8827 * elf32-m32r.c: Add macros to handle NOP insertion.
8828
8829 Wed Jan 14 16:15:22 1998 Richard Henderson <rth@cygnus.com>
8830
8831 * xcofflink.c (xcoff_mark_symbol): Don't mark the absolute section.
8832 (xcoff_mark): Likewise.
8833 (xcoff_build_ldsyms): Mark absolute symbols.
8834
8835 Wed Jan 14 16:03:11 1998 Richard Henderson <rth@cygnus.com>
8836
8837 * bout.c (b_out_write_object_contents): Sort symbols before output
8838 to keep {CALL,BAL}NAME symbols adjacent.
8839 (b_out_symbol_cmp): New function.
8840
8841 For older changes see ChangeLog-9697
8842 \f
8843 Local Variables:
8844 mode: change-log
8845 left-margin: 8
8846 fill-column: 74
8847 version-control: never
8848 End: