b55c6df9268729b93a623a0673d30ae048df2921
[deliverable/binutils-gdb.git] / bfd / ChangeLog
1 2002-08-26 Alan Modra <amodra@bigpond.net.au>
2
3 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
4
5 2002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6
7 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
8 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
9 Likewise.
10 (struct elf_sh_pcrel_relocs_copied): Removed.
11 (struct elf_sh_dyn_relocs): New.
12 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
13 field with dyn_relocs.
14 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
15 sections and sym_sec.
16 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
17 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
18 (sh_elf_create_dynamic_sections): Use create_got_section instead
19 of _bfd_elf_create_got_section.
20 (sh_elf_check_relocs): Likewise.
21 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
22 sections.
23 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
24 sh_elf_relocate_section, sh_elf_check_relocs,
25 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
26 Likewise.
27 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
28 dynamic relocations and avoiding the copy relocation when we
29 didn't find any dynamic relocations in the section which has
30 contents or is read-only.
31 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
32 (sh_elf_size_dynamic_sections): Don't reset the size of
33 .rela.got section even if dynamic_sections_created flag is off.
34 Don't use sh_elf_discard_copies. Scan all input bfd and use
35 allocate_dynrelocs. Call readonly_dynrelocs to determine
36 whether we need DT_TEXTREL.
37 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
38 whether the symbol was never referred to.
39 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
40 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
41 (sh_elf_check_relocs): Call create_got_section if the short-cut
42 to .got is null. Increment reference counters only instead of
43 allocating space on dynamic sections here. Don't conditionalize
44 uninitialized got.offset value when marking the symbol as a
45 global offset table entry. Keep relocations for symbols satisfied
46 by a dynamic library to avoid copy relocations for the symbol.
47 Set dynobj field of an elf hash table if needed.
48 (sh_elf_finish_dynamic_sections): Handle null section pointer
49 correctly.
50 (elf_backend_copy_indirect_symbol): Defined.
51 (elf_backend_can_refcount): Defined.
52
53 2002-08-23 Nick Clifton <nickc@redhat.com>
54
55 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
56 previous change. Add comment explaining why.
57
58 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
59
60 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
61 contents of .got.plt[2] to tr0, not address of .got.plt.
62 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
63 patching absolute plt entry. For shmedia plt entry, set bottom bit
64 of branch to plt0 as this is a branch to an shmedia instruction.
65 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
66 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
67 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
68 branch to plt0.
69 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
70 patching absolute plt entry. For shmedia plt entry, branch to
71 plt0 is now ptrel, so use relative offset. Set bottom bit of
72 branch target as it is a branch to an shmedia instruction.
73
74 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
75 Richard Shann <richard.shann@superh.com>
76
77 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
78 value if .init is an SHmedia function. Similarly for DT_FINI.
79 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
80
81 2002-08-23 Stephen Clarke <stephen.clarke@superh.com>
82
83 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
84 dynamic section.
85 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
86
87 2002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
88
89 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
90 byte read when reading the return address register column.
91
92 2002-08-22 Nick Clifton <nickc@redhat.com>
93
94 * config.bfd: Add powepc64-*-*bsd* target.
95
96 2002-08-22 Graeme Peterson <gp@qnx.com>
97
98 * Makefile.am: Add entries for elf32-shqnx.c
99 * Makefile.in: Regenerate.
100 * config.bfd: Add support sh-*-nto* target.
101 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
102 * configure: Regenerate.
103 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
104 * elf32-sh.c: Do not include elf32-target.h if
105 ELF32_SH_C_INCLUDED is defined.
106 * elf32-shqnx.c: New file: Support for QNX.
107 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
108
109 2002-08-22 Nick Clifton <nickc@redhat.com>
110
111 * po/tr.po: Updated Turkish translation.
112
113 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
114 symbols are not read.
115
116 2002-08-22 Alan Modra <amodra@bigpond.net.au>
117
118 * elf32-m68hc11.c: Formatting fixes.
119 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
120 * elf32-m68hc12.c: Formatting fixes.
121 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
122
123 2002-08-22 Alan Modra <amodra@bigpond.net.au>
124
125 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
126 SEC_DATA.
127 (pmac_xcoff_vec): Likewise.
128 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
129 (aix5coff64_vec): Likewise.
130
131 2002-08-22 Alan Modra <amodra@bigpond.net.au>
132
133 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
134 param to elf_backend_copy_indirect_symbol.
135 (_bfd_elf_link_hash_copy_indirect): Likewise.
136 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
137 calls to copy_indirect_symbol.
138 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
139 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
140 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
141 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
142 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
143 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
144 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
145 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
146 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
147 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
148 test refcounts for "used" values.
149
150 2002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
151
152 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
153 argument declaration.
154
155 2002-08-19 Elena Zannoni <ezannoni@redhat.com>
156
157 * archures.c (bfd_mach_ppc_e500): Added.
158 * bfd-in2.h: Rebuilt.
159 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
160
161 2002-08-19 Alan Modra <amodra@bigpond.net.au>
162
163 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
164
165 2002-08-17 Andrew Cagney <ac131313@redhat.com>
166
167 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
168 `bfd_byte'.
169
170 2002-08-17 Stan Cox <scox@redhat.com>
171
172 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
173 IRIX 6 segment layout for NEWABI.
174
175 2002-08-16 Stephen Clarke <stephen.clarke@superh.com>
176
177 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
178 symbols when looking for section referred to by a relocation.
179 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
180
181 2002-08-15 Alan Modra <amodra@bigpond.net.au>
182
183 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
184
185 2002-08-15 Hans-Peter Nilsson <hp@axis.com>
186
187 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
188 missing check for whether the symbol is referenced by DSO before
189 unexporting it as an unneeded dynamic symbol.
190
191 2002-08-14 H.J. Lu <hjl@gnu.org>
192
193 * libbfd.h: Regenerate.
194
195 2002-08-14 H.J. Lu <hjl@gnu.org>
196
197 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
198
199 2002-08-14 Stephane Carrez <stcarrez@nerim.fr>
200
201 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
202 instructions.
203 (m68hc11_direct_relax): New to define table of relaxable instructions.
204 (find_relaxable_insn): New, find a relaxable insn.
205 (compare_reloc): New to compare two relocs.
206 (m68hc11_elf_relax_section): New, relax text sections.
207 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
208 (elf32_m68hc11_check_relocs): New function for GC support.
209 (elf32_m68hc11_relocate_section): New function for GC support.
210 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
211 (elf_backend_check_relocs): Likewise.
212 (elf_backend_relocate_section): Likewise.
213
214 2002-08-13 H.J. Lu <hjl@gnu.org>
215
216 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
217 definitions in shared objects when checking symbol with
218 undefined version.
219
220 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
221
222 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
223 (elf32_m68hc11_gc_sweep_hook): Likewise.
224 (elf_backend_gc_mark_hook): Define for GC section support.
225 (elf_backend_gc_sweep_hook): Likewise.
226 (elf_backend_can_gc_sections): Likewise.
227
228 * elf32-m68hc12.c: Likewise.
229
230 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
231
232 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
233 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
234 (_bfd_m68hc11_elf_set_private_flags): New function.
235 Use them to set/check/print ELF flags specific to 68HC11.
236
237 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
238 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
239 (_bfd_m68hc12_elf_set_private_flags): New function.
240 Use them to set/check/print ELF flags specific to 68HC12.
241
242 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
243
244 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
245 fix masks for PC-rel relocs.
246 (m68hc11_elf_ignore_reloc): New function.
247
248 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
249 68HC12 banked addressing relocs.
250 (m68hc12_phys_addr): New to compute physical address of banked memory.
251 (m68hc12_phys_page): Likewise for page.
252 (m68hc12_addr_is_banked): New to see if address is in banked area.
253 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
254
255 2002-08-13 Stephane Carrez <stcarrez@nerim.fr>
256
257 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
258 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
259 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
260 * bfd-in2.h: Regenerate.
261
262 2002-08-12 H.J. Lu <hjl@gnu.org>
263
264 * elflink.h (elf_add_default_symbol): Preserve section across
265 elf_merge_symbol.
266
267 2002-08-09 Graeme Peterson <gp@qnx.com>
268
269 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
270 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
271 * Makefile.in: Regenerate.
272 * config.bfd: Add support for powerpc{le}-*-nto targets.
273 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
274 * configure: Regenerate.
275 * elf32-i386qnx.c: Moved backend functions into a QNX specific
276 common file "elf32-qnx.h", and now include that file.
277 * elf32-qnx.h: New file: QNX specific common elf backend.
278 * elf32-ppc.c: Do not include elf32-target.h if
279 ELF32_PPC_C_INCLUDED is defined.
280 * elf32-ppcqnx.c: New file: Support for QNX.
281 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
282 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
283
284 2002-08-09 Nick Clifton <nickc@redhat.com>
285
286 * po/sv.po: Updated Swedish translation.
287
288 2002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
289
290 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
291 g->global_gotsym is NULL.
292
293 2002-08-08 H.J. Lu <hjl@gnu.org>
294
295 * elflink.h (elf_add_default_symbol): Don't warn if a definition
296 overrides an indirect versioned symbol.
297
298 2002-08-08 Jakub Jelinek <jakub@redhat.com>
299
300 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
301 for R_386_TLS_TPOFF32 relocs against symndx 0.
302
303 2002-08-07 H.J. Lu <hjl@gnu.org>
304
305 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
306 with undefined version if needed.
307 (elf_link_assign_sym_version): Match a default symbol with a
308 version without definition. No need to hide the default
309 definition separately.
310
311 2002-08-08 Alan Modra <amodra@bigpond.net.au>
312
313 * elflink.h (elf_link_output_extsym): Don't output symbols from
314 SEC_EXCLUDE sections.
315
316 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
317
318 2002-08-07 Alan Modra <amodra@bigpond.net.au>
319
320 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
321 entries.
322
323 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
324
325 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
326 mismatch.
327
328 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
329
330 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
331
332 2002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
333
334 * elf32-mips.c (mips_reloc_map): Fix typo.
335
336 2002-08-06 Alan Modra <amodra@bigpond.net.au>
337
338 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
339
340 2002-08-06 Alan Modra <amodra@bigpond.net.au>
341
342 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
343
344 2002-08-06 Alan Modra <amodra@bigpond.net.au>
345
346 * libxcoff.h: Use PARAMS on function declarations.
347 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
348 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
349
350 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
351 addend.
352 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
353
354 2002-08-06 Alan Modra <amodra@bigpond.net.au>
355
356 * coff-rs6000.c: Formatting fixes.
357 (xcoff_calculate_relocation): Use PARAMS in declaration.
358 (xcoff_complain_overflow): Likewise.
359 (xcoff_ppc_relocate_section): Use old-style function pointer call.
360 (bfd_xcoff_backend_data): Remove useless comments.
361 (rs6000coff_vec): Likewise.
362 (bfd_pmac_xcoff_backend_data): Likewise.
363 (pmac_xcoff_vec): Likewise.
364
365 * coff64-rs6000.c: Formatting fixes.
366 (xcoff64_calculate_relocation): Use PARAMS in declaration.
367 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
368 (bfd_xcoff_backend_data): Remove useless comments.
369 (rs6000coff64_vec): Likewise.
370 (bfd_xcoff_aix5_backend_data): Likewise.
371 (aix5coff64_vec): Likewise.
372
373 2002-08-06 Alan Modra <amodra@bigpond.net.au>
374
375 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
376 mask entries. Use complain_overflow_dont for R_REF.
377 (xcoff_reloc_type_ba): Revert last change.
378 (xcoff_reloc_type_br): Likewise.
379 (xcoff_reloc_type_crel): Likewise.
380 (xcoff_ppc_relocate_section): Likewise.
381 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
382 (xcoff64_ppc_relocate_section): Likewise.
383 (xcoff64_howto_table): Revert some of last change to mask entries.
384 Use complain_overflow_dont for R_REF.
385
386 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
387 relocs with bitsize == 16 have size = 1.
388 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
389 (xcoff_reloc_type_br): Likewise.
390 (xcoff_reloc_type_crel): Likewise.
391 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
392 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
393 dst_mask adjustment.
394 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
395 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
396 bitsize == 16 have size = 1.
397
398 2002-08-01 Denis Chertykov <denisc@overta.ru>
399
400 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
401 (struct misc): New field isymbuf. All free_* fields removed.
402 (symbol_value): Pass in internal syms. No need to swap syms in.
403 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
404 possibly cached info.
405 (tidyup_after_error): Removed.
406 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
407 misc. Use new field.
408 (adjust_all_relocations): Use internal syms. No need to swap syms
409 in and out.
410 (add_page_insn): Don't use removed fields of struct misc.
411
412 2002-08-01 Nick Clifton <nickc@redhat.com>
413
414 * elf32-arm.h: Revert previous delta.
415
416 2002-08-01 Nick Clifton <nickc@redhat.com>
417
418 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
419 * configure: Regenerate.
420
421 2002-07-31 H.J. Lu <hjl@gnu.org>
422
423 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
424 selected.
425
426 2002-07-31 H.J. Lu <hjl@gnu.org>
427
428 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
429 is selected.
430
431 2002-07-31 Jakub Jelinek <jakub@redhat.com>
432
433 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
434 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
435
436 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
437
438 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
439 There is no 8 byte relocation type for this architecture.
440 (do_ns32k_reloc): Use bfd_vma instead of native types.
441 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
442 returns void.
443 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
444 rely on generic code to do that.
445 * aout-ns32k.c (howto_table): Add appropriate overflow detection
446 to all table entries.
447 (_bfd_ns32k_relocate_contents): put_data returns void.
448 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
449 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
450 return void.
451
452 2002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
453
454 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
455 archive object is target dependant.
456
457 2002-07-31 Adam Nemet <anemet@lnxw.com>
458
459 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
460 (THUMB_PLT_ENTRY_SIZE): New macro.
461 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
462 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
463 ARM_PLT_ENTRY_SIZE.
464 (elf32_arm_plt_entry): Likewise.
465 (elf_backend_plt_header_size): Likewise.
466 (elf32_thumb_plt0_entry): New global.
467 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
468 into .plt.thumb.
469 (elf32_thumb_plt_entry): New global.
470 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
471 Thumb entries. Set the bottom bit of the corresponding GOT entry
472 for a Thumb PLT entry.
473 (struct elf32_arm_plt_entry_info): New structure.
474 (struct elf32_arm_link_hash_entry, plt_info): New member of this
475 type.
476 (elf32_arm_link_hash_newfunc): Initialize new member.
477 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
478 relocations against the PLT.
479 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
480 first_rel_type if this is the first time we encounter the symbol.
481 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
482 Determine if relocation needs a PLT entry. Set first_rel_type if
483 this is the first time we encounter the symbol
484 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
485 functions as well.
486 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
487 (elf32_arm_create_dynamic_sections): New function. Create the
488 .plt.thumb section.
489 (elf_backend_create_dynamic_sections): Call it.
490
491 2002-07-31 Nick Clifton <nickc@redhat.com>
492
493 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
494 'alternative' in order to avoid shadowing global symbol of the
495 same name.
496 * bfd-in2.h: Regenerate.
497 * libbfd.h: Regenerate.
498 * libcoff.h: Regenerate.
499
500 2002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
501
502 * Makefile.am: Add n32 ABI support.
503 * Makefile.in: Regenerate.
504 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
505 bit vectors for mips*-*-linux targets as optional.
506 * configure.in: Add n32 ABI vectors.
507 * configure: Regenerate.
508 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
509 * elfn32-mips.c: New file, n32 ABI support.
510 * targets.c: Add n32 ABI vectors.
511
512 2002-07-30 Graeme Peterson <gp@qnx.com>
513
514 * elfarmqnx-nabi.c: New file: Support for QNX.
515 * config.bfd: Add support for arm-*-nto target.
516 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
517 * configure: Regenerate.
518 * Makefile.am: Add entries for elfarmqnx-nabi.c.
519 * Makefile.in: Regenerate.
520 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
521 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
522 * elfarm-nabi.c: Do not include elf32-arm.h if
523 ELFARM_NABI_C_INCLUDED is defined.
524 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
525
526 2002-07-30 Nick Clifton <nickc@redhat.com>
527
528 * po/sv.po: Updated Swedish translation.
529
530 2002-07-30 Jakub Jelinek <jakub@redhat.com>
531
532 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
533
534 2002-07-30 Alan Modra <amodra@bigpond.net.au>
535
536 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
537 * archive.c (bfd_generic_archive_p): Likewise.
538 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
539 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
540 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
541 (xcoff64_archive_p): Likewise.
542 (xcoff64_openr_next_archived_file): Likewise.
543 (xcoff64_archive_p): Clean up tdata properly on error.
544 * coffgen.c (coff_real_object_p): Likewise.
545 (coff_object_p): Release filehdr and opthdr.
546 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
547 * ieee.c (ieee_archive_p): Likewise.
548 * ihex.c (ihex_object_p): Likewise.
549 (ihex_mkobject): Always allocate tdata.
550 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
551 * srec.c (srec_mkobject): Always allocate tdata.
552 (srec_object_p): Clean up tdata properly on error.
553 (symbolsrec_object_p): Likewise.
554 * versados.c (versados_object_p): Likewise.
555 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
556 and bfd_realloc instead of realloc.
557 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
558 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
559 place of bfd_malloc, simplifying error freeing. Free hash table too.
560 (vms_object_p): Clean up tdata on error.
561 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
562 (vms_close_and_cleanup): Adjust for bfd_alloc use.
563
564 2002-07-30 Alan Modra <amodra@bigpond.net.au>
565
566 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
567
568 2002-07-26 Chris Demetriou <cgd@broadcom.com>
569
570 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
571 flags into resulting BFD.
572
573 2002-07-26 Alan Modra <amodra@bigpond.net.au>
574
575 From John Reiser <jreiser@BitWagon.com>
576 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
577 tls_ldm_got.refcount.
578
579 2002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
580
581 * elf64-mips.c: Update TODO comment.
582 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
583 mips_elf64_gprel16_reloca): Remove prototypes.
584 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
585 (UNUSED_RELOC): Replace by EMPTY_RELOC.
586 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
587 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
588 R_MIPS_HIGHEST.
589 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
590 R_MIPS_GOT16. Remove wrong comments.
591 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
592 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
593 from elf32-mips.c.
594 (mips_elf64_hi16_reloc): Fix formatting.
595 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
596 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
597 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
598 (mips_elf64_gprel16_reloc): Make static. Add check for
599 partial_inplace.
600 (mips_elf64_gprel16_reloca): Remove.
601 (mips_elf64_literal_reloc): New function.
602 (mips_elf64_gprel32_reloc): Fix formatting.
603 (mips_elf64_shift6_reloc): Fix comment. Make static.
604 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
605 elf32-mips.c.
606 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
607 elf32-mips.c
608 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
609 specific relocations.
610 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
611 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
612 (ELF_MAXPAGESIZE): Add comment.
613
614 2002-07-25 Nick Clifton <nickc@redhat.com>
615
616 * po/sv.po: Updated Swedish translation.
617 * po/es.po: Updated Spanish translation.
618 * po/fr.po: Updated French translation.
619
620 2002-07-25 Alan Modra <amodra@bigpond.net.au>
621
622 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
623 as elf_link_record_local_dynamic_symbol.
624 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
625 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
626 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
627 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
628 attempt is made to record a symbol in a discarded section, and
629 return `2' in that case.
630
631 2002-07-24 Nick Clifton <nickc@redhat.com>
632
633 * po/sv.po: Updated Swedish translation.
634 * po/es.po: Updated Spanish translation.
635
636 2002-07-23 Alan Modra <amodra@bigpond.net.au>
637
638 * po/SRC-POTFILES.in: Regenerate.
639
640 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
641 immediately. Remove code handling relocatable linking.
642 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
643 * elf32-cris.c (cris_elf_relocate_section): Likewise.
644 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
645 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
646 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
647 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
648 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
649 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
650 * elf32-v850.c (v850_elf_relocate_section): Likewise.
651 * elf32-vax.c (elf_vax_relocate_section): Likewise.
652 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
653 * elf32-avr.c (elf_backend_rela_normal): Define.
654 * elf32-cris.c: Likewise.
655 * elf32-fr30.c: Likewise.
656 * elf32-frv.c: Likewise.
657 * elf32-h8300.c: Likewise.
658 * elf32-hppa.c: Likewise.
659 * elf32-ip2k.c: Likewise.
660 * elf32-sparc.c: Likewise.
661 * elf32-v850.c: Likewise.
662 * elf32-vax.c: Likewise.
663 * elf64-hppa.c: Likewise.
664 * elf64-sparc.c: Likewise.
665 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
666 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
667 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
668 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
669 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
670 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
671 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
672 * elf-m10200.c (USE_RELA): Don't define.
673 * elf-m10300.c: Likewise.
674 * elfarm-oabi.c: Likewise.
675 * elf32-i370.c: Likewise.
676 * elf32-ip2k.c: Likewise.
677 * elf32-m68k.c: Likewise.
678 * elf32-mcore.c: Likewise.
679 * elf32-ppc.c: Likewise.
680 * elf32-s390.c: Likewise.
681 * elf32-vax.c: Likewise.
682 * elf64-ppc.c: Likewise.
683 * elf64-s390.c: Likewise.
684 * elf64-x86-64.c: Likewise.
685 * elfxx-ia64.c: Likewise.
686 * elf32-avr.c (USE_REL): Don't undef.
687 * elf32-ip2k.c: Likewise.
688
689 2002-07-23 Nick Clifton <nickc@redhat.com>
690
691 * elf-bfd.h (struct elf_backend_data): Add new bitfield
692 'want_p_paddr_set_to_zero'.
693 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
694 to false;
695 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
696 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
697
698 2002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
699
700 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
701 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
702 show the Copyright string.
703 Minor formatting tidy ups.
704
705 2002-07-23 Nick Clifton <nickc@redhat.com>
706
707 * po/fr.po: Updated French translation.
708 * po/sv.po: Updated Swedish translation.
709
710 2002-07-23 Alan Modra <amodra@bigpond.net.au>
711
712 * elflink.h (elf_link_input_bfd): Don't change internal symbols
713 when outputting relocs.
714
715 2002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
716
717 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
718 DT_PLTGOT into the dynamic section if there is a PLT.
719
720 2002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
721
722 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
723 elf32-mips.c.
724 (_bfd_mips_elf_write_section): Likewise.
725 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
726 (_bfd_mips_elf_write_section): Likewise.
727 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
728 (elf32_mips_write_section): Likewise.
729 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
730 (_bfd_mips_elf_write_section): Likewise.
731
732 2002-07-19 Alan Modra <amodra@bigpond.net.au>
733
734 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
735 PT_IA_64_UNWIND segments for a given section.
736
737 2002-07-17 H.J. Lu <hjl@gnu.org>
738
739 * Makefile.am: Fix a typo.
740 * Makefile.in: Regenerate.
741
742 2002-07-15 Denis Chertykov <denisc@overta.ru>
743 Frank Ch. Eigler <fche@redhat.com>
744 Ben Elliston <bje@redhat.com>
745 Alan Lehotsky <alehotsky@cygnus.com>
746 John Healy <jhealy@redhat.com>
747 Graham Stott <grahams@redhat.com>
748 Jeff Johnston <jjohnstn@redhat.com>
749
750 * Makefile.am: Add support for ip2k.
751 * Makefile.in: Regenerate.
752 * doc/Makefile.in: Regenerate.
753 * archures.c: Add support for ip2k.
754 * config.bfd: Add support for ip2k.
755 * configure.in: Add support for ip2k.
756 * configure: Regenerate.
757 * reloc.c: Add support for ip2k.
758 * targets.c: Add support for ip2k.
759 * bfd-in2.h: Regenerate.
760 * libbfd.h: Regenerate.
761 * cpu-ip2k.c: New file.
762 * elf32-ip2k.c: New file.
763
764 2002-07-17 Ian Rickards <irickard@arm.com>
765
766 * dwarf2.c (concat_filename): If we can't establish the directory
767 just return the filename.
768
769 2002-07-16 Moritz Jodeit <moritz@jodeit.org>
770
771 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
772
773 2002-07-16 Alan Modra <amodra@bigpond.net.au>
774
775 * elflink.h: Formatting fixes, tidy prototypes.
776 (elf_link_assign_sym_version): Move common code out of loop.
777
778 2002-07-16 Alan Modra <amodra@bigpond.net.au>
779
780 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
781 reloc section size is zero. Correct reloc output location.
782
783 2002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
784
785 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
786 the final type for the e_fsel selector when generating PA2.0W code.
787 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
788 relocations.
789
790 2002-07-14 H.J. Lu <hjl@gnu.org>
791
792 * elflink.h (elf_link_assign_sym_version): Hide the default
793 definition if there is a hidden versioned definition.
794
795 2002-07-12 Hans-Peter Nilsson <hp@axis.com>
796
797 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
798 dynamic reference test in assertion when initializing GOT with
799 static contents. Just assert that there are either no dynamic
800 sections, the symbol is defined in the regular objects or that the
801 symbol is undef weak. Tweak comment.
802 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
803 only if the symbol isn't defined in the program and isn't undef
804 weak.
805 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
806 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
807 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
808 (elf_cris_discard_excess_program_dynamics): Don't consider
809 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
810
811 2002-07-11 Alan Modra <amodra@bigpond.net.au>
812
813 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
814 unresolved debugging relocs in dynamic applications.
815 * elf32-s390.c (elf_s390_relocate_section): Likewise.
816 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
817 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
818 * elf64-s390.c (elf_s390_relocate_section): Likewise.
819 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
820 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
821
822 2002-07-10 Alan Modra <amodra@bigpond.net.au>
823
824 * elf64-ppc.c (ONES): Define.
825 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
826 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
827 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
828
829 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
830 (ppc64_elf_set_private_flags): Delete.
831 (ppc64_elf_section_from_shdr): Delete.
832 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
833 (ppc64_elf_fake_sections): Delete.
834 (bfd_elf64_bfd_set_private_flags): Don't define.
835 (bfd_elf64_get_symbol_info): Likewise.
836 (elf_backend_section_from_shdr): Likewise.
837 (elf_backend_fake_sections): Likewise.
838
839 2002-07-10 Marco Walther <Marco.Walther@sun.com>
840
841 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
842 when not already set.
843 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
844 (elf_backend_fake_sections): Define.
845
846 2002-07-10 Alan Modra <amodra@bigpond.net.au>
847
848 * merge.c (_bfd_merge_section): Remove redundant output_section check.
849 Formatting.
850 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
851
852 2002-07-09 Hans-Peter Nilsson <hp@axis.com>
853
854 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
855 NULL sym_hashes to just before use.
856 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
857 symbol with non-default visibility.
858 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
859 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
860 Ditto.
861 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
862 symbol with non-default visibility.
863 (cris_elf_check_relocs): At tests for local symbol before
864 increasing h->plt.refcount, also check for non-default
865 visibility. Ditto when checking for local symbol to eliminate
866 pc-relative runtime relocs.
867
868 2002-07-08 Alan Modra <amodra@bigpond.net.au>
869
870 * elf.c: Formatting.
871 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
872 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
873 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
874 segments.
875
876 2002-07-07 Mark Mitchell <mark@codesourcery.com>
877 Alan Modra <amodra@bigpond.net.au>
878
879 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
880 account the impact of relocation count overflow when computing
881 section offsets.
882 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
883 or not to apply the PE COFF reloc overflow handling. Fix a
884 fencepost error in deciding whether or not to use that technique.
885
886 2002-07-07 Alan Modra <amodra@bigpond.net.au>
887
888 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
889 change type of locsyms.
890 (bfd_elf_get_elf_syms): Declare.
891 * elf.c (bfd_elf_get_elf_syms): New function.
892 (group_signature): Use bfd_elf_get_elf_syms.
893 (bfd_section_from_r_symndx): Likewise.
894 * elfcode.h (elf_slurp_symbol_table): Likewise.
895 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
896 (elf_link_add_object_symbols): Likewise. Reorganise to increase
897 locality of various data structures. Properly free internal relocs.
898 (elf_bfd_final_link): Properly free internal relocs.
899 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
900 (elf_link_input_bfd): Likewise.
901 (elf_gc_mark): Likewise. Properly free internal relocs.
902 (elf_gc_sweep): Properly free internal relocs.
903 (elf_reloc_symbol_deleted_p): No need to swap syms in.
904 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
905 internal relocs.
906 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
907 Properly free possibly cached info.
908 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
909 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
910 symbol swapping code.
911 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
912 Properly free possibly cached info.
913 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
914 (mn10300_elf_relax_delete_bytes): Likewise.
915 (mn10300_elf_symbol_address_p): Likewise.
916 (mn10300_elf_get_relocated_section_contents): Likewise.
917 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
918 (elf32_h8_relax_delete_bytes): Likewise.
919 (elf32_h8_symbol_address_p): Likewise.
920 (elf32_h8_get_relocated_section_contents): Likewise.
921 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
922 (m32r_elf_relax_delete_bytes): Likewise.
923 (m32r_elf_get_relocated_section_contents): Likewise.
924 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
925 elf_section_data to determine whether cached.
926 (sh_elf_relax_section): As above for elf-m10200.c.
927 (sh_elf_relax_delete_bytes): Likewise.
928 (sh_elf_get_relocated_section_contents): Likewise.
929 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
930 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
931 reading of local syms.
932 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
933 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
934 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
935 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
936 relocs.
937 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
938 free internal relocs and section contents. Don't read symbols.
939 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
940 (elf32_hppa_size_stubs): Don't free local syms.
941 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
942 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
943 possibly cached info.
944 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
945 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
946 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
947 all_local_syms.
948 (get_local_syms): Delete function.
949 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
950 on exit.
951 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
952
953 2002-07-05 Jim Wilson <wilson@redhat.com>
954
955 * syms.c (decode_section_type): New.
956 (bfd_decode_symclass): Call decode_section_type.
957
958 2002-07-04 Jakub Jelinek <jakub@redhat.com>
959
960 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
961 section content start.
962 Reported by Michael Schumacher <mike@hightec-rt.com>.
963
964 2002-07-04 Alan Modra <amodra@bigpond.net.au>
965
966 * section.c (_bfd_strip_section_from_output): Remove unnecessary
967 link order code. Don't actually remove the output section here;
968 Just set a flag for the linker to do so.
969 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
970 sections when setting up output section dynsyms.
971
972 2002-07-04 Alan Modra <amodra@bigpond.net.au>
973
974 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
975 fudge.
976 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
977 libs here instead.
978
979 2002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
980
981 * elf64-s390.c (create_got_section): Set .got section alignment to
982 8 bytes.
983 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
984
985 2002-07-02 Alan Modra <amodra@bigpond.net.au>
986
987 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
988
989 2002-07-01 Matt Thomas <matt@3am-software.com>
990
991 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
992 to EF_VAX_*.
993
994 2002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
995
996 * elfxx-mips.c (ABI_64_P): Fix comment.
997 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
998 new section names for N64 ABI.
999 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
1000 (mips_elf_calculate_relocation): Code formatting.
1001 (mips_elf_create_dynamic_relocation): Likewise.
1002 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
1003 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
1004 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
1005 in any NewABI.
1006 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
1007 for NewABI.
1008 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
1009 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
1010 here, too.
1011
1012 2002-07-01 Andreas Schwab <schwab@suse.de>
1013
1014 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
1015 R_X86_64_64 to R_X86_64_RELATIVE.
1016
1017 2002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
1018
1019 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
1020 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
1021 Run "make dep-am".
1022 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
1023 host_aout_vec.
1024 * configure.in (vaxbsd_vec): Add.
1025 * targets.c (vaxbsd_vec): Add.
1026 * Makefile.in: Rebuild.
1027 * configure: Rebuild.
1028 * po/SRC-POTFILES.in: Rebuild.
1029
1030 2002-07-01 Alan Modra <amodra@bigpond.net.au>
1031
1032 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
1033 examining to gc_mark_hook, rather than the bfd.
1034 (elf_gc_sections): Adjust.
1035 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
1036 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
1037 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
1038 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
1039 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
1040 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
1041 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
1042 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
1043 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
1044 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
1045 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
1046 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
1047 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
1048 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
1049 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
1050 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
1051 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
1052 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
1053 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
1054 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
1055 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
1056 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
1057 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
1058 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1059 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
1060 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
1061 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
1062 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
1063 redundant local sym tests.
1064 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
1065 (link_hash_newfunc): Init is_entry.
1066 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
1067 (ppc64_elf_link_hash_table_create): Init all_local_syms.
1068 (create_linkage_sections): Use bfd_make_section_anyway rather than
1069 bfd_make_section.
1070 (ppc64_elf_mark_entry_syms): New function.
1071 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
1072 up opd entry to function section map.
1073 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
1074 relocs that reference the opd section.
1075 (edit_opd): New function.
1076 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
1077 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
1078 (get_local_syms): Do so here. Exit if we already have local syms.
1079 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
1080 read local syms on non-ELF input.
1081 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
1082 than duplicating it's function here. Adjust free of internal
1083 relocs to suit.
1084 (ppc64_elf_relocate_section): Adjust local syms in opd section.
1085 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
1086 * elf32-hppa.c (elf32_hppa_size_stubs): Call
1087 _bfd_elf32_link_read_relocs rather than duplicating it's function
1088 here. Adjust free of internal relocs to suit.
1089
1090 2002-07-01 Andreas Jaeger <aj@suse.de>
1091
1092 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
1093 are not allowed in shared libs code, enforce -fPIC.
1094
1095 2002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
1096
1097 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
1098 trailing zero-sequences when there's previous left-over data.
1099
1100 2002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
1101
1102 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
1103 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
1104 and opd_rel_sec in order for starting rela section. Check _raw_size.
1105 (elf_backend_reloc_type_class): Define.
1106
1107 2002-06-27 Kevin Buettner <kevinb@redhat.com>
1108
1109 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
1110 DWARF2 formats.
1111
1112 2002-06-27 Alan Modra <amodra@bigpond.net.au>
1113
1114 * cpu-powerpc.c: Comment on ordering of arch_info.
1115 * elf32-ppc.c (ppc_elf_object_p): New function.
1116 (elf_backend_object_p): Define.
1117 * elf64-ppc.c (ppc64_elf_object_p): New function.
1118 (elf_backend_object_p): Define.
1119
1120 2002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
1121
1122 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
1123 * configure: Regenerate.
1124
1125 2002-06-25 Jason Eckhardt <jle@rice.edu>
1126
1127 * dwarf2.c (decode_line_info): Check unit->addr_size
1128 to read in the proper number of prologue bytes.
1129
1130 2002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
1131
1132 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
1133 aix5coff64_vec if 64-bit bfd support has been enabled.
1134 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
1135 been enabled.
1136
1137 * targets.c (_bfd_target_vector[]): Only include
1138 aix5coff64_vec if 64-bit bfd support has been enabled.
1139
1140 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1141
1142 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
1143 * elf32-hppa.c (hppa_add_stub): Likewise.
1144 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
1145 * elflink.h (elf_add_default_symbol): Fix comment typo.
1146 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
1147 (elf_link_add_object_symbols): Likewise.
1148 (elf_link_assign_sym_version): Likewise.
1149 * hash.c (bfd_hash_lookup): Likewise.
1150 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
1151 * section.c (bfd_get_unique_section_name): Likewise.
1152 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
1153 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
1154 (assign_section_numbers): Likewise.
1155 (_bfd_elfcore_make_pseudosection): Likewise.
1156 (elfcore_grok_lwpstatus): Likewise.
1157 (elfcore_grok_win32pstatus): Likewise.
1158 (elfcore_write_note): Constify input params. Use PTR instead of
1159 void *. Include terminating NUL in namesz. Correct padding.
1160 Support NULL "name" param. Use memcpy instead of strcpy.
1161 (elfcore_write_prpsinfo): Constify input params.
1162 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
1163 (elfcore_write_lwpstatus): Likewise.
1164 (elfcore_write_pstatus): Likewise.
1165 (elfcore_write_prfpreg): Likewise.
1166 (elfcore_write_prxfpreg): Likewise.
1167 * elf-bfd.h (elfcore_write_note): Update declaration.
1168 (elfcore_write_prpsinfo): Likewise.
1169 (elfcore_write_prstatus): Likewise.
1170 (elfcore_write_pstatus): Likewise.
1171 (elfcore_write_prfpreg): Likewise.
1172 (elfcore_write_prxfpreg): Likewise.
1173 (elfcore_write_lwpstatus): Likewise.
1174
1175 2002-06-25 Jason Eckhardt <jle@rice.edu>
1176
1177 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
1178 symbols of type stProc and stStaticProc.
1179
1180 2002-06-25 Nick Clifton <nickc@redhat.com>
1181
1182 * ecoff.c: VArious formatting fixes.
1183
1184 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1185
1186 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
1187
1188 2002-06-25 Alan Modra <amodra@bigpond.net.au>
1189
1190 * aout-adobe.c: Don't compare against "true" or "false.
1191 * aout-target.h: Likewise.
1192 * aoutx.h: Likewise.
1193 * archive.c: Likewise.
1194 * bout.c: Likewise.
1195 * cache.c: Likewise.
1196 * coff-a29k.c: Likewise.
1197 * coff-alpha.c: Likewise.
1198 * coff-i386.c: Likewise.
1199 * coff-mips.c: Likewise.
1200 * coff-or32.c: Likewise.
1201 * coff64-rs6000.c: Likewise.
1202 * coffcode.h: Likewise.
1203 * coffgen.c: Likewise.
1204 * cpu-ns32k.c: Likewise.
1205 * ecoff.c: Likewise.
1206 * ecofflink.c: Likewise.
1207 * elf.c: Likewise.
1208 * elf32-arm.h: Likewise.
1209 * elf32-cris.c: Likewise.
1210 * elf32-d30v.c: Likewise.
1211 * elf32-i386.c: Likewise.
1212 * elf32-mcore.c: Likewise.
1213 * elf32-ppc.c: Likewise.
1214 * elf32-sh.c: Likewise.
1215 * elf32-sh64.c: Likewise.
1216 * elf32-v850.c: Likewise.
1217 * elf64-alpha.c: Likewise.
1218 * elf64-sh64.c: Likewise.
1219 * elfcode.h: Likewise.
1220 * elfcore.h: Likewise.
1221 * elflink.h: Likewise.
1222 * elfxx-mips.c: Likewise.
1223 * i386os9k.c: Likewise.
1224 * ieee.c: Likewise.
1225 * libbfd.c: Likewise.
1226 * linker.c: Likewise.
1227 * mmo.c: Likewise.
1228 * nlm32-alpha.c: Likewise.
1229 * nlm32-i386.c: Likewise.
1230 * nlm32-ppc.c: Likewise.
1231 * nlm32-sparc.c: Likewise.
1232 * nlmcode.h: Likewise.
1233 * oasys.c: Likewise.
1234 * pdp11.c: Likewise.
1235 * peicode.h: Likewise.
1236 * reloc.c: Likewise.
1237 * som.c: Likewise.
1238 * srec.c: Likewise.
1239 * tekhex.c: Likewise.
1240 * vms.c: Likewise.
1241 * xcofflink.c: Likewise.
1242 * elf64-sparc.c: Edit comment to not use "== false".
1243
1244 * aoutf1.h: Don't use "? true : false".
1245 * ecoff.c: Likewise.
1246 * format.c: Likewise.
1247 * ieee.c: Likewise.
1248 * linker.c: Likewise.
1249 * mmo.c: Likewise.
1250 * oasys.c: Likewise.
1251
1252 2002-06-23 H.J. Lu <hjl@gnu.org>
1253
1254 * elflink.h (elf_link_add_archive_symbols): For the default
1255 version, check references with only one `@' first.
1256
1257 2002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
1258
1259 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
1260 function.
1261 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
1262 symbol table.
1263 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
1264 (elf64_hppa_size_dynamic_sections): Revise to use
1265 elf64_hppa_mark_milli_and_exported_functions.
1266 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
1267 symbols out of dynamic symbol table.
1268
1269 2002-06-23 Alan Modra <amodra@bigpond.net.au>
1270
1271 * Makefile.in: Regenerate.
1272 * libbfd.h: Regenerate.
1273 * bfd-in2.h: Regenerate.
1274 * configure: Regenerate.
1275 * po/SRC-POTFILES.in: Regenerate.
1276
1277 * elflink.h: Comment typo fixes.
1278
1279 2002-06-23 H.J. Lu <hjl@gnu.org>
1280
1281 * elf-bfd.h (elf_link_loaded_list): New structure.
1282 (elf_link_hash_table): Add "loaded".
1283 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
1284 * elflink.h (elf_link_check_versioned_symbol): New function.
1285 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
1286
1287 2002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
1288
1289 * elflink.h (size_dynamic_sections): If the target does not
1290 support an ELF style hash table, return true, indicating that
1291 nothing needed to be done, rather than false, indicating that the
1292 section's size could not be computed.
1293
1294 2002-06-18 Dave Brolley <brolley@redhat.com>
1295
1296 From Catherine Moore, Michael Meissner, Dave Brolley:
1297 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
1298 * targets.c: Support bfd_elf32_frv_vec.
1299 * reloc.c: Add FRV relocs.
1300 * configure.in: Add support for bfd-elf32-frv-vec.
1301 * config.bfd (targ_cpu): Add support for frv-*-elf.
1302 * archures.c: Add frv arch and machines.
1303 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
1304 (ALL_MACHINES_CFILES): Add cpu-frv.c.
1305 (BFD32_BACKENDS): Add elf32-frv.lo.
1306 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
1307 (cpu-frv.lo): New target.
1308 (elf32-frv.lo): New target.
1309 * cpu-frv.c: New file.
1310 * elf32-frv.c: New file.
1311
1312 2002-06-18 Jakub Jelinek <jakub@redhat.com>
1313
1314 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
1315 e_shnum == 0.
1316 Only read the first section header if e_shoff is non-zero.
1317 Don't consider e_shstrndx if there are no sections.
1318
1319 2002-06-17 Tom Rix <trix@redhat.com>
1320
1321 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
1322 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
1323 complain_overflow_bitfield.
1324
1325 2002-06-17 Alan Modra <amodra@bigpond.net.au>
1326
1327 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
1328 (bfd_fdopenr): Likewise.
1329 (bfd_openstreamr): Likewise.
1330 (bfd_openw): Likewise.
1331
1332 * targets.c: Sort target vecs.
1333 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
1334 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
1335 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
1336 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
1337 * configure.in: Sort target vecs. Add m88kmach3_vec.
1338 * configure: Regenerate.
1339
1340 2002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
1341
1342 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
1343 bpo_reloc_no to break sort order ties, not address of items.
1344
1345 2002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
1346
1347 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
1348 Skip excluded sections in determing __gp value.
1349 (elf_hppa_final_link_relocate): Use the symbol's address in
1350 R_PARISC_FPTR64 relocations that don't need an opd entry.
1351 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
1352 (elf64_hppa_finalize_dynreloc): Likewise.
1353 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
1354 (elf64_hppa_finish_dynamic_symbol): Break up assert.
1355
1356 2002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
1357
1358 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
1359 alignment for .bss, .data and .text sections so that sse and sse2
1360 code will work.
1361 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
1362
1363 2002-06013 J"orn Rennecke <joern.rennecke@superh.com>
1364
1365 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
1366 sh[1234]*-elf*.
1367
1368 2002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
1369
1370 * elflink.h (elf_bfd_final_link): Improve error handling for missing
1371 dynamic sections.
1372
1373 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
1374 for a symbol that has no output section.
1375 (allocate_dynrel_entries): Correct comment.
1376 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
1377 unless we want one.
1378 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
1379 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
1380 with no section. Remove unnecessary parentheses.
1381
1382 2002-06-11 Tom Rix <trix@redhat.com>
1383
1384 * coffcode.h (coff_compute_section_file_positions): Add data
1385 section to AIX loader alignment check.
1386
1387 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
1388 alignment to 4 bytes.
1389 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
1390 power accessor macro.
1391 (do_shared_object_padding): Remove invalid assertion.
1392
1393 2002-06-10 Richard Sandiford <rsandifo@redhat.com>
1394
1395 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
1396 for removed output sections.
1397
1398 2002-06-10 Geoffrey Keating <geoffk@redhat.com>
1399
1400 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
1401 htab_alloc.
1402 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
1403
1404 2002-06-08 H.J. Lu <hjl@gnu.org>
1405
1406 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
1407 work around a long long bug in gcc 2.96 on mips.
1408
1409 2002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
1410
1411 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
1412 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
1413 Regenerate dependency lists.
1414 * Makefile.in: Regenerate.
1415 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
1416 vax1knetbsd_vec to targ_selvecs.
1417 * configure.in: Add vax1knetbsd_vec.
1418 * configure: Regenerate.
1419 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
1420 * vax1knetbsd.c: New file.
1421 * vaxnetbsd.c: Update copyright years.
1422 (TARGET_PAGE_SIZE): Set to 0x1000.
1423 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
1424
1425 2002-06-08 Matt Thomas <matt@3am-software.com>
1426
1427 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
1428
1429 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1430
1431 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
1432
1433 2002-06-08 Alan Modra <amodra@bigpond.net.au>
1434
1435 * Makefile.am: Run "make dep-am".
1436 * Makefile.in: Regenerate.
1437
1438 * armnetbsd.c: Replace CONST with const.
1439 * corefile.c: Likewise.
1440 * elf32-dlx.c: Likewise.
1441 * elf64-mips.c: Likewise.
1442 * mmo.c: Likewise.
1443 * ns32knetbsd.c: Likewise.
1444
1445 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
1446 table is elf64-sparc.
1447
1448 2002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1449
1450 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
1451 Fix RELA addends to get not shifted in the result. Don't do special
1452 handling of R_MIPS_64 for NewABI.
1453
1454 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1455
1456 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1457 (NAME(aout,slurp_reloc_table)): Likewise.
1458 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
1459 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
1460 (xcoff_write_archive_contents_big): Likewise.
1461 (xcoff_generate_rtinit): Likewise.
1462 (xcoff_generate_rtinit): Likewise, and check error return.
1463 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
1464 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
1465 (coff_get_normalized_symtab): Likewise.
1466 (coff_make_empty_symbol): Likewise.
1467 (bfd_coff_set_symbol_class): Likewise.
1468 * cofflink.c (coff_link_add_symbols): Likewise.
1469 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
1470 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
1471 (bfd_ecoff_write_accumulated_debug): Likewise.
1472 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
1473 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
1474 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
1475 * ieee.c (do_with_relocs): Use bfd_zalloc.
1476 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
1477 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
1478 (NAME(aout,slurp_reloc_table)): Likewise.
1479 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
1480 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
1481 * som.c (som_build_and_write_symbol_table): Likewise.
1482 (som_slurp_string_table): Likewise.
1483 (som_slurp_symbol_table): Likewise.
1484 (som_bfd_ar_write_symbol_stuff): Likewise.
1485 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
1486 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
1487 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
1488 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
1489 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
1490
1491 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1492
1493 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
1494 "group" union.
1495 (elf_group_name): Update.
1496 (elf_group_id): Define.
1497 (bfd_elf_set_group_contents): Declare.
1498 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
1499 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
1500 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
1501 that sym for the signature.
1502 (_bfd_elf_compute_section_file_positions): Don't call
1503 set_group_contents for "ld -r" case.
1504 (swap_out_syms): Use bfd_zalloc.
1505 * elflink.h (elf_link_add_archive_symbols): Likewise.
1506 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
1507 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
1508
1509 2002-06-07 Alan Modra <amodra@bigpond.net.au>
1510
1511 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
1512 relocs in opd for non-shared too.
1513
1514 2002-06-06 Jeffrey Law <law@redhat.com
1515
1516 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
1517 relocations.
1518
1519 2002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
1520
1521 * merge.c: Include libiberty.h.
1522 * elf-strtab.c: Include libiberty.h.
1523
1524 2002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
1525
1526 * peXXigen.c (pe_print_idata): Remove unused variable.
1527
1528 2002-06-06 David Heine <dlheine@tensilica.com>
1529
1530 * elf.c (assign_file_positions_for_segments): Remove unallocated
1531 sections from the section to segment mapping for PT_LOAD segments.
1532 Update comment about empty loadable segments.
1533
1534 2002-06-06 Richard Sandiford <rsandifo@redhat.com>
1535
1536 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
1537 is within the .stabstr section.
1538
1539 2002-06-06 Alan Modra <amodra@bigpond.net.au>
1540
1541 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
1542 are "const PTR", not "const PTR *".
1543 (bfd_elf32_swap_symbol_in): Likewise.
1544 (bfd_elf64_swap_symbol_in): Likewise.
1545 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
1546 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1547 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1548 (elf_link_add_object_symbols): Likewise.
1549 (elf_link_record_local_dynamic_symbol): Likewise.
1550 (elf_link_input_bfd): Likewise.
1551 (elf_gc_mark): Likewise.
1552 (elf_reloc_symbol_deleted_p): Likewise.
1553 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1554 (mn10200_elf_relax_delete_bytes): Likewise.
1555 (mn10200_elf_symbol_address_p): Likewise.
1556 (mn10200_elf_get_relocated_section_contents): Likewise.
1557 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1558 (mn10300_elf_relax_section): Likewise.
1559 (mn10300_elf_relax_delete_bytes): Likewise.
1560 (mn10300_elf_symbol_address_p): Likewise.
1561 (mn10300_elf_get_relocated_section_contents): Likewise.
1562 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1563 (elf32_h8_relax_delete_bytes): Likewise.
1564 (elf32_h8_symbol_address_p): Likewise.
1565 (elf32_h8_get_relocated_section_contents): Likewise.
1566 * elf32-hppa.c (get_local_syms): Likewise.
1567 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1568 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1569 * elf32-sh.c (sh_elf_relax_section): Likewise.
1570 (sh_elf_relax_delete_bytes): Likewise.
1571 (sh_elf_get_relocated_section_contents): Likewise.
1572 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1573 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1574 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1575 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1576 * elf64-ppc.c (get_local_syms): Likewise.
1577 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1578 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1579
1580 2002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
1581
1582 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
1583
1584 2002-06-05 Alan Modra <amodra@bigpond.net.au>
1585
1586 * elf.c (group_signature): Swap in the whole symbol, and handle
1587 extracting section symbol names.
1588 (setup_group): Add comment.
1589 (set_group_contents): When called from objcopy or ld, arrange for
1590 section contents to be written. Write group member output section
1591 indices to allow objcopy to reorganize sections.
1592 (_bfd_elf_copy_private_section_data): Copy group info.
1593
1594 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
1595 (bfd_elf32_swap_symbol_in): Update prototype.
1596 (bfd_elf64_swap_symbol_in): Likewise.
1597 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
1598 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
1599 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
1600 (elf_link_add_object_symbols): Likewise.
1601 (elf_link_record_local_dynamic_symbol): Likewise.
1602 (elf_link_input_bfd): Likewise.
1603 (elf_gc_mark): Likewise.
1604 (elf_reloc_symbol_deleted_p): Likewise.
1605 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
1606 (mn10200_elf_relax_delete_bytes): Likewise.
1607 (mn10200_elf_symbol_address_p): Likewise.
1608 (mn10200_elf_get_relocated_section_contents): Likewise.
1609 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
1610 (mn10300_elf_relax_section): Likewise.
1611 (mn10300_elf_relax_delete_bytes): Likewise.
1612 (mn10300_elf_symbol_address_p): Likewise.
1613 (mn10300_elf_get_relocated_section_contents): Likewise.
1614 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
1615 (elf32_h8_relax_delete_bytes): Likewise.
1616 (elf32_h8_symbol_address_p): Likewise.
1617 (elf32_h8_get_relocated_section_contents): Likewise.
1618 * elf32-hppa.c (get_local_syms): Likewise.
1619 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
1620 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
1621 * elf32-sh.c (sh_elf_relax_section): Likewise.
1622 (sh_elf_relax_delete_bytes): Likewise.
1623 (sh_elf_get_relocated_section_contents): Likewise.
1624 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
1625 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
1626 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1627 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
1628 * elf64-ppc.c (get_local_syms): Likewise.
1629 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
1630 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
1631 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
1632 * elf64-alpha.c (alpha_elf_size_info): Likewise.
1633 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1634 * elf64-mips.c (mips_elf64_size_info): Likewise.
1635 * elf64-s390.c (s390_elf64_size_info): Likewise.
1636 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1637
1638 2002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1639
1640 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
1641 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
1642 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
1643 _bfd_mips_elf_ignore_discarded_relocs.
1644 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
1645
1646 2002-06-05 H.J. Lu <hjl@gnu.org>
1647
1648 * elfxx-mips.c (mips_elf_calculate_relocation): Call
1649 _bfd_elf_rel_local_sym for STT_SECTION relocations against
1650 the SEC_MERGE section.
1651
1652 2002-06-05 Alan Modra <amodra@bigpond.net.au>
1653
1654 * coff-alpha.c: Update copyright date.
1655 * coff-mips.c: Likewise.
1656 * xcoff-target.h: Likewise.
1657
1658 * bfd-in.h: Remove "taken from the source" comment.
1659 * libbfd-in.h: Likewise.
1660 * libcoff-in.h: Likewise.
1661 * bfd-in2.h: Regenerate.
1662 * libbfd.h: Regenerate.
1663 * libcoff.h: Regenerate.
1664
1665 * elf.c (bfd_elf_discard_group): Return true.
1666 * elf-bfd.h (bfd_elf_discard_group): Declare.
1667 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
1668 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
1669 * bfd.c (bfd_discard_group): Define.
1670 * targets.c (struct bfd_target): Add _bfd_discard_group.
1671 (BFD_JUMP_TABLE_LINK): Here too.
1672 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
1673 * aout-adobe.c (aout_32_bfd_discard_group): Define.
1674 * aout-target.h (MY_bfd_discard_group): Define.
1675 * aout-tic30.c (MY_bfd_discard_group): Define.
1676 * binary.c (binary_bfd_discard_group): Define.
1677 * bout.c (b_out_bfd_discard_group): Define.
1678 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
1679 * coffcode.h (coff_bfd_discard_group): Define.
1680 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
1681 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
1682 * i386msdos.c (msdos_bfd_discard_group): Define.
1683 * i386os9k.c (os9k_bfd_discard_group): Define.
1684 * ieee.c (ieee_bfd_discard_group): Define.
1685 * ihex.c (ihex_bfd_discard_group): Define.
1686 * mmo.c (mmo_bfd_discard_group): Define.
1687 * nlm-target.h (nlm_bfd_discard_group): Define.
1688 * oasys.c (oasys_bfd_discard_group): Define.
1689 * ppcboot.c (ppcboot_bfd_discard_group): Define.
1690 * som.c (som_bfd_discard_group): Define.
1691 * srec.c (srec_bfd_discard_group): Define.
1692 * tekhex.c (tekhex_bfd_discard_group): Define.
1693 * versados.c (versados_bfd_discard_group): Define.
1694 * vms.c (vms_bfd_discard_group): Define.
1695 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
1696 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
1697 (aix5coff64_vec): Likewise.
1698 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
1699
1700 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1701
1702 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
1703 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
1704 (elf32-sh64-com.lo): New dependency list.
1705 * Makefile.in: Regenerate.
1706 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
1707 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
1708 elf32-sh64-com.lo.
1709 * configure: Regenerate.
1710 * elf32-sh64.c (sh64_address_in_cranges)
1711 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
1712 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
1713 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
1714 * elf32-sh64-com.c: ...here. New file.
1715
1716 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1717
1718 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
1719 ATTRIBUTE_UNUSED on used params.
1720 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
1721 before calling bfd_section_from_elf_index on local syms.
1722 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
1723
1724 2002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
1725
1726 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
1727 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
1728 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
1729 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
1730 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
1731 * Makefile.in: Regenerate.
1732 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
1733 (sh64-*-netbsd*): New targets.
1734 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
1735 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
1736 * configure: Regenerate.
1737 * elf32-sh64-nbsd.c: New file.
1738 * elf64-sh64-nbsd.c: New file.
1739 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
1740 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
1741 bfd_elf64_sh64lnbsd_vec.
1742
1743 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1744
1745 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
1746 (bfd_section_from_shdr): Likewise. Set section name of group
1747 sections from signature.
1748 (group_signature): Split out from setup_group. Ensure symbol table
1749 is available.
1750 (bfd_elf_discard_group): New function.
1751 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
1752 .gnu.linkonce* sections if they are members of a group.
1753 (set_group_contents): Set GRP_COMDAT flag.
1754 * section.c (bfd_discard_group): New function.
1755 * bfd-in.h (bfd_elf_discard_group): Declare.
1756 * bfd-in2.h: Regenerate.
1757 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
1758 (elf_linkonce_p): Define.
1759
1760 2002-06-04 Alan Modra <amodra@bigpond.net.au>
1761
1762 * elf.c (bfd_section_from_shdr): Make "name" const.
1763 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
1764 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
1765 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1766 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1767 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1768 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1769 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1770 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
1771 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1772 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1773 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1774
1775 2002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
1776
1777 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
1778 ABI.
1779
1780 2002-06-02 Kazu Hirata <kazu@cs.umass.edu>
1781
1782 * elf32-arc.c: Fix formatting.
1783 * elf32-arm.h: Likewise.
1784 * elf32-cris.c: Likewise.
1785 * elf32-dlx.c: Likewise.
1786 * elf32-hppa.c: Likewise.
1787 * elf32-i386.c: Likewise.
1788 * elf32-i386qnx.c: Likewise.
1789 * elf32-or32.c: Likewise.
1790 * elf32-s390.c: Likewise.
1791 * elf32-sh64.c: Likewise.
1792 * elf32-vax.c: Likewise.
1793 * elf32-xstormy16.c: Likewise.
1794 * elf64-alpha.c: Likewise.
1795 * elf64-mmix.c: Likewise.
1796 * elf64-ppc.c: Likewise.
1797 * elf64-s390.c: Likewise.
1798 * elf64-sh64.c: Likewise.
1799 * elf64-x86-64.c: Likewise.
1800
1801 2002-06-02 Richard Henderson <rth@redhat.com>
1802
1803 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
1804 null when there are no got entries for a symbol.
1805 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
1806 uninitialized variable warning.
1807
1808 2002-06-01 Richard Henderson <rth@redhat.com>
1809
1810 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
1811 undefined symbols here.
1812 (elf64_alpha_relax_section): Do it here. Also test for not
1813 defined in the current module.
1814 (elf64_alpha_relocate_section_r): Split out of ...
1815 (elf64_alpha_relocate_section): ... here. Don't dereference
1816 NULL when looking up local got entries.
1817
1818 2002-06-01 Richard Henderson <rth@redhat.com>
1819
1820 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
1821 symbols from JSR relaxation.
1822 (elf64_alpha_size_plt_section_1): New.
1823 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
1824 (elf64_alpha_size_rela_got_1): ... here.
1825 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
1826 (elf64_alpha_size_rela_got_section): ... here.
1827 (elf64_alpha_size_plt_section): New.
1828 (elf64_alpha_relax_section): Call them.
1829 (elf64_alpha_size_got_sections): Remove output_bfd arg.
1830 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
1831
1832 2002-06-01 Richard Henderson <rth@redhat.com>
1833
1834 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
1835 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
1836 in shared libraries. Fix DTPRELHI and TPRELHI value.
1837 (INSN_ADDQ, INSN_RDUNIQ): New.
1838 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
1839 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
1840 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
1841 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
1842 Handle GOTDTPREL and GOTTPREL relocations.
1843 (elf64_alpha_relax_gprelhilo): New.
1844 (elf64_alpha_relax_tls_get_addr): New.
1845 (elf64_alpha_relax_find_tls_segment): New.
1846 (elf64_alpha_relax_section): Handle TLS relocations.
1847 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
1848 (elf64_alpha_check_relocs): Set it.
1849
1850 2002-06-01 Richard Henderson <rth@redhat.com>
1851
1852 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
1853
1854 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
1855 check; don't suppress dynamic relocs for non-allocated sections.
1856
1857 * elf64-alpha.c: Remove dead code.
1858
1859 2002-05-31 Alan Modra <amodra@bigpond.net.au>
1860
1861 * bfd-in2.h: Regenerate.
1862 * libbfd.h: Regenerate.
1863 * po/SRC-POTFILES.in: Regenerate.
1864
1865 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
1866 space for bss .plt.
1867
1868 2002-05-31 Graeme Peterson <gp@qnx.com>
1869
1870 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
1871 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
1872 Run "make dep-am".
1873 * Makefile.in: Regenerate.
1874 * config.bfd: Add i[3456]86-*-nto-qnx* support.
1875 * configure.in: Add bfd_elf32_i386qnx_vec support.
1876 * configure: Regenerate.
1877 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
1878 is_contained_by_filepos, and copy_private_bfd_data_p.
1879 * elf.c (assign_file_positions_for_segments): Call backend
1880 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
1881 (IS_CONTAINED_BY_FILEPOS): Define.
1882 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
1883 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
1884 Fix non-K&R call to _bfd_error_handler.
1885 (_bfd_elf_copy_private_section_data): Use backend
1886 copy_private_bfd_data_p.
1887 * elf32-i386.c: Don't include elfxx-target.h when
1888 ELF32_I386_C_INCLUDED is defined.
1889 * elf32-i386qnx.c: New QNX elf backend file.
1890 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
1891 elf_backend_is_contained_by_filepos, and
1892 elf_backend_do_copy_private_bfd_data.
1893 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
1894
1895 2002-05-31 Alan Modra <amodra@bigpond.net.au>
1896
1897 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
1898 Move other similar defines to start of file.
1899
1900 2002-05-30 Tom Rix <trix@redhat.com>
1901
1902 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
1903 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
1904
1905 2002-05-30 Richard Henderson <rth@redhat.com>
1906
1907 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
1908 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
1909 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
1910 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
1911 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
1912 (struct alpha_elf_obj_tdata): Rename total_got_entries and
1913 n_local_got_entries to total_got_size and local_got_size.
1914 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
1915 (alpha_got_entry_size): New.
1916 (elf64_alpha_relax_with_lituse): Use it.
1917 (elf64_alpha_relax_without_lituse): Likewise.
1918 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
1919 (get_got_entry): New.
1920 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
1921 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
1922 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
1923 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
1924 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
1925 (elf64_alpha_calc_got_offsets): Likewise.
1926 (alpha_dynamic_entries_for_reloc): New.
1927 (elf64_alpha_calc_dynrel_sizes): Use it.
1928 (elf64_alpha_size_dynamic_sections): Likewise.
1929 (elf64_alpha_relocate_section): Handle TLS relocations.
1930 * reloc.c: Add Alpha TLS relocations.
1931 * bfd-in2.h, libbfd.h: Rebuild.
1932
1933 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1934
1935 * peXXigen.c (pe_print_idata): Remove double printed
1936 import table lines; add Bound-To comment.
1937
1938 2002-05-29 Matt Thomas <matt@3am-software.com>
1939
1940 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
1941 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
1942 (elf32-vax.lo): New rule.
1943 * Makefile.in: Regenerate.
1944 * configure.in (bfd_elf32_vax_vec)
1945 (vaxnetbsd_vec): New vectors.
1946 * configure: Regenerate.
1947 * config.bfd (vax-*-netbsdelf*)
1948 (vax-*-netbsdaout*)
1949 (vax-*-netbsd*): New targets.
1950 * elf32-vax.c: New file.
1951 * reloc.c: Add VAX relocations.
1952 * bfd-in2.h: Regenerate.
1953 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
1954
1955 2002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
1956
1957 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
1958 and bfd_elf32_bigarm_vec to targ_selvecs.
1959
1960 2002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
1961
1962 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
1963 with auto-imported symbols.
1964
1965 2002-05-29 Adam Nemet <anemet@lnxw.com>
1966
1967 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
1968 sections only record bfd.
1969 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
1970 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
1971 * bfd-in2.h: Regenerate.
1972
1973 2002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
1974
1975 * syms.c (_bfd_stab_section_find_nearest_line): Move
1976 declaration and initialisation of saw_line and saw_func out of
1977 for loop.
1978
1979 2002-05-29 Alan Modra <amodra@bigpond.net.au>
1980
1981 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
1982 (bfd_elf64_get_symbol_info): Define.
1983 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
1984
1985 2002-05-29 Andrey Volkov <avolkov@transas.com>
1986
1987 * cpu-h8300.c: Make default h8300 machine first in machine list.
1988
1989 2002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
1990
1991 * config.bfd: Added DLX configuraton.
1992 * Makefile.am: Added DLX configuraton.
1993 * configure.in: Added DLX configuraton.
1994 * archures.c: Add DLX architecure.
1995 * reloc.c: Add DLX relocs.
1996 * targets.c: Added DLX target vector.
1997 * configure: Regenerate.
1998 * Makefile.in: Regenreate.
1999 * bfd-in2.h: Regenreate.
2000 * elf32-dlx.c: New file: Support DLX target.
2001 * cpu-dlx.c: New file: Support DLX target.
2002
2003 2002-05-25 Alan Modra <amodra@bigpond.net.au>
2004
2005 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
2006
2007 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
2008 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
2009 strings to point inside function code sym string.
2010 (func_desc_adjust): Likewise.
2011 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
2012
2013 2002-05-24 Michal Ludvig <mludvig@suse.cz>
2014
2015 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
2016 (elf64_x86_64_grok_psinfo): Added.
2017
2018 2002-05-24 TAMURA Kent <kent@netbsd.org>
2019
2020 * config.bfd: Add a target for i386-netbsdpe.
2021
2022 2002-05-24 Alan Modra <amodra@bigpond.net.au>
2023
2024 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
2025 and is_func_descriptor.
2026 (func_desc_adjust): Hide function code sym in shared libs unless
2027 there is a matching exported function descriptor sym.
2028
2029 2002-05-23 Jakub Jelinek <jakub@redhat.com>
2030
2031 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
2032 for symbols from SHF_TLS section.
2033 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
2034 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
2035 (map_sections_to_segments): Build PT_TLS segment if necessary.
2036 (assign_file_positions_for_segments): Likewise.
2037 (get_program_header_size): Account for PT_TLS segment.
2038 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
2039 SEC_THREAD_LOCAL sections to STT_TLS.
2040 * reloc.c: Add 386 and IA-64 TLS relocs.
2041 * section.c (SEC_THREAD_LOCAL): Define.
2042 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
2043 Remove.
2044 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
2045 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
2046 unconditionally.
2047 (struct elf_final_link_info): Add first_tls_sec.
2048 (elf_bfd_final_link): Set first_tls_sec.
2049 Compute elf_hash_table (info)->tls_segment.
2050 (elf_link_output_extsym): Handle STT_TLS symbols.
2051 (elf_link_input_bfd): Likewise.
2052 * syms.c (BSF_THREAD_LOCAL): Define.
2053 * bfd-in2.h: Rebuilt.
2054 * libbfd.h: Rebuilt.
2055 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
2056 elf_i386_mkobject, elf_i386_object_p): New functions.
2057 (elf_howto_table): Add TLS relocs.
2058 (elf_i386_reloc_type_lookup): Support TLS relocs.
2059 (elf_i386_info_to_howto_rel): Likewise.
2060 (struct elf_i386_link_hash_entry): Add tls_type.
2061 (struct elf_i386_obj_tdata): New.
2062 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
2063 New macros.
2064 (struct elf_i386_link_hash_table): Add tls_ldm_got.
2065 (link_hash_newfunc): Clear tls_type.
2066 (elf_i386_check_relocs): Support TLS relocs.
2067 (elf_i386_gc_sweep_hook): Likewise.
2068 (allocate_dynrelocs): Likewise.
2069 (elf_i386_size_dynamic_sections): Likewise.
2070 (elf_i386_relocate_section): Likewise.
2071 (elf_i386_finish_dynamic_symbol): Likewise.
2072 (bfd_elf32_mkobject, elf_backend_object_p): Define.
2073 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
2074 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
2075 want_tprel, want_dtpmod, want_dtprel.
2076 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
2077 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
2078 R_IA64_LTOFF_TPREL22.
2079 (elf_code_to_howto_index): Add TLS relocs.
2080 (elfNN_ia64_check_relocs): Support TLS relocs.
2081 (allocate_global_data_got): Account for TLS .got data.
2082 (allocate_dynrel_entries): Account for TLS dynamic relocations.
2083 (elfNN_ia64_install_value): Supprt TLS relocs.
2084 (set_got_entry): Support TLS relocs.
2085 (elfNN_ia64_relocate_section): Likewise.
2086
2087 2002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
2088
2089 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
2090 BLX reloc round the relocation up rather than down.
2091 * coff-arm.c (coff_arm_relocate_section): Likewise.
2092
2093 2002-05-21 H.J. Lu (hjl@gnu.org)
2094
2095 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
2096 definition.
2097
2098 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2099
2100 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
2101 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
2102
2103 2002-05-22 Alan Modra <amodra@bigpond.net.au>
2104
2105 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
2106 unresolved relocs.
2107 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
2108
2109 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2110
2111 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
2112 non-ELF targets.
2113
2114 2002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2115
2116 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
2117 an error value.
2118 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
2119 return with false on error.
2120 (elf_link_input_bfd): Check reloc_emitter return value.
2121
2122 2002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
2123
2124 * config.bfd (armeb-*-netbsdelf*): New target.
2125
2126 2002-05-20 Alan Modra <amodra@bigpond.net.au>
2127
2128 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
2129 at the plt call stub.
2130
2131 2002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2132
2133 * cpu-mips.c (mips_compatible): Don't try to check machine
2134 compatibility.
2135
2136 2002-05-18 Tom Rix <trix@redhat.com>
2137
2138 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
2139
2140 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2141
2142 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
2143 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
2144 we've already warned about an undefined symbol. Report more
2145 detail on reloc errors.
2146
2147 2002-05-17 Alan Modra <amodra@bigpond.net.au>
2148
2149 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
2150 * configure.in: Invoke AM_INSTALL_LIBBFD.
2151 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
2152 (install_libbfd): .. New target.
2153 (uninstall_libbfd): Likewise.
2154 (install-bfdlibLTLIBRARIES): Likewise.
2155 (uninstall-bfdlibLTLIBRARIES): Likewise.
2156 (bfdlibdir): New.
2157 (bfdincludedir): New.
2158 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
2159 * aclocal.m4: Regenerate.
2160 * configure: Regenerate.
2161 * Makefile.in: Regenerate.
2162
2163 2002-05-17 Stuart Balfour <sbalfour@cisco.com>
2164
2165 * hash.c (bfd_hash_lookup): Remove computation of len from inside
2166 hash loop.
2167
2168 2002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
2169
2170 * config.bfd: Add targets for sh64-linux (little endian and
2171 big endian).
2172
2173 2002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
2174
2175 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
2176 is located in the same section as the import table. Instead
2177 check, and if necessary load the section containing the thunk.
2178
2179 2002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
2180
2181 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
2182 bfd_bread.
2183 (xcoff64_core_file_matches_executable_p): Replace bfd_read
2184 with bfd_bread.
2185
2186 2002-05-15 Alan Modra <amodra@bigpond.net.au>
2187
2188 * aix5ppc-core.c: Warning fixes.
2189 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
2190 * aout-target.h (MY_bfd_link_just_syms): Define.
2191 * aout-tic30.c (MY_bfd_link_just_syms): Define.
2192 * bfd.c (bfd_link_just_syms): Define.
2193 * binary.c (binary_bfd_link_just_syms): Define.
2194 * bout.c (b_out_bfd_link_just_syms): Define.
2195 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
2196 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
2197 * coffcode.h (coff_bfd_link_just_syms): Define.
2198 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
2199 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
2200 (_bfd_elf_link_just_syms): Declare.
2201 * elf.c (_bfd_elf_link_just_syms): New function.
2202 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
2203 sections haven't already been discarded by the linker.
2204 * elflink.h (elf_link_add_object_symbols): Likewise for stab
2205 sections and SEC_MERGE sections.
2206 (elf_bfd_discard_info): Similarly here.
2207 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
2208 * i386msdos.c (msdos_bfd_link_just_syms): Define.
2209 * i386os9k.c (os9k_bfd_link_just_syms): Define.
2210 * ieee.c (ieee_bfd_link_just_syms): Define.
2211 * ihex.c (ihex_bfd_link_just_syms): Define.
2212 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
2213 (_bfd_generic_link_just_syms): Declare.
2214 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
2215 * linker.c (_bfd_generic_link_just_syms): New function.
2216 * mmo.c (mmo_bfd_link_just_syms): Define.
2217 * nlm-target.h (nlm_bfd_link_just_syms): Define.
2218 * oasys.c (oasys_bfd_link_just_syms): Define.
2219 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
2220 * som.c (som_bfd_link_just_syms): Define.
2221 * srec.c (srec_bfd_link_just_syms): Define.
2222 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
2223 (BFD_JUMP_TABLE_LINK): And here.
2224 * tekhex.c (tekhex_bfd_link_just_syms): Define.
2225 * versados.c (versados_bfd_link_just_syms): Define.
2226 * vms.c (vms_bfd_link_just_syms): Define.
2227 * libbfd.h: Regenerate.
2228 * bfd-in2.h: Regenerate.
2229
2230 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2231
2232 * elf32-mips.c: Remove superfluous definitions copied from
2233 elfxx-mips.c.
2234 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
2235 SGIish vectors to check the special case.
2236 (mips_elf_hi16_reloc): Fix comment.
2237 (mips_elf_got16_reloc): Likewise.
2238 (_bfd_mips_elf32_gprel16_reloc): Likewise.
2239 (elf_reloc_map): Code cleanup.
2240 (mips_reloc_map): Add comment.
2241 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
2242 (mips_elf32_rtype_to_howto): Likewise.
2243 (mips_elf32_discard_info): Likewise.
2244 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
2245 lead to IRIX compatibility now.
2246
2247 2002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2248
2249 * elfxx-mips.c: Call it IRIX, not Irix in comments.
2250
2251 2002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
2252
2253 * config.bfd (shle-*-netbsdelf*): Add target which includes
2254 sh64 support.
2255
2256 2002-05-13 David Edelsohn <edelsohn@gnu.org>
2257
2258 * configure.in: Revert 2002-04-07. Instead, auto-configure
2259 HAVE_ST_C_IMPL.
2260 * configure: Regenerate.
2261 * config.in: Regenerate.
2262 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
2263 or AIX_5_CORE.
2264
2265 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2266
2267 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
2268 corefiles as well.2
2269 * configure: Regenerate.
2270
2271 2002-05-13 Alan Modra <amodra@bigpond.net.au>
2272
2273 * Makefile.am (install-data-local): Install headers to
2274 $(exec_prefix)/include.
2275 * Makefile.in: Regenerate.
2276
2277 2002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2278 Daniel Jacobowitz <drow@mvista.com>
2279
2280 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
2281 map BFD_RELOC_RVA.
2282
2283 2002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
2284
2285 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
2286 hppa*-*-openbsd*): New targets.
2287 * configure.in (alpha*-*-openbsd*): Set COREFILE.
2288 * configure: Regenerate.
2289
2290 2002-05-10 Tom Rix <trix@redhat.com>
2291
2292 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
2293 xcoff64_ppc_relocate_section.
2294 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
2295 * libxcoff.h: Common xcoff_reloc_type function declaration.
2296
2297 2002-05-10 Alan Modra <amodra@bigpond.net.au>
2298
2299 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
2300 added in 2002-05-09 commit.
2301
2302 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
2303 don't look for stubs on all undefined syms.
2304
2305 2002-05-09 Alan Modra <amodra@bigpond.net.au>
2306
2307 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
2308 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
2309 pcrel_offset.
2310
2311 * elf32-i386.c (elf_howto_table): Comments.
2312 (elf_i386_relocate_section): Handle more relocs for relocatable
2313 linking and against SEC_MERGE sections.
2314
2315 2002-05-08 Alan Modra <amodra@bigpond.net.au>
2316
2317 * elf32-ppc.c (ppc_elf_create_got): New function.
2318 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
2319 _bfd_elf_create_dynamic_sections. Correct .plt flags.
2320 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
2321 _bfd_elf_create_got_section.
2322
2323 2002-05-07 Alan Modra <amodra@bigpond.net.au>
2324
2325 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
2326 * elfxx-target.h (elf_backend_rela_normal): Define.
2327 (elfNN_bed): Init rela_normal.
2328 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
2329 for section symbols here if rela_normal. Simplify abs section test.
2330 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
2331 return immediately. Remove code handling relocatable linking.
2332 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
2333 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
2334 * elf32-i370.c (i370_elf_relocate_section): Likewise.
2335 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
2336 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2337 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
2338 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
2339 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2340 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2341 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
2342 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2343 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2344 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2345 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2346 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
2347 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
2348 * elf-m10200.c (elf_backend_rela_normal): Define.
2349 * elf-m10300.c (elf_backend_rela_normal): Define.
2350 * elf32-fr30.c (elf_backend_rela_normal): Define.
2351 * elf32-i370.c (elf_backend_rela_normal): Define.
2352 * elf32-i860.c (elf_backend_rela_normal): Define.
2353 * elf32-m68k.c (elf_backend_rela_normal): Define.
2354 * elf32-mcore.c (elf_backend_rela_normal): Define.
2355 * elf32-openrisc.c (elf_backend_rela_normal): Define.
2356 * elf32-ppc.c (elf_backend_rela_normal): Define.
2357 * elf32-s390.c (elf_backend_rela_normal): Define.
2358 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
2359 * elf64-ppc.c (elf_backend_rela_normal): Define.
2360 * elf64-s390.c (elf_backend_rela_normal): Define.
2361 * elf64-x86-64.c (elf_backend_rela_normal): Define.
2362 * elfxx-ia64.c (elf_backend_rela_normal): Define.
2363 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
2364 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
2365
2366 2002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
2367
2368 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
2369 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
2370
2371 2002-05-06 Alan Modra <amodra@bigpond.net.au>
2372
2373 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
2374 when not relocatable. Fix reloc_emitter call for K&R.
2375
2376 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2377
2378 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
2379 reloading local sym addend mistakenly removed in 2002-05-01 change.
2380
2381 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
2382 (read_abbrevs): Change "offset" param to bfd_vma.
2383 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
2384 Change "abbrev_offset" to bfd_vma.
2385 (read_indirect_string): Use correct conversion chars in error
2386 message format string, cast bfd_vma's to unsigned long.
2387 (read_abbrevs): Likewise.
2388 (read_attribute_value): Likewise.
2389 (decode_line_info): Likewise.
2390 (scan_unit_for_functions): Likewise.
2391 (parse_comp_unit): Likewise.
2392
2393 2002-05-04 Tom Rix <trix@redhat.com>
2394
2395 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
2396 (coff_swap_reloc_out): Same.
2397 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
2398 (xcoff_swap_reloc_out): Same.
2399 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
2400 case some 16 bit relocs. Add reloc value to output.
2401 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
2402 R_RBR. Improve names.
2403 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
2404 (bfd_xcoff_backend_data): Update with new reloc swap names.
2405 (bfd_pmac_xcoff_backend_data) : Same.
2406 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
2407 (xcoff64_swap_reloc_out): Same.
2408 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
2409 R_POS. Add reloc value to output.
2410 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
2411 bit R_RBR. Improve names, masks.
2412 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
2413 (bfd_xcoff_backend_data): Update with new reloc swap names.
2414 (bfd_xcoff_aix5_backend_data) : Same.
2415
2416 2002-05-04 Alan Modra <amodra@bigpond.net.au>
2417
2418 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
2419 bfd_count top_index, input_list, all_local_syms.
2420 (elf32_hppa_setup_section_lists): New function, split from
2421 elf32_hppa_size_stubs.
2422 (elf32_hppa_next_input_section): Likewise.
2423 (group_sections): Likewise.
2424 (get_local_syms): Likewise.
2425 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
2426 stubs on undefined syms too.
2427 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
2428 Only access htab elf fields when we have an elf hash table.
2429 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
2430 (elf32_hppa_next_input_section): Declare.
2431
2432 2002-05-04 Bob Byrnes <byrnes@curl.com>
2433
2434 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
2435 _bfd_new_bfd.
2436
2437 2002-05-03 H.J. Lu (hjl@gnu.org)
2438
2439 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
2440 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
2441 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
2442 to hide a global symbol.
2443 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
2444 forced_local to true.
2445
2446 2002-05-02 Richard Henderson <rth@redhat.com>
2447
2448 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
2449 vs SHN_UNDEF to zero.
2450
2451 2002-05-02 Alan Modra <amodra@bigpond.net.au>
2452
2453 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
2454 16 bit reloc.
2455 <R_PPC64_SECTOFF_DS>: Likewise.
2456 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2457 SECTOFF reloc.
2458 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
2459 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
2460 SECTOFF reloc.
2461
2462 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
2463 (ppc64_elf_ha_reloc): New function.
2464 (ppc64_elf_brtaken_reloc): New function.
2465 (ppc64_elf_sectoff_reloc): New function.
2466 (ppc64_elf_sectoff_ha_reloc): New function.
2467 (ppc64_elf_toc_reloc): New function.
2468 (ppc64_elf_toc_ha_reloc): New function.
2469 (ppc64_elf_toc64_reloc): New function.
2470 (ppc64_elf_unhandled_reloc): New function.
2471 (ppc64_elf_howto_raw): Use the above.
2472 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
2473 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
2474 <R_PPC64_SECTOFF_DS>: Likewise.
2475 (IS_ABSOLUTE_RELOC): Update.
2476 (struct ppc_link_hash_table): Add have_undefweak.
2477 (ppc64_elf_link_hash_table_create): Init.
2478 (func_desc_adjust): Set have_undefweak.
2479 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
2480 add the .sfpr blr when have_undefweak.
2481 (ppc64_elf_setup_section_lists): Check hash table flavour.
2482 (ppc64_elf_next_input_section): Move output_section->owner test to
2483 ppc64elf.em.
2484 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
2485 and relocatable test. Return TOCstart and don't set elf_gp.
2486 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
2487 offset calculation. Add assert on weak sym branch tweaks.
2488 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
2489 (ppc64_elf_toc): Declare.
2490 (ppc64_elf_next_input_section): Update.
2491
2492 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2493
2494 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
2495 file_name.
2496
2497 2002-05-01 Alan Modra <amodra@bigpond.net.au>
2498
2499 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
2500 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
2501 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
2502 call branches. Correct undefined weak destination.
2503 (ppc64_elf_func_desc_adjust): Always create at least one blr in
2504 .sfpr, and correct case where either only savef* or restf* is
2505 needed.
2506
2507 Long branch stubs, multiple stub sections.
2508 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
2509 (ppc64_elf_next_input_section): Declare.
2510 * elf64-ppc.c: Move linker-only prototypes.
2511 (STUB_SUFFIX): Define.
2512 (enum ppc_stub_type): New.
2513 (struct ppc_stub_hash_entry): New.
2514 (struct ppc_branch_hash_entry): New.
2515 (struct ppc_link_hash_entry): Add stub_cache, oh.
2516 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
2517 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
2518 Rename plt_overflow to stub_error.
2519 (ppc_stub_hash_lookup): Define.
2520 (ppc_branch_hash_lookup): Define.
2521 (stub_hash_newfunc): New function.
2522 (branch_hash_newfunc): New function.
2523 (link_hash_newfunc): Init new fields.
2524 (ppc64_elf_link_hash_table_create): Likewise.
2525 (ppc64_elf_link_hash_table_free): New function.
2526 (ppc_stub_name): New function.
2527 (ppc_get_stub_entry): New function.
2528 (ppc_add_stub): New function.
2529 (create_linkage_sections): Use bfd_make_section_anyway. Create
2530 .branch_lt and .rela.branch_lt sections. Don't create .stub.
2531 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
2532 and set up for plt call stubs. Link func and func desc syms.
2533 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
2534 (func_desc_adjust): Avoid hash lookup when func desc sym available
2535 via shortcut, and set links when processing.
2536 (ppc64_elf_hide_symbol): Likewise.
2537 (allocate_dynrelocs): Don't allocate stub section here.
2538 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
2539 Remove sstub code.
2540 (ppc_type_of_stub): New function.
2541 (build_one_stub): Delete.
2542 (ppc_build_one_stub): New function.
2543 (ppc_size_one_stub): New function.
2544 (ppc64_elf_setup_section_lists): New function.
2545 (ppc64_elf_next_input_section): New function.
2546 (group_sections): New function.
2547 (get_local_syms): New function.
2548 (ppc64_elf_size_stubs): Rewrite.
2549 (ppc64_elf_build_stubs): Rewrite.
2550 (ppc64_elf_relocate_section): Look up stub entry for REL24
2551 relocs. Don't propagate REL14* to dynamic objects. Look for long
2552 branch stubs if REL14* or REL24 relocs won't reach.
2553 (bfd_elf64_bfd_link_hash_table_free): Define.
2554
2555 2002-04-30 Mark Mitchell <mark@codesourcery.com>
2556
2557 * config.bfd: Add support for powerpc-*-windiss.
2558
2559 2002-04-30 Tom Rix <trix@redhat.com>
2560
2561 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
2562 symbol names into the hash table.
2563
2564 2002-04-28 Tom Rix <trix@redhat.com>
2565
2566 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
2567 calulating relocations.
2568 (xcoff_complain_overflow) : Function table for relocation errors.
2569 (xcoff_ppc_relocate_section): Use relocation and complain function
2570 tables.
2571 (xcoff_complain_overflow_unsigned_func): New complain function.
2572 (xcoff_complain_overflow_signed_func): Same.
2573 (xcoff_complain_overflow_bitfield_func): Same.
2574 (xcoff_complain_overflow_dont_func): Same.
2575 (xcoff_reloc_type_crel): New recot function.
2576 (xcoff_reloc_type_br): Same.
2577 (xcoff_reloc_type_ba): Same.
2578 (xcoff_reloc_type_toc): Same.
2579 (xcoff_reloc_type_rel): Same.
2580 (xcoff_reloc_type_neg): Same.
2581 (xcoff_reloc_type_pos): Same.
2582 (xcoff_reloc_type_fail): Same.
2583 (xcoff_reloc_type_noop): Same.
2584 * libxcoff.h : Declare common parts for xcoff64.
2585 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
2586 and complain function tables.
2587
2588 2002-04-28 Alan Modra <amodra@bigpond.net.au>
2589
2590 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
2591 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
2592
2593 2002-04-26 Alan Modra <amodra@bigpond.net.au>
2594
2595 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
2596 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
2597
2598 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
2599 same as the output before calling elf_link_input_bfd.
2600
2601 * coffcode.h (coff_compute_section_file_positions): Set
2602 section_tail after shuffling section list.
2603
2604 2002-04-24 Christian Groessler <chris@groessler.org>
2605
2606 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
2607 addresses are 23bit with a special layout, not plain 32bit
2608 values. Prevent relocation of immediate values.
2609
2610 2002-04-24 Chris G. Demetriou <cgd@broadcom.com>
2611
2612 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
2613 MIPS-16 ASE flags are set, print something to indicate that.
2614
2615 2002-04-23 Alan Modra <amodra@bigpond.net.au>
2616
2617 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
2618 under which a plt call stub is used.
2619 (final_link_relocate): Similarly.
2620 (allocate_plt_static): Clear h-plabel except when plt entry is
2621 exclusively used for a plabel.
2622 (allocate_dynrelocs): Use the above to simplify plt sizing.
2623 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
2624 (elf32_hppa_link_hash_table_create): Init.
2625 (BL22_RP): Define.
2626 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
2627 (elf32_hppa_check_relocs): Set has_22bit_branch.
2628
2629 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
2630 (final_link_relocate): Likewise.
2631
2632 2002-04-22 Jakub Jelinek <jakub@redhat.com>
2633
2634 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
2635 search table if some FDE is DW_EH_PE_aligned encoded either.
2636 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
2637
2638 2002-04-22 Richard Smith <richard@ex-parrot.com>
2639 Jakub Jelinek <jakub@redhat.com>
2640
2641 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
2642 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
2643 encoded personality.
2644 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
2645 for CIE/FDE removal.
2646
2647 2002-04-20 Tom Rix <trix@redhat.com>
2648
2649 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
2650
2651 2002-04-20 Alan Modra <amodra@bigpond.net.au>
2652
2653 * archures.c (bfd_lookup_arch): Move the list order comment..
2654 (struct bfd_arch_info): ..to where it belongs.
2655 * bfd-in2.h: Regenerate.
2656
2657 * archures.c (bfd_lookup_arch): Add comment on list order.
2658 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
2659 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
2660 is always at head of list.
2661
2662 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2663
2664 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
2665 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
2666 definition of these functions for ARM_WINCE builds as they are
2667 not used.
2668 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
2669 for ARM_WINCE builds.
2670
2671 2002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
2672
2673 * coff-arm.c (bfd_arm_process_before_allocation):
2674
2675 2002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
2676
2677 * cpu-sh.c (scan_mach): Delete.
2678 (arch_info_struct): Replace scan_mach with bfd_default_scan.
2679 (bfd_sh_arch): Likewise.
2680
2681 2002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
2682
2683 * ihex.c (ihex_write_object_contents): Fix check for records
2684 crossing 64K boundaries.
2685
2686 2002-04-16 Alan Modra <amodra@bigpond.net.au>
2687
2688 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
2689 type rather than just assuming entries are ELF.
2690 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
2691 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
2692 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
2693 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
2694 rather than elf_link_hash_entry.
2695
2696 2002-04-15 Richard Henderson <rth@redhat.com>
2697
2698 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
2699 n32 binaries.
2700
2701 2002-04-15 Michael Snyder <msnyder@redhat.com>
2702
2703 * opncls.c (bfd_close): Write contents if writeable.
2704 Minor formatting tidy-ups.
2705
2706 2002-04-15 Alan Modra <amodra@bigpond.net.au>
2707
2708 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
2709
2710 2002-04-12 Michael Snyder <msnyder@redhat.com>
2711
2712 * bfd-in.h (bfd_get_section_lma): New access macro.
2713 Minor white-space fix-up.
2714
2715 2002-04-12 Alan Modra <amodra@bigpond.net.au>
2716
2717 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
2718 header pad.
2719
2720 2002-04-09 DJ Delorie <dj@redhat.com>
2721
2722 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
2723
2724 2002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
2725
2726 * coffcode.h (coff_read_word): New.
2727 (coff_compute_checksum): New.
2728 (coff_apply_checksum): New.
2729 (coff_write_object_contents): Call coff_apply_checksum () to
2730 apply checksum to PE image.
2731
2732 2002-04-08 Randolph Chung <tausq@debian.org>
2733
2734 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
2735 (elf32_hppa_final_link): Split out sorting logic to..
2736 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
2737 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
2738
2739 2002-04-07 Andrew Cagney <ac131313@redhat.com>
2740
2741 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
2742 pattern.
2743 * configure: Re-generate.
2744
2745 2002-04-07 Andrew Cagney <ac131313@redhat.com>
2746
2747 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
2748 is greater or equal to 4.3.3.
2749 * configure: Regenerate.
2750 Fix PR gdb/344.
2751
2752 2002-04-05 Hans-Peter Nilsson <hp@axis.com>
2753
2754 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
2755 R_CRIS_32_PCREL>: Fix typo in name.
2756 (cris_elf_check_relocs): Always create .rela.got here when
2757 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
2758 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
2759 assume it's created.
2760
2761 2002-04-04 Daniel Jacobowitz <drow@mvista.com>
2762
2763 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
2764 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
2765 define.
2766 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
2767 * bfd.c (bfd_link_hash_table_free): Define.
2768 * binary.c (binary_bfd_link_hash_table_free): Define.
2769 * bout.c (b_out_bfd_link_hash_table_free): Define.
2770 * coff-rs6000.c (rs6000coff_vec): Include
2771 _bfd_generic_link_hash_table_free.
2772 (pmac_xcoff_vec): Likewise.
2773 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
2774 (aix5coff64_vec): Likewise.
2775 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
2776 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
2777 (bfd_elf32_bfd_link_hash_table_free): Define.
2778 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
2779 (bfd_elf32_bfd_link_hash_table_free): Define.
2780 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
2781 define.
2782 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
2783 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
2784 * ieee.c (ieee_bfd_link_hash_table_free): Define.
2785 * ihex.c (ihex_bfd_link_hash_table_free): Define.
2786 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
2787 (_bfd_generic_link_hash_table_free): Add prototype.
2788 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
2789 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
2790 * linker.c (_bfd_generic_link_hash_table_free): New function.
2791 * mmo.c (mmo_bfd_link_hash_table_free): Define.
2792 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
2793 * oasys.c (oasys_bfd_link_hash_table_free): Define.
2794 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
2795 * som.c (som_bfd_link_hash_table_free): Define.
2796 * srec.c (srec_bfd_link_hash_table_free): Define.
2797 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
2798 * versados.c (versados_bfd_link_hash_table_free): Define.
2799 * vms.c (vms_bfd_link_hash_table_free): New function.
2800 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
2801
2802 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
2803 instead of bfd_alloc.
2804 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
2805 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
2806 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
2807 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
2808 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
2809 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
2810 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
2811 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
2812 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
2813 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
2814 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
2815 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
2816 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
2817 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
2818 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
2819 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
2820 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
2821 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
2822 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
2823 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
2824 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
2825 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
2826 * m68klinux.c (linux_link_hash_table_create): Likewise.
2827 * sparclinux.c (linux_link_hash_table_create): Likewise.
2828 * sunos.c (sunos_link_hash_table_create): Likewise.
2829 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
2830
2831 * targets.c: Add _bfd_link_hash_table_free to xvec.
2832
2833 * bfd-in2.h: Regenerate.
2834 * libbfd.h: Regenerate.
2835 * libcoff.h: Regenerate.
2836
2837 2002-04-04 Alan Modra <amodra@bigpond.net.au>
2838
2839 * dep-in.sed: Cope with absolute paths.
2840 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
2841 Run "make dep-am".
2842 * Makefile.in: Regenerate.
2843 * coff-arm.c: Fix copyright date.
2844 * cpu-h8300.c: Likewise.
2845 * cpu-i370.c: Likewise.
2846 * cpu-s390.c: Likewise.
2847 * cpu-mips.c: Likewise.
2848 * po/SRC-POTFILES.in: Regenerate.
2849
2850 2002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2851
2852 * Makefile.am: Add elfxx-mips.c to the known backends.
2853 (elf32-mips.lo): remove dependency to coff/external.h.
2854 * Makefile.in: Regenerate.
2855 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
2856 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
2857 accordingly.
2858 * configure: Regenerate.
2859 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
2860 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
2861 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
2862 MIPS specific backend functions.
2863 * elf32-mips.c: Moved most code to elfxx-mips.c.
2864 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
2865 static.
2866 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
2867 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
2868 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
2869 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
2870 interface to allow selection of the right REL or RELA howto table.
2871 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
2872 static. Let it refuse n32 objects.
2873 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
2874 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
2875 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
2876 (elf32_mips_ignore_discarded_relocs): Rename from
2877 _bfd_elf32_mips_ignore_discarded_relocs.
2878 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
2879 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
2880 (elf_mips_howto_table_rela): Remove.
2881 * elf64-mips.c: Moved most code to elfxx-mips.c.
2882 (bfd_elf64_bfd_reloc_type_lookup): Make static.
2883 (mips_elf64_rtype_to_howto): New function.
2884 (mips_elf64_object_p): Likewise.
2885 (elf64_mips_irix_compat): Likewise.
2886 * elfxx-mips.c: New file containing common code merged together from
2887 elf32-mips.c and elf64-mips.c.
2888 * elfxx-mips.h: New file containing MIPS specific prototypes from
2889 elf-bfd.h.
2890 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
2891 elf_backend_mips_rtype_to_howto.
2892
2893 2002-04-04 Alan Modra <amodra@bigpond.net.au>
2894
2895 * srec.c (MAXCHUNK, Chunk): Revise comments.
2896 (srec_write_record): Correct buffer size.
2897 (srec_write_header): Do without intermediate buffer.
2898 (srec_write_section): Validate Chunk.
2899 (srec_write_terminator): Pass NULL instead of dummy buffer.
2900 (srec_write_symbols): Pass file and symbol names directly to
2901 bfd_bwrite so sprintf won't overflow buffer.
2902
2903 2002-04-03 Jakub Jelinek <jakub@redhat.com>
2904
2905 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
2906 PC relative relocs against hidden symbols.
2907 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2908
2909 2002-04-03 Alan Modra <amodra@bigpond.net.au>
2910
2911 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
2912 LMAs, loop over segments until p_vaddr and p_memsz specify an
2913 extent enclosing the section.
2914
2915 2002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
2916
2917 * ihex.c (ihex_write_object_contents): Do not allow records to
2918 cross a 64K boundary - wrap if necessary.
2919
2920 2002-04-01 Nathan Williams <nathanw@wasabisystems.com>
2921
2922 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
2923 which caused the returned LWP ID to always be 0.
2924
2925 2002-04-01 Richard Henderson <rth@redhat.com>
2926
2927 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
2928 (elf32_sparc_relocate_section): Use it to figure out when to
2929 initialize .got entries.
2930 * elf64-sparc.c: Similarly.
2931
2932 2002-03-28 Alan Modra <amodra@bigpond.net.au>
2933
2934 * linker.c (link_action): Ignore duplicate warning syms.
2935 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
2936 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
2937 (elf_adjust_dynamic_symbol): Likewise.
2938 (elf_export_symbol): Likewise.
2939 (elf_link_find_version_dependencies): Likewise.
2940 (elf_link_assign_sym_version): Likewise.
2941 (elf_link_sec_merge_syms): Likewise.
2942 (elf_link_output_extsym): Likewise.
2943 (elf_gc_sweep_symbol): Likewise.
2944 (elf_gc_propagate_vtable_entries_used): Likewise.
2945 (elf_gc_smash_unused_vtentry_relocs): Likewise.
2946 (elf_gc_allocate_got_offsets): Likewise.
2947 (elf_collect_hash_codes): Likewise.
2948 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
2949 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
2950 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
2951 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
2952 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
2953 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
2954 (elf_cris_discard_excess_dso_dynamics): Likewise.
2955 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
2956 (mark_PIC_calls): Likewise.
2957 (allocate_plt_static): Likewise.
2958 (allocate_dynrelocs): Likewise.
2959 (readonly_dynrelocs): Likewise.
2960 * elf32-i386.c (allocate_dynrelocs): Likewise.
2961 (readonly_dynrelocs): Likewise.
2962 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
2963 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
2964 * elf32-mips.c (mips_elf_output_extsym): Likewise.
2965 (mips_elf_sort_hash_table_f): Likewise.
2966 (mips_elf_check_mips16_stubs): Likewise.
2967 * elf32-s390.c (allocate_dynrelocs): Likewise.
2968 (readonly_dynrelocs): Likewise.
2969 * elf32-sh.c (sh_elf_discard_copies): Likewise.
2970 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
2971 (xstormy16_relax_plt_realloc): Likewise.
2972 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
2973 (elf64_alpha_output_extsym): Likewise.
2974 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
2975 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
2976 (mips_elf64_check_mips16_stubs): Likewise.
2977 (mips_elf64_output_extsym): Likewise.
2978 * elf64-ppc.c (func_desc_adjust): Likewise.
2979 (allocate_dynrelocs): Likewise.
2980 (readonly_dynrelocs): Likewise.
2981 * elf64-s390.c (allocate_dynrelocs): Likewise.
2982 (readonly_dynrelocs): Likewise.
2983 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
2984 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
2985 (readonly_dynrelocs): Likewise.
2986 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
2987 * aoutx.h (aout_link_write_other_symbol): Likewise.
2988 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
2989 (_bfd_coff_write_global_sym): Likewise.
2990 * i386linux.c (linux_tally_symbols): Likewise.
2991 * m68klinux.c (linux_tally_symbols): Likewise.
2992 * sparclinux.c (linux_tally_symbols): Likewise.
2993 * pdp11.c (aout_link_write_other_symbol): Likewise.
2994 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
2995 * xcofflink.c (xcoff_build_ldsyms): Likewise.
2996 (xcoff_write_global_symbol): Likewise.
2997
2998 * cofflink.c (_bfd_coff_final_link): Formatting.
2999 * cpu-mips.c (mips_compatible): Make static, prototype.
3000 * elf32-i386.c (elf_i386_check_relocs): Formatting.
3001 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
3002 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
3003 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
3004 (mips_elf64_final_link): Likewise.
3005 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
3006 prototype.
3007
3008 2002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
3009
3010 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
3011 (SWAP_OUT_RELOC_OFFSET): Define.
3012
3013 2002-03-27 Gregory Steuck <greg@nest.cx>
3014
3015 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
3016 terminating NULL if empty symbol table.
3017 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
3018
3019 2002-03-26 H.J. Lu (hjl@gnu.org)
3020
3021 * elflink.h (elf_link_input_bfd): Revert the last change since
3022 the gcc exception handling isn't fixed yet.
3023
3024 2002-03-26 H.J. Lu (hjl@gnu.org)
3025
3026 * elflink.h (elf_link_input_bfd): Complain about relocations
3027 against local symbols in discarded sections.
3028
3029 2002-03-26 Alan Modra <amodra@bigpond.net.au>
3030
3031 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
3032
3033 2002-03-23 Alan Modra <amodra@bigpond.net.au>
3034
3035 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
3036 section file offset for !SEC_LOAD sections.
3037
3038 2002-03-21 Richard Earnshaw <rearnsha@arm.com>
3039
3040 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
3041 <case R_ARM_GOT>): Handle relocations to Thumb functions.
3042
3043 2002-03-21 Alan Modra <amodra@bigpond.net.au>
3044
3045 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
3046 Whitespace changes.
3047 * archive.c: Update copyright date.
3048 * bfd-in2.h: Regenerate.
3049 * libbfd.h: Regenerate.
3050 * Makefile.am: Run "make dep-am"
3051 * Makefile.in: Regenerate.
3052 * po/SRC-POTFILES.in: Regenerate.
3053
3054 2002-03-20 Daniel Jacobowitz <drow@mvista.com>
3055
3056 * dwarf2.c (struct funcinfo): Move up.
3057 (lookup_address_in_function_table): New argument function_ptr.
3058 Set it.
3059 (lookup_address_in_line_table): New argument function. If function
3060 is non-NULL, use it to handle ``addr'' before the first line note of
3061 the function.
3062 (comp_unit_find_nearest_line): Update and swap calls to
3063 lookup_address_in_function_table and lookup_address_in_line_table.
3064 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
3065 N_SLINE encountered if we see an N_FUN before any N_SLINE.
3066
3067 2002-03-20 Tom Rix <trix@redhat.com>
3068
3069 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
3070 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
3071 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
3072
3073 2002-03-19 Tom Rix <trix@redhat.com>
3074
3075 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
3076 dynamic objects in archives.
3077
3078 2002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
3079
3080 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
3081 STT_NOTYPE symbols to STT_OBJECT.
3082
3083 2002-03-18 Jan Hubicka <jh@suse.cz>
3084
3085 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
3086
3087 2002-03-18 Tom Rix <trix@redhat.com>
3088
3089 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
3090 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
3091 * coff-rs6000 (do_pad) : New function for archive padding.
3092 (do_copy) : New function for object file copying in archives.
3093 (do_shared_object_padding) : New function for padding shared
3094 objects to their text section alignment in archives.
3095 (bfd_xcoff_ar_achive_set_magic) : Stub.
3096 (xcoff_write_armap_big) : Use do_copy and do_pad.
3097 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
3098 do_copy and do_pad.
3099 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
3100 bfd_xcoff_magic_number.
3101 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
3102 fop.
3103 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
3104 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
3105 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
3106 * rs6000-core.c : Update copyright date.
3107 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
3108 csectpp.
3109 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
3110 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
3111 (coff_set_flags) : Use bfd_xcoff_magic_number.
3112 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
3113 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
3114 * Makefile.am : Same.
3115 * config.bfd : Same.
3116 * targets.c : Same.
3117 * configure : Regnerate.
3118 * Makefile.in : Same.
3119 * bfd-in2.h : Same.
3120
3121 2002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
3122
3123 * po/fr.po: Updated version.
3124
3125 2002-03-18 Alan Modra <amodra@bigpond.net.au>
3126
3127 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
3128 * libbfd.h: Regenerate.
3129 * archive.c (coff_write_armap): Pass on failures from
3130 bfd_write_bigendian_4byte_int.
3131
3132 2002-03-14 H.J. Lu <hjl@gnu.org>
3133
3134 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
3135 error to bfd_error_nonrepresentable_section for reinit_array
3136 section in DSO.
3137
3138 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3139
3140 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
3141 OR it in rather than replacing previously selected flags.
3142
3143 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
3144 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
3145
3146 2002-03-14 Alan Modra <amodra@bigpond.net.au>
3147
3148 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
3149 (N): Use the above.
3150 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
3151 ensure reloc size matches before calling elf_link_input_bfd.
3152 Add an assert to check reloc size when counting output relocs.
3153
3154 2002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
3155
3156 * mmo.c (mmo_get_loc): Return NULL rather than false.
3157
3158 2002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
3159
3160 * po/fr.po: Updated version.
3161
3162 2002-03-13 Alan Modra <amodra@bigpond.net.au>
3163
3164 * archures.c (bfd_default_compatible): Test bits_per_word.
3165 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
3166 bfd_default_compatible.
3167 * cpu-i370.c (i370_compatible): Likewise.
3168 * cpu-sparc.c (sparc_compatible): Likewise.
3169 * cpu-h8300.c (compatible): Test in->arch == out->arch.
3170
3171 * elflink.h: Formatting fixes.
3172 (elf_link_output_extsym): Merge undefined and undef weak cases.
3173
3174 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
3175 when word size of input matches output word size.
3176
3177 2002-03-12 Andreas Jaeger <aj@suse.de>
3178
3179 * cpu-i386.c (i386_compatible): New. Use it instead of
3180 bfd_default_compatible.
3181
3182 2002-03-07 H.J. Lu (hjl@gnu.org)
3183
3184 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
3185 as the type for bfd_reloc_val.
3186
3187 2002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
3188
3189 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
3190 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
3191 (elf_hppa_final_link_relocate): Correct relocations for indirect
3192 references to local data through the DLT. Fix .opd creation for
3193 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
3194 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
3195 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
3196 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3197 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
3198 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
3199 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
3200
3201 2002-03-05 Jakub Jelinek <jakub@redhat.com>
3202
3203 * merge.c (_bfd_merge_sections): Don't segfault if there
3204 is nothing to merge due to GC.
3205
3206 2002-03-05 Alan Modra <amodra@bigpond.net.au>
3207
3208 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
3209 symbols that have been forced local.
3210
3211 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
3212 to output forced local syms for non-shared link.
3213 (elf_link_output_extsym): Tweak condition for calling backend
3214 adjust_dynamic_symbol so that previous behaviour is kept.
3215 Whitespace changes throughout file.
3216
3217 2002-03-04 H.J. Lu <hjl@gnu.org>
3218
3219 * elf.c (bfd_section_from_shdr): Handle special sections,
3220 .init_array, .fini_array and .preinit_array.
3221 (elf_fake_sections): Likewise.
3222
3223 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
3224 DT entry only if the section is in output for .init_array,
3225 .fini_array and .preinit_array. Complain about .preinit_array
3226 section in DSO.
3227 (elf_bfd_final_link): Warn zero size for .init_array,
3228 .fini_array and .preinit_array sections.
3229
3230 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
3231 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
3232 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
3233 .preinit_array.
3234
3235 2002-03-04 Alan Modra <amodra@bigpond.net.au>
3236
3237 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
3238 * configure: Regenerate.
3239
3240 2002-03-02 Tom Rix <trix@redhat.com>
3241
3242 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
3243 symbolic equiv.
3244 * coff-rs6000.c (xcoff_howto_table): Same.
3245
3246 2002-03-01 David Mosberger <davidm@hpl.hp.com>
3247
3248 * elflink.h (size_dynamic_sections): If section named
3249 ".preinit_array" exists, create DT_PREINIT_ARRAY and
3250 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
3251 ".init_array" and ".fini_array".
3252 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
3253 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
3254 DT_FINI_ARRAY.
3255
3256 2002-02-26 Andrew Macleod <amacleod@cygnus.com>
3257
3258 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
3259 dynsyms.
3260
3261 2002-02-25 Alan Modra <amodra@bigpond.net.au>
3262
3263 * elf64-hppa.h: Update copyright date.
3264
3265 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
3266 (ppc64_elf_relocate_section): Don't generate power4 style branch
3267 hints for *_BRTAKEN and *_BRNTAKEN relocs.
3268
3269 2002-02-22 Jakub Jelinek <jakub@redhat.com>
3270
3271 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
3272 last patch.
3273 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3274
3275 2002-02-21 Andreas Jaeger <aj@suse.de>
3276
3277 * elf64-x86-64.c: Major rework that introduces all recent changes
3278 to the x86-64 backend. Get a closer match to elf32-i386.
3279 (struct elf64_x86_64_dyn_relocs): Rename from
3280 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
3281 all users.
3282 (struct elf64_x86_64_link_hash_table): Add short cuts to some
3283 sections.
3284 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
3285 remove casts, initialize new hash members.
3286 (create_got_section): New.
3287 (elf64_x86_64_create_dynamic_sections): New.
3288 (elf64_x86_64_copy_indirect_symbol): New.
3289 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
3290 relocs, .got or .relgot here but do it in allocate_dynrelocs.
3291 Reference count possible .plt and .got entries. Don't test input
3292 section SEC_READONLY here to try to avoid copy relocs, and keep
3293 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
3294 DF_TEXTREL here. Delay setting of variables until needed. Cache
3295 pointer to "sreloc" section in elf_section_data. Tweak condition
3296 under which .got created. Report files with bad relocation
3297 section names.
3298 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
3299 Reference count possible .plt entries. Don't deallocate .got and
3300 .relgot space here.
3301 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
3302 do copy reloc processing for weakdefs. Remove redundant casts and
3303 aborts. Delay setting of vars until needed. Move creation of
3304 dynamic symbols and allocation of .plt and .rela.plt to
3305 allocate_dynrelocs. Replace BFD_ASSERT with abort.
3306 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
3307 (allocate_dynrelocs): New.
3308 (readonly_dynrelocs): New.
3309 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
3310 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
3311 Zero out the dynamic allocated content space.
3312 (elf64_x86_64_discard_copies): Removed.
3313 (elf64_x86_64_relocate_section): Make use of dynamic section
3314 short-cuts. Localise vars, and delay setting. Better error
3315 reporting, replace BFD_ASSERT with abort. Check
3316 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
3317 regular object file and tread the weak definition as the normal
3318 one. Don't discard relocs for undefweak or undefined symbols and
3319 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
3320 relocs.
3321 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
3322 symbols that have been forced local. Use same test to decide if
3323 we can use a relative reloc for got as relocate_section. Expand
3324 SHN_UNDEF comment. Move expressions out of function calls.
3325 Replace BFD_ASSERT with abort.
3326 (bfd_elf64_bfd_final_link): Removed.
3327 (elf_backend_copy_indirect_symbol): Define.
3328
3329 2002-02-20 Tom Rix <trix@redhat.com>
3330
3331 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
3332 (_bfd_xcoff_reloc_type_lookup): Use it.
3333 * coff64-rs6000.c (xcoff64_howto_table): Same.
3334 (xcoff64_reloc_type_lookup): Same.
3335
3336 2002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
3337
3338 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
3339 little endian.
3340
3341 2002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
3342
3343 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
3344 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
3345 * bfd-in2.h: Regenerate.
3346 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
3347 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
3348 with "s390:64-bit".
3349 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
3350 (elf_s390_reloc_type_lookup): Likewise.
3351 (elf_s390_check_relocs): Likewise.
3352 (elf_s390_gc_sweep_hook): Likewise.
3353 (elf_s390_relocate_section): Likewise.
3354 (elf_s390_object_p): Use renamed architecture define.
3355 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
3356
3357 2002-02-19 Frank Ch. Eigler <fche@redhat.com>
3358
3359 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
3360
3361 2002-02-19 Jakub Jelinek <jakub@redhat.com>
3362
3363 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
3364 absptr -> pcrel optimization for shared libs.
3365 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
3366 library cannot be converted to pcrel.
3367 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
3368 relative.
3369 * elf32-i386.c (elf_i386_relocate_section): If
3370 _bfd_elf_section_offset returned -2, skip, but make sure the
3371 relocation is installed.
3372 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
3373 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3374 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3375 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3376 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3377 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3378 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3379 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3380 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3381 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3382 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3383 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3384 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3385 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3386 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
3387 _bfd_elf_section_offset returning -2 the same way as -1.
3388 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
3389 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
3390 and BFD_ASSERT.
3391 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
3392
3393 2002-02-18 Tom Rix <trix@redhat.com>
3394
3395 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
3396 (bfd_xcoff_size_dynamic_sections): Same.
3397 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
3398 (bfd_xcoff_size_dynamic_sections): Same.
3399 * coff-rs6000.c (xcoff_generate_rtinit): Same.
3400 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
3401 * libxcoff.h (struct xcoff_backend_data_rec): Same.
3402 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
3403 * bfd-in2.h: Regenerate.
3404
3405 2002-02-18 Alan Modra <amodra@bigpond.net.au>
3406
3407 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
3408 (struct ppc_link_hash_table): Add sfpr.
3409 (ppc64_elf_link_hash_table_create): Init it.
3410 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
3411 .glink out to..
3412 (create_linkage_sections): ..here. Make .sfpr too.
3413 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
3414 dynobj early.
3415 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
3416 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
3417 ._restf* functions, and create as needed.
3418 (func_desc_adjust): Only force_local for shared libs.
3419
3420 2002-02-18 David O'Brien <obrien@FreeBSD.org>
3421
3422 * configure.in: Bump version number post 2.12 branching.
3423 * configure: Regenerate.
3424
3425 2002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
3426
3427 * mmo.c: Correct and improve comments.
3428 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
3429 zero-pad. Use input to fill up non-empty bfd buffer.
3430 (mmo_flush_chunk): New function.
3431 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
3432 changed. Don't emit location specifier if VMA is same as
3433 *LAST_VMAP after omitting leading zero contents. Call
3434 mmo_flush_chunk before emitting location specifier.
3435 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
3436 with mmo_write_loc_chunk calls.
3437 (mmo_internal_write_section): Call mmo_flush_chunk after
3438 mmo_write_chunk.
3439 (mmo_write_symbols_and_terminator): Move :Main to first position
3440 in symbol array. Add faked one if it does not exist if there are
3441 other symbols. Don't add it if there are no symbols at all. Move
3442 out test for value of :Main from symbol loop. Rename table
3443 fakemain to maintable and variable mainsym to fakemain.
3444
3445 2002-02-15 Richard Henderson <rth@redhat.com>
3446
3447 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
3448 section with no got matches any got. Simplify error generaion.
3449
3450 2002-02-15 Alan Modra <amodra@bigpond.net.au>
3451
3452 Support arbitrary length fill patterns.
3453 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
3454 (_bfd_default_link_order): Remove bfd_fill_link_order code.
3455 Call default_data_link_order.
3456 (default_fill_link_order): Delete.
3457 (default_data_link_order): New function.
3458 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
3459 of bfd_fill_link_order with bfd_data_link_order.
3460 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
3461 * elf64-mips.c (mips_elf64_final_link): Likewise.
3462
3463 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
3464 Correct value returned in "end" for "0x<non-hex>".
3465
3466 2002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
3467
3468 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
3469 (scan): Test against 'mach' field in info structure.
3470
3471 2002-02-14 Alan Modra <amodra@bigpond.net.au>
3472
3473 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
3474
3475 2002-02-14 Matt Fredette <fredette@netbsd.org>
3476
3477 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
3478 EF_M68000.
3479
3480 2002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
3481
3482 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
3483 non-zero physical addresses when adjusting the LMAs of new
3484 sections.
3485
3486 2002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
3487
3488 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
3489 from _bfd_elf_hppa_gen_reloc_type.
3490 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
3491 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
3492 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
3493 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
3494
3495 2002-02-12 Alexandre Oliva <aoliva@redhat.com>
3496
3497 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
3498 loading its contents if there's nothing to do in it.
3499
3500 2002-02-12 Alan Modra <amodra@bigpond.net.au>
3501
3502 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
3503 64k boundary.
3504
3505 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
3506 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
3507 (ppc64_elf_finish_dynamic_sections): Set values for them.
3508
3509 2002-02-11 Michael Snyder <msnyder@redhat.com>
3510
3511 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
3512 * elf.c (elfcore_grok_pstatus): Add prototype.
3513 (elfcore_grok_lwpstatus): Add prototype.
3514 (elfcore_write_lwpstatus): New function.
3515 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
3516
3517 2002-02-11 Alexandre Oliva <aoliva@redhat.com>
3518
3519 * elf32-sh.c: Added missing prototypes.
3520 * elf32-sh64.c: Likewise.
3521 (sh_elf_align_loads): Mark unused args as such.
3522 * elf64-sh64.c: Added missing prototypes.
3523 (struct elf_sh64_link_hash_entry): Fix typo.
3524 (sh_elf64_relocate_section): Fix info argument passed to
3525 _bfd_elf_section_offset.
3526
3527 2002-02-11 Alan Modra <amodra@bigpond.net.au>
3528
3529 * Makefile.am: "make dep-am".
3530 * Makefile.in: Regenerate.
3531 * aclocal.m4: Regenerate.
3532 * config.in: Regenerate.
3533 * configure: Regenerate.
3534
3535 2002-02-10 Daniel Jacobowitz <drow@mvista.com>
3536
3537 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
3538 variable warnings.
3539 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
3540 comparison warning.
3541 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
3542 cast warnings for the common case.
3543
3544 2002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
3545
3546 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
3547 vectors.
3548 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
3549 vectors.
3550
3551 2002-02-09 Richard Henderson <rth@redhat.com>
3552
3553 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
3554 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
3555 (elf64_alpha_relocate_section): Likewise.
3556 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
3557 * bfd-in2.h, libbfd.h: Rebuild.
3558
3559 2002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
3560
3561 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
3562 that base-plus-offset reloc accounting is consistent.
3563 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
3564 up to date for undefined symbols.
3565
3566 2002-02-08 Eric Christopher <echristo@redhat.com>
3567
3568 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
3569
3570 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
3571 sections for the O32 ABI.
3572
3573 2002-02-08 Chris Demetriou <cgd@broadcom.com>
3574
3575 * elf32-arm.h: Fix formatting of _("...").
3576 * elf32-d10v.c: Likewise.
3577 * elf32-m68k.c: Likewise.
3578 * elf32-mips.c: Likewise.
3579
3580 2002-02-08 Ivan Guzvinec <ivang@opencores.org>
3581
3582 * coff-or32.c: Fix compile time warning messages.
3583
3584 2002-02-08 Alexandre Oliva <aoliva@redhat.com>
3585
3586 Contribute sh64-elf.
3587 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
3588 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
3589 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
3590 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
3591 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
3592 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
3593 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
3594 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
3595 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
3596 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
3597 New relocs.
3598 * libbfd.h, bfd-in2.h: Rebuilt.
3599 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
3600 (sh_reloc_map): Map them.
3601 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
3602 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
3603 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
3604 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
3605 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
3606 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
3607 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
3608 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
3609 datalabel_got_offset.
3610 (sh_elf_link_hash_newfunc): Initialize it.
3611 (sh_elf_relocate_section): Augment the scope of
3612 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
3613 GOT and GOTOFF handling to new SHmedia relocation types. Support
3614 GOT_BIAS.
3615 (sh_elf_check_relocs): Likewise.
3616 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
3617 PLT entries using movi_shori_putval. Support GOT_BIAS.
3618 (sh_elf_finish_dynamic_sections): Likewise.
3619 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
3620 relocation, it's now done by the caller.
3621 (GOT_BIAS): New.
3622 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
3623 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
3624 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
3625 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
3626 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
3627 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
3628 sh64_elf64_hash_table): New.
3629 (sh_elf64_howto_table): Introduce new relocs.
3630 (sh_elf64_info_to_howto): Accept new PIC relocs.
3631 (sh_elf64_relocate_section): Augment the scope of
3632 seen_stt_datalabel. Support new PIC relocs.
3633 (sh_elf64_check_relocs): Support new PIC relocs.
3634 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
3635 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
3636 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
3637 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
3638 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
3639 movi_shori_putval, movi_3shori_putval,
3640 sh64_elf64_create_dynamic_sections,
3641 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
3642 sh64_elf64_size_dynamic_sections,
3643 sh64_elf64_finish_dynamic_symbol,
3644 sh64_elf64_finish_dynamic_sections): New.
3645 (elf_backend_create_dynamic-sections,
3646 bfd_elf64_bfd_link_hash_table_create,
3647 elf_backend_adjust_dynamic_symbol,
3648 elf_backend_size_dynamic_sections,
3649 elf_backend_finish_dynamic_symbol,
3650 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
3651 elf_backend_plt_readonly, elf_backend_want_plt_sym,
3652 elf_backend_got_header_size, elf_backend_plt_header_size):
3653 Define.
3654 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
3655 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
3656 match official numbers and names; moved unmaching ones to the
3657 range 0xf2-0xff.
3658 * elf32-sh64.c, elf64-sh64.c: Likewise.
3659 2001-03-12 DJ Delorie <dj@redhat.com>
3660 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
3661 sections.
3662 2001-03-12 DJ Delorie <dj@redhat.com>
3663 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
3664 be aligned.
3665 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
3666 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
3667 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
3668 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
3669 .cranges section with SEC_SORT_ENTRIES set.
3670 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
3671 incoming sorted .cranges section.
3672 (sh64_bfd_elf_copy_private_section_data): New.
3673 (sh64_elf_final_write_processing): Only sort .cranges and modify
3674 start address if called by linker.
3675 2001-01-08 Ben Elliston <bje@redhat.com>
3676 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
3677 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
3678 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
3679 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3680 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
3681 line. Add comments before all entries.
3682 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
3683 comment.
3684 (sh_elf64_reloc): Correct head comment.
3685 (sh_elf64_relocate_section): Correct spacing.
3686 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
3687 instead call reloc_dangerous callback.
3688 <case R_SH_SHMEDIA_CODE>: New case.
3689 (sh_elf64_gc_mark_hook): Correct spacing.
3690 (sh_elf64_check_relocs): Ditto.
3691 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
3692 New case.
3693 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
3694 functions.
3695 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
3696 clarify describing comment. Add comments before all entries.
3697 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
3698 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
3699 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
3700 Sort .cranges section in final link. Prepare to set bit 0 on
3701 entry address.
3702 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
3703 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
3704 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
3705 .cranges section.
3706 (sh64_backend_section_from_shdr): New, to recognize
3707 SHT_SH5_CR_SORTED on incoming .cranges section.
3708 (elf_backend_section_from_shdr): Define.
3709 (sh64_elf_final_write_processing): Sort outgoing .cranges
3710 section. (New, temporarily disabled:) Set bit 0 on entry address
3711 according to ISA type.
3712 (sh64_find_section_for_address): New.
3713 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
3714 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
3715 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
3716 bfd_malloc, not xmalloc.
3717 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
3718 global.
3719 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
3720 temporarily disabled) setting bit 0 on entry address.
3721 (elf_backend_final_write_processing): Define.
3722 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
3723 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
3724 be a proper relocation for PTA and PTB rather than a marker.
3725 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
3726 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
3727 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
3728 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
3729 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
3730 Zero src_mask.
3731 * elf64-sh64.c: Ditto.
3732 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
3733 * elf32-sh64.c: Include opcodes/sh64-opc.h
3734 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
3735 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
3736 parameters. No unused parameters. Caller changed.
3737 <case R_SH_PT_16>: New case.
3738 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
3739 * Makefile.in: Regenerate.
3740 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
3741 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
3742 all code sections.
3743 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3744 (sh64_elf_merge_private_data): Ditto.
3745 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
3746 to access stored section flags.
3747 (sh64_elf_final_write_processing): Return immediately unless
3748 called by linker. Use sh64_elf_section_data (cranges) to get size
3749 of linker-generated cranges entries.
3750 (sh64_elf_copy_private_data): Add missing "return true".
3751 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
3752 (sh_elf64_merge_private_data): Ditto.
3753 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
3754 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
3755 elf64-sh64.c:sh64_elf_fake_sections.
3756 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
3757 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
3758 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
3759 (sh64_elf_final_write_processing): New.
3760 (elf_backend_final_write_processing): Define.
3761 (sh64_elf_fake_sections): Get header flags from tdata field.
3762 (sh64_elf_copy_private_data): Do not call
3763 sh64_elf_copy_private_data_internal, just copy e_flags field.
3764 (sh64_elf_merge_private_data): Do not call
3765 sh64_elf_copy_private_data_internal.
3766 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
3767 Remove EF_SH64_ABI64, let ELF size make difference.
3768 Remove SH64-specific BFD section flag.
3769 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
3770 containing SHmedia through elf_section_data (asect)->tdata
3771 non-zero, not using a BFD section flag.
3772 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
3773 (sh64_elf_merge_private_data): Similar.
3774 (elf_backend_section_flags): Don't define.
3775 (sh64_elf_backend_section_flags): Delete.
3776 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
3777 not EF_SH64_ABI64.
3778 (sh_elf64_merge_private_data): Similar.
3779 * section.c (Section flags definitions): Don't define
3780 SEC_SH_ISA_SHMEDIA.
3781 (bfd-in2.h): Regenerate.
3782 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
3783 Make DataLabel references work with partial linking.
3784 * elf32-sh64.c: Fix formatting.
3785 (sh64_elf_link_output_symbol_hook): New.
3786 (elf_backend_link_output_symbol_hook): Define to
3787 sh64_elf_link_output_symbol_hook.
3788 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
3789 undefined if partial linking. Adjust sanity check.
3790 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
3791 (elf_backend_link_output_symbol_hook): Define to
3792 sh64_elf64_link_output_symbol_hook.
3793 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
3794 undefined if partial linking. Adjust sanity check.
3795 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
3796 Implement semantics for inter-file DataLabel references.
3797 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
3798 (sh64_elf64_add_symbol_hook): New.
3799 (sh_elf64_relocate_section): If passing an indirect symbol with
3800 st_type STT_DATALABEL on the way to a symbol with st_other
3801 STO_SH5_ISA32, do not bitor 1 to the relocation.
3802 (elf_backend_add_symbol_hook): Define to
3803 sh64_elf64_add_symbol_hook.
3804 * elf64-sh32.c: Tweak comments.
3805 (DATALABEL_SUFFIX): Define.
3806 (sh64_elf_add_symbol_hook): New.
3807 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
3808 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
3809 symbol with st_type STT_DATALABEL on the way to a symbol with
3810 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
3811 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
3812 Pass through STT_DATALABEL.
3813 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
3814 (elf_backend_get_symbol_type): Define.
3815 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
3816 (elf_backend_get_symbol_type): Define.
3817 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
3818 * elf32-sh64.c: Tweak comments.
3819 (sh64_elf_copy_private_data_internal): Add prototype.
3820 (bfd_elf32_bfd_set_private_flags): Define.
3821 (sh64_elf_copy_private_data_internal): Compare machine name, not
3822 textual BFD target name, to check whether to copy section flag
3823 SHF_SH5_ISA32.
3824 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
3825 Tweak section-contents-type-mismatch message.
3826 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
3827 Validize reloc-types.
3828 * elf64-sh64.c: New file.
3829 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
3830 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
3831 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
3832 Regenerate dependencies.
3833 * Makefile.in: Regenerate.
3834 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
3835 bfd_elf64_sh64l_vec.
3836 * configure.in: Handle bfd_elf64_sh64_vec and
3837 bfd_elf64_sh64l_vec.
3838 * configure: Regenerate.
3839 * po/POTFILES.in: Regenerate.
3840 * po/bfd.pot: Regenerate.
3841 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
3842 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
3843 anything else but EF_SH64 and EF_SH64_ABI64.
3844 (sh64_elf_merge_private_data): Emit error for anything else but
3845 EF_SH64 and EF_SH64_ABI64.
3846 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
3847 from targ_selvecs.
3848 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
3849 bfd_elf32_sh64l_vec as a temporary measure.
3850 * configure: Regenerate.
3851 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
3852 * cpu-sh.c (arch_info_struct): Include sh5 item
3853 unconditionalized.
3854 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
3855 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
3856 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
3857 * elf32-sh64.c: Tweak comments.
3858 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
3859 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
3860 (sh64_elf_copy_private_data_internal): Wrap long line.
3861 (sh64_elf_merge_private_data): Rewrite to allow objects from
3862 SH64 subsets to be linked together.
3863 (INCLUDE_SHMEDIA): Define.
3864 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
3865 Parenthesize plus-expression inside or-expression.
3866 <global symbol>: Ditto.
3867 (sh_elf_set_mach_from_flags): Remove code refusing
3868 deleted EF_SH64_32BIT_ABI flag.
3869 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
3870 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
3871 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
3872 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
3873 (sh_elf_relocate_section) <local symbol>: Or 1 in
3874 calculation of relocation if sym->st_other & STO_SH5_ISA32.
3875 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
3876 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
3877 relocation.
3878 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
3879 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
3880 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
3881 Regenerate dependencies.
3882 * Makefile.in: Regenerate.
3883 * archures.c: Add bfd_mach_sh5.
3884 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
3885 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
3886 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
3887 * configure: Regenerate.
3888 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
3889 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
3890 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
3891 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
3892 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
3893 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
3894 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
3895 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
3896 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
3897 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
3898 in item for SH5.
3899 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
3900 for SHmedia relocs.
3901 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
3902 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
3903 shmedia_prepare_reloc, goto final_link_relocate if it returns
3904 non-zero, else fail as before.
3905 (sh_elf_set_mach_from_flags): Provide function only if not defined
3906 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
3907 (sh_elf_set_private_flags): Provide function only if not defined
3908 as a macro.
3909 (sh_elf_copy_private_data): Similar.
3910 (sh_elf_merge_private_data): Similar.
3911 * section.c (SEC_SH_ISA_SHMEDIA): New.
3912 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
3913 * elf32-sh64.c: New file.
3914 * libbfd.h: Regenerate.
3915 * bfd-in2.h: Regenerate.
3916 * po/POTFILES.in: Regenerate.
3917 * po/bfd.pot: Regenerate.
3918 * bfd-in2.h: Regenerate.
3919 * libbfd.h: Regenerate.
3920
3921 2002-02-07 Daniel Jacobowitz <drow@mvista.com>
3922
3923 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
3924 been included, not drag it in.
3925 * bfd-in2.h: Regenerate.
3926
3927 2002-02-06 H.J. Lu (hjl@gnu.org)
3928
3929 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
3930 the mach and ISA fields if necessary.
3931
3932 2002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
3933
3934 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
3935 ARM architecture when an F_ARM_5 flag is detected, since we cannot
3936 be sure exactly which architecture this represents.
3937
3938 2002-02-05 Nick Clifton <nickc@redhat.com>
3939
3940 * po/tr.po: Updated translation.
3941
3942 2002-02-05 Alan Modra <amodra@bigpond.net.au>
3943
3944 From Jimi X <jimix@watson.ibm.com>
3945 * archures (bfd_mach_ppc64): Define.
3946 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
3947 (bfd_powerpc_arch): Define.
3948 * bfd-in2.h: Regenerate.
3949 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
3950 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
3951 (bfd_powerpc_archs): Add default powerpc64 arch.
3952
3953 2002-02-05 Alan Modra <amodra@bigpond.net.au>
3954
3955 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
3956 against section syms in readonly sections. Don't do the global
3957 sym check if we find one.
3958 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
3959 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
3960 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
3961 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
3962 (elf_s390_grok_prstatus): Add missing prototype.
3963
3964 2002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
3965
3966 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
3967 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
3968 Call bfd_get_section_by_name only once. Initialize
3969 bpodata->n_bpo_relocs_this_section.
3970 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
3971 referring to DSOs.
3972 (bpo_reloc_request_sort_fn): Don't use difference of values as
3973 return-value.
3974
3975 2002-02-02 David O'Brien <obrien@FreeBSD>
3976
3977 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
3978 version 4.5 and later the same as 5-CURRENT.
3979 * configure: Re-generate.
3980
3981 2002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
3982
3983 * config.bfd (hppa*-*-netbsd*): New target.
3984
3985 2002-01-31 Philipp Thomas <pthomas@suse.de>
3986
3987 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
3988 to front of message. Unify messages with elf32-arm.h. Use
3989 commas where neccessary.
3990 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
3991 ERROR in messages. Unify messages with coff-arm.c. Correct
3992 VFP/FPA error message.
3993 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
3994 APCS-32 for translation.
3995
3996 2002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
3997
3998 Perform on-demand global register allocation from
3999 R_MMIX_BASE_PLUS_OFFSET relocs.
4000 * elf64-mmix.c (struct bpo_reloc_section_info, struct
4001 bpo_reloc_request, struct bpo_greg_section_info): New.
4002 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
4003 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
4004 _bfd_mmix_check_all_relocs,
4005 _bfd_mmix_prepare_linker_allocated_gregs,
4006 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
4007 (elf_mmix_howto_table): Correct src_mask for most relocs.
4008 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
4009 case.
4010 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
4011 case. Fix typo in comment. New label do_mmix_reloc.
4012 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
4013 store first object file with a base-plus-offset reloc. Call
4014 mmix_elf_check_common_relocs for the part common with mmo.
4015 (mmix_elf_final_link): Write out linker-allocated register
4016 contents section.
4017 (elf_backend_gc_sweep_hook): Define.
4018 (bfd_elf64_bfd_relax_section): Define.
4019
4020 * mmo.c: Don't include <ctype.h>
4021 (mmo_init): Correct init-once logic.
4022
4023 2002-02-01 Tom Rix <trix@redhat.com>
4024
4025 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
4026
4027 2002-02-01 Alan Modra <amodra@bigpond.net.au>
4028
4029 * Makefile.am: Run "make dep-am"
4030 * Makefile.in: Regenerate.
4031
4032 2002-01-31 David O'Brien <obrien@FreeBSD>
4033
4034 * configure.in: Recognize the differences in core files from FreeBSD
4035 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
4036 5-CURRENT.
4037 * configure: Regenerate.
4038
4039 2002-01-31 Ivan Guzvinec <ivang@opencores.org>
4040
4041 * coff-or32.c: New file.
4042 * cpu-or32.c: New file.
4043 * elf32-or32.c: New file.
4044 * archures.c: Add support for or32.
4045 * targets.c: Add support for or32.
4046 * bfd-in2.h: Regenerate.
4047 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
4048 coff_write_object_contents): Add support for or32.
4049 * config.bfd: Add target.
4050 * configure.in: Add support for or32.
4051 * configure: Regenerate.
4052 * Makefile.am: Add support for or32.
4053 * Makefile.in: Regenerate.
4054 * po/SRC-POTFILES.in: Add or32 files.
4055 * po/bfd.pot: Regenerate.
4056
4057 2002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
4058 Don Lindsay <lindsayd@cisco.com>
4059
4060 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
4061 false' with a return of a bfd_reloc_ error code.
4062
4063 2002-01-31 Hans-Peter Nilsson <hp@axis.com>
4064
4065 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
4066 unexport unreferenced symbols when --export-dynamic. Call
4067 _bfd_elf_strtab_delref when unexporting.
4068
4069 2002-01-30 Daniel Jacobowitz <drow@mvista.com>
4070
4071 * bfd-in.h: Include <stdbool.h> if it is available.
4072 * bfd-in2.h: Regenerated.
4073
4074 2002-01-31 Alan Modra <amodra@bigpond.net.au>
4075
4076 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
4077 not go via the plt.
4078
4079 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4080
4081 * archures.c: Tidy up formatting of embedded comments.
4082 * bfd.c: Tidy up formatting of embedded comments.
4083 * bfd-in.h: Fix formatting of comments.
4084 * reloc.c: Tidy up formatting of ordinary & embedded comments.
4085 * section.c: Tidy up formatting of embedded comments.
4086 * syms.c: Tidy up formatting of embedded comments.
4087 * targets.c: Tidy up formatting of embedded comments.
4088
4089 * bfd-in2.h: Regenerate.
4090
4091 2002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
4092
4093 * vms-tir.c (cmd_name): New function.
4094 (tir_cmd_name): New function.
4095 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
4096 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
4097 Fix formatting.
4098
4099 * peXXigen.c (pe_print_idata): Rearrange message to aid in
4100 translation.
4101 (pe_print_pdata): Rearrange message to aid in translation.
4102
4103 * libbfd.c (warn_deprecated): Rearrange error message to aid in
4104 translation.
4105
4106 * ihex.c (ihex_write_object_contents): Fix spelling typo.
4107
4108 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
4109
4110 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
4111 message to aid in translation.
4112
4113 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
4114 to aid in translation.
4115
4116 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
4117
4118 2002-01-30 Philipp Thomas <pthomas@suse.de>
4119
4120 * coff-arm.c, elf32-elf.h: Unify messages.
4121
4122 2002-01-30 Nick Clifton <nickc@redhat.com>
4123
4124 * po/sv.po: Updated translation.
4125
4126 2002-01-30 Philipp Thomas <pthomas@suse.de>
4127
4128 * dwarf2.c (read_abbrev): Use full section name in error message.
4129 (decode_line_info): Likewise.
4130
4131 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
4132 message.
4133
4134 2002-01-30 Alan Modra <amodra@bigpond.net.au>
4135
4136 * elf64-ppc.c (func_desc_adjust): Only provide missing function
4137 descriptor symbols for undefined function code syms. Clear
4138 ELF_LINK_NON_ELF so that they can stay weak.
4139
4140 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4141 Mitch Lichtenberg <mpl@broadcom.com>
4142
4143 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
4144 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
4145 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
4146 generation.
4147 * bfd-in2.h: Regenerate.
4148
4149 2002-01-29 Chris Demetriou <cgd@broadcom.com>
4150
4151 * elf32-mips.c: Add additional comments about HI16 relocation
4152 processing.
4153 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
4154 pc-relative relocations. (Reverts change made on 2001-10-31.)
4155 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
4156 for pc-relative relocations.
4157 (mips_elf_calculate_relocation): Add a comment about a kludge
4158 in the R_MIPS_GNU_REL_HI16 handling.
4159 (_bfd_mips_elf_relocate_section): Implement that kludge;
4160 adjust pc-relative HI16 relocation for difference in HI16 and
4161 LO16 addresses, since it can't easily be done in
4162 mips_elf_calculate_relocation.
4163
4164 2002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
4165
4166 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
4167 relocations with PC32 relocations for undefined or weak symbols.
4168 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
4169 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
4170
4171 2002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
4172
4173 * elfcore.h (elf_core_file_p): Improve comment for last change.
4174
4175 2002-01-27 Daniel Jacobowitz <drow@mvista.com>
4176
4177 * configure: Regenerated.
4178
4179 2002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
4180
4181 * elfcore.h (elf_core_file_p): Set the machine architecture
4182 before processing the program headers.
4183
4184 2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
4185
4186 * configure.in <64-bit configuration>: If using gcc, check and
4187 emit error for egcs-1.1.2.
4188 * configure: Regenerate.
4189
4190 2002-01-26 Egor Duda <deo@logos-m.ru>
4191
4192 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
4193 as possible to avoid stack corruption.
4194
4195 2002-01-26 Richard Henderson <rth@redhat.com>
4196
4197 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
4198 for non-allocated sections.
4199
4200 2002-01-25 Mark Kettenis <kettenis@gnu.org>
4201
4202 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
4203 prstat.pr_reg even if it is a struct.
4204
4205 2002-01-25 Steve Ellcey <sje@cup.hp.com>
4206
4207 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
4208
4209 2002-01-25 Philipp Thomas <pthomas@suse.de>
4210
4211 * coffgen.c (coff_print_symbol): Don't mark info message
4212 for translation.
4213
4214 2002-01-25 Nick Clifton <nickc@redhat.com>
4215
4216 * po/fr.po: Updated translation.
4217 * po/es.po: Updated translation.
4218
4219 2002-01-25 Philipp Thomas <pthomas@suse.de>
4220
4221 * coff-alpha.c (alpha_relocate_section): Unify warning message
4222 for GP relative relocations without GP defined.
4223 * coff-mips.c (mips_relocate_section): Likewise.
4224
4225 2002-01-25 Alan Modra <amodra@bigpond.net.au>
4226
4227 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
4228 unsigned overflow when new_offset < old_offset.
4229
4230 2002-01-24 Philipp Thomas <pthomas@suse.de>
4231
4232 * bfd.c (_bfd_abort): Fix typo.
4233
4234 2002-01-23 Richard Henderson <rth@redhat.com>
4235
4236 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
4237 plt entries for undefweak symbols.
4238
4239 2002-01-23 Steve Ellcey <sje@cup.hp.com>
4240
4241 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
4242 (bfd_elf64_ia64_hpux_big_vec): Ditto.
4243 (bfd_elf32_h8300_vec): Ditto.
4244
4245 2002-01-23 Alan Modra <amodra@bigpond.net.au>
4246
4247 * elf64-ppc.c: Remove stale part of ABI comment.
4248 (NO_OPD_RELOCS): Define.
4249 (ppc64_elf_check_relocs): Use it.
4250 (ppc64_elf_relocate_section): Here too.
4251 (build_one_stub): Don't point function syms at the stub. Instead,
4252 hijack plt.offset.
4253 (ppc64_elf_relocate_section): Check whether REL24 relocs should
4254 really go to the stub. Make all dynamic relocs in opd against
4255 locals.
4256 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
4257 plt.offset.
4258
4259 2002-01-22 Richard Henderson <rth@redhat.com>
4260
4261 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
4262
4263 2002-01-22 Alan Modra <amodra@bigpond.net.au>
4264
4265 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
4266 TOC_BASE_OFF adjustment.
4267
4268 * Makefile.am: Run "make dep-am".
4269 * Makefile.in: Regenerate.
4270 * po/SRC-POTFILES.in: Regenerate.
4271
4272 2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
4273
4274 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
4275 host defines.
4276
4277 2002-01-21 Hans-Peter Nilsson <hp@axis.com>
4278
4279 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
4280 Check for and emit error if sgot is NULL at this point.
4281
4282 2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
4283
4284 * config.bfd (ia64*-*-netbsd*): New target.
4285
4286 2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
4287
4288 * som.c (som_write_space_strings): Comment typo fix.
4289
4290 2002-01-21 Alan Modra <amodra@bigpond.net.au>
4291
4292 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
4293 is_func_descriptor fields.
4294 (link_hash_newfunc): Init them.
4295 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
4296 dot are candidates for plt entries. When processing .opd relocs,
4297 set function descriptor strings to point inside function code
4298 string, and set new ppc_link_hash_entry fields.
4299 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
4300 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
4301 function descriptors. It's now done in..
4302 (func_desc_adjust): New.
4303 (ppc64_elf_func_desc_adjust): New.
4304 (define elf_backend_always_size_sections): Define.
4305 (ppc64_elf_hide_symbol): New.
4306 (define elf_backend_hide_symbol): Define.
4307 (allocate_dynrelocs): Remove code looking up function descriptors
4308 as that has been done earlier.
4309 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
4310 table.
4311 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
4312 up function descriptor.
4313 (build_one_stub): Look up the function code sym. Check for
4314 invalid plt offsets.
4315 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
4316 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
4317
4318 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
4319 boolean param.
4320 (_bfd_elf_link_hash_hide_symbol): Likewise.
4321 * elflink.h (elf_link_add_object_symbols): Adjust call to
4322 elf_backend_hide_symbol.
4323 (elf_fix_symbol_flags): Likewise.
4324 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
4325 than bfd_alloc.
4326 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
4327 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
4328 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
4329 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
4330 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
4331 and adjust to suit.
4332 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
4333 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
4334 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
4335
4336 2002-01-18 Alan Modra <amodra@bigpond.net.au>
4337
4338 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
4339 dynamic function descriptor symbol, not the associated function
4340 symbol.
4341
4342 2002-01-17 Eric Christopher <echristo@redhat.com>
4343
4344 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
4345
4346 2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
4347
4348 * po/bfd.pot: Regenerate.
4349 * po/fr.po: Regenerate.
4350
4351 2002-01-17 Alan Modra <amodra@bigpond.net.au>
4352
4353 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
4354 Remove "Elf_Internal_Shdr *" param.
4355 (_bfd_mips_elf_section_from_bfd_section): Ditto.
4356 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
4357 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
4358 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
4359 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
4360 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
4361 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
4362 function to override special sections. Remove hdr arg from
4363 backend call, and don't loop.
4364
4365 2002-01-16 Eric Christopher <echristo@redhat.com>
4366
4367 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
4368 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
4369 relocations requiring gp0 and gp.
4370
4371 2002-01-16 Richard Earnshaw <rearnsha@arm.com>
4372
4373 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
4374 EF_ARM_VFP_FLOAT.
4375 (elf32_arm_print_private_bfd_data): Likewise.
4376
4377 2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
4378
4379 * po/tr.po: Import new version.
4380
4381 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4382
4383 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
4384 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
4385 (ORI_R0_R0_0): Correct.
4386
4387 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4388
4389 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
4390 when plt_not_loaded.
4391 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
4392 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
4393 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
4394 (ppc64_elf_glink_code): Delete.
4395 (PPC64_ELF_GLINK_SIZE): Delete.
4396 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
4397 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
4398 ORI_R0_R0_0): Define.
4399 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
4400 (struct ppc_link_hash_table): Add sstub and plt_overflow.
4401 (ppc64_elf_link_hash_table_create): Init them.
4402 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
4403 Don't copy to shared lib.
4404 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
4405 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
4406 (allocate_dynrelocs <plt>): Don't change function sym here. Make
4407 room for .stub and .glink code.
4408 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
4409 DT_PPC64_GLINK.
4410 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
4411 bfd_elf64_bfd_final_link.
4412 (bfd_elf64_bfd_final_link): Don't define.
4413 (ppc64_elf_size_stubs): New.
4414 (build_plt_stub): New.
4415 (build_one_stub): New.
4416 (ppc64_elf_build_stubs): New.
4417 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
4418 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
4419 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
4420 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
4421 case output sections not separate. Adjust DT_RELASZ to not
4422 include plt relocs. Set reserved got entry. Set got and plt
4423 entry size.
4424 (elf_backend_got_header_size): Set to 8.
4425 * elf64-ppc.h: New file.
4426
4427 2002-01-16 Alan Modra <amodra@bigpond.net.au>
4428
4429 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
4430 sections, use bfd_section_list_remove.
4431 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
4432 * elflink.h (elf_link_add_object_symbols): When removing all
4433 sections, use bfd_section_list_clear.
4434
4435 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4436
4437 * po/sv.po: New file: Swedish translation.
4438 * configure.in (ALL_LINGUAS): Add sv.
4439 * configure: Regenerate.
4440
4441 2002-01-15 Jakub Jelinek <jakub@redhat.com>
4442
4443 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
4444 * elf.c (merge_sections_remove_hook): New function.
4445 (_bfd_elf_merge_sections): Pass it as 3rd argument to
4446 _bfd_merge_sections.
4447 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
4448 * libbfd.h: Rebuilt.
4449 * merge.c (_bfd_merge_sections): Add remove_hook argument.
4450 Call remove_hook if a SEC_EXCLUDE section is encountered.
4451
4452 2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
4453
4454 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
4455 (xstormy16_reloc_map): Initialise new field with correct howto
4456 table.
4457 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
4458 howto entry.
4459
4460 2002-01-10 Michael Snyder <msnyder@redhat.com>
4461
4462 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
4463 (elfcore_write_pstatus): Use long instead of pid_t;
4464 * elf-bfd.h: Change prototypes to use long instead of pid_t;
4465
4466 2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
4467
4468 * elf.c: Update copyright years.
4469 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
4470 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
4471
4472 2002-01-08 Michael Snyder <msnyder@redhat.com>
4473
4474 Add capability to write corefile note sections, for gdb.
4475 * elf.c (elfcore_write_note): New function.
4476 (elfcore_write_prpsinfo): New function.
4477 (elfcore_write_prstatus): New function.
4478 (elfcore_write_pstatus): New function.
4479 (elfcore_write_prfpreg): New function.
4480 (elfcore_write_prxfpreg): New function.
4481 * elf-bfd.h: Add prototypes for above functions.
4482
4483 2002-01-08 Alexandre Oliva <aoliva@redhat.com>
4484
4485 * elf.c (elf_fake_sections): Propagate errors from
4486 elf_backend_fake_section.
4487
4488 2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
4489
4490 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
4491 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
4492 (elf32-sh-nbsd.lo): New rule.
4493 * Makefile.in: Regenerate.
4494 * config.bfd (sh*le-*-netbsdelf*): New target.
4495 (sh*-*-netbsdelf*): New target.
4496 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
4497 (bfd_elf32_shnbsd_vec): New vector.
4498 (bfd_elf32_shlnbsd_vec): New vector.
4499 * configure: Regenerate.
4500 * elf32-sh-nbsd.c: New file.
4501 * targets.c: Update copyright years.
4502 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
4503 bfd_elf32_shnbsd_vec.
4504
4505 2002-01-07 Aldy Hernandez <aldyh@redhat.com>
4506
4507 * coff-rs6000.c (READ20): Use bfd_scan_vma.
4508
4509 2002-01-07 Geoffrey Keating <geoffk@redhat.com>
4510
4511 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
4512 of a symbol in a section that will be deleted.
4513
4514 2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
4515
4516 * po/es.po: New file: Spanish translation.
4517 * configure.in (ALL_LINGUAS): Add es.
4518 * configure: Regenerate.
4519
4520 2002-01-06 Steve Ellcey <sje@cup.hp.com>
4521
4522 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
4523 argument so we can handle HP-UX specially.
4524 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
4525 (elfNN_hpux_backend_section_from_bfd_section): New for support
4526 of SHN_IA_64_ANSI_COMMON.
4527 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
4528 (is_unwind_section_name): Add special HP-UX support.
4529 (elfNN_ia64_section_from_shdr): Add support for more sections.
4530 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
4531 add support for more sections.
4532 (elfNN_ia64_additional_program_headers): Modify
4533 is_unwind_section_name call.
4534 (elfNN_ia64_modify_segment_map): Remove assumption that there is
4535 only one unwind section in segment.
4536
4537 2002-01-06 Alan Modra <amodra@bigpond.net.au>
4538
4539 * syms.c (_bfd_generic_make_empty_symbol): New function.
4540 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
4541 _bfd_generic_make_empty_symbol.
4542 * libbfd.h: Regenerate.
4543 * bfd-in2.h: Regenerate.
4544 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
4545 (hppabsd_core_get_symtab_upper_bound): Don't define.
4546 (hppabsd_core_get_symtab): Likewise.
4547 (hppabsd_core_print_symbol): Likewise.
4548 (hppabsd_core_get_symbol_info): Likewise.
4549 (hppabsd_core_bfd_is_local_label_name): Likewise.
4550 (hppabsd_core_get_lineno): Likewise.
4551 (hppabsd_core_find_nearest_line): Likewise.
4552 (hppabsd_core_bfd_make_debug_symbol): Likewise.
4553 (hppabsd_core_read_minisymbols): Likewise.
4554 (hppabsd_core_minisymbol_to_symbol): Likewise.
4555 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
4556 Formatting fixes.
4557 * hpux-core.c: Similarly.
4558 * irix-core.c: Similarly.
4559 * osf-core.c: Similarly.
4560 * sco5-core.c: Similarly.
4561 * binary.c (binary_make_empty_symbol): Remove function, define as
4562 _bfd_generic_make_empty_symbol.
4563 * ihex.c (ihex_make_empty_symbol): Likewise.
4564 * mmo.c (mmo_make_empty_symbol): Likewise.
4565 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
4566 * srec.c (srec_make_empty_symbol): Likewise.
4567 * versados.c (versados_make_empty_symbol): Likewise.
4568 * vms.c (_bfd_vms_make_empty_symbol): Remove.
4569 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
4570 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
4571 rather than _bfd_vms_make_empty_symbol.
4572 * vms-misc.c (new_symbol): Likewise.
4573
4574 2002-01-05 Alan Modra <amodra@bigpond.net.au>
4575
4576 * section.c (bfd_section_init): Remove unnecessary initialisations.
4577 (bfd_section_list_clear): New function.
4578 (bfd_section_list_remove, bfd_section_list_insert): New macros.
4579 (_bfd_strip_section_from_output): Use them.
4580 * coffcode.h (coff_set_alignment_hook): Likewise.
4581 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
4582 * elf64-mips.c (mips_elf64_final_link): Likewise.
4583 * elf64-mmix.c (mmix_elf_final_link): Likewise.
4584 * sunos.c (sunos_add_dynamic_symbols): Likewise.
4585 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
4586 * bfd-in2.h: Regenerate.
4587
4588 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
4589 rather than doing our own section handling. Clean up after errors
4590 with bfd_release and bfd_section_list_clear. Handle unexpected
4591 flags.
4592 * aoutf1.h (sunos4_core_file_p): Likewise.
4593 * aix386-core.c (aix386_core_file_p): Likewise.
4594 * cisco-core.c (cisco_core_file_validate): Likewise.
4595 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
4596 * trad-core.c (trad_unix_core_file_p): Likewise.
4597
4598 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
4599 with bfd_release and bfd_section_list_clear.
4600 * hpux-core.c (hpux_core_core_file_p): Likewise.
4601 * irix-core.c (irix_core_core_file_p): Likewise.
4602 * lynx-core.c (lynx_core_file_p): Likewise.
4603 * osf-core.c (osf_core_core_file_p): Likewise.
4604 * rs6000-core.c (rs6000coff_core_p): Likewise.
4605 * sco5-core.c (sco5_core_file_p): Likewise.
4606
4607 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
4608 sign extension adjustments without conditionals.
4609
4610 2002-01-04 Jakub Jelinek <jakub@redhat.com>
4611
4612 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
4613 CIE at .eh_frame start is removed due to no FDEs referencing it.
4614
4615 2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
4616
4617 * config.bfd (x86_64-*-netbsd*): New target.
4618 * configure.in (x86_64-*-netbsd*): Set COREFILE
4619 to netbsd-core.lo.
4620 * configure: Regenerated.
4621
4622 2002-01-03 Tom Rix <trix@redhat.com>
4623
4624 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
4625 for recent bfd_make_section_anyway change.
4626
4627 2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
4628
4629 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
4630 R_ARM_THM_PC11 reloc.
4631
4632 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4633
4634 * configure.in (LINGUAS): Add ja.
4635 * configure: Regenerate.
4636 * po/ja.po: Import from translation project's web site.
4637
4638 2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
4639
4640 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
4641 messages to ease translation into other languages.
4642
4643 For older changes see ChangeLog-0001
4644 \f
4645 Local Variables:
4646 mode: change-log
4647 left-margin: 8
4648 fill-column: 74
4649 version-control: never
4650 End:
This page took 0.129685 seconds and 4 git commands to generate.