include/opcode/
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
5a7ea749
RS
12003-07-15 Richard Sandiford <rsandifo@redhat.com>
2
3 * archures.c (bfd_mach_mips7000): New.
4 * bfd-in2.h: Regenerated.
5 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
6 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
7 (mips_mach_extensions): Add an entry for it.
8
76bff705
NC
92003-07-14 Nick Clifton <nickc@redhat.com>
10
11 * po/tr.po: Update with latest version.
12 * po/SRC-POTFILES.in: Regenerate.
13 * po/bfd.pot: Regenerate.
14 * Makfile.in: Regenerate.
15 * configure: Regenerate.
16
d0facd1b
NC
172003-07-12 Jeff Baker <jbaker@qnx.com>
18
19 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
20 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
21 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
22 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
23
bcb9b88d
NC
242003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
25
26 * coffcode.h (coff_set_section_contents): Set the
27 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
28
7a9823f1
RS
292003-07-11 Richard Sandiford <rsandifo@redhat.com>
30
31 * bfd-in.h (bfd_h8300_pad_address): Declare.
32 * bfd-in2.h: Regenerate.
33 * cpu-h8300.c (bfd_h8300_pad_address): New function.
34 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
35 addresses before checking whether they can be relaxed.
36 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
37 Don't complain about overflows in general 8-bit relocations.
38 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
39 Fix handling of R_H8_DIR24A8.
40
c6baf75e
RS
412003-07-11 Richard Sandiford <rsandifo@redhat.com>
42
43 * elf32-h8300.c: Convert function prototypes and definitions
44 to C90 syntax.
45 * coff-h8300.c: Likewise.
46 * cpu-h8300.c: Likewise.
47
fce00800
AM
482003-07-11 Alan Modra <amodra@bigpond.net.au>
49
50 * po/SRC-POTFILES.in: Regenerate.
51 * po/bfd.pot: Likewise.
52
e901de89
BW
532003-07-10 Bob Wilson <bob.wilson@acm.org>
54
55 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
56 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
57 .xt.lit.plt section.
58 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
59 and allocate memory for it.
60 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
61 section to the .got.loc section.
62 (elf_xtensa_finish_dynamic_sections): Fix up call to
63 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
64 the address of .got.loc.
65 (relax_property_section): Shrink .got.loc to match changes in any
66 literal table section.
67 (xtensa_is_property_section): Change to match
68 xtensa_get_property_section_name.
69 (xtensa_is_littable_section): New.
70
eff26f78
L
712003-07-10 H.J. Lu <hongjiu.lu@intel.com>
72
73 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
74 -1LL.
75
942e0f42
AM
762003-07-10 Alan Modra <amodra@bigpond.net.au>
77
78 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
79 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
80 Run "make dep-am".
81 * Makefile.in: Regenerate.
82
73c3cd1c
AO
832003-07-10 Alexandre Oliva <aoliva@redhat.com>
84
85 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
86 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
87 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
88 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
89 * elf32-am33lin.c: Rename global functions.
90 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
91 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
92 * configure.in (bfd_elf32_am33lin_vec): Added.
93 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
94 (elf32-am33lin.lo): List dependencies.
95 * aclocal.m4, configure, Makefile.in: Rebuilt.
96 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
97 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
98 ELF_ARCH was not defined before.
99 (elf_symbol_leading_char): Define if not defined.
100 * elf32-am33lin.c: Override the definitions above.
101 * targets.c (bfd_elf32_am33lin_vec): New.
102
03a12831
AO
1032003-07-09 Alexandre Oliva <aoliva@redhat.com>
104
105 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
106 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
107 pcrel_relocs_copied.
108 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
109 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
110 ld-linux.so.2 to ld.so.1.
111 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
112 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
113 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
114 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
115 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
116 .rela.* section contents with bfd_zalloc.
117 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
118 * elf-m10300.c: Added declarations for functions missing them.
119 Merge some shared-library changes from the i386 back-end. Use
120 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
121 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
122 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
123 members of elf_link_hash_entry. Adjusted references.
124 (mn10300_elf_final_link_relocate): dynobj was already loaded
125 into a local variable, use it.
126 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
127 * elf-m10300.c: Add missing function prototypes.
128 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
129 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
130 relocation for dynamic relocations.
131 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
132 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
133 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
134 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
135 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
136 (_bfd_mn10300_elf_create_got_section): ... here, so that its
137 adress is already known at the time we compute relaxations.
138 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
139 and PLT32 to narrower relocations.
140 * libbfd.h, bfd-in2.h: Rebuilt.
141 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
142 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
143 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
144 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
145 BFD_RELOC_MN10300_RELATIVE): New relocs.
146 * libbfd.h, bfd-in2.h: Rebuilt.
147 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
148 (struct elf32_mn10300_link_hash_entry): Added DSO-related
149 fields.
150 (elf_mn10300_howto): Defined new relocation types.
151 (mn10300_reloc_map): Map them.
152 (_bfd_mn10300_elf_create_got_section): New fn.
153 (mn10300_elf_check_relocs): Handle PIC relocs.
154 (mn10300_elf_final_link_relocate): Likewise.
155 (mn10300_elf_relocate_section): Handle DSOs.
156 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
157 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
158 elf_mn10300_pic_plt_entry): New.
159 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
160 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
161 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
162 elf_mn10300_plt_reloc_offset: New macros.
163 (ELF_DYNAMIC_INTERPRETER): Likewise.
164 (_bfd_mn10300_elf_create_dynamic_sections): New function.
165 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
166 (_bfd_mn10300_elf_discard_copies): Likewise.
167 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
168 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
169 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
170 (elf_backend_can_gc_sections,
171 elf_backend_create_dynamic_sections,
172 elf_backend_adjust_dynamic_sections,
173 elf_backend_size_dynamic_sections,
174 elf_backend_finish_dynamic_symbol,
175 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
176 elf_backend_plt_readonly, elf_backend_want_plt_sym,
177 elf_backend_got_header_size, elf_backend_plt_header_size): New
178 macros.
179
b08fa4d3
AO
1802003-07-09 Alexandre Oliva <aoliva@redhat.com>
181
182 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
183 * elf-m10300.c (compute_function_info): Account for AM33
184 registers in `movm' when computing stack space for `call' when
185 linking for AM33/2.0 link.
186 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
187 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
188 * bfd-in2.h: Rebuilt.
189 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
190 * elf-m10300.c: Updated.
191 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
192 * archures.c (bfd_mach_am332): Defined.
193 * bfd-in2.h: Rebuilt.
194 * cpu-m10300.c (bfd_am332_arch): Defined.
195 (bfd_am33_arch): Chained with am33-2.
196 * elf-m10300.c (elf_mn10300_mach): Handle am332.
197 (_bfd_mn10300_elf_final_write_processing): Likewise.
198
201933ea
L
1992003-07-09 H.J. Lu <hongjiu.lu@intel.com>
200
201 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
202
e717da7e
AM
2032003-07-10 Alan Modra <amodra@bigpond.net.au>
204
205 * elf64-ppc.c (bfd_elf64_mkobject): Define.
206 (struct ppc64_elf_obj_tdata): New.
207 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
208 (ppc64_elf_mkobject): New function.
209 (struct got_entry): Add "owner". Move "tls_type".
210 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
211 (ppc64_elf_init_stub_bfd): New function.
212 (create_got_section): Create header .got in dynobj. Create .got
213 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
214 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
215 Look for dynobj .got, and test it.
216 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
217 (update_local_sym_info): Likewise.
218 (ppc64_elf_check_relocs): Likewise.
219 (ppc64_elf_gc_sweep_hook): Likewise.
220 (ppc64_elf_tls_optimize): Likewise.
221 (allocate_dynrelocs): Likewise.
222 (ppc64_elf_size_dynamic_sections): Likewise.
223 (ppc64_elf_relocate_section): Likewise.
224 (ppc64_elf_next_toc_section): Update comment.
225 (toc_adjusting_stub_needed): Remove unneeded cast.
226 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
227 testing section flags.
228 (ppc64_elf_build_stubs): Likewise.
229 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
230 (ppc64_elf_finish_dynamic_sections): Write out got sections.
231 (func_desc_adjust): Copy over dynamic info for undef weaks.
232 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
233 (ppc64_elf_size_stubs): Update prototype.
234 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
235 input sections rather than scanning dynobj.
236
18ad015f
RS
2372003-07-09 Richard Sandiford <rsandifo@redhat.com>
238
239 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
240 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
241 (mips_elf_create_msym_section): Delete.
242 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
243 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
244 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
245 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
246 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
247 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
248 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
249
e10609d3
RS
2502003-07-09 Richard Sandiford <rsandifo@redhat.com>
251
252 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
253 symbols protected.
254
0d591ff7
RS
2552003-07-09 Richard Sandiford <rsandifo@redhat.com>
256
257 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
258 of relocations whose offset is -2.
259
fdd07405
RS
2602003-07-09 Richard Sandiford <rsandifo@redhat.com>
261
262 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
263 forced-local symbols like other locals. Don't create relocations
264 against STN_UNDEF in irix objects.
265
d2fba50d
RS
2662003-07-09 Richard Sandiford <rsandifo@redhat.com>
267
268 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
269 compatible objects, add the values of defined external symbols
270 to the addend.
271
6eaa6adc
RS
2722003-07-09 Richard Sandiford <rsandifo@redhat.com>
273
274 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
275 initialize a GOT entry to the symbol's st_value.
276
0c83546a
AM
2772003-07-08 Alan Modra <amodra@bigpond.net.au>
278
43c40ab2
AM
279 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
280 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
281 (ppc_elf_tdata): Define.
282 (elf_local_ptr_offsets): Adjust.
283 (ppc_elf_mkobject): New function.
284 (bfd_elf32_mkobject): Define.
285
0c83546a
AM
286 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
287 * elfcore.h (elf_core_file_p): Likewise.
288 * section.c (bfd_section_init): Remove prototype.
289
58111eb7
AM
2902003-07-08 Alan Modra <amodra@bigpond.net.au>
291
292 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
293 field.
294 (enum elf_linker_section_enum): Delete.
295 (struct elf_linker_section): Delete.
296 (struct elf_linker_section_pointers): Delete.
297 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
298 Make linker_section_pointers a void**.
299 (elf_local_ptr_offsets, elf_linker_section): Don't define.
300 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
301 of old item in elf-bfd.h.
302 (struct elf_linker_section): Likewise.
303 (struct elf_linker_section_pointers): Likewise.
304 (elf_local_ptr_offsets): Define.
305 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
306 (ppc_elf_link_hash_newfunc): Init it.
307 (struct ppc_elf_link_hash_table): Add sbss.
308 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
309 individual fields.
310 (elf_create_linker_section): Fold into..
311 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
312 Make rela section here if shared.
313 (elf_find_pointer_linker_section): Pass lsect rather than enum.
314 (elf_create_pointer_linker_section): Adjust. zalloc rather than
315 clearing in a loop.
316 (elf_finish_pointer_linker_section): Adjust. Don't make rela
317 section here.
318 (ppc_elf_check_relocs): Adjust.
319 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
320 creating .sbss by hand.
321 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
322
15f8604d
JJ
3232003-07-04 Jakub Jelinek <jakub@redhat.com>
324
325 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
326 complain_overflow_bitfield.
327 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
328 complain_overflow_bitfield.
329
3368a7fb
JJ
3302003-07-04 Jakub Jelinek <jakub@redhat.com>
331
332 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
333 true even if -pie.
334
9203ba99
JJ
3352003-07-04 Jakub Jelinek <jakub@redhat.com>
336
337 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
338 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
339 !info->executable.
340 (get_fptr): For -pie create .opd as writable section and create
341 .rela.opd as well.
342 (elfNN_ia64_check_relocs): Change info->shared into
343 !info->executable.
344 (allocate_fptr): Likewise.
345 (allocate_dynrel_entries): Account for a relative reloc for -pie
346 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
347 for undefweak symbol. Account for an IPLT reloc in .rela.opd
348 section if -pie.
349 (set_got_entry): Don't create a relative reloc if -pie
350 want_ltoff_fptr for undefweak symbol.
351 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
352 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
353 @fptr().
354
355 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
356 even if -pie.
357 * elf32-i386.c (elf_i386_relocate_section): Likewise.
358 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
359 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
360 * elf64-s390.c (elf_s390_relocate_section): Likewise.
361 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
362 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
363 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
364 * elf32-s390.c (elf_s390_relocate_section): Likewise.
365 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
366
e0a868d1 3672003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
368
369 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
370 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
371 <R_H8_DIR32A16>: Fix type of relocation.
372
35cad4c4
KK
3732003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
374
375 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
376 sections were created already. Remove unnecessary tests of
377 the previous change.
378
03151a5a
KK
3792003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
380
381 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
382 bfd_make_section for existing sections.
383
003d627e
AM
3842003-07-04 Alan Modra <amodra@bigpond.net.au>
385
2293c499
AM
386 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
387 create_got_section if we already have done so.
388 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
389 (sh_elf_check_relocs): Likewise.
390 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
391 htab->root.dynobj instead.
392 (sh_elf_check_relocs): Likewise.
393 (sh_elf_finish_dynamic_sections): Likewise.
394
003d627e
AM
395 * section.c (bfd_make_section): Return NULL for existing section.
396
fa681e5d
AM
3972003-07-04 Alan Modra <amodra@bigpond.net.au>
398
399 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
400 ppc_elf_create_got if we've already done so.
3dab13f6
AM
401
402 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
403 (_bfd_elf_find_pointer_linker_section): Likewise.
404 (bfd_elf32_create_pointer_linker_section): Likewise.
405 (bfd_elf32_finish_pointer_linker_section): Likewise.
406 (bfd_elf64_create_pointer_linker_section): Likewise.
407 (bfd_elf64_finish_pointer_linker_section): Likewise.
408 (_bfd_elf_make_linker_section_rela): Likewise.
409 * elfcode.h (elf_create_pointer_linker_section): Don't define.
410 (elf_finish_pointer_linker_section): Likewise.
411 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
412 (_bfd_elf_create_linker_section): Move this function..
413 (_bfd_elf_find_pointer_linker_section): ..and this..
414 * elflink.h (elf_create_pointer_linker_section): ..and this..
415 (elf_finish_pointer_linker_section): ..and this..
416 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
417 calls.
418 (elf_create_linker_section): Convert to C90, tidy.
419 (elf_find_pointer_linker_section): Likewise.
420 (elf_create_pointer_linker_section): Likewise.
421 (elf_finish_pointer_linker_section): Likewise.
422 * elf32-i370.c: Delete #if 0 code.
423
772119ce
AM
4242003-07-02 Alan Modra <amodra@bigpond.net.au>
425
426 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
427 _restf* to be satisfied by shared libs, and always force them local.
428 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
429 Correct test for "bl".
430 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
431 primary opcode 31.
432
bd1ea41b
MS
4332003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
434
435 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
436 (s390_tls_reloc): New function.
437 (elf_howto_table): Add long displacement relocations R_390_20,
438 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
439 (elf_s390_reloc_type_lookup): Likewise.
440 (elf_s390_check_relocs): Likewise.
441 (elf_s390_gc_sweep_hook): Likewise.
442 (elf_s390_relocate_section): Likewise.
443 * elf64-s390.c: Same changes as for elf32-s390.c.
444 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 445 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
446 BFD_RELOC_390_TLS_GOTIE20.
447 * bfd-in2.h: Regenerate.
448 * libbfd.h: Likewise.
449
113202d6
AM
4502003-06-30 Alan Modra <amodra@bigpond.net.au>
451
452 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
453 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
454
c58b9523
AM
4552003-06-29 Alan Modra <amodra@bigpond.net.au>
456
457 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
458 Replace PTR with void *. Formatting.
459 * archive64.c: Likewise.
460 * archures.c: Likewise.
461 * bfd-in.h: Likewise.
462 * bfd.c: Likewise.
463 * bfdio.c: Likewise.
464 * bfdwin.c: Likewise.
465 * cache.c: Likewise.
466 * corefile.c: Likewise.
467 * format.c: Likewise.
468 * init.c: Likewise.
469 * libbfd-in.h: Likewise.
470 * libbfd.c: Likewise.
471 * linker.c: Likewise.
472 * opncls.c: Likewise.
473 * reloc.c: Likewise.
474 * section.c: Likewise.
475 * simple.c: Likewise.
476 * syms.c: Likewise.
477 * targets.c: Likewise.
478 * bfd-in2.h: Regenerate.
479 * libbfd.h: Regenerate.
480
481 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
482 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
483 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
484 (bfd_getb64): Rewrite without parens.
485 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
486 * cache.c (insert, snip): Remove INLINE.
487 * linker.c (bfd_link_add_undef): Likewise.
488
27482721
AJ
4892003-06-29 Andreas Jaeger <aj@suse.de>
490
491 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
492 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
493 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
494 trim plt entries. Move undefweak non-default visibility test ...
495 (allocate_dynrelocs): ... from here.
496 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
497 Change all callers.
498 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
499 SYMBOL_REFERENCES_LOCAL for dynreloc check.
500 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
501 dynreloc and .got relocs.
502 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
503 for .got relocs.
27482721 504
2b86c02e
TS
5052003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
506
507 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
508
e7c81c25
NC
5092003-06-27 Nick Clifton <nickc@redhat.com>
510
511 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
512 bfd_add_gnu_debuglink_section and only create the section, do not
513 fill in its contents.
514 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
515 contents of a .gnu-debuglink section.
516 * bfd-in2.h: Regenerate.
517
72b4917c
TS
5182003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
519
520 * elfxx-mips.c: Revert .got alignment to 2**4.
521
91709090
TS
5222003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
523
524 * elf32-mips.c: Fix addend for _gp_disp special symbol.
525
7a79a000
TS
5262003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
527
528 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
529 relocation header setup.
530
e47cd125
AM
5312003-06-25 Alan Modra <amodra@bigpond.net.au>
532
533 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
534 (ppc_elf_reloc_type_lookup): Modify comment.
535 (ppc_elf_info_to_howto): Ditto.
536 (ppc_elf_relocate_section): Ditto.
537 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
538
1049f94e
AM
5392003-06-25 Alan Modra <amodra@bigpond.net.au>
540
541 * aout-ns32k.c: Correct spelling of "relocatable".
542 * aoutx.h: Likewise.
543 * bfd-in.h: Likewise.
544 * bfd.c: Likewise.
545 * bout.c: Likewise.
546 * coff-a29k.c: Likewise.
547 * coff-alpha.c: Likewise.
548 * coff-arm.c: Likewise.
549 * coff-i386.c: Likewise.
550 * coff-i860.c: Likewise.
551 * coff-i960.c: Likewise.
552 * coff-m68k.c: Likewise.
553 * coff-m88k.c: Likewise.
554 * coff-mcore.c: Likewise.
555 * coff-mips.c: Likewise.
556 * coff-or32.c: Likewise.
557 * coff-ppc.c: Likewise.
558 * coff-rs6000.c: Likewise.
559 * coff-sh.c: Likewise.
560 * coff-tic80.c: Likewise.
561 * coff64-rs6000.c: Likewise.
562 * cofflink.c: Likewise.
563 * cpu-ns32k.c: Likewise.
564 * ecoff.c: Likewise.
565 * ecofflink.c: Likewise.
566 * elf-bfd.h: Likewise.
567 * elf-eh-frame.c: Likewise.
568 * elf-hppa.h: Likewise.
569 * elf-m10200.c: Likewise.
570 * elf-m10300.c: Likewise.
571 * elf.c: Likewise.
572 * elf32-arm.h: Likewise.
573 * elf32-avr.c: Likewise.
574 * elf32-cris.c: Likewise.
575 * elf32-d10v.c: Likewise.
576 * elf32-dlx.c: Likewise.
577 * elf32-fr30.c: Likewise.
578 * elf32-frv.c: Likewise.
579 * elf32-h8300.c: Likewise.
580 * elf32-hppa.c: Likewise.
581 * elf32-i370.c: Likewise.
582 * elf32-i386.c: Likewise.
583 * elf32-i860.c: Likewise.
584 * elf32-i960.c: Likewise.
585 * elf32-ip2k.c: Likewise.
586 * elf32-iq2000.c: Likewise.
587 * elf32-m32r.c: Likewise.
588 * elf32-m68hc11.c: Likewise.
589 * elf32-m68hc1x.c: Likewise.
590 * elf32-m68k.c: Likewise.
591 * elf32-mcore.c: Likewise.
592 * elf32-mips.c: Likewise.
593 * elf32-msp430.c: Likewise.
594 * elf32-openrisc.c: Likewise.
595 * elf32-ppc.c: Likewise.
596 * elf32-s390.c: Likewise.
597 * elf32-sh.c: Likewise.
598 * elf32-sh64.c: Likewise.
599 * elf32-sparc.c: Likewise.
600 * elf32-v850.c: Likewise.
601 * elf32-vax.c: Likewise.
602 * elf32-xstormy16.c: Likewise.
603 * elf32-xtensa.c: Likewise.
604 * elf64-alpha.c: Likewise.
605 * elf64-hppa.c: Likewise.
606 * elf64-mips.c: Likewise.
607 * elf64-mmix.c: Likewise.
608 * elf64-ppc.c: Likewise.
609 * elf64-s390.c: Likewise.
610 * elf64-sh64.c: Likewise.
611 * elf64-sparc.c: Likewise.
612 * elf64-x86-64.c: Likewise.
613 * elfcode.h: Likewise.
614 * elflink.h: Likewise.
615 * elfn32-mips.c: Likewise.
616 * elfxx-ia64.c: Likewise.
617 * elfxx-mips.c: Likewise.
618 * i386linux.c: Likewise.
619 * ieee.c: Likewise.
620 * libcoff-in.h: Likewise.
621 * linker.c: Likewise.
622 * m68klinux.c: Likewise.
623 * pdp11.c: Likewise.
624 * pe-mips.c: Likewise.
625 * peXXigen.c: Likewise.
626 * reloc.c: Likewise.
627 * reloc16.c: Likewise.
628 * sparclinux.c: Likewise.
629 * sunos.c: Likewise.
630 * syms.c: Likewise.
631 * versados.c: Likewise.
632 * vms.c: Likewise.
633 * xcofflink.c: Likewise.
634 * bfd-in2.h: Regenerate.
635 * libcoff.h: Regenerate.
636 * libbfd.h: Regenerate.
637
55fd94b0
AM
6382003-06-24 Alan Modra <amodra@bigpond.net.au>
639
d85f2c7d
AM
640 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
641 local sym errors.
642
55fd94b0
AM
643 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
644 prototypes and casts. Replace PTR with void *. Formatting.
645 * elf32-ppc.c: Likewise. Break long strings too.
646 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
647 (ppc_elf_unhandled_reloc): Internationalize error message.
648 * elf32-ppc.h: Remove PARAMS.
649
88810f8c
MM
6502003-06-23 Mark Mitchell <mark@codesourcery.com>
651
652 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
653 APUinfo slots.
654 (ppc_elf_final_write_processing): Likewise.
655
6e35c4da
L
6562003-06-23 H.J. Lu <hongjiu.lu@intel.com>
657
658 * elflink.h (elf_link_input_bfd): Check raw size when using
659 kept_section to preserve debug information discarded by
660 linkonce.
661
8f3bab57
AM
6622003-06-20 Alan Modra <amodra@bigpond.net.au>
663
664 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
665 (ppc64_elf_setup_section_lists): Set it.
666 (ppc64_elf_relocate_section): Check sym section id against top_id.
667 (ppc_build_one_stub): Comment on top_id.
668
efbc813e
NC
6692003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
670
671 * config.bfd: Add tic4x-*-rtems*.
672
4ce794b7
AM
6732003-06-20 Alan Modra <amodra@bigpond.net.au>
674
675 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
676 prototypes and casts. Replace PTR with void *. Format copyright.
677 Mention ABI links.
678 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
679 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
680 (ppc_type_of_stub): Make r_type an enum.
681 (ppc64_elf_size_stubs): Likewise.
682 * elf64-ppc.h: Remove PARAMS macro.
683
d2a300cf
AM
6842003-06-19 Alan Modra <amodra@bigpond.net.au>
685
3254fd24
AM
686 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
687 elf hash tab fields.
688
d2a300cf
AM
689 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
690 (ppc64_elf_info_to_howto): Likewise.
691 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
692 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
693
83615de0
AM
6942003-06-19 Alan Modra <amodra@bigpond.net.au>
695
696 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
697 reloc overflow on discarded eh_frame entries.
698
9b5ecbd0
AM
6992003-06-19 Alan Modra <amodra@bigpond.net.au>
700
701 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
702 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
703 Return error condition.
704 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
705 that have has_gp_reloc set.
706 (struct ppc_link_hash_table): Add stub_count.
707 (ppc_build_one_stub): Increment it.
708 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
709 individual fields.
710 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
711
64c456e1
AM
7122003-06-18 Alan Modra <amodra@bigpond.net.au>
713
714 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
715 size calculation from addend. Round size up.
716
3dab95d3
HPN
7172003-06-18 Hans-Peter Nilsson <hp@axis.com>
718
719 * elf32-cris.c (cris_elf_relocate_section) <case
720 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
721 symbol from a normal object or an undefined weak symbol.
722
0b13192e
AM
7232003-06-18 Alan Modra <amodra@bigpond.net.au>
724
725 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
726 R_PPC64_TOC relocs.
727
f97b9cb8
L
7282003-06-17 H.J. Lu <hongjiu.lu@intel.com>
729
730 * section.c (struct sec): Put back kept_section.
731 (STD_SECTION): Put back kept_section initialization.
732 * bfd-in2.h: Regenerate.
733
734 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
735 sections for relocateable output. Use kept_section to preserve
736 debug information discarded by linkonce.
737
9f1c3a0a
L
7382003-06-17 Roland McGrath <roland@redhat.com>
739
740 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
741 segment-relative relocation between different segments.
742
734b6cf9
AM
7432003-06-17 Alan Modra <amodra@bigpond.net.au>
744
1cf1f670
AM
745 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
746 optimizations earlier.
747
734b6cf9
AM
748 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
749 Restore previous input_list type.
750 (ppc64_elf_link_hash_table_create): Undo last change.
751 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
752 per output section, but don't bother with bfd_abs_section marker.
753 (ppc64_elf_next_input_section): Adjust for multiple input section
754 lists.
755 (group_sections): Likewise.
756
23fbd6fa
JJ
7572003-06-17 Jakub Jelinek <jakub@redhat.com>
758
759 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
760 *r_offset == r_addend for RELATIVE relocs against .got.
761
dad27d18
AM
7622003-06-17 Alan Modra <amodra@bigpond.net.au>
763
764 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
765
b613960a
NC
7662003-06-17 Nick Clifton <nickc@redhat.com>
767
768 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
769 in the vtable_entries_used array to allow for the accessing
770 the largest element.
b613960a 771
000732f7
AM
7722003-06-17 Alan Modra <amodra@bigpond.net.au>
773
3d6f9012
AM
774 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
775 input_list.
776 (ppc64_elf_link_hash_table_create): Init input_list here.
777 (ppc64_elf_setup_section_lists): Remove code setting up input lists
778 per output section. Set toc_off for abs and other standard sections.
779 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
780 (ppc64_elf_next_input_section): Adjust for single input section list.
781 Don't set toc_curr from input bfds that haven't set elf_gp.
782 (group_sections): Adjust for single input section list.
783
000732f7
AM
784 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
785
81407a69
AM
7862003-06-16 Alan Modra <amodra@bigpond.net.au>
787
788 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
789 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
790 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
791 got section for RELATIVE relocs. Fix wrong comment. Change condition
792 under which dynamic relocs update the section contents.
793
a06a29f2
NC
7942003-06-13 Robert Millan <zeratul2@wanadoo.es>
795
796 * config.bfd: Add i386-netbsd-gnu target.
797
7d1ebfb2
NC
7982003-06-12 Nick Clifton <nickc@redhat.com>
799
800 * opncls.c (calc_crc32): Rename to
801 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 802 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 803 hard-coded ".gnu_debuglink" in the code.
81407a69 804 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 805 xmalloc with a call to malloc.
81407a69 806 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 807 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 808 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
809 section to a bfd.
810 * bfd-in2.h: Regenerate.
811
8122003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 813
7d1ebfb2
NC
814 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
815 New target (was i[3-7]86-*-openbsd* before).
816 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
817 (vax-*-openbsd*): New target.
818
d80dcc6a
TS
8192003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
820
821 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
822 for n32, too.
823 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
824 (mips_elf_rel_dyn_section): Use appropriate section alignment.
825 (mips_elf_create_got_section): Likewise.
826 (_bfd_mips_elf_create_dynamic_sections): Likewise.
827
a7ebbfdf
TS
8282003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
829
830 * elf32-mips.c (mips_elf_generic_reloc): New Function.
831 (elf_mips_howto_table_rel): Use it.
832 (gprel32_with_gp): Move prototype.
833 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
834 Use mips_elf_generic_reloc.
835 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
836 Code cleanup.
837 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
838 zero addend.
839 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
840 as in the other *_gprel*_reloc functions.
841 (gprel32_with_gp): Handle partial_inplace properly.
842 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
843 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
844 Do addend handling directly instead of calling
845 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
846 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
847 of zero addend. Handle partial_inplace properly.
848 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
849 addend.
850 (mips_elf64_gprel16_reloc): Likewise.
851 (mips_elf64_literal_reloc): Likewise.
852 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
853 logic as in the other *_gprel*_reloc functions. Handle
854 partial_inplace properly.
855 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
856 addend. Handle partial_inplace properly.
857 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
858 of calling _bfd_mips_elf_gprel16_with_gp.
859 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
860 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
861 of zero addend.
862 (mips_elf_shift6_reloc): Handle partial_inplace properly.
863 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
864 of calling _bfd_mips_elf_gprel16_with_gp.
865 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
866 partial_inplace properly. Fix wrong addend handling. Fix overflow
867 check.
868 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
869 exported.
870 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
871 (_bfd_mips_elf_relocate_section): Likewise.
872 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
873 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
874 (_bfd_mips_elf_sign_extend): New prototype.
875
49ba19a4 8762003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 877
49ba19a4
NC
878 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
879 New target (was sparc-*-openbsd* before).
880 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 881
de6e5e1a
NC
882 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
883 * configure: Regenerate.
884
3b443373
L
8852003-06-11 H.J. Lu <hongjiu.lu@intel.com>
886
887 * po/Make-in (DESTDIR): New.
888 (install-data-yes): Support $(DESTDIR).
889 (uninstall): Likewise.
890
795bb480
AM
8912003-06-11 Alan Modra <amodra@bigpond.net.au>
892
893 * Makefile.am (config.status): Depend on version.h.
894 Run "make dep-am".
895 * Makefile.in: Regenerate.
896 * po/SRC-POTFILES.in: Regenerate.
897
adadcc0c
AM
8982003-06-10 Alan Modra <amodra@bigpond.net.au>
899 Gary Hade <garyhade@us.ibm.com>
900
901 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
902
f4984206
RS
9032003-06-10 Richard Sandiford <rsandifo@redhat.com>
904
905 * archures.c (bfd_mach_h8300sxn): New architecture.
906 * bfd-in2.h: Regenerate.
907 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
908 (h8300sxn_info_struct): New.
909 (h8300sx_info_struct): Link to it.
910 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
911 (elf32_h8_final_write_processing): Likewise.
912
ad8e1ba5
AM
9132003-06-08 Alan Modra <amodra@bigpond.net.au>
914
915 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
916 elfxx-target.h so that we can use elf_backend_got_header_size.
917 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
918 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
919 associated macros.
920 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
921 dst_mask.
922 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
923 ppc_stub_plt_branch_r2off.
924 (struct ppc_stub_hash_entry): Reorganize.
925 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
926 toc_curr, toc_off and emit_stub_syms.
927 (ppc64_elf_link_hash_table_create): Init them.
928 (ppc_stub_name): Correct string size.
929 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
930 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
931 used.
932 (ppc_type_of_stub): Tweak root.type test.
933 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
934 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
935 ppc_stub_plt_branch_r2off.
936 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
937 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
938 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
939 Initialize elf_gp and toc_curr.
940 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
941 (ppc64_elf_next_input_section): Set toc_off.
942 (group_sections): Ensure groups have the same TOC.
943 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
944 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
945 Build new glink stub.
946 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
947 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
948 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
949 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
950 * section.c (struct sec): Rename flag12 to has_gp_reloc.
951 (STD_SECTION): Update.
952 * ecoff.c (bfd_debug_section): Update comment.
953 * bfd-in2.h: Regenerate.
954
90fff0d4
DJ
9552003-06-05 Daniel Jacobowitz <drow@mvista.com>
956
957 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
958 NULL function pointers.
959
c82b20e4
DJ
9602003-06-05 Daniel Jacobowitz <drow@mvista.com>
961
962 * simple.c (bfd_simple_get_relocated_section_contents): Call
963 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
964
53d4437a
SS
9652003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
966
5a5b9651
SS
967 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
968 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
969 swaptables.
970 * coff-tic4x.c: Ditto
53d4437a
SS
971 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
972 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
973 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
974 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
975 swap tables.
53d4437a
SS
976 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
977 * coff-a29k.c: Append COFF_SWAP_TABLE argument
978 * coff-apollo.c: Ditto
979 * coff-arm.c: Ditto
980 * coff-h8300.c: Ditto
981 * coff-h8500.c: Ditto
982 * coff-i960.c: Ditto
983 * coff-m68k.c: Ditto
984 * coff-m88k.c: Ditto
985 * coff-mcore.c: Ditto
986 * coff-sh.c: Ditto
987 * coff-sparc.c: Ditto
988 * coff-tic80.c: Ditto
989 * coff-we32k.c: Ditto
990 * coff-z8k.c: Ditto
991 * coff-w65.c: Ditto
992
736694c8
SS
9932003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
994
995 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
996 initialization bug
997
9ee5e499
JJ
9982003-06-03 Jakub Jelinek <jakub@redhat.com>
999
1000 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1001 (bfd_section_from_phdr): Likewise.
1002 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1003 (get_program_header_size): Count with PT_GNU_STACK.
1004 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1005 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1006
6f6f27f8
L
10072003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1008
1009 * elflink.h (elf_link_input_bfd): Call linker error_handler
1010 for discarded definitions.
1011
a3b6428f
NC
10122003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1013
1014 * syms.c (decode_section_type): Return 'n' if section flags are
1015 SEC_HAS_CONTENTS && SEC_READONLY.
1016
e30ddb24
NC
10172003-06-03 Nick Clifton <nickc@redhat.com>
1018
1019 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1020 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
1021 (v850_elf_reloc_map): Likewise.
1022 (v850_elf_check_relocs): Likewise.
1023 (v850_elf_perform_relocation): Likewise.
1024 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 1025 to make R_V850_REl32 pc-relative.
adadcc0c 1026
2558b9a9
KK
10272003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1028
1029 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1030 and DT_DEBUG dynamic tag even for position independent executables.
1031 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1032
f15398ef
DJ
10332003-06-02 Daniel Jacobowitz <drow@mvista.com>
1034
1035 * config.bfd: Move obsolete entries out of the range of the
1036 targmatch sed script.
1037
cad28985
DJ
10382003-06-02 Daniel Jacobowitz <drow@mvista.com>
1039
1040 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1041
f2c822e3
JJ
10422003-05-31 Jakub Jelinek <jakub@redhat.com>
1043
1044 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1045 plt entries, not just 8191.
1046
c9c27aad
DJ
10472003-05-30 Daniel Jacobowitz <drow@mvista.com>
1048
1049 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1050 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1051
36af4a4e
JJ
10522003-05-30 Ulrich Drepper <drepper@redhat.com>
1053 Jakub Jelinek <jakub@redhat.com>
1054
1055 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1056 instead of info->shared where appropriate.
1057 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1058 * elflink.c (_bfd_elf_create_got_section): Likewise.
1059 (_bfd_elf_link_create_dynamic_sections): Likewise.
1060 (_bfd_elf_link_assign_sym_version): Likewise.
1061 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1062 and DT_DEBUG dynamic tag even for position independent executables.
1063 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1064 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1065 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1066 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1067 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1068 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1069 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1070 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1071 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1072
f8843e87
AM
10732003-05-30 Kris Warkentin <kewarken@qnx.com>
1074
1075 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1076 signalled thread.
1077 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1078
29e1a6e4
NC
10792003-05-29 Nick Clifton <nickc@redhat.com>
1080
1081 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1082 Tidy up formatting.
1083 * Makefile.am: Add dependency on safe-ctype.h.
1084 * Makefile.in: Regenerate.
1085
4b555070
TS
10862003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1087
1088 * elfxx-mips.c: Don't force symbols local unconditionally.
1089
0236e03e
L
10902003-05-28 Alan Modra <amodra@bigpond.net.au>
1091
1092 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1093 undefined_symbol call.
1094
9e4aeb93
RS
10952003-05-27 Richard Sandiford <rsandifo@redhat.com>
1096
1097 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1098 (mips_elf_link_hash_table): Likewise.
1099
d0c728db
TS
11002003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1101
1102 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1103 R_MIPS_GNU_REL16_S2 support.
1104 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1105 (mips_elf64_rtype_to_howto): Use it.
1106 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1107 R_MIPS_GNU_REL16_S2 support.
1108 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1109 (mips_elf_n32_rtype_to_howto): Use it.
1110
759ebd76
DA
11112003-05-21 Stuart F. Downing <sdowning@fame.com>
1112
1113 * som.h: Define PA_2_0 before including a.out.h
1114
143d77c5
EC
11152003-05-07 Eric Christopher <echristo@redhat.com>
1116 Alexandre Oliva <aoliva@redhat.com>
1117
1118 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1119 pic tests, change to warning.
1120 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1121
cea3d58d
NC
11222003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1123
1124 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1125 well as shle-...-netbsdelf. Remove duplicate entry.
1126
385a4c14
NC
11272003-05-21 Nick Clifton <nickc@redhat.com>
1128
60e42408
NC
1129 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1130 for X_STORMY16_REL_12 reloc.
1131
385a4c14 1132 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 1133 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
1134 (bfd_elf_get_runpath_list): Likewise.
1135
129b8c20
RM
11362003-05-19 Roland McGrath <roland@redhat.com>
1137
1138 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1139 * bfd-in.h: Declare it.
1140 * bfd-in2.h: Regenerated.
1141 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1142 * elf-bfd.h (struct elf_backend_data): New function pointer member
1143 elf_backend_bfd_from_remote_memory.
1144 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1145 Declare them.
1146 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1147 (elfNN_bed): Add that to the initializer.
1148
11492003-05-15 Roland McGrath <roland@redhat.com>
1150
1151 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1152
22d5e339
L
11532003-05-20 Jakub Jelinek <jakub@redhat.com>
1154
1155 * elflink.h (elf_link_output_extsym): Only issue error about !=
1156 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1157
11582003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1159
1160 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1161 when removing the old definition for symbols with non-default
1162 visibility.
1163
b645cb17
JE
11642003-05-18 Jason Eckhardt <jle@rice.edu>
1165
1166 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1167
d2ff124f
AS
11682003-05-17 Andreas Schwab <schwab@suse.de>
1169
1170 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1171 elf_section_data during processing of pc-relative and absolute
1172 relocations.
1173 (elf_m68k_relocate_section): Use the cached reloc section instead
1174 of computing it again. Fix handling of visibility. Don't modify
1175 addend when copying over a relocation into the output.
1176
9c7a29a3
AM
11772003-05-17 Alan Modra <amodra@bigpond.net.au>
1178
1179 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1180 to trim plt entries. Move undefweak non-default visibility test..
1181 (allocate_dynrelocs): ..from here.
1182 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1183 dynamic_sections_created here. Update comment. Move undefweak
1184 non-default visibility test..
1185 (allocate_dynrelocs): ..from here. Fix comment.
1186 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1187 to trim plt entries. Move undefweak non-default visibility test..
1188 (allocate_dynrelocs): ..from here. Fix comment.
1189 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1190 STV_DEFAULT rather than comparing with zero.
1191 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1192 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1193
9bcf4de0
TS
11942003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1195
1196 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1197 pointers.
1198 (_bfd_set_gp_value): Likewise.
1199
5d1db417
MS
12002003-05-16 Michael Snyder <msnyder@redhat.com>
1201 From Bernd Schmidt <bernds@redhat.com>
1202 * archures.c (bfd_mach_h8300sx): New.
1203 * bfd-in2.h: Regenerate.
1204 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1205 (h8300sx_info_struct): New.
1206 (h8300s_info_struct): Link to it.
1207 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1208 (elf32_h8_final_write_processing): Likewise.
1209 (elf32_h8_relax_section): Likewise.
1210
80c7c40a
NC
12112003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1212
1213 * config.bfd: Accept i[3-7]86 variants.
1214 * configure.host: Likewise.
1215 * configure.in: Likewise.
1216 * configure: Regenerate.
1217
c1be741f
L
12182003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1219
1220 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1221 symbol.
1222
a15d9d3a
L
12232003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1224
1225 * elflink.h (elf_link_check_versioned_symbol): Also allow
1226 the base version.
1227
09695f56
AM
12282003-05-15 Alan Modra <amodra@bigpond.net.au>
1229 H.J. Lu <hongjiu.lu@intel.com>
1230
1231 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1232 (elf_i386_relocate_section): Likewise.
1233 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1234 (ppc_elf_relocate_section): Likewise.
1235 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1236 (ppc64_elf_relocate_section): Likewise.
1237
40f62fa0
TS
12382003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1239
1240 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1241
47247ced
SC
12422003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1243
1244 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1245 processor capability, allow merge of HC12 and HCS12 in some cases.
1246 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1247 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1248 (bfd_m68hc12_arch): Link it.
1249 (scan_mach): New function.
1250
32dfa85d
AH
12512003-05-13 Andrew Haley <aph@redhat.com>
1252
1253 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1254
586119b3
AM
12552003-05-13 Alan Modra <amodra@bigpond.net.au>
1256 H.J. Lu <hongjiu.lu@intel.com>
1257
1258 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1259 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1260 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1261 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1262 (ppc_elf_relocate_section): Likewise.
1263 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1264 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1265 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1266 relocs need no other types.
1267 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1268 dynreloc check.
1269 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1270 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1271 .got relocs.
1272
04e534c3
KK
12732003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1274
1275 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1276 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 1277 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
1278 visibility, a) don't allocate plt entries, b) don't allocate
1279 .got relocs, c) discard dyn rel space
adadcc0c
AM
1280 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1281 don't generate dynamic relocs.
04e534c3
KK
1282 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1283 for weakdefs when symbol already adjusted.
1284
0afb2dc0
NC
12852003-05-12 Nick Clifton <nickc@redhat.com>
1286
1287 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1288 overflow detection for R_XSTORMY16_16 reloc.
1289
9d29900b
NC
12902003-05-12 Paul Clarke <paulc@senet.com.au>
1291
1292 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1293
a48c6a54
JE
12942003-05-11 Jason Eckhardt <jle@rice.edu>
1295
1296 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1297 adjust upper bits.
1298 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1299 proper place.
1300 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1301 proper place.
1302
44f745a6
AS
13032003-05-11 Andreas Schwab <schwab@suse.de>
1304
1305 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1306 complicated tests for unresolvable relocs with a simple direct
1307 scheme using "unresolved_reloc" var. Report some detail on
1308 bfd_reloc_outofrange and similar errors.
1309
4ec72bde
MS
13102003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1311
1312 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1313 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1314 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1315 * elf64-s390.c: Likewise.
1316
64285810
MS
13172003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1318
1319 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1320 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1321 ELF_LINK_NON_GOT_REF from weakdef.
1322 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1323 already been adjusted before treating it specially.
1324 * el64-s390.c: Likwise.
1325
82058a73
MS
13262003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1327
1328 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1329 non-default visibility, a) don't make them dynamic, b) discard
1330 space for dynamic relocs.
1331 (elf_s390_relocate_section): Initialize the GOT entries and skip
1332 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1333 symbols with non-default visibility.
1334 * elf64-s390.c: Likewise.
1335
60d8b524
AM
13362003-05-09 Alan Modra <amodra@bigpond.net.au>
1337
1338 * cpu-arm.c (arm_check_note): Warning fix.
1339 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1340 to keep relocs if edited.
1341 (iq2000_elf_print_private_bfd_data): Return TRUE.
1342 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1343 ELF64_R_SYM.
1344 (elfNN_ia64_relax_ldxmov): Warning fix.
1345 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1346 * xtensa-modules.c (get_num_opcodes): Warning fix.
1347
e57b5356
AM
13482003-05-09 Andrey Petrov <petrov@netbsd.org>
1349
1350 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1351
45d6a902
AM
13522003-05-09 Alan Modra <amodra@bigpond.net.au>
1353
1354 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1355 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1356 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1357 (bfd_elf_record_link_assignment): Move from elflink.h.
1358 (_bfd_elf_merge_symbol): Likewise.
1359 (_bfd_elf_add_default_symbol): Likewise.
1360 (_bfd_elf_export_symbol): Likewise.
1361 (_bfd_elf_link_find_version_dependencies): Likewise.
1362 (_bfd_elf_link_assign_sym_version): Likewise.
1363 (_bfd_elf_link_read_relocs): Likewise.
1364 (_bfd_elf_link_size_reloc_section): Likewise.
1365 (_bfd_elf_fix_symbol_flags): Likewise.
1366 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1367 (_bfd_elf_link_sec_merge_syms): Likewise.
1368 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1369 and bed->s->sizeof_rela.
1370 (_bfd_elf_link_output_relocs): Likewise.
1371 * elf-bfd.h (struct elf_size_info): Rename file_align to
1372 log_file_align.
1373 (struct elf_info_failed): Move from elflink.h.
1374 (struct elf_assign_sym_version_info): Likewise.
1375 (struct elf_find_verdep_info): Likewise.
1376 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1377 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1378 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1379 _bfd_elf_link_assign_sym_version,
1380 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1381 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1382 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1383 _bfd_elf_link_sec_merge_syms): Declare.
1384 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1385 (_bfd_elf32_link_read_relocs): Likewise.
1386 (bfd_elf64_link_create_dynamic_sections): Likewise.
1387 (_bfd_elf64_link_read_relocs): Likewise.
1388 * elflink.h: Move lots o' stuff elsewhere.
1389 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1390 (bfd_elf64_record_link_assignment): Likewise.
1391 (bfd_elf_record_link_assignment): Declare.
1392 * bfd-in2.h: Regenerate.
1393 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1394 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1395 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1396 (assign_file_positions_for_segments): Likewise.
1397 (assign_file_positions_except_relocs): Likewise.
1398 (swap_out_syms, elfcore_write_note): Likewise.
1399 * elf-m10200.c: Adjust for changed function names.
1400 * elf-m10300.c: Likewise.
1401 * elf32-arm.h: Likewise.
1402 * elf32-h8300.c: Likewise.
1403 * elf32-hppa.c: Likewise.
1404 * elf32-ip2k.c: Likewise.
1405 * elf32-m32r.c: Likewise.
1406 * elf32-m68hc11.c: Likewise.
1407 * elf32-m68hc1x.c: Likewise.
1408 * elf32-m68k.c: Likewise.
1409 * elf32-mips.c: Likewise.
1410 * elf32-ppc.c: Likewise.
1411 * elf32-sh.c: Likewise.
1412 * elf32-v850.c: Likewise.
1413 * elf32-xtensa.c: Likewise.
1414 * elf64-alpha.c: Likewise.
1415 * elf64-hppa.c: Likewise.
1416 * elf64-mmix.c: Likewise.
1417 * elf64-ppc.c: Likewise.
1418 * elf64-sh64.c: Likewise.
1419 * elfxx-ia64.c: Likewise.
1420 * elfxx-mips.c: Likewise.
1421 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1422 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1423 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1424 * elf64-mips.c (mips_elf64_size_info): Likewise.
1425 * elf64-s390.c (s390_elf64_size_info): Likewise.
1426 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1427
bf1e742e
L
14282003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1429
1430 * elflink.h (elf_add_default_symbol): After skipping the
1431 unversioned symbol, go to non-default one.
1432
6a32c710
L
14332003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1434
1435 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1436 want_plt field.
1437 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1438 for symbols with non-default visibility.
1439
71552942
L
14402003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1441
1442 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1443 case that a DSO references a hidden symbol which may be
1444 satisfied by a versioned symbol in another DSO.
1445 (elf_link_output_extsym): Check versioned definition for hidden
1446 symbol referenced by a DSO.
1447
208c2cd6
NC
14482003-05-07 Nick Clifton <nickc@redhat.com>
1449
1450 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1451 R_XSTORMY16_16 reloc to ignore overflows.
1452
aa701218
AO
14532003-05-06 Alexandre Oliva <aoliva@redhat.com>
1454
1455 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1456 error message for mixing different-endian files. Check for ABI
1457 compatibility of input files with the selected emulation.
1458
4e795f50
AM
14592003-05-05 Alan Modra <amodra@bigpond.net.au>
1460
1461 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1462 non-default visibility, a) don't make them dynamic, b) discard
1463 space for dynamic relocs.
1464 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1465
1466 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1467 non-default visibility, a) don't allocate plt entries, b) don't
1468 allocate .got relocs, c) discard dyn rel space,
1469 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1470 don't generate dynamic relocs.
1471 * elf64-ppc.c (allocate_dynrelocs): As above.
1472 (ppc64_elf_relocate_section): As above.
1473
4bc6e03a
AJ
14742003-05-05 Andreas Jaeger <aj@suse.de>
1475
1476 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1477 relocation entries for weak undefined symbols with non-default
1478 visibility.
1479 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1480 skip R_386_32/R_386_PC32 for weak undefined symbols with
1481 non-default visibility.
1482
ef5aade5
L
14832003-05-04 H.J. Lu <hjl@gnu.org>
1484
1485 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1486 relocation entries for weak undefined symbols with non-default
1487 visibility.
1488 (elf_i386_relocate_section): Initialize the GOT entries and
1489 skip R_386_32/R_386_PC32 for weak undefined symbols with
1490 non-default visibility.
129b8c20 1491
ef5aade5
L
1492 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1493 descriptors for weak undefined symbols with non-default
1494 visibility.
1495 (allocate_dynrel_entries): Don't allocate relocation entries
1496 for symbols resolved to 0.
1497 (set_got_entry): Don't install dynamic relocation for weak
1498 undefined symbols with non-default visibility.
1499 (set_pltoff_entry): Likewise.
1500
1501 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1502 with non-default visibility.
1503 (elf_link_output_extsym): Don't make weak undefined symbols
1504 with non-default visibility dynamic.
1505
c424e0e9
L
15062003-05-04 H.J. Lu <hjl@gnu.org>
1507
1508 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1509
d31e3dfe
L
15102003-05-04 H.J. Lu <hjl@gnu.org>
1511
1512 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1513 symbol dynamic. Check indirection when removing the old
1514 definition for symbols with non-default visibility.
1515 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1516
4d2e1ff0
NC
15172003-05-02 Nick Clifton <nickc@redhat.com>
1518
1519 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1520 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1521 unsigned overflow.
1522
d40d037c
AJ
15232003-05-02 Andreas Jaeger <aj@suse.de>
1524
1525 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1526 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1527 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1528 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1529 ELF_LINK_NON_GOT_REF from weakdef.
1530
c5d1701e
NC
15312003-05-02 Charles Lepple <clepple@ghz.cc>
1532 Nick Clifton <nickc@redhat.com>
1533
1534 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1535 * aclocal.m4: Regenerate.
1536 * configure: Regenerate.
1537 * Makefile.in: Regenerate.
1538
81848ca0
AM
15392003-05-01 Alan Modra <amodra@bigpond.net.au>
1540
1541 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1542 weakdef sym has already been adjusted before treating it specially.
1543 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1544 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1545 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1546 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 1547
c7996ad6
L
15482003-04-28 H.J. Lu <hjl@gnu.org>
1549
1550 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1551 the relax finalize pass.
1552
1553 * section.c (struct sec): Add need_finalize_relax and remove
1554 flag11.
1555 (STD_SECTION): Update struct sec initializer.
1556 * bfd-in2.h: Regenerated.
1557
f006af20
L
15582003-04-28 H.J. Lu <hjl@gnu.org>
1559
1560 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1561 to copy any information related to dynamic linking when we flip
1562 the indirection.
1563
1b1fe8fe
L
15642003-04-27 H.J. Lu <hjl@gnu.org>
1565
1566 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
1567 (ELF_LINK_DYNAMIC_WEAK): New.
1568
1569 * elflink.h (elf_merge_symbol): Add one argument to indicate if
1570 a symbol should be skipped. Ignore definitions in dynamic
1571 objects for symbols with non-default visibility.
1572 (elf_add_default_symbol): Adjusted.
1573 (elf_link_add_object_symbols): Check if a symbol should be
1574 skipped. Don't merge the visibility field with the one from
1575 a dynamic object.
1576 (elf_link_check_versioned_symbol): Use undef_bfd.
1577 (elf_link_output_extsym): Warn if a forced local symbol is
1578 referenced from dynamic objects. Make non-weak undefined symbol
1579 with non-default visibility a fatal error.
1580
052a450c
DJ
15812003-04-27 Daniel Jacobowitz <drow@mvista.com>
1582
1583 * configure.in: Bump version on HEAD to 2.14.90.
1584 * configure: Regenerated.
1585
d204f4c0
SC
15862003-04-26 Stephane Carrez <stcarrez@nerim.fr>
1587
1588 PR savannah/3331:
1589 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
1590 when we couldn't relax something.
1591
3c0a515d
L
15922003-04-25 Alan Modra <amodra@bigpond.net.au>
1593
1594 * elflink.h (elf_merge_symbol): When we find a regular definition
1595 for an indirect symbol, flip the indirection so that the old
1596 direct symbol now points to the new definition.
1597
d145330d
RM
15982003-04-24 Roland McGrath <roland@redhat.com>
1599
1600 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
1601
fc0bffd6
AM
16022003-04-24 Alan Modra <amodra@bigpond.net.au>
1603
1604 * elf32-ppc.c: Formatting and comment fixes.
1605 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
1606 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
1607
16082003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
1609
1610 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
1611 * bfd-in2.h: Rebuilt.
1612 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 1613 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
1614 & H8300SNMAGIC.
1615 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
1616 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
1617 (h8300sn_info_struct, h8300hn_info_struct): New.
1618 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
1619 (elf32_h8_final_write_processing): Likewise.
1620
267fb3c1
KK
16212003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1622
1623 * elf32-sh.c (tpoff): New.
1624 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
1625 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 1626 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 1627 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 1628 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
1629 (dtpoff_base): Fix wrong indentation.
1630 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
1631 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
1632 R_SH_TLS_TPOFF32 relocations.
1633
ef230218
JR
16342003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
1635
1636 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
1637 * cpu-sh.c: Likewise.
1638 * elf32-sh.c: Likewise.
1639 * reloc.c (bfd_reloc_code_real): Likewise.
1640 * elf32-sh64-com.c: Change comment to refer to SuperH.
1641 * elf32-sh64.c: Likewise.
1642 * elf64-sh64.c: Likewise.
1643 * bfd-in2.h (enum bfd_architecture): Regenerate.
1644
8c29f035
AM
16452003-04-23 Alan Modra <amodra@bigpond.net.au>
1646
1647 From Julien LEMOINE <speedblue@debian.org>
1648 * elf32-i386.c (elf_i386_info_to_howto): Delete.
1649 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
1650
26597c86
NC
16512003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
1652
1653 * archures.c: Replace references to Mitsubishi M32R with references
1654 to Renesas M32R.
1655 * relocs.c: Likewise.
1656 * bfd-in2.h: Regenerate.
1657
cc13e3ef
RH
16582003-04-21 Richard Henderson <rth@redhat.com>
1659
1660 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
1661 executable when a symbol is defined both regular and dynamic.
1662
f5a6f915
SC
16632003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1664
1665 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
1666 (elf32-m68hc1x.lo): Update dependencies
1667 * configure.in: Add elf32-m68hc1x.lo.
1668 * configure: Rebuild.
1669 * Makefile.in: Rebuild.
1670
3a65329d
SC
16712003-04-21 Stephane Carrez <stcarrez@nerim.fr>
1672
1673 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1674 (m68hc11_elf_hash_table_create): New function.
1675 (elf32_m68hc11_link_hash_table_free): New function.
1676 (stub_hash_newfunc): New function.
1677 (m68hc11_add_stub): New function.
1678 (elf32_m68hc11_add_symbol_hook): New function.
1679 (elf32_m68hc11_setup_section_lists): New function.
1680 (elf32_m68hc11_next_input_section): New function.
1681 (elf32_m68hc11_size_stubs): New function.
1682 (elf32_m68hc11_build_stubs): New function.
1683 (m68hc11_get_relocation_value): New function.
1684 (elf32_m68hc11_relocate_section): Call the above to redirect
1685 some relocations to the trampoline code.
1686 (m68hc11_elf_export_one_stub): New function.
1687 (m68hc11_elf_set_symbol): New function.
1688 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
1689 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
1690 is not yet initialized.
1691
1692 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
1693 (elf32_m68hc11_stub_hash_entry): New struct.
1694 (m68hc11_page_info): Add trampoline handler address.
1695 (m68hc11_elf_link_hash_table): Add stubs generation members.
1696 (elf32_m68hc11_add_symbol_hook): Declare.
1697 (elf32_m68hc11_setup_section_lists): Declare.
1698 (elf32_m68hc11_size_stubs): Declare.
1699 (elf32_m68hc11_build_stubs): Declare.
8c29f035 1700
3a65329d
SC
1701 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
1702 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
1703 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
1704 (_bfd_m68hc11_elf_set_private_flags): Ditto.
1705 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
1706 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
1707 (bfd_elf32_bfd_link_hash_table_create): Define.
1708 (elf_backend_add_symbol_hook): Define.
1709 (m68hc11_elf_bfd_link_hash_table_create): New function.
1710 (m68hc11_elf_build_one_stub): New function.
1711 (m68hc11_elf_size_one_stub): New function.
1712 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
1713 (bfd_elf32_bfd_link_hash_table_create): Define.
1714
1715 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
1716 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
1717 (m68hc12_phys_addr): Ditto.
1718 (m68hc12_phys_page): Ditto.
1719 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
1720 (elf32_m68hc11_gc_mark_hook): Likewise.
1721 (elf32_m68hc11_gc_sweep_hook): Likewise.
1722 (elf32_m68hc11_check_relocs): Likewise.
1723 (elf32_m68hc11_relocate_section): Likewise.
1724 (_bfd_m68hc12_elf_set_private_flags): Likewise.
1725 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
1726 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
1727 (m68hc12_elf_build_one_stub): New function.
1728 (m68hc12_elf_size_one_stub): New function.
1729 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
1730 (elf_backend_add_symbol_hook): Define.
1731 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
1732
4081944f
NC
17332003-04-18 Nick Clifton <nickc@redhat.com>
1734
1735 * format.c (bfd_check_format_matches): Only check associated
1736 vector if the matching_vector has been created.
1737
060dc71d
AO
17382003-04-15 Alexandre Oliva <aoliva@redhat.com>
1739
1740 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
1741 2003-04-09's change.
1742
a3476bef
NC
17432003-04-15 Brian Ford <ford@vss.fsi.com>
1744
1745 * peicode.h (coff_swap_scnhdr_in): If a section holds
1746 uninitialized data and is from an object file or from an
1747 executable image that has not initialized the s_size field, or if
1748 the physical size is padded, use the virtual size (stored in
1749 s_paddr) instead.
1750
ca4fa240
NC
17512003-04-15 H.J. Lu <hjl@gnu.org>
1752
1753 * elflink.h (elf_link_add_object_symbols): Properly report
1754 filename for alignment reduction.
1755
c2dcd04e
NC
17562003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
1757
1758 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
1759 * reloc.c: Likewise.
1760 * coff-h8300.c: Likewise.
1761 * coff-h8500.c: Likewise.
1762 * coff-sh.c: Likewise.
1763 * cpu-h8300.c: Likewise.
1764 * cpu-sh.c: Likewise.
1765 * elf32-h8300.c: Likewise.
1766 * elf32-sh.c: Likewise.
1767 * elf32-sh64-com.c: Likewise.
1768 * elf32-sh64.c: Likewise.
1769 * elf64-sh64.c: Likewise.
1770 * bfd-in2.h: Regenerate.
1771
f7661995
NC
17722003-04-14 H.J. Lu <hjl@gnu.org>
1773
1774 * elflink.h (elf_link_add_object_symbols): Maintain maximum
1775 alignment for common symbols. Warn reducing alignment for
1776 common symbols. Report old filename when symbol size changes.
1777
93a2b7ae
AO
17782003-04-12 Alexandre Oliva <aoliva@redhat.com>
1779
1780 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
1781 occurrences of the same test changed in the previous patch.
1782 Optimize.
1783
0176c794
AO
17842003-04-11 Alexandre Oliva <aoliva@redhat.com>
1785
1786 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
1787 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
1788 GOT_DISP/addend only if the symbol got a global GOT entry.
1789
0fdc1bf1
AO
17902003-04-10 Alexandre Oliva <aoliva@redhat.com>
1791
1792 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
1793 GOT_PAGE/GOT_OFST referencing overridable symbol to
1794 GOT_DISP/addend.
1795 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
1796 global symbol as GOT_DISP.
1797
9b8c98a4
BW
17982003-04-10 Bob Wilson <bob.wilson@acm.org>
1799
1800 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
1801 next relocation on an undefined symbol.
1802
ec1659c8
RH
18032003-04-09 Richard Henderson <rth@redhat.com>
1804
1805 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
1806 Ignore relocations against r_symndx == 0.
1807
7dfb07f7
L
18082003-04-09 H.J. Lu <hjl@gnu.org>
1809
1810 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
1811 FALSE for undefined symbols.
1812 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1813
a3805e4e
AO
18142003-04-09 Alexandre Oliva <aoliva@redhat.com>
1815
1816 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
1817 and IRIX-specific shift-to-64-bit 4-byte lengths before following
1818 addr_size.
1819
69931e60
AO
18202003-04-08 Alexandre Oliva <aoliva@redhat.com>
1821
1822 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
1823 pointer size from ABI, not arch_bits_per_address.
1824
59a8c196
KB
18252003-04-07 Kevin Buettner <kevinb@redhat.com>
1826
1827 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
1828 constants for n32 ABI.
1829
8e16317c
NC
18302003-04-06 Andrew Cagney <cagney@redhat.com>
1831
1832 * simple.c (bfd_simple_get_relocated_section_contents): Disable
1833 free that leads to GDB vs BFD memory corruption.
1834
196486be
SC
18352003-04-04 Stephane Carrez <stcarrez@nerim.fr>
1836
1837 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
1838 symbols that mark the end of the section.
1839 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
1840 converting to a relative branch so that the offset is computed after
1841 the relaxation; also relocate a jsr into a bsr if possible but don't
1842 relax them if they are to a far symbol as we need to call the
1843 trampoline code.
1844 (elf_m68hc11_howto_table): Set pcrel_offset to true.
1845
be33c5dd
SS
18462003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1847
1848 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
1849 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
1850 * bfd-in2.h: Regenerate
1851 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
1852 * cpu-tic4x.c: Ditto
1853
ff0c9faf
NC
18542003-04-03 Nick Clifton <nickc@redhat.com>
1855
1856 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
1857 differently for object files and executables.
1858 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
1859 for object files or for executables who have not already
1860 initialised the field.
1861 * libpei.h (bfd_pe_executable_p): New macro. Return true if
1862 the PE format bfd is an executable.
1863
2b98e6c0
AM
18642003-04-03 Alan Modra <amodra@bigpond.net.au>
1865
1866 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
1867 here as it's too early to reliably determine locality.
1868 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 1869 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 1870
92403579
BW
18712003-04-02 Bob Wilson <bob.wilson@acm.org>
1872
1873 * xtensa-modules.c: Remove comment indicating that this is a
1874 generated file.
1875
c45a316a
AM
18762003-04-02 Alan Modra <amodra@bigpond.net.au>
1877
1878 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
1879
e0001a05
NC
18802003-04-01 Bob Wilson <bob.wilson@acm.org>
1881
8c29f035
AM
1882 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
1883 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
1884 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
1885 xtensa-modules.lo.
1886 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
1887 xtensa-modules.c.
1888 (cpu-xtensa.lo): New target.
1889 (elf32-xtensa.lo): Likewise.
1890 (xtensa-isa.lo): Likewise.
1891 (xtensa-modules.lo): Likewise.
1892 * Makefile.in: Regenerate.
1893 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
1894 (bfd_archures_list): Add bfd_xtensa_arch.
1895 * config.bfd: Handle xtensa-*-*.
1896 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
1897 * configure: Regenerate.
1898 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
1899 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
1900 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
1901 (bfd_elf32_xtensa_le_vec): Likewise.
1902 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
1903 * cpu-xtensa.c: New file.
1904 * elf32-xtensa.c: Likewise.
1905 * xtensa-isa.c: Likewise.
1906 * xtensa-modules.c: Likewise.
1907 * libbfd.h: Regenerate.
1908 * bfd-in2.h: Likewise.
e0001a05 1909
5a6c6817
NC
19102003-04-01 Nick Clifton <nickc@redhat.com>
1911
1912 * archures.c (bfd_mach_arm_unknown): Define.
1913 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
1914 bfd_arm_get_mach_from_notes): Prototype.
1915 * bfd-in2.h: Regenerate.
1916 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
1917 bfd_arm_merge_machines.
1918 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
1919 * coffcode.h (coff_set_arch_mach_hook): Call
1920 bfd_arm_get_mach_from_notes.
1921 * coffgen.c (coff_real_object_p): Revert previous delta.
1922 * cpu_arm.c (arm_check_note): New function. Examine a note in a
1923 .note section.
1924 (bfd_arm_merge_machines): New function: Handle the merging of ARM
1925 binaries compiled for different architectures..
1926 (bfd_arm_update_notes): New function: Update an ARM note section.
1927 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
1928 number from an ARM note section.
1929 * elf32-arm.h (elf32_arm_object_p): Use
1930 bfd_arm_get_mach_from_notes.
1931 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
1932 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 1933
0cc1cf99
BE
19342003-04-01 Ben Elliston <bje@wasabisystems.com>
1935
1936 * dwarf2.c (read_attribute_value): Correct typo in comment.
1937
af3ef9fe
NC
19382003-04-01 Nick Clifton <nickc@redhat.com>
1939
1940 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
1941 instead of concat().
1942 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
1943 (add_line_info): Make a copy of the filename when storing it into
1944 the info structure.
af3ef9fe 1945
6e84a906
DJ
19462003-03-31 Andreas Schwab <schwab@suse.de>
1947 Daniel Jacobowitz <drow@mvista.com>
1948
1949 * simple.c (bfd_simple_get_relocated_section_contents): Add
1950 parameter symbol_table. Optionally use it instead of the symbol
1951 table from the bfd. Save and restore output offsets and output
1952 sections around bfd_get_relocated_section_contents. Fix a memory
1953 leak.
1954 (simple_save_output_info, simple_restore_output_info): New
1955 functions.
1956 * bfd-in2.h: Regenerate.
1957 * dwarf2.c (read_abbrevs): Use
1958 bfd_simple_get_relocated_section_contents instead of
1959 bfd_get_section_contents.
1960 (decode_line_info): Likewise.
1961 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
1962 find_rela_addend.
1963 (find_rela_addend): Remove.
1964 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
1965 debugging sections.
1966 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
1967 not bfd_zalloc.
1968
5ed6aba4
NC
19692003-03-31 David Heine <dlheine@suif.stanford.edu>
1970
1971 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
1972 bfd_alloc.
1973 * dwarf2.c (concat_filename): Always allocate space for the
1974 returned filename.
1975 (decode_line_info): Free the allocated filename returned by
1976 concat_filename.
1977 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
1978 * elf.c (copy_private_bfd_data): Likewise.
1979 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
1980 * elflink.h (elf_link_sort_relocs): Fix memory leak.
1981 * format.c (bfd_check_format_matches): Likewise.
1982 * linker.c (bfd_generic_final_link): Likewise.
1983 * opncls.c (find_separate_debug_info): Likewise.
1984 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 1985
5941afc1
L
19862003-03-28 H.J. Lu <hjl@gnu.org>
1987
1988 * elflink.h (elf_link_add_object_symbols): Correctly combine
1989 visibilities.
1990
9d73f260
JJ
19912003-03-27 Jakub Jelinek <jakub@redhat.com>
1992
1993 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
1994 to -1 before recomputing got offsets.
1995
a5ad465a
AS
19962003-03-26 Andreas Schwab <schwab@suse.de>
1997
1998 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1999 (elf_m68k_relocate_section): Use it to correctly handle symbols
2000 forced to be local.
2001 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2002 entries for symbols that are forced to be local.
2003
d0647110
AO
20042003-03-25 Alexandre Oliva <aoliva@redhat.com>
2005
2006 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2007 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2008 * elfn32-mips.c, elf64-mips.c: Use it.
2009
e16bb312
NC
20102003-03-25 Stan Cox <scox@redhat.com>
2011 Nick Clifton <nickc@redhat.com>
8c29f035 2012
9b5ecbd0 2013 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
2014
2015 * archures.c: Add bfd_mach_arm_iWMMXt.
2016 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2017 * bfd-in2.h: Regenerate.
2018 * libbfd.h: Regenerate.
2019 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2020 object files to be linked with XScale ones.
2021 (coff_arm_final_link_postscript): Update note section.
2022 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2023 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2024 after identifying a coff binary.
2025 * cpu-arm.c (processors): Add iWMMXt.
2026 (arch_inf): Likewise.
2027 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 2028 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
2029 be linked with XScale ones.
2030 (elf32_arm_section_flags): New function: Set flags on note section.
2031 (elf32_arm_final_write_processing): Handle note section.
2032
25f14c34
DD
20332003-03-21 DJ Delorie <dj@redhat.com>
2034
2035 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2036 _bfd_elf_rela_local_sym.
2037
04b3329b
L
20382003-03-20 H.J. Lu <hjl@gnu.org>
2039
2040 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2041 non-ELF outputs.
2042
c25cfdf8
NC
20432003-03-20 Nick Clifton <nickc@redhat.com>
2044
2045 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2046 $idata5 in case bfd_coff_final_link is not called.
2047
3e1d7f19
JJ
20482003-03-19 Jakub Jelinek <jakub@redhat.com>
2049
2050 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2051 field.
2052 (canon_reloc_count): Define.
2053 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2054 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2055 reloc_count.
2056 (sparc64_elf_canonicalize_reloc): New routine.
2057 (bfd_elf64_canonicalize_reloc): Define.
2058
3fa1d917
JJ
20592003-03-18 Jakub Jelinek <jakub@redhat.com>
2060
2061 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2062 againt mergeable sections. Take r_addend into account when caching
2063 trampolines.
2064
f86b235a
RH
20652003-03-18 Richard Henderson <rth@redhat.com>
2066
8c29f035
AM
2067 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2068 local symbols that have no dyninfo.
f86b235a 2069
49ae03bf
NC
20702003-03-14 Gene Smith <gene.smith@siemens.com>
2071
2072 * ieee.c (ieee_write_expression): Handle the case where symbol is
2073 NULL.
2074 General formatting improvements.
2075
6a457e5c
NC
20762003-03-13 Nick Clifton <nickc@redhat.com>
2077
2078 * configure.in (LINGUAS): Add zh_CN.
2079 * configure: Regenerate.
2080 * po/zh_CN.po: New file.
2081
93516ec3
NC
20822003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2083
2084 * aout-cris.c (BYTES_IN_WORD): Don't define.
2085 aout-encap.c: Likewise.
2086 aout-ns32k.c: Likewise.
2087 aout-tic30.c: Likewise.
2088 hp300bsd.c: Likewise.
2089 i386aout.c: Likewise.
2090 i386dynix.c: Likewise.
2091 i386linux.c: Likewise.
2092 i386lynx.c: Likewise.
2093 i386mach3.c: Likewise.
2094 m68k4knetbsd.c: Likewise.
2095 m68klinux.c: Likewise.
2096 m68klynx.c: Likewise.
2097 m68knetbsd.c: Likewise.
2098 m88kmach3.c: Likewise.
2099 mipsbsd.c: Likewise.
2100 newsos3.c: Likewise.
2101 sparclinux.c: Likewise.
2102 sparclynx.c: Likewise.
2103 sparcnetbsd.c: Likewise.
2104 vaxbsd.c: Likewise. Fix comment formatting.
2105
fee24f1c
AO
21062003-03-12 Alexandre Oliva <aoliva@redhat.com>
2107
0b25d3e6
AO
2108 * Reverted 2003-03-02's patch.
2109
fee24f1c
AO
2110 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2111 overridable.
2112 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2113 mips_elf64_get_dynamic_reloc_upper_bound,
2114 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2115 (bfd_elf64_get_canonicalize_reloc,
2116 bfd_elf64_get_dynamic_reloc_upper_bound,
2117 bfd_elf64_canonicalize_dynamic_reloc): Define.
2118 (mips_elf64_slurp_reloc_table): Support dynamic.
2119 (mips_elf64_slurp_one_reloc_table): Adjust.
2120
64fb1839
NC
21212003-03-12 Nick Clifton <nickc@redhat.com>
2122
2123 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2124 'index' to 'offset' in test for zero value.
2125
908488f1
AO
21262003-03-11 Alexandre Oliva <aoliva@redhat.com>
2127
2128 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2129 dynamic relocations pointing to local or section symbols, use the
2130 NULL symbol instead. Document the choice to not emit an
2131 additional R_MIPS_64 relocation.
2132
e515b051
AM
21332003-03-11 Alan Modra <amodra@bigpond.net.au>
2134
2135 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2136 zero index dynamic tls relocs generated for the GOT. Tidy code.
2137 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2138 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2139
a23b6845
AM
21402003-03-07 Alan Modra <amodra@bigpond.net.au>
2141
87d243f1
AM
2142 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2143 a tls_get_addr call.
2144
a23b6845
AM
2145 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2146 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2147 ELF_LINK_NON_GOT_REF from weakdef.
2148 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2149 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2150 ELF_LINK_NON_GOT_REF from weakdef.
2151 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2152 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2153 ELF_LINK_NON_GOT_REF from weakdef.
2154
2d36fe5f
AH
21552003-03-06 Jakub Jelinek <jakub@redhat.com>
2156 Andrew Haley <aph@redhat.com>
2157
2158 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2159 output is relocateable.
2160
34f304a7
NC
21612003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2162
2163 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2164 R_COMMENT.
2165
7b609f53
AM
21662003-03-06 Alan Modra <amodra@bigpond.net.au>
2167
2168 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2169 error messages.
2170 (ELIMINATE_COPY_RELOCS): Define to zero.
2171 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2172 TLSLD relocs. Report reloc types on a number of errors. Optimize
2173 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2174 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2175 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2176 calculating TLSLD relocs. Report reloc types on a number of errors.
2177 Don't capitalize error messages.
2178
6a0fb186
L
21792003-03-03 H.J. Lu <hjl@gnu.org>
2180
2181 * elfxx-ia64.c (USE_BRL): Removed.
2182 (oor_ip): Removed.
2183
34f304a7 21842003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
2185
2186 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2187 relocation (no special function), and make it non-partial_inplace.
2188 (sh_elf_relax_section): When creating a bsr, use a consistent value
2189 no matter if the symbol is extern or not; set addend to -4.
2190 Don't swap load / non-load instructions for SH4.
2191 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2192 rather than if the symbol is external to determine if adjusting the
2193 offset makes sense. Adjust the addend too if appropriate.
2194 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2195 relocation.
2196
a9d68a1e
NC
21972003-03-03 Nick Clifton <nickc@redhat.com>
2198
2199 * po/da.po: Installed latest translation.
2200
7c2be35c
TS
22012003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2202
2203 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2204 R_MIPS_PC16 to rightshift 2.
2205 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2206 (bfd_elf32_bfd_reloc_type_lookup): Support
2207 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2208 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2209 R_MIPS_PC16 to rightshift 2.
2210 (mips_elf64_howto_table_rela): Likewise.
2211 (mips_reloc_map): Map to rightshifted BFD reloc.
2212 * elfn32-mips.c: The same as in elf64-mips.c.
2213 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2214 (mips_elf_calculate_relocation): Handle rightshifted addends for
2215 R_MIPS_PC16.
2216 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2217 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2218 * libbfd.h: Regenerate.
2219 * bfd-in2.h: Regenerate.
2220
484a4f9c
RH
22212003-02-28 Richard Henderson <rth@redhat.com>
2222
2223 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2224 for ltoff22x relaxation.
2225
2ce40c65
AM
22262003-03-01 Alan Modra <amodra@bigpond.net.au>
2227
2228 * bfd-in.h (_bfd): Don't define.
2229 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2230 * syms.c: Likewise.
2231 * bfd-in2.h: Regenerate.
2232
2c4c2bc0
RH
22332003-02-27 Richard Henderson <rth@redhat.com>
2234
2235 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2236 (elfNN_ia64_check_relocs): Set it.
2237 (allocate_global_data_got): Check it.
2238 (allocate_local_got): Likewise.
2239 (allocate_dynrel_entries): Likewise.
2240 (elfNN_ia64_relax_ldxmov): New.
2241 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2242 (elfNN_ia64_choose_gp): Split out from ...
2243 (elfNN_ia64_final_link): ... here.
8c29f035 2244
c2852e88
AC
22452003-02-27 Andrew Cagney <cagney@redhat.com>
2246
2247 * bfd.c (struct bfd): Rename "struct _bfd".
2248 * bfd-in.h: Update copyright.
2249 (struct bfd): Rename "struct _bfd".
2250 (_bfd): Define for backward compatibility.
2251 * bfd-in2.h: Regenerate.
2252
3f87cb70
AM
22532003-02-25 Alan Modra <amodra@bigpond.net.au>
2254
3f9a32bd
AM
2255 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2256 and rel_hdr2 when initially counting input relocs rather than after
2257 creating output reloc sections.
4fabe71e
AM
2258 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2259 sizes.
3f9a32bd 2260
3f87cb70
AM
2261 * Makefile.am: Run "make dep-am".
2262 * Makefile.in: Regenerate.
2263
07c6e936
NC
22642003-02-24 Kris Warkentin <kewarken@qnx.com>
2265
2266 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2267 (elfcore_grog_nto_note): New function.
2268 (elfcore_grog_nto_gregs): New function.
2269 (elfcore_grog_nto_status): New function.
2270
aad5d350
AM
22712003-02-24 Alan Modra <amodra@bigpond.net.au>
2272
2273 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2274 section flags before concluding that we've already been called.
2275 Don't use register keyword.
2276 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2277 (_bfd_elf_create_linker_section): Formatting.
2278
2ab1486e
NC
22792003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2280
2281 * coff-h8300.c: Fix typo: intial -> initial.
2282 * coff-ppc.c: Likewise.
2283
70bccea4
AM
22842003-02-20 Alan Modra <amodra@bigpond.net.au>
2285
2286 * elf32-ppc.c: Formatting.
2287 (allocate_dynrelocs): LD and GD relocs against the same sym need
2288 separate GOT entries.
2289 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2290 entries per symbol.
2291
ee05f2fe
AM
22922003-02-19 Alan Modra <amodra@bigpond.net.au>
2293
26e41594
AM
2294 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2295 removal. Localize vars. Remove unnecessary dynobj test.
2296 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2297 of INFO.
2298 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2299 and optimize.
2300 (elf_i386_relocate_section): Likewise.
2301 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2302 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2303 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2304 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2305 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2306 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2307 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2308 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2309 Formatting.
2310
f4656909
AM
2311 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2312 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2313 test.
2314 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2315 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2316 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2317 and optimize. Use ELIMINATE_COPY_RELOCS.
2318 (ppc64_elf_relocate_section): Likewise.
2319
ee05f2fe
AM
2320 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2321 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2322 (ELIMINATE_COPY_RELOCS): Define.
2323 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2324 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2325 (MUST_BE_DYN_RELOC): Define.
2326 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2327 and optimize. Trim dyn_relocs.
2328 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2329 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2330 track of pc_rel dyn relocs.
2331 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2332 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2333 allocate_dynrelocs. Don't recalculate "sec".
2334
7619e7c7
AM
23352003-02-18 Alan Modra <amodra@bigpond.net.au>
2336
d881513a
AM
2337 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2338 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2339 on invalid LD relocs.
2340 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2341 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2342 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2343
7619e7c7
AM
2344 * elf32-ppc.h: New file.
2345 * elf32-ppc.c: Include elf32-ppc.h.
2346 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2347 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2348 Add "tls_mask" field.
2349 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2350 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2351 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2352 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2353 Make use of htab shortcuts throughout file.
2354 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2355 (ppc_elf_link_hash_table_create): Init new fields.
2356 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2357 (ppc_elf_howto_raw): Add tls relocs.
2358 (ppc_elf_reloc_type_lookup): Handle them.
2359 (ppc_elf_unhandled_reloc): New function.
2360 (ppc_elf_create_got): Stash got section pointer in hash table,
2361 return status. Make .rela.got too.
2362 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2363 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2364 NON_GOT_REF set. Don't allocate space in .plt here..
2365 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2366 not allocating plt entries unnecessarily. Allocate got entries here.
2367 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2368 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2369 "info" during allocate_dynrelocs hash traversal. Use htab section
2370 shortcuts rather than searching for named sections. Get rid of
2371 "plt" and "strip" booleans.
2372 (update_local_sym_info, bad_shared_reloc): New functions.
2373 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2374 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2375 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2376 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2377 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2378 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2379 relocs that might use a plt entry. Set NON_GOT_REF too.
2380 Enumerate all do-nothing relocs.
2381 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2382 tls relocs and all plt relocs.
2383 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2384 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2385 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2386 shortcuts.
2387 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2388 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2389 entries and got relocs here. Warn on non-zero got reloc addend.
2390 Split out branch taken/not taken reloc code into a separate switch
2391 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2392 Split out HA reloc adjustments to separate switch statement. Don't
2393 warn on reloc overflow if we've already warned about undefined.
2394 Don't rebuild sym name when reporting errors. Report all possible
2395 errors from _bfd_final_link_relocate.
2396 (bfd_elf32_bfd_final_link): Don't define.
2397
cd27b276
AM
23982003-02-18 Alan Modra <amodra@bigpond.net.au>
2399
2400 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2401 rebuild sym name when reporting errors.
2402
ae9a127f
NC
24032003-02-17 Nick Clifton <nickc@redhat.com>
2404
3f9a32bd 2405 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
2406 allow_shlib_undefined for shared libraries.
2407 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2408 of allow_shlib_undefined.
2409 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2410 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2411 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2412 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2413 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2414 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2415 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2416 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2417 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2418 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2419 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2420 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2421 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2422 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2423 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2424 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2425
b5f852ea
NC
24262003-02-17 Nick Clifton <nickc@redhat.com>
2427
2428 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2429 address field to use in the comparison.
3f9a32bd 2430 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 2431
3193e234
NC
24322003-02-14 Bob Wilson <bob.wilson@acm.org>
2433
2434 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2435 backends when checking if the generic ELF target should be used.
2436
21efdc8d
NC
2437 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2438 outside of functions, treat values as absolute addresses.
2439
ed781d5d
NC
2440 * bfd.c: Change embedded documentation to use consistent indentation
2441 and to split up long lines. Change informal style of description
2442 for functions lacking real documentation.
2443 * coffcode.h: Break up long lines in embedded documentation.
2444 * format.c: Likewise.
2445 * targets.c: Likewise.
2446 * libcoff.h: Regenerate.
2447 * bfd-in2.h: Regenerate.
2448
58ac9f71
AM
24492003-02-14 Alan Modra <amodra@bigpond.net.au>
2450
2451 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2452 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2453 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2454 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2455 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2456 (group_sections): Don't share a stub section if stubs are for a large
2457 section. Adjust comment.
2458 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2459 !stubs_always_before_branch.
2460 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2461 treat undefined and undefweak specially when processing dyn relocs.
2462
9147e853
JJ
24632003-02-13 Jakub Jelinek <jakub@redhat.com>
2464
2465 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2466
427bfd90
NC
24672003-02-13 Nick Clifton <nickc@redhat.com>
2468
2469 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2470 in computation of offset to insert into BL instruction.
2471
42b5d0ea
NC
24722003-02-11 Uwe Stieber <uwe@wwws.de>
2473
2474 * config.bfd: Add support for kaOS as cross build target system.
2475
a48ebf4d
AM
24762003-02-11 Alan Modra <amodra@bigpond.net.au>
2477
2478 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2479 .__tls_get_addr too.
2480 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2481
c95b8a7a
KK
24822003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2483
2484 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2485 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2486 (sh_elf_link_hash_newfunc): Remove the initialization of
2487 tls_tpoff32 field.
2488 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2489 for which tls_tpoff32 flag is set.
2490 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2491 of the symbol includes the entry matched with the input_section
2492 and having tls_tpoff32 flag on. When linking statically, set
2493 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2494 is defined in this executable.
2495 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2496
a779acda
JJ
24972003-02-10 Jakub Jelinek <jakub@redhat.com>
2498
2499 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2500 even if there is just non-empty .rela.plt.
2501
fde78edd
NC
25022003-02-10 Nick Clifton <nickc@redhat.com>
2503
2504 * archures.c (bfd_mach_arm_ep9312): Define.
2505 * bfd-in2.h: Regenerate.
2506 * cpu-arm.c (processors[]): Add ep9312.
2507 (bfd_arm_arch): Add ep9312.
2508 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2509 messages and add test for Maverick floating point support.
2510 (elf32_arm_print_private_bfd_data): Handle
2511 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
2512 (elf32_arm_object_p): New function.
2513 (elf_backend_object_p): Define.
fde78edd 2514
e7b938ca
AM
25152003-02-10 Alan Modra <amodra@bigpond.net.au>
2516
2517 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2518 variables, structure fields or function params to tls_mask or
2519 similar to better reflect usage.
2520 (struct got_entry): Comment.
9b5ecbd0 2521 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
2522 (get_tls_mask): Rename from get_tls_type.
2523
951fd09b
AM
25242003-02-09 Alan Modra <amodra@bigpond.net.au>
2525
2526 * elf64-ppc.c (TLS_GD_LD): Don't define..
2527 (TLS_GD): ..define this instead and update all uses.
2528 (TLS_TPRELGD): Define.
2529 (ppc64_elf_link_hash_table_create): Tweak initialization of
2530 init_refcount and init_offset.
2531 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2532 Mark second slot of GD or LD toc entries.
2533 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2534 from other tls types.
2535 (ppc64_elf_tls_setup): New function, split out from..
2536 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2537 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2538 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2539 return value to properly decide whether toc GD and LD entries can
2540 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2541 to determine GD or LD rather than looking at TLS_LD flag. Don't
2542 attempt to adjust got entry tls_type here..
2543 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2544 look for possible merges.
2545 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2546 optimization.
2547 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2548 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2549 Make use of return value from get_tls_type to properly detect GD and
2550 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2551 handle tls_get_addr removal when looking at REL24 relocs, do it when
2552 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2553 GD or LD.
2554 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2555
acc990f2
AM
25562003-02-08 Alan Modra <amodra@bigpond.net.au>
2557
00b28bb0
AM
2558 * elf32-hppa.c (group_sections): Don't share a stub section if
2559 stubs are for a large section.
2560
acc990f2
AM
2561 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2562 stubs if !stubs_always_before_branch.
2563
589e6347
NC
25642003-02-07 Nick Clifton <nickc@redhat.com>
2565
2566 * elf.c (swap_out_syms): Generate an error message if an
2567 equivalent output section cannot be found for a symbol.
2568
c328dc3f
JJ
25692003-02-07 Jakub Jelinek <jakub@redhat.com>
2570
2571 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
2572 local_got_entries is NULL.
2573
84f97cb6
AS
25742003-02-06 Andreas Schwab <schwab@suse.de>
2575
2576 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
2577 (read_value): Add parameter is_signed, use signed extraction if
2578 the value is signed.
2579 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
2580 encoding to read_value.
2581
6349e628
AM
25822003-02-06 Alan Modra <amodra@bigpond.net.au>
2583
2584 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
2585 plt info when called to transfer weak sym info.
2586
411e1bfb
AM
25872003-02-05 Alan Modra <amodra@bigpond.net.au>
2588
2589 * reloc.c: Add PPC and PPC64 TLS relocs.
2590 * libbfd.h: Regenerate.
2591 * bfd-in2.h: Regenerate.
2592 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
2593 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
2594 against a 32 bit field.
2595 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
2596 (_ppc64_elf_section_data): Add t_symndx and comments.
2597 (ppc64_elf_section_data): Use elf_section_data macro.
2598 (ppc64_elf_new_section_hook): American spelling.
2599 (struct got_entry, struct plt_entry): New.
2600 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
2601 (struct ppc_stub_hash_entry): Add "addend" field.
2602 (struct ppc_link_hash_entry): Add "tls_type".
2603 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
2604 TLS_EXPLICIT): Define.
2605 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
2606 (link_hash_newfunc): Init new fields.
58ac9f71 2607 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
2608 init_offset to NULL.
2609 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
2610 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
2611 there.
2612 (update_local_sym_info, update_plt_info): New functions.
2613 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
2614 handling to use got.glist rather than got.refcount. Likewise for PLT.
2615 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
2616 (func_desc_adjust): Adjust for new PLT list.
2617 (ppc64_elf_adjust_dynamic_symbol): Likewise.
2618 (get_sym_h, get_tls_type): New functions.
2619 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
2620 (ppc64_elf_tls_optimize): New function.
2621 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
2622 TLS relocs.
2623 (ppc64_elf_size_dynamic_sections): Likewise.
2624 (ppc_type_of_stub): Adjust for new PLT list.
2625 (ppc_build_one_stub): Likewise.
2626 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
2627 calls specially.
2628 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
2629 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
2630 init GOT entries that have a reloc. Generate GOT relocs here..
2631 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
2632 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
2633
0cca5f05
AS
26342003-02-04 Andreas Schwab <schwab@suse.de>
2635
2636 * elf32-m68k.c (elf_m68k_hash_entry): Define.
2637 (elf_m68k_link_hash_traverse): Remove.
2638 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
2639 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
2640 reduce casting.
2641 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
2642 casting.
2643 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
2644 instead of elf_m68k_link_hash_traverse.
2645 (elf_m68k_discard_copies): Change first parameter to pointer to
2646 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
2647 elf_m68k_link_hash_entry is needed.
2648
5cab59f6
AM
26492003-02-04 Alan Modra <amodra@bigpond.net.au>
2650
2651 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
2652 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
2653 "got" union, and declare as gotplt_union. Use gotplt_uinion for
2654 "plt" field.
2655 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
2656 Add "init_offset" field.
2657 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
2658 (elf_local_got_ents): Declare.
2659 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
2660 and "plt".
2661 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
2662 (_bfd_elf_link_hash_table_init): Set "init_offset".
2663 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
2664 from init_offset.
2665 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
2666
2667 * elf.c (bfd_elf_local_sym_name): Split out from..
2668 (group_signature): ..here.
2669 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
2670
68bfbfcc
AM
26712003-02-04 Alan Modra <amodra@bigpond.net.au>
2672
2673 * elf-bfd.h (enum elf_link_info_type): Remove.
2674 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
2675 to struct sec. Remove linkonce_p field.
2676 (elf_linkonce_p): Delete.
2677 (elf_discarded_section): Update for sec_info_type change.
2678 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
2679 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
2680 (ELF_INFO_TYPE_NONE): Define.
2681 (ELF_INFO_TYPE_STABS): Define.
2682 (ELF_INFO_TYPE_MERGE): Define.
2683 (ELF_INFO_TYPE_EH_FRAME): Define.
2684 (ELF_INFO_TYPE_JUST_SYMS): Define.
2685 (STD_SECTION): Update struct sec initializer.
2686 * ecoff.c (bfd_debug_section): Likewise.
2687 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
2688 * elflink.h: Likewise.
2689 * elf-eh-frame.c: Likewise.
2690 * elf64-alpha.c: Likewise.
2691 * elfxx-ia64.c: Likewise.
2692 * elfxx-mips.c: Likewise.
2693 * bfd-in2.h: Regenerate.
2694
2695 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
2696 referring to used_by_bfd.
2697 * elf64-sparc.c (sec_do_relax): Likewise.
2698 * elf64-mmix.c (mmix_elf_section_data): Likewise.
2699 * elfxx-mips.c (mips_elf_section_data): Likewise.
2700 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
2701 (ieee_get_section_contents): Likewise.
2702 (ieee_new_section_hook): Formatting.
2703 (ieee_canonicalize_reloc): Remove commented out code.
2704 * mmo.c (mmo_section_data): Define. Use throughout file.
2705 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
2706
31f7ba04
NC
27072003-01-31 Graydon Hoare <graydon@redhat.com>
2708
2709 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
2710 * Makefile.in: Regenerate.
2711 * opncls.c (calc_crc32, get_debug_link_info,
2712 seperate_debug_file_exists, find_seperate_debug_file): New
2713 internal functions.
2714 (bfd_follow_gnu_debuglink): New function. Follow the pointer
2715 contained inside a .gnu_debuglink section.
2716 * bfd-in2.h: Regenerate.
2717
38985a1c
AO
27182003-01-29 Alexandre Oliva <aoliva@redhat.com>
2719
2720 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
2721 entry->abfd when it's NULL.
2722
4bb9a95f
AO
27232003-01-27 Alexandre Oliva <aoliva@redhat.com>
2724
2725 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
2726 _bfd_elf_section_offset returning -2 the same way as -1.
2727
f4416af6
AO
2728 * elfxx-mips.c (mips_elf_multi_got): New function.
2729 (struct mips_got_entry): Make symndx and gotidx signed. Moved
2730 addend into union along with address and link hash entry.
2731 (struct mips_got_info): Added bfd2got and next.
2732 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
2733 (mips_elf_got_section, mips_elf_create_got_section): Use
2734 SEC_EXCLUDE bit to tell whether we really need the got
2735 section. Take boolean arguments to disregard an excluded
2736 section, or to create it as excluded. Adjust all callers.
2737 Use mips_elf_got_section all over.
2738 (mips_elf_local_got_index, mips_elf_got_page,
2739 mips_elf_got16_entry): Take input bfd as argument, and pass it
2740 on to mips_elf_create_local_got_entry.
2741 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
2742 Take input bfd as argument, and manage entries in the
2743 appropriate GOT.
2744 (mips_elf_got_offset_from_index): Take input bfd as argument,
2745 and use it to adjust the GP offset of the bfd.
2746 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
2747 unreferenced GOT entries of global symbols to the end.
2748 (mips_elf_record_global_got_symbol): Take input bfd as
2749 argument. Add entries to the master GOT hash table.
2750 (struct mips_elf_bfd2got_hash): New.
2751 (struct mips_elf_got_per_bfd_arg): New.
2752 (struct mips_elf_set_global_got_offset_arg): New.
2753 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
2754 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
2755 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
2756 mips_elf_merge_gots, mips_elf_set_global_got_offset,
2757 mips_elf_resolve_final_got_entry,
2758 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
2759 mips_elf_got_for_ibfd): New functions.
2760 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
2761 (MIPS_ELF_GOT_MAX_SIZE): New macro.
2762 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
2763 (mips_elf_got_entry_hash): Take new fields into account. Use
2764 mips_elf_hash_bfd_vma.
2765 (mips_elf_got_entry_eq): Take new fields into account.
2766 (mips_elf_create_got_section): Initialize new fields.
2767 (mips_elf_calculate_relocation): Pass input_bfd to functions
2768 that now take it. Adjust gp for the input_bfd.
2769 (mips_elf_allocate_dynamic_relocation,
2770 mips_elf_create_dynamic_relocation,
2771 _bfd_mips_elf_create_dynamic_sections): Use...
2772 (mips_elf_rel_dyn_section): New function. Borrow code from...
2773 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
2774 now take it. Create the got section if needed, even if
2775 excluded, before recording a global got symbol. Move some
2776 code to...
2777 (mips_elf_record_local_got_symbol): New fn.
2778 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
2779 Compute multi-got global entries offsets. Move GOT code to...
2780 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
2781 if the GOT is too big.
2782 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
2783 undefweak symbol to zero. Generate dynamic relocations for
2784 non-primary GOT entries for global symbols.
2785 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
2786 case. Generate dynamic relocations for local got entries.
2787 Sort dynamic relocations on N64 too, using...
2788 (sort_dynamic_relocs_64): New fns.
2789 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
2790 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
2791
52b69c9e
AO
27922003-01-27 Alexandre Oliva <aoliva@redhat.com>
2793
2794 * bfd.c (struct _bfd): Added id field.
2795 * opncls.c (_bfd_id_counter): New static variable.
2796 (_bfd_new_bfd): Use it.
2797 * bfd-in2.h: Rebuilt.
2798
71e5db1c
AM
27992003-01-25 Alan Modra <amodra@bigpond.net.au>
2800
2801 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
2802
b9734f35
JJ
28032003-01-25 Jakub Jelinek <jakub@redhat.com>
2804
2805 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
2806 (elf32_sparc_rev32_howto): New variable.
2807 (sparc_reloc_map): Add TLS relocs.
2808 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
2809 Handle REV32.
2810 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
2811 New functions.
2812 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
2813 struct elf32_sparc_link_hash_table):
2814 New structures.
2815 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
2816 elf32_sparc_hash_table): Define.
2817 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
2818 create_got_section, elf32_sparc_create_dynamic_sections,
2819 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
2820 functions.
2821 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
2822 reference counting.
2823 (elf32_sparc_gc_sweep_hook): Likewise.
2824 (elf32_sparc_adjust_dynamic_symbol): Likewise.
2825 (elf32_sparc_size_dynamic_sections): Likewise.
2826 (elf32_sparc_relocate_section): Likewise.
2827 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
2828 New functions.
2829 (elf32_sparc_object_p): Allocate backend private object data.
2830 (bfd_elf32_bfd_link_hash_table_create,
2831 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
2832 elf_backend_can_refcount): Define.
2833 (elf_backend_create_dynamic_sections): Define to
2834 elf32_sparc_create_dynamic_sections.
2835 * reloc.c: Add SPARC TLS relocs.
2836 * bfd-in2.h, libbfd.h: Rebuilt.
2837 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
2838 (sparc_reloc_map): Likewise.
2839
69fc87f1
MS
28402003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
2841
2842 * bfd-in2.h: Regenerate.
2843 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
2844 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
2845 (elf_howto_table): Add TLS relocs.
2846 (elf_s390_reloc_type_lookup): Likewise.
2847 (elf_s390_link_hash_entry): Add tls_type.
2848 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
2849 New macros.
2850 (elf_s390_link_hash_table): Add tls_ldm_got.
2851 (link_hash_newfunc): Initialize tls_type.
2852 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
2853 (elf_s390_copy_indirect_symbol): Copy tls_type information.
2854 (elf_s390_check_relocs): Support TLS relocs.
2855 (elf_s390_gc_sweep_hook): Likewise.
2856 (allocate_dynrelocs): Likewise.
2857 (elf_s390_size_dynamic_sections): Likewise.
2858 (elf_s390_relocate_section): Likewise.
2859 (elf_s390_finish_dynamic_symbol): Likewise.
2860 (bfd_elf32_mkobject): Define for TLS.
2861 * elf64-s390.c: Same changes as for elf32-s390.c.
2862 * libbfd.h: Regenerate.
2863 * reloc.c: Add s390 TLS relocations.
2864
c5d1701e 28652003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
2866
2867 * aclocal.m4: Fix name of --enable-install-libbfd switch.
2868
5177500f
NC
28692003-01-23 Nick Clifton <nickc@redhat.com>
2870
2871 * Add sh2e support:
5177500f 2872 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
2873 * archures.c (bfd_mach_sh2e): Added.
2874 * bfd-in2.h: Rebuilt.
2875 * cpu-sh.c (arch_info_struct): Added SH2e.
2876 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 2877
f0abc2a1
AM
28782003-01-23 Alan Modra <amodra@bigpond.net.au>
2879
2880 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
2881 dynindx to an int. Rearrange for better packing.
2882 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
2883 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
2884 * elf32-sh64.h: New. Split out from include/elf/sh.h.
2885 (struct _sh64_elf_section_data): New struct.
2886 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
2887 * elf32-sh64-com.c: Include elf32-sh64.h.
2888 * elf32-sh64.c: Likewise.
2889 (sh64_elf_new_section_hook): New function.
2890 (bfd_elf32_new_section_hook): Define.
2891 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
2892 (sh64_bfd_elf_copy_private_section_data): Likewise.
2893 (sh64_elf_final_write_processing): Likewise.
2894 * elf32-sparc.c (struct elf32_sparc_section_data): New.
2895 (elf32_sparc_new_section_hook): New function.
2896 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2897 (sec_do_relax): Define.
2898 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
2899 (elf32_sparc_relocate_section): Likewise.
2900 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
2901 * elf64-mmix.c (struct _mmix_elf_section_data): New.
2902 (mmix_elf_section_data): Define. Use throughout file.
2903 (mmix_elf_new_section_hook): New function.
2904 (bfd_elf64_new_section_hook): Define.
2905 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
2906 (ppc64_elf_section_data): Define. Use throughout.
2907 (ppc64_elf_new_section_hook): New function.
2908 (bfd_elf64_new_section_hook): Define.
2909 * elf64-sparc.c (struct sparc64_elf_section_data): New.
2910 (sparc64_elf_new_section_hook): New function.
2911 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2912 (sec_do_relax): Define.
2913 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
2914 (sparc64_elf_relocate_section): Likewise.
2915 (bfd_elf64_new_section_hook): Define.
2916 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
2917 * elfxx-mips.c (struct _mips_elf_section_data): New.
2918 (mips_elf_section_data): Define. Use throughout.
2919 (_bfd_mips_elf_new_section_hook): New function.
2920 (mips_elf_create_got_section): Don't alloc used_by_bfd.
2921 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
2922 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
2923 * Makefile.am: Run "make dep-am".
2924 * Makefile.in: Regenerate.
2925
cc03ec80
RH
29262003-01-21 Richard Henderson <rth@redhat.com>
2927
2928 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
2929 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
2930 (elf64_alpha_adjust_dynamic_symbol): Set them.
2931 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
2932 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
2933 symbol index when relaxing LDM to TPREL.
2934 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
2935 relocs, even if the target isn't locally defined.
2936 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
2937 (elf64_alpha_relocate_section): Likewise. Force TP-relative
2938 relocs vs symndx 0 to the tp base.
2939
da896d3f
NC
29402003-01-21 Fabio Alemagna <falemagn@aros.org>
2941
2942 * config.bfd: Handle i[3456]86-*-aros*.
2943
7fce784e
AS
29442003-01-21 Andreas Schwab <schwab@suse.de>
2945
2946 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
2947 (struct ppc_elf_link_hash_entry): Define.
2948 (ppc_elf_hash_entry): New function.
2949 (struct ppc_elf_link_hash_table): Define.
2950 (ppc_elf_hash_table): New function.
2951 (ppc_elf_link_hash_newfunc): New function.
2952 (ppc_elf_link_hash_table_create): New function.
2953 (ppc_elf_copy_indirect_symbol): New function.
2954 (allocate_dynrelocs): New function.
2955 (readonly_dynrelocs): New function.
2956 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
2957 relocs and determine DT_TEXTREL.
2958 (ppc_elf_check_relocs): Don't do that here, just count the
2959 dynamic relocs.
2960 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
2961 removed section.
2962 (bfd_elf32_bfd_link_hash_table_create): Define.
2963 (elf_backend_copy_indirect_symbol): Define.
2964
1bbc9cec
RH
29652003-01-21 Richard Henderson <rth@redhat.com>
2966
2967 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
2968 TPREL also get a reloc if shared. Remove SREL support.
2969 (elf64_alpha_emit_dynrel): New.
acc990f2 2970 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
2971 and GOTTPREL relocs to local symbols against the tp base.
2972 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
2973
2974 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
2975 use count before clobbering r_type.
2976 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
2977 ordering would mean dataflow inspection is necessary.
2978
0da35f8b
SS
29792003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
2980
2981 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 2982
571fe01f
NC
29832003-01-20 Fabio Alemagna <falemagn@aros.org>
2984
2985 * elf32-sh.c: Treat elfNN_bed like other macros defined in
2986 elfxx-target.h and #undef it before #define'ing it.
2987 * elf32-i386.c: Likewise.
acc990f2
AM
2988 * elf32-sh64.c: Likewise.
2989 * elf64-alpha.c: Likewise.
2990 * elf64-sh64.c: Likewise.
571fe01f 2991
5236c819
MS
29922003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2993
2994 * bfd-in2.h: Regenerate.
2995 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
2996 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
2997 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
2998 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
2999 R_390_PLTOFF32 and R_390_PLTOFF64.
3000 (elf_s390_reloc_type_lookup): Likewise.
3001 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3002 of GOTPLT references to a function.
3003 (link_hash_newfunc): Initialize gotplt_refcount.
3004 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3005 and creation of the got section out of the main switch. Add support
3006 for the gotoff, gotplt and pltoff relocations.
3007 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3008 and pltoff.
3009 (elf_s390_adjust_gotplt): New function.
3010 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3011 plt entries.
3012 (allocate_dynrelocs): Add comment.
3013 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3014 for gotoff, gotplt and pltoff relocations.
3015 * elf64-s390.c: Same changes as for elf32-s390.c.
3016 * libbfd.h: Regenerate.
3017 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3018 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3019 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3020 and BFD_RELOC_390_PLTOFF64.
3021
a823975a
JJ
30222003-01-18 Jakub Jelinek <jakub@redhat.com>
3023
3024 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3025 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3026
b3dfd7fe
JJ
30272003-01-16 Jakub Jelinek <jakub@redhat.com>
3028
3029 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3030 self_dtpmod_done and self_dtpmod_offset.
3031 (allocate_global_data_got): Only use one got entry for all
3032 dtpmod relocs against local symbols.
3033 (allocate_dynrel_entries): Only need .rela.got entry for
3034 dtpmod against global symbol.
3035 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3036 Reserve space in .rela.got for the local dtpmod entry.
3037 (set_got_entry): Initialize the common local dtpmod .got entry.
3038 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3039 and R_IA_64_DTPREL64MSB.
3040
04c9666a
AM
30412003-01-16 Alan Modra <amodra@bigpond.net.au>
3042
3043 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3044 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3045 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3046 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3047 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3048 relative relocs, not with absolute ones.
3049 * Makefile.am: Run "make dep-am".
3050 * Makefile.in: Regenerate.
3051 * po/SRC-POTFILES.in: Regenerate.
3052
c87f1ff7
AS
30532003-01-15 Andreas Schwab <schwab@suse.de>
3054
3055 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3056 relocation against a non-allocated readonly section.
3057
86bbe32f
AM
30582003-01-10 Alan Modra <amodra@bigpond.net.au>
3059
3060 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3061 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3062
32d95f29
KD
30632002-01-08 Klee Dienes <kdienes@apple.com>
3064
3065 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3066 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3067 * Makefile.in: Regenerate.
acc990f2 3068
ab7d0aa0
AO
30692003-01-08 Alexandre Oliva <aoliva@redhat.com>
3070
3071 * elfn32-mips.c (prev_reloc_section): New.
3072 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3073 (SET_RELOC_ADDEND): Parenthesize macro argument.
3074
95d0f04a
DA
30752003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3076
3077 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3078 adjust addil instructions if the symbol has no section.
3079
5c9e189c
DD
30802003-01-07 DJ Delorie <dj@redhat.com>
3081
3082 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3083 partial_inplace.
3084
3e829b4a
AS
30852003-01-07 Andreas Schwab <schwab@suse.de>
3086
3087 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3088 PC relative relocations.
3089 (elf_m68k_discard_copies): Set it here instead.
3090
a75473eb
SC
30912002-01-02 Ben Elliston <bje@redhat.com>
3092 Jeff Johnston <jjohnstn@redhat.com>
3093
3094 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3095 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3096 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3097 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3098 (cpu-iq2000.lo): New target.
3099 * Makefile.in: Regenerate.
3100 * config.bfd: Handle iq2000-*-elf.
3101 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3102 (bfd_archures_list): Add bfd_iq2000_arch.
3103 * configure.in: Handle bfd_elf32_iq2000_vec.
3104 * configure: Regenerate.
acc990f2 3105 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
3106 and BFD_RELOC_IQ2000_UHI16.
3107 * targets.c (bfd_elf32_iq2000_vec): Declare.
3108 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3109 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3110 * cpu-iq2000.c: New file.
3111 * elf32-iq2000.c: Likewise.
3112 * libbfd.h: Regenerate.
3113 * bfd-in2.h: Likewise.
3114
64543e1a
RS
31152003-01-02 Richard Sandiford <rsandifo@redhat.com>
3116
3117 * elfxx-mips.c: Include libiberty.h.
3118 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3119 (mips_set_isa_flags): New function, split out from...
3120 (_bfd_mips_elf_final_write_processing): ...here. Only call
3121 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3122 (mips_mach_extensions): New array.
3123 (mips_32bit_flags_p): New function.
3124 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3125 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3126 other is 64-bit. When adopting IBFD's architecture, adopt the
3127 bfd_mach as well as the flags.
3128
4852a44e
NC
31292003-01-02 Nick Kelsey <nickk@ubicom.com>
3130
3131 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3132 fix internal errors, fix bad code generation, fix incorrect stabs
3133 information, and improve ability to eliminate redundant page
3134 instructions. Added code to ip2k_final_link_relocate to self-verify
3135 the linker relaxation. Fix formatting problems.
3136
af7ee8bf
CD
31372002-12-30 Chris Demetriou <cgd@broadcom.com>
3138
3139 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3140 * archures.c (bfd_mach_mipsisa32r2): New define.
3141 * bfd-in2.h: Regenerate.
3142 * cpu-mips.c (I_mipsisa32r2): New enum value.
3143 (arch_info_struct): Add entry for I_mipsisa32r2.
3144 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3145 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3146 (_bfd_mips_elf_final_write_processing): Add
3147 bfd_mach_mipsisa32r2 case.
3148 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3149 binaries marked as using MIPS32 Release 2.
3150
2469cfa2
NC
31512002-12-30 Dmitry Diky <diwil@mail.ru>
3152
3153 * Makefile.am: Add msp430 target.
3154 * configure.in: Likewise.
3155 * Makefile.in: Regenerate.
3156 * configure: Regenerate.
3157 * archures.c: Add msp430 architecture vector.
3158 * config.bfd: Likewise.
3159 * reloc.c: Add msp430 relocs.
3160 * targets.c: Add msp320 target.
3161 * cpu-msp430.c: New file: msp430 cpu detection.
3162 * elf32-msp430.c: New file: msp430 reloc processing.
3163 * bfd-in2.h: Regenerate.
3164 * libbfd.h: Regenerate.
3165
eecdbe52
JJ
31662002-12-28 Jakub Jelinek <jakub@redhat.com>
3167
3168 * elf.c (elf_sort_sections): Don't reorder .tbss.
3169 (assign_file_positions_for_segments): Only adjust off/voff
3170 for increased alignment in PT_LOAD or PT_NOTE segment,
3171 but adjust p_filesz for .tbss too. in PT_LOAD consider
3172 .tbss to have zero memory size.
3173 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3174 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3175 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3176 into PT_TLS segment. Never put SHF_TLS sections in
3177 segments other than PT_TLS or PT_LOAD.
3178
3179 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3180 sh_entsize.
3181
213e90f4
DD
31822002-12-23 DJ Delorie <dj@redhat.com>
3183
3184 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3185
75828352
AM
31862002-12-23 Alan Modra <amodra@bigpond.net.au>
3187
3188 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3189
312b768e
NC
31902002-12-23 Nick Clifton <nickc@redhat.com>
3191
3192 * archures.c (bfd_arch_get_compatible): Add third parameter
3193 'accept_unknowns'. Only accept unknown format BFDs if
3194 accept_unknowns is true, or if the format is "binary".
acc990f2 3195 * bfd-in2.h: Regenerate.
312b768e 3196
63222ec9
NC
31972002-12-21 Nick Clifton <nickc@redhat.com>
3198
3199 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3200 that subtracted 8 from pc relative relocations.
3201
19852a2a
KH
32022002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3203
3204 * coff-h8300.c: Fix comment typos.
3205 * coffcode.h: Likewise.
3206 * cpu-cris.c: Likewise.
3207 * elf32-vax.c: Likewise.
3208 * genlink.h: Likewise.
3209 * linker.c: Likewise.
3210 * som.c: Likewise.
3211 * tekhex.c: Likewise.
3212 * vms-misc.c: Likewise.
3213
5fd63999
DD
32142002-12-20 DJ Delorie <dj@redhat.com>
3215
3216 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3217 * libbfd.h: Regenerate.
3218 * bfd-in2.h: Regenerate.
3219 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3220 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 3221
4ee79850
KH
32222002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3223
3224 * doc/bfdint.texi: Fix typos.
3225
66e25bab
AM
32262002-12-20 Paul Eggert <eggert@twinsun.com>
3227
3228 Port to POSIX 1003.1-2001.
3229 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3230 * configure.in (build-warnings): Likewise.
3231 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3232 * aclocal.m4: Regenerate.
3233 * config.in: Regenerate.
3234 * configure: Regenerate.
3235
7dc77aaa
AM
32362002-12-19 Alan Modra <amodra@bigpond.net.au>
3237
0171ee92
AM
3238 * coff-h8300.c: Include libiberty.h.
3239 (h8300_reloc16_extra_cases): Check the hash table creator before
3240 referencing h8300 specific fields. Stash the hash table pointer
3241 in a local var. Comment typo fixes.
3242 (h8300_bfd_link_add_symbols): Likewise.
3243
1049f94e 3244 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
3245 dst_mask comments.
3246 * bfd-in2.h: Regenerate.
3247
47388f4c
AM
32482002-12-18 Alan Modra <amodra@bigpond.net.au>
3249
3250 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3251 code a little. Comment on dynamic relocs against section symbols.
3252
1b3e3744
AM
32532002-12-17 Roger Sayle <roger@eyesopen.com>
3254
3255 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3256 the HP compiler's "long long".
3257
46f2b541
DD
32582002-12-16 Andrew MacLeod <amacleod@redhat.com>
3259
3260 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3261 and R_XSTORMY16_HI16) howto entries.
3262 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 3263 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
3264 determine the start of the second reloc table.
3265
af738ea7
NC
32662002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3267
3268 * ecofflink.c: Fix the reading of the debugging information
3269 of Tru64/Alpha binaries that are produced by recent Compaq
3270 compilers.
3271 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3272 table.
3273 (lookup_line): Because of the strange information sometimes
3274 generated by Compaq's recent compilers, change how the FDR
3275 table is searched so that PDRs (procedure descriptors) are
3276 correctly found. Note that this change is really more of a hack;
3277 however, I have included extensive documentation as to why
3278 this is the best solution short of an extensive rewrite or
3279 another hack.
3280 (fdrtab_lookup): Add comments to explain the algorithm.
3281
5354b572
AO
32822002-12-12 Alexandre Oliva <aoliva@redhat.com>
3283
3284 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3285 initializers to match struct declaration.
3286
ab3acfbe
AM
32872002-12-12 Alan Modra <amodra@bigpond.net.au>
3288
3289 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3290 * elf.c (get_program_header_size): Likewise.
3291 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3292 (m32r_elf_generic_reloc): Likewise.
3293 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3294 * elflink.h (elf_bfd_discard_info): Likewise.
3295
6348e046
AM
32962002-12-12 Alan Modra <amodra@bigpond.net.au>
3297
3298 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3299 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3300 DT_RELSZ adjustment, not output section. Avoid writing tags when
3301 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3302 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3303 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3304 DT_RELASZ adjustment, not output section. Avoid writing tags when
3305 unchanged. Adjust DT_RELA.
3306 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3307 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3308
2e7a68a8
AO
33092002-12-12 Alexandre Oliva <aoliva@redhat.com>
3310
3311 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3312 addend by 4.
3313
b15e6682
AO
33142002-12-12 Alexandre Oliva <aoliva@redhat.com>
3315
3316 * elfxx-mips.c (struct mips_got_entry): New.
3317 (struct mips_got_info): Added got_entries field.
3318 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3319 (mips_elf_local_got_index, mips_elf_got_page,
3320 mips_elf_got16_entry): Re-implement in terms of new...
3321 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3322 Change return type.
3323 (mips_elf_highest): Warning clean-up.
3324 (mips_elf_create_got_section): Initialize got_entries.
3325 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3326 local got size.
3327 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3328 GOT_PAGE entries, since we now reuse GOT16 entries.
3329
e6af3a53
NC
33302002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3331
3332 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3333 read-only section that lies after .text and before .data to be
3334 written into the output file and included in a_text.
3335 (translate_to_native_sym_flags): If an otherwise unrepresentable
3336 section was merged with .text, convert its symbols to N_TEXT
3337 symbols.
3338 * libaout.h (aout_section_merge_with_text_p): New macro.
3339
cf3d882d
AM
33402002-12-08 Alan Modra <amodra@bigpond.net.au>
3341
3342 * bfd-in.h: Comment typo fix. Formatting.
3343 * bfd-in2.h: Regenerate.
3344 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3345 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3346 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3347
2f9bd3f6
RH
33482002-12-05 Richard Henderson <rth@redhat.com>
3349
3350 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3351 Only send PCREL21B though the plt. Fix installed reloc type.
3352 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3353 against PCREL22 or PCREL64I; clean up error messages for
3354 branch relocs.
3355
d0112f73
KB
33562002-12-04 Kevin Buettner <kevinb@redhat.com>
3357
3358 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3359 New functions.
3360 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3361
c10d9d8f
JW
33622002-12-04 David Mosberger <davidm@hpl.hp.com>
3363
3364 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3365
d48770d4
L
33662002-12-04 H.J. Lu <hjl@gnu.org>
3367
3368 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3369 BFD address when constructing local name.
3370
b6152c34
AS
33712002-12-04 Andreas Schwab <schwab@suse.de>
3372
3373 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3374 member.
3375 (elf_m68k_link_hash_table_create): Initialize it.
3376 (elf_m68k_check_relocs): Handle symbols that are forced to be
3377 local due to visibility changes.
3378 (elf_m68k_adjust_dynamic_symbol): Likewise.
3379 (elf_m68k_size_dynamic_sections): Likewise.
3380 (elf_m68k_discard_copies): Likewise.
3381 (elf_m68k_relocate_section): Likewise.
3382
73374ef1
AM
33832002-12-04 Alan Modra <amodra@bigpond.net.au>
3384
3385 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3386
c5c1944d
AM
33872002-12-04 Alan Modra <amodra@bigpond.net.au>
3388
3389 * srec.c (srec_write_symbols): Restore '$' prefix to address
3390 accidentally removed in 2002-04-04 change.
3391 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3392
e1a9cb8e
NC
33932002-12-03 Nick Clifton <nickc@redhat.com>
3394
3395 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
3396 (apuinfo_list_add): New function: Add a value to the list.
3397 (apuinfo_list_length): New function: Return the number of
3398 values on the list.
3399 (apuinfo_list_element): New function: Return a value on the
3400 list.
3401 (apuinfo_list_finish): New function: Free the resources used
3402 by the list.
3403 (ppc_elf_begin_write_processing): New function. Scan the
3404 input bfds for apuinfo sections.
3405 (ppc_elf_write_section): New function: Delay the creation of
3406 the contents of an apuinfo section in an output bfd.
3407 (ppc_elf_final_write_processing): New function. Create the
3408 contents of an apuinfo section in an output bfd.
3409 (elf_backend_begin_write_processing): Define.
3410 (elf_backend_final_write_processing): Define.
3411 (elf_backend_write_section): Define.
e1a9cb8e 3412
a823923b
RH
34132002-12-03 Richard Henderson <rth@redhat.com>
3414
3415 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3416
30491647
SC
34172002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3418
3419 Fix PR savannah/1417:
3420 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3421 branch if it goes to the start of the deleted region.
3422
bc7c6a90
SC
34232002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3424
3425 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3426 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3427 bfd_mach_m6812s): Declare.
3428
3429 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3430 (_bfd_m68hc12_elf_set_private_flags): Call it.
3431 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3432 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3433 report microcontroller incompatibilities (HC12 vs HCS12).
3434 (elf_backend_object_p): Update.
3435
b34976b6
AM
34362002-11-30 Alan Modra <amodra@bigpond.net.au>
3437
3438 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3439 (enum bfd_boolean, boolean): Delete.
3440 (bfd_boolean): Typedef to an int.
3441 (FALSE, TRUE): Define.
3442 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3443 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3444 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3445 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3446 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3447 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3448 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3449 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3450 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3451 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3452 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3453 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3454 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3455 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3456 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3457 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3458 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3459 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3460 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3461 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3462 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3463 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3464 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3465 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3466 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3467 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3468 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3469 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3470 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3471 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3472 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3473 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3474 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3475 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3476 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3477 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3478 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3479 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3480 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3481 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3482 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3483 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3484 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3485 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3486 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3487 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3488 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3489 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 3490 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
3491 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3492 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3493 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3494 of bfd_boolean vars with TRUE/FALSE. Formatting.
3495 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3496
947216bf
AM
34972002-11-28 Alan Modra <amodra@bigpond.net.au>
3498
3499 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3500 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3501 with Elf_Internal_Rela.
3502 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3503 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3504 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3505 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3506 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3507 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3508 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3509 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3510 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3511 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3512 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3513 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3514 throughout instead.
3515 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3516 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3517 Remove INLINE keyword.
3518 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3519 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3520 as a bfd_byte *.
3521 (elf_write_relocs): Consolidate REL and RELA code.
3522 (elf_slurp_reloc_table_from_section): Simplify REL code.
3523 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3524 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3525 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3526 RELA code.
3527 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3528 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3529 (elf_link_output_relocs): Likewise.
3530 (elf_reloc_link_order): Likewise.
3531 (elf_finish_pointer_linker_section): Likewise.
3532 (struct elf_link_sort_rela): Remove union.
3533 (elf_link_sort_cmp1): Update to suit.
3534 (elf_link_sort_cmp2): Here too.
3535 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3536 over-allocation for int_rels_per_ext_rel != 1 case.
3537 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3538 * elf32-i386.c: Likewise.
3539 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3540 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3541 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3542 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3543 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3544 elf64-sparc.c, elf64-x86-64.c: Likewise.
3545 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3546 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3547 bfd_elf32_swap_reloc_in.
3548
3549 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3550 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3551 (mips_elf64_swap_reloc_in): Zero r_addend.
3552 (mips_elf64_be_swap_reloc_in): Likewise.
3553 (mips_elf64_slurp_one_reloc_table): Simplify.
3554
3555 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3556 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3557 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3558
1448fa32
KK
35592002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3560
3561 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 3562 unresolved debugging relocs in dynamic applications.
1448fa32
KK
3563 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3564
73722af0
AM
35652002-11-26 Alan Modra <amodra@bigpond.net.au>
3566
3567 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
3568 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
3569 on a relocatable link. Comment typos.
3570 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
3571 in the order they are declared. Clear elf_hash_value too.
3572 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
3573 eh_info and tls_segment.
3574 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
3575 sorted when discarding relocs by turning them into R_*_NONE.
3576
3577 * libbfd.c (warn_deprecated): Comment spelling.
3578 * po/SRC-POTFILES.in: Regenerate.
3579
7c25b72c
RH
35802002-11-21 Richard Henderson <rth@redhat.com>
3581
3582 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
3583 arch's st_other bits when merging visibilities.
3584 (elf_link_output_extsym): Tidy clearing of visibility field.
3585
dc12c51f
AM
35862002-11-21 Alan Modra <amodra@bigpond.net.au>
3587
3588 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
3589 (SWAP_OUT_RELOC_OFFSET): Define.
3590
963f13ec
AO
35912002-11-20 Alexandre Oliva <aoliva@redhat.com>
3592
3593 * elf.c (_bfd_elf_link_hash_table_init): Make sure
3594 can_refcount is properly extended to the type of
3595 init_refcount.
3596
ee6423ed
AO
35972002-11-19 Alexandre Oliva <aoliva@redhat.com>
3598
4ffba85c
AO
3599 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
3600 (_bfd_mips_elf_relocate_section): Use it.
3601
ee6423ed
AO
3602 * elfxx-mips.c (MNAME): New macro.
3603 (_bfd_mips_elf_check_relocs): Use it.
3604 (_bfd_mips_elf_discard_info): Likewise.
3605 (_bfd_mips_elf_final_link): Likewise.
3606
cdcf6e38
AM
36072002-11-19 Alan Modra <amodra@bigpond.net.au>
3608
3609 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
3610 rel_hdr.sh_size too.
3611
93509525
KD
36122002-11-18 Klee Dienes <kdienes@apple.com>
3613
3614 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
3615 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
3616 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
3617 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
3618 Add dependencies for bfdwin.c, bfdio.c.
3619 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
3620 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
3621 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
3622 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
3623 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
3624 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
3625 bfd_get_size (moved from libbfd.c and bfd.c).
3626 * bfdwin.c New file. Contains _bfd_window_internal,
3627 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
3628 libbfd.c and bfd.c).
3629 * po/SRC-POTFILES.in: Regenerate.
3630 * po/bfd.pot: Regenerate.
3631 * libbfd.h: Regenerate.
3632 * bfd-in2.h: Regenerate.
3633 * aclocal.m4: Regenerate.
3634 * Makefile.in: Regenerate.
3635 * configure: Regenerate.
3636
3ae41454
AM
36372002-11-18 Klee Dienes <kdienes@apple.com>
3638
3639 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
3640
e514ac71
NC
36412002-11-15 Kazu Hirata <kazu@cs.umass.edu>
3642
3643 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
3644 jsr after a short jump.
3645 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
3646
eddc4f81
KD
36472002-11-15 Klee Dienes <kdienes@apple.com>
3648
3649 * pef.c (bfd_pef_convert_architecture): Move declaration of
3650 ARCH_POWERPC and ARCH_M68K to the start of the function.
3651
51908eee
SS
36522002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
3653
3654 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
3655
3416d2e7
HPN
36562002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
3657
3658 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
3659 For bpo_gregs_section->contents, allocate _raw_size, not
3660 _cooked_size.
3661
b1c58715
AM
36622002-11-13 Klee Dienes <kdienes@apple.com>
3663
3664 * config.bfd: Add entries for powerpc-*-darwin and cousins.
3665
077ca68b
L
36662002-11-13 H.J. Lu <hjl@gnu.org>
3667
3668 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
3669
e84d6fca
AM
36702002-11-13 Klee Dienes <kdienes@apple.com>
3671 Alan Modra <amodra@bigpond.net.au>
3672
3673 * bfd.c (struct bfd_preserve): New.
3674 (bfd_preserve_save): New function.
3675 (bfd_preserve_restore): Ditto.
3676 (bfd_preserve_finish): Ditto.
3677 * bfd-in2.h: Regenerate.
3678 * mach-o.c: Formatting.
3679 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
3680 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
3681 (bfd_mach_o_core_p): Ditto.
3682 (bfd_mach_o_scan): Pass in mdata.
3683 * mach-o.h (bfd_mach_o_scan): Update prototype.
3684 * pef.c: Formatting.
3685 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
3686 (bfd_pef_xlib_object_p): Ditto.
3687 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
3688 * pef.h (bfd_pef_scan): Update prototype.
3689 * xsym.c: Formatting, K&R fixes.
3690 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
3691 (bfd_sym_scan): New function split out from bfd_sym_object_p.
3692 * xsym.h (bfd_sym_scan): Declare.
3693 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 3694 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
3695 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
3696
cd24c222
NC
36972002-11-12 Nick Clifton <nickc@redhat.com>
3698
3699 * po/da.po: Updated Danish translation.
3700
99eb2ac8
AM
37012002-11-12 Alan Modra <amodra@bigpond.net.au>
3702
d6fe2dc1
AM
3703 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
3704 relocatable link too.
3705 (elf_link_input_bfd): When emitting relocs, adjust offsets for
3706 eh_frame and stab sections. Zap deleted relocs.
3707 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
3708 (elf_bfd_discard_info): Run for relocatable link too.
3709 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
3710 Handle ld -r case.
3711 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
3712 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
3713
126495ed
AM
3714 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
3715 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
3716 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
3717 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
3718 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
3719 (struct elf_link_hash_table): Add eh_info.
3720 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
3721 (_bfd_elf_discard_section_eh_frame): Update prototype.
3722 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
3723 (_bfd_elf_write_section_eh_frame): Likewise.
3724 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
3725 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
3726 param. Get "hdr_info" from link hash table.
3727 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
3728 header section from link hash table. Save header section to elf_tdata.
3729 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
3730 header section from link hash table. Don't alloc hdr_info. Clear
3731 hdr_sec instead of setting "strip".
3732 (_bfd_elf_eh_frame_section_offset): Formatting.
3733 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
3734 Get header section from link hash table.
3735 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
3736 Get header section from link hash table.
3737 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
3738 (get_program_header_size): Likewise.
3739 (_bfd_elf_section_offset): Formatting.
3740 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
3741 section pointer in link hash table.
3742 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
3743 and _bfd_elf_write_section_eh_frame calls. Update comment about
3744 eh_frame entries.
3745 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
3746 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
3747
3748 * po/SRC-POTFILES.in: Regenerate.
3749
99eb2ac8
AM
3750 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
3751 relocs for discarded FDEs. Remove dead code.
3752 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
3753 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
3754 Tidy conditions under which stabs are edited. Formatting.
3755 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
3756 from discarded relocs.
3757 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
3758 section adjustments after testing magic values.
3759
7c319a27
AM
37602002-11-12 Thomas Moestl <tmm@FreeBSD.org>
3761
3762 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
3763 references to large plt symbols.
3764
a95a4550
AM
37652002-11-12 Klee Dienes <kdienes@apple.com>
3766
3767 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
3768 looking for an unused section name.
3769
bc7eab72
KH
37702002-11-11 Kazu Hirata <kazu@cs.umass.edu>
3771
3772 * coff-h8300.c: Fix formatting.
3773 * elf32-h8300.c: Likewise.
3774 * reloc16.c: Likewise.
3775
52585bb8
AM
37762002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
3777
3778 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
3779 section when dynamic section unused; _bfd_strip_section_from_output
3780 instead.
3781
9f632188
AM
37822002-11-08 Alan Modra <amodra@bigpond.net.au>
3783
207b304b
AM
3784 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
3785 and sym_vec.
3b029f65 3786
9f632188
AM
3787 * dwarf2.c: Revert last change.
3788
ec4530b5
NC
37892002-11-07 Michal Ludvig <mludvig@suse.cz>
3790
9b5ecbd0 3791 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
3792 _bfd_dwarf2_find_nearest_line): Use
3793 bfd_simple_get_relocated_section_contents() instead of
3794 bfd_get_section_contents().
3795 * reloc.c (bfd_perform_relocation): Add sanity check.
3796 * simple.c (simple_get_relocated_section_contents): If the section
3797 does not have any relocs associated with it, just return the
3798 unadjusted contents.
3799
205cfeb0
HPN
38002002-11-07 Hans-Peter Nilsson <hp@axis.com>
3801
3802 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
3803 case R_CRIS_32_GOT>: Correct test for filling in constant .got
3804 contents, enabling for a non-DSO, for symbols defined in the
3805 program with --export-dynamic.
3806
87e226ce
AM
38072002-11-07 Alan Modra <amodra@bigpond.net.au>
3808
3809 * elf64-ppc.c: Comment typo fixes.
3810 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
3811
235c4794
NC
38122002-11-07 Nick Clifton <nickc@redhat.com>
3813
3814 * po/da.po: Updated Danish translation.
3815
49179469
AO
38162002-11-06 Alexandre Oliva <aoliva@redhat.com>
3817
3818 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
3819 exactly three internal relocs per external reloc. Set reloc_count
3820 to the external reloc count.
3821
246178f2
NC
38222002-11-06 Klee Dienes <kdienes@apple.com>
3823
3ae41454 3824 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
3825 Fix comment formatting.
3826
3af9a47b
NC
38272002-11-06 Klee Dienes <kdienes@apple.com>
3828
3ae41454 3829 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
3830 xsym.lo.
3831 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
3832 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
3833 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
3834 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
3835 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
3836 sym.
3ae41454 3837 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
3838 * Makefile.in: Regenerate.
3839 * doc/Makefile.in: Regenerate.
3ae41454 3840 * bfd-in2.h: Regenerate.
3af9a47b
NC
3841 * xsym.c: New file. Contains support for the Apple/Metrowerks
3842 xSYM debugging format.
3843 * xsym.h: New file.
3844 * pef.c: New file. Contains support for the Apple Code Fragment
3845 Manager Preferred Executable Format
3846 * pef.h: New file.
3847 * pef-traceback.h: New file. Contains support for parsing PowerPC
3848 traceback tables as used by PEF executables (and perhaps other
3849 systems as well).
3ae41454 3850 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
3851 format.
3852 * mach-o.h: New file.
3853 * mach-o-target.c: New file. Declares the mach-o targets
3854 themselves. Included three times by mach-o.c; each time with a
3855 different set of macros set.
3ae41454 3856
b6821651 38572002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
3858
3859 * Makefile.am: Remove entries for elf32-qnx.[ch].
3860 * Makefile.in: Regenerate.
3861 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
3862 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
3863 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3864 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
3865 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
3866 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
3867 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3868 * configure: Regenerate.
3869 * elf32-qnx.c: Remove.
3870 * elf32-qnx.h: Remove.
3871 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
3872 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
3873 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
3874 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
3875 * elf32-i386.c: Remove QNX extended bfd support.
3876 * elf32-ppc.c: Remove QNX extended bfd support.
3877 * elf32-sh.c: Remove QNX extended bfd support.
3878 * elfarm-nabi.c: Remove QNX extended bfd support.
3879 * targets.c: Remove qnx vectors.
3880 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
3881 (elf_backend_is_contained_by_filepos): Remove.
3882 (elf_backend_copy_private_bfd_data_p): Remove.
3883 * po/SRC-POTFILES.in: Regenerate.
3884
b6821651
AM
38852002-11-06 David O'Brien <obrien@FreeBSD.org>
3886 Alan Modra <amodra@bigpond.net.au>
3887
3888 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
3889 dynamic relocs against section symbols for the output section vma.
3890
38912002-11-05 Alan Modra <amodra@bigpond.net.au>
3892
3893 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
3894 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
3895
08f74004
AM
38962002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3897 Alan Modra <amodra@bigpond.net.au>
3898
3899 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
3900 vectors in target_selvecs.
3901 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
3902 in target_selvecs.
3903 (sh-*-netbsdelf*): Likewise.
3904 * configure.in (assocvecs): New variable. Handle assocvecs like
3905 selvecs.
3906 * configure: Regenerate.
3907 * format.c (bfd_check_format_matches): Store bfd_target pointers
3908 in matching_vector instead of target names. Select first target
3909 from bfd_associated_vector that matches a list of ambiguous targets.
3910 * targets.c (_bfd_associated_vector): New array.
3911 (bfd_associated_vector): New variable.
3912 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
3913 * libbfd-in.h (bfd_associated_vector): Declare.
3914 * libbfd.h: Regenerate.
3915
89117aab
AM
39162002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
3917
3918 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
3919 non-NULL before dereferencing.
3920
5e9aae3e
KK
39212002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3922
3923 * vms.c (vms_object_p): Restore the start address when returning
3924 NULL.
3925
c97e73dd
AM
39262002-11-04 Alan Modra <amodra@bigpond.net.au>
3927 Hans-Peter Nilsson <hp@axis.com>
3928
3929 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
3930 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
3931 Set up a larger symshndxbuf, and write it out. Free it on
3932 exit rather than freeing symbuf twice. Correct section index
3933 on output section symbol loop.
3934 (elf_link_output_sym): Accumulate symbol extension section
3935 indices, reallocating symshndxbuf rather than writing it out.
3936 (elf_link_flush_output_syms): Don't flush symshndxbuf.
3937 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
3938 Use bfd_zalloc to clear i_shdrp[0] too.
3939
3463048e
SC
39402002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
3941
3942 * elf32-sh64-com.c (sh64_address_in_cranges): Use
3943 _raw_size of cranges section if _cooked_size not yet set.
3944
63a23799
HPN
39452002-11-03 Hans-Peter Nilsson <hp@axis.com>
3946
3947 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
3948 for bfd_elf32_swap_symbol_out.
3949
e68cc12e
DB
39502002-10-31 David O'Brien <obrien@FreeBSD.org>
3951
3952 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
3953 signed and unsigned in comparison.
3954
db4b6d01
DJ
39552002-10-30 Daniel Jacobowitz <drow@mvista.com>
3956
3957 * coffcode.h: Remove extraneous '\'.
3958
840f0243
L
39592002-10-28 H.J. Lu <hjl@gnu.org>
3960
3961 * Makefile.am (targets.lo): Depend on Makefile instead of
3962 config.status.
3963 (archures.lo): Likewise.
3964 * Makefile.in: Regenerated.
3965
05a7e2db
JT
39662002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
3967
3968 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
3969 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
3970 targ_selvecs.
3971
a0087177
JW
39722002-10-25 Jim Wilson <wilson@redhat.com>
3973
3974 * elf64-sh64.c (sh_elf64_relocate_section): Call
3975 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
3976 of SHF_MERGE section.
3977
8718ac9c
HPN
39782002-10-25 Hans-Peter Nilsson <hp@axis.com>
3979
3980 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
3981
d45913a0
DA
39822002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
3983
3984 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
3985 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
3986 unsigned int.
3987 (NAME(aout,final_link)): Cast enum used in assignment.
3988 (aout_link_write_symbols): Cast enums in comparisons, int values to
3989 boolean, enums in assignments to int.
3990 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
3991 (aout_link_input_section_ext): Likewise. Cast enums used in
3992 comparisons with unsigned ints.
d45913a0
DA
3993 (aout_link_reloc_link_order): Cast enum to int in assignment.
3994 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
3995 calls to char *.
3996 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
3997 assignment.
3998 * bfd-in2.h (bfd_set_section_vma): Likewise.
3999 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4000 * binary.c (bfd_alloc): Cast enum to long.
4001 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4002 * dwarf2.c (read_abbrevs): Add casts to enum types.
4003 (read_attribute_value): Likewise.
4004 (arange_add): Cast result of bfd_zalloc call.
4005 (comp_unit_contains_address): Return true and false.
4006 (comp_unit_find_nearest_line): Cast return to boolean.
4007 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4008 * gen-aout.c: define macro '_' if not defined.
4009 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4010 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4011 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4012 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4013 (bfd_generic_is_local_label_name): Cast return to boolean.
4014 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4015 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4016 struct bfd_hash_entry *.
4017 (_bfd_generic_link_hash_newfunc): likewise.
4018 (_bfd_generic_final_link): Cast enum to unsigned int.
4019 * merge.c (sec_merge_emit): Cast return to boolean.
4020 (merge_strings): Add casts to const unsigned char *.
4021 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4022 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
4023 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4024 to struct bfd_hash_entry *.
d45913a0
DA
4025 (bfd_set_section_content): Add cast to PTR in comparison.
4026 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4027 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4028 simple_dummy_unattached_reloc,
4029 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4030 function definitions.
4031 * srec.c (S3Forced): Initialize to false.
4032 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4033 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4034 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4035 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4036 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4037 comparisons.
4038
475c2a7e
JJ
40392002-10-23 Jakub Jelinek <jakub@redhat.com>
4040
4041 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4042 relocs into shared lib non-allocated reloc sections.
4043
e82ce529
AM
40442002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4045
4046 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4047 sorted even when given an out-of-order line sequence.
4048 (lookup_address_in_line_info_table): When an exact VMA match is
4049 not found, return line information with the closest VMA.
4050
f2482cb2
NC
40512002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4052
4053 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4054 HPUX 11.00 patch PHSS_26559.
4055
c1fd6598
AO
40562002-10-22 Alexandre Oliva <aoliva@redhat.com>
4057
4058 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4059 the options section into a separate section unless IRIX 6
4060 compatibility is enabled.
4061
033fd5f9
AO
40622002-10-22 Alexandre Oliva <aoliva@redhat.com>
4063
4064 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4065 into arrays.
4066 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4067 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4068 into account.
4069 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4070 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4071
ef485c01
AM
40722002-10-21 Graeme Peterson <gp@qnx.com>
4073
4074 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4075
b50afec9
AM
40762002-10-21 Alan Modra <amodra@bigpond.net.au>
4077
4078 * targets.c (bfd_target_list): Don't return the default target twice.
4079
5fe39cae
AM
40802002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4081
4082 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4083 perror with bfd_perror.
4084
5d603aa9
L
40852002-10-19 H.J. Lu <hjl@gnu.org>
4086
4087 * elflink.h (elf_link_add_object_symbols): Correctly handle
4088 DT_RPATH and DT_RUNPATH.
4089
e377ab71
MK
40902002-10-19 Mark Kettenis <kettenis@gnu.org>
4091
4092 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4093
0d09fec6
DC
40942002-10-17 Denis Chertykov <denisc@overta.ru>
4095
4096 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4097 for ip2k port.
4098
acf8aed4
AM
40992002-10-17 Alan Modra <amodra@bigpond.net.au>
4100
4101 * elfxx-target.h (USE_REL): Don't define as 1.
4102 * elf32-arm.h (USE_REL): Provide a default define of 0.
4103 Use #if rather than #ifdef when testing USE_REL.
4104 * elf32-m32r.c: Likewise.
4105
4106 * elf32-arc.c (USE_REL): Define as 1.
4107 * elf32-d10v.c (USE_REL): Likewise.
4108 * elf32-m32r.c (USE_REL): Likewise.
4109 * elf32-m68hc11.c (USE_REL): Likewise.
4110 * elf32-m68hc12.c (USE_REL): Likewise.
4111 * elf32-or32.c (USE_REL): Likewise.
4112 * elfarm-nabi.c (USE_REL): Likewise.
4113
f52d1d64
JJ
41142002-10-16 Jakub Jelinek <jakub@redhat.com>
4115
4116 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4117 (s390x-*-linux*): Add targ_selvecs.
4118
2bc3c89a
AM
41192002-10-16 Alan Modra <amodra@bigpond.net.au>
4120
4121 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 4122 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
4123 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4124 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4125 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4126 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4127 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4128 (SOURCE_HFILES): Add elf32-qnx.h.
4129 (BUILD_HFILES): Add bfdver.h.
4130 Run "make dep-am".
4131 * Makefile.in: Regenerate.
4132 * configure.in Update bfd vector dependencies.
4133 * configure: Regenerate.
4134 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4135 * elf32-i386qnx.c: Likewise.
4136 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4137 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4138 * elf32-sh-lin.c: Likewise.
4139 * elf32-shqnx.c: Likewise.
4140 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4141 * elf32-sh64-nbsd.c: Likewise.
4142 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4143 * elf64-sh64-nbsd.c: Likewise.
4144 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4145 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4146 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4147 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4148 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4149 (elf_backend_is_contained_by_filepos): Likewise.
4150 (elf_backend_copy_private_bfd_data_p): Likewise.
4151 Globalize and move functions to..
4152 * elf32-qnx.c: ..here. New file.
4153 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4154 emit target vectors when INCLUDE_SHMEDIA.
4155 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4156 end of file.
4157 * elf64-sh64.c: Remove ELF_ARCH test.
4158 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4159 * po/BLD-POTFILES.in: Regenerate.
4160 * po/SRC-POTFILES.in: Regenerate.
4161
90c9df85
AM
41622002-10-16 Alan Modra <amodra@bigpond.net.au>
4163
366f2964
AM
4164 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4165 loaded with --just-symbols.
4166
90c9df85
AM
4167 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4168 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4169 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4170 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4171
2238051f
RH
41722002-10-15 Richard Henderson <rth@redhat.com>
4173
4174 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4175 (BFD64_BACKENDS_CFILES): Likewise.
4176 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4177 * elf64-alpha-fbsd.c: Remove file, move code ...
4178 * elf64-alpha.c: ... here.
4179 * Makefile.in, configure: Rebuild.
4180
64e04ecd
RH
41812002-10-14 Richard Henderson <rth@redhat.com>
4182
4183 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4184 VALUE, not ADDEND.
4185
396a6083
SC
41862002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4187
4188 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4189 datalabel_got_offset with union of datalabel_got
4190 offset and refcount.
4191 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4192 (allocate_dynrelocs): Delete unnecessary code for
4193 STT_DATALABEL type. Create entry in got for
4194 datalabel version of symbol if datalabel_got.refcount > 0.
4195 (sh_elf_relocate_section): Use datalabel_got union.
4196 (sh_elf_gc_sweep_hook): Pull common code to initialize
4197 h and eh out of switch statement. Declare seen_stt_datalabel.
4198 Initialize it. Decrement datalabel_got.refcount for
4199 got relocs when seen_stt_datalabel is true.
4200 Decrement local_got_refcounts entry for datalabel got relocs
4201 of local symbols.
4202 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4203 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4204 Initialize it. When seen_stt_datalabel is true, increment
4205 datalabel_got refcount rather than got.refcount.
4206 (sh_elf_finish_dynamic_symbol): Create relocs to
4207 initialize got entry for datalabel version of symbol.
4208
6a0735ef
AM
42092002-10-14 Alan Modra <amodra@bigpond.net.au>
4210
4211 * Makefile.am: Run "make dep-am".
4212 (BFD_H_FILES): Remove version.h.
4213 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4214 * version.h: ..to here.
4215 * configure.in (bfd_version_date): Remove.
4216 (AC_OUTPUT): Make bfdver.h from version.h.
4217 * bfd.c: #include "bfdver.h".
4218 * vms-hdr.c: Likewise.
4219 * Makefile.in: Regenerate.
4220 * bfd-in2.h: Regenerate.
4221 * configure: Regenerate.
4222 * po/SRC-POTFILES.in: Regenerate.
4223
686e4055
AM
42242002-10-14 Alan Modra <amodra@bigpond.net.au>
4225
4226 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4227 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4228 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4229 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4230 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4231 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4232 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4233 bfd_mach_ip2022, bfd_mach_ip2022ext,
4234 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4235 * bfd-in2.h: Regenerate.
4236
019dca2b
KK
42372002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4238
4239 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4240 endian vector to targ_selvecs.
4241
bce03d3d
AO
42422002-10-13 Alexandre Oliva <aoliva@redhat.com>
4243
4244 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4245 save_addend argument. Don't apply the 32-bit mask to a
4246 GPREL32 value if it's to be used in another relocation. Don't
4247 use forced-check computation of local_p to decide whether to
4248 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4249 of the addend of a non-in-place GPREL16 relocation.
4250 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4251 mips_elf_calculate_relocation().
4252
9b691193
SC
42532002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4254
4255 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4256 with symbols in other sections if we relaxed something; the sections
4257 output offsets must be re-computed before.
4258
1f4c5b47
SC
42592002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4260
4261 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4262 handling to use Elf_Internal_Sym.
4263 (m68hc11_elf_relax_delete_bytes): Likewise.
4264
5dc97655
KK
42652002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4266
4267 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4268 sh_elf_object_p, dtpoff_base): New functions.
4269 (sh_elf_howto_table): Add TLS relocs.
4270 (sh_reloc_map): Likewise.
4271 (sh_elf_info_to_howto): Support TLS relocs.
4272 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4273 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4274 New macros.
4275 (sh_elf_obj_tdata): New.
4276 (elf_sh_link_hash_table): Add tls_ldm_got.
4277 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4278 (allocate_dynrelocs): Support TLS relocs.
4279 (sh_elf_size_dynamic_sections): Likewise.
4280 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4281 .rela.got section when found already. Return false after printing
4282 error about unresolvable relocation.
4283 (sh_elf_gc_sweep_hook): Support TLS relocs.
4284 (sh_elf_check_relocs): Likewise.
4285 (sh_elf_finish_dynamic_symbol): Likewise.
4286 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4287 * reloc.c: Add SH TLS relocs.
4288 * bfd-in2.h, libbfd.h: Regenerate.
4289
6a0735ef
AM
42902002-10-11 Daniel Jacobowitz <drow@mvista.com>
4291
4292 * Makefile.in: Regenerated.
4293
af39267e
DJ
42942002-10-11 Daniel Jacobowitz <drow@mvista.com>
4295
4296 * Makefile.am: Run dep-am.
6a0735ef 4297 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
4298 (BFD32_LIBS): Add simple.lo.
4299 (BFD32_LIBS_CFILES): Add simple.c.
4300 * Makefile.in: Regenerated.
4301 * bfd-in2.h: Regenerated.
4302 * simple.c: New file.
4303
0be617ce
AM
43042002-10-11 Alan Modra <amodra@bigpond.net.au>
4305
14a793b2
AM
4306 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4307 (record_thumb_to_arm_glue): Likewise.
4308 * ecoff.c (ecoff_link_add_externals): Likewise.
4309 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4310 (record_thumb_to_arm_glue): Likewise.
4311 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4312 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4313 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4314 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4315 * elf64-ppc.c (func_desc_adjust): Likewise.
4316 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4317 (sh64_elf64_create_dynamic_sections): Likewise.
4318 * elflink.c (_bfd_elf_create_got_section): Likewise.
4319 (_bfd_elf_create_dynamic_sections): Likewise.
4320 (_bfd_elf_create_linker_section): Likewise.
4321 * elflink.h (elf_add_default_symbol): Likewise.
4322 (elf_link_create_dynamic_sections): Likewise.
4323 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4324 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4325 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4326 (_bfd_mips_elf_add_symbol_hook): Likewise.
4327 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4328 * linker.c (generic_link_add_symbol_list): Likewise.
4329 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4330
4331 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4332
0be617ce 4333 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 4334 completely removed. Correct local sym adjustment.
0be617ce 4335
0a4ef3f4
SC
43362002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4337
4338 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4339 Correct mistake in calculation of address of .got.
4340 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4341 elf_sh64_pic_plt_entry_le): Likewise.
4342
efacd36e
SC
43432002-10-09 Richard Shann <richard.shann@superh.com>
4344 Stephen Clarke <stephen.clarke@superh.com>
4345
4346 * Makefile.am: Add entries for elf32-sh64-lin.c and
4347 elf64-sh64-lin.c. Regenerate.
4348 * Makefile.in: Regenerate.
9b5ecbd0 4349 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
4350 to use sh64 vectors rather than sh vectors.
4351 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4352 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4353 * configure: Regenerate.
4354 * elf32-sh64-lin.c: New file.
4355 * elf64-sh64-lin.c: New file.
4356 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
4357 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4358
299bf759
L
43592002-10-08 H.J. Lu <hjl@gnu.org>
4360
4361 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4362 IE->LE transition for R_386_TLS_IE.
4363
51020317
AM
43642002-10-08 Alan Modra <amodra@bigpond.net.au>
4365
4366 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4367
a8fcf378
NC
43682002-10-07 Mark Elbrecht <snowball3@softhome.net>
4369
51020317
AM
4370 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4371 sections.
a8fcf378 4372
a16d5acb
AM
43732002-10-07 Alan Modra <amodra@bigpond.net.au>
4374
a6b511bd
AM
4375 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4376 code.
4377
a16d5acb
AM
4378 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4379
7c4a37eb
AM
43802002-10-06 Alan Modra <amodra@bigpond.net.au>
4381
4382 * opncls.c: Formatting.
4383 (_bfd_new_bfd): Use a smaller section hash table.
4384
7c4ca42d
AO
43852002-10-05 Alexandre Oliva <aoliva@redhat.com>
4386
4387 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4388 of the other two relocations packed with a REL32 to NONE.
4389
4989d792
SC
43902002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4391
4392 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4393 (sh_elf_link_hash_newfunc): Initialize it.
4394 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4395 to got.refcount for symbols that are forced local or when
4396 we have direct got refs.
4397 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4398 to correctly adjust got.refcount and plt.refcount.
4399 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4400 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 4401
7c445aa3
JJ
44022002-10-01 Jakub Jelinek <jakub@redhat.com>
4403
4404 * elf32-i386.c (elf_i386_relocate_section): Fix
4405 movl foo@indntpoff, %eax IE->LE transition.
4406
abcf1d52
JJ
44072002-10-01 Jakub Jelinek <jakub@redhat.com>
4408
4409 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4410 sequence and its transitions.
4411
a45bb67d
JJ
44122002-10-01 Jakub Jelinek <jakub@redhat.com>
4413
4414 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4415 to st_value + addend in non-code sections.
4416 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4417 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4418
00707a0e 44192002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
4420 Ken Raeburn <raeburn@cygnus.com>
4421 Aldy Hernandez <aldyh@redhat.com>
4422 Eric Christopher <echristo@redhat.com>
4423 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
4424
4425 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4426 (bfd_mach_mips5500): New.
4427 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4428 (arch_info_struct): Add corresponding entries here.
4429 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4430 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4431 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4432 bfd_mach_mips5400 and bfd_mach_mips5500.
4433 (_bfd_mips_elf_mach_extends_p): New function.
4434 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4435 the EF_MIPS_MACH flags.
4436 * bfd-in2.h: Regenerate.
4437
624f0b25
JT
44382002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4439
4440 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4441 .got sections.
4442
b89fe0ee
AM
44432002-09-28 Alan Modra <amodra@bigpond.net.au>
4444
4445 * elf.c (map_sections_to_segments): Correct test for start of
4446 writable section in the same page as end of read-only section.
4447
b29635ba
JT
44482002-09-27 Matt Thomas <matt@3am-software.com>
4449
4450 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4451 local_got_refcounts usage. Remove allocation of got slot.
4452 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4453 Remove de-allocation of got slot.
4454 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4455 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4456 sections to be GC'ed.
4457 (elf_vax_instantiate_got_entries): New function.
4458 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4459 tests that are now handled by elf_vax_instantiate_got_entries.
4460 Assert GOT entry falls within .got section size. Remove redundant
4461 comparisions. Fix comments.
4462
bffbf940
JJ
44632002-09-27 Jakub Jelinek <jakub@redhat.com>
4464
4465 * reloc.c: Add x86-64 TLS relocs.
4466 * bfd-in2.h, libbfd.h: Rebuilt.
4467 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4468 relocs. Add TLS relocs.
4469 (x86_64_reloc_map): Add TLS relocs.
4470 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4471 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4472 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4473 (elf64_x86_64_hash_entry): Define.
4474 (struct elf64_x86_64_obj_tdata): New.
4475 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4476 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4477 (link_hash_newfunc): Initialize tls_type.
4478 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4479 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4480 (elf64_x86_64_mkobject): New.
4481 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4482 (elf64_x86_64_tls_transition): New.
4483 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4484 Handle TLS relocs.
4485 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4486 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4487 (elf64_x86_64_size_dynamic_sections): Likewise.
4488 (dtpoff_base, tpoff): New.
4489 (elf64_x86_64_relocate_section): Handle TLS relocs.
4490 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4491 entries.
4492 (bfd_elf64_mkobject): Define.
4493
4494 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4495 DF_STATIC_TLS if shared.
4496
14366460
TS
44972002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4498
4499 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4500 empty relocation sections.
4501
9f951329
AM
45022002-09-26 Alan Modra <amodra@bigpond.net.au>
4503
4504 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4505 (ppc64_elf_build_stubs): Build them here instead.
4506
6b3ac709
JJ
45072002-09-24 Jakub Jelinek <jakub@redhat.com>
4508
4509 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4510 addend into r_addend, not *r_offset.
4511 (elf32_sparc_finish_dynamic_symbol): Likewise.
4512 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4513 R_SPARC_RELATIVE's r_offset.
4514
e2f6d277
NC
45152002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4516
4517 * dwarf2.c (decode_line_info): Update to correctly decode
4518 the (non-standard DWARF2) out-of-order address sequences
4519 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4520
f3961b2b
DD
45212002-09-23 Mark Elbrecht <snowball3@softhome.net>
4522
4523 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4524
ad34bc37
AM
45252002-09-23 Alan Modra <amodra@bigpond.net.au>
4526
4527 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4528 for discarded FDEs. Remove redundant assignment.
4529 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4530
82988bff
L
45312002-09-22 H.J. Lu <hjl@gnu.org>
4532
4533 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4534 the relocation count between different .reloc sections.
4535
5ad8645c
AM
45362002-09-21 Alan Modra <amodra@bigpond.net.au>
4537
5f819128
AM
4538 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4539 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4540 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4541 R_PPC_EMB_RELSDA.
4542
5ad8645c
AM
4543 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4544 unsigned. Move "symcount" assignment out of loop.
4545 * Makefile.am: Run "make dep-am".
4546 * Makefile.in: Regenerate.
4547 * configure: Regenerate.
4548 * po/SRC-POTFILES.in: Regnerate.
4549
75936555
NC
45502002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4551
4552 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4553 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4554 (e.g. IRIX64).
4555
2243deae
L
45562002-09-19 Jakub Jelinek <jakub@redhat.com>
4557
4558 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4559 even if generating R_PPC_RELATIVE reloc.
4560 (ppc_elf_relocate_section): Make sure relocation is performed
4561 if skip == -2. Clear memory at r_offset when creating dynamic
4562 relocation.
4563
37e55690
JJ
45642002-09-19 Jakub Jelinek <jakub@redhat.com>
4565
4566 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
4567 BFD_RELOC_386_TLS_GOTIE): Add.
4568 * bfd-in2.h, libbfd.h: Rebuilt.
4569 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
4570 and R_386_TLS_GOTIE.
4571 (elf_i386_reloc_type_lookup): Handle it.
4572 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
4573 char instead of enum, change GOT_* into defines.
4574 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
4575 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4576 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
4577 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
4578 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
4579 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4580 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4581 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4582 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
4583 tls_type is GOT_TLS_IE_BOTH.
4584 (elf_i386_size_dynamic_sections): Likewise.
4585 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
4586 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
4587 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
4588 all 4 GOT_TLS_* TLS types.
4589
8e67855b
NC
45902002-09-19 Nick Clifton <nickc@redhat.com>
4591
4592 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
4593 follow indirect links.
4594
1c59ba3f
NC
45952002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4596
4597 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
4598 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
4599 on 64 bit machines.
4600 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
4601 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
4602 ECOFF information: 'ioptMax' refers to the actual *size*
4603 of the optimization symtab, not the number of entries.
1c59ba3f 4604
9d7404b7
NC
46052002-09-19 Daniel Jacobowitz <drow@mvista.com>
4606
4607 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
4608 ELF_LINK_HASH_NEEDS_PLT logic.
4609
05a487dc
DJ
46102002-09-18 Daniel Jacobowitz <drow@mvista.com>
4611
4612 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4613 correct relocation count.
4614
1f70368c
DJ
46152002-09-17 Daniel Jacobowitz <drow@mvista.com>
4616
4617 * bfd-in.h (bfd_get_dynamic_symcount): Define.
4618 * bfd.c (struct _bfd): Add dynsymcount.
4619 * bfd-in2.h: Regenerated.
4620 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
4621 abfd->dynsymcount.
4622 * elfcode.h (elf_slurp_reloc_table_from_section): Check
4623 for overflow.
4624
51020317 46252002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
4626
4627 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
4628 (mips_elf64_final_gp): Don't make up gp value.
4629 * elfn32-mips.c (mips_elf_final_gp): Likewise.
4630 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
4631 .MIPS.options/.options section.
4632
290062cc
DB
46332002-09-17 David O'Brien <obrien@FreeBSD.org>
4634
4635 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
4636 It is benign for FreeBSD < 4.1. Minor reformatting.
4637 * elf64-alpha-fbsd.c: Likewise.
4638
c5c1f40c
JJ
46392002-09-17 Jakub Jelinek <jakub@redhat.com>
4640
ca1eb0ba
JJ
4641 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
4642 addend.
c5c1f40c 4643
562ace6b
AM
46442002-09-17 Alan Modra <amodra@bigpond.net.au>
4645
4646 * elf64-alpha.c (alpha_elf_size_info): Make static.
4647
5af6ead6
AM
46482002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
4649
4650 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
4651 * cpu-tic4x.c: Ditto.
4652
cb9512fc
TS
46532002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4654
4655 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
4656 duplicate define.
4657
4ada7262
DB
46582002-09-16 Bruno Haible <bruno@clisp.org>
4659
4660 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
4661 by a target variant implementation.
4662 * elf64-alpha.c: Likewise.
4663 * elf32-i386-fbsd.c: New file.
4664 * elf64-alpha-fbsd.c: New file.
4665 * targets.c: Support bfd_elf32_i386_freebsd_vec and
4666 bfd_elf64_alpha_freebsd_vec.
4667 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
4668 bfd_elf64_alpha_freebsd_vec.
4669 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
4670 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
4671 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
4672 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
4673 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
4674 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
4675 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
4676
6a30718d
JJ
46772002-09-12 Jakub Jelinek <jakub@redhat.com>
4678
4679 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
4680 NULL.
4681 (elf_i386_relocate_section): Return false after printing error about
4682 unresolvable relocation.
4683
6cf9e9fe
NC
46842002-09-12 Nick Clifton <nickc@redhat.com>
4685
4686 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
4687 R_ARM_THM_PC11.
4688
10f469bf
DJ
46892002-09-11 Jeffrey Law <law@redhat.com>
4690
4691 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
4692
dc43ada5
NC
46932002-09-11 Andrew Haley <aph@cambridge.redhat.com>
4694
4695 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
4696 line_ptr before deciding we've found a symbol.
4697
e09f4395
NC
46982002-09-11 Nick Clifton <nickc@redhat.com>
4699
4700 * po/da.po: New Danish translation file.
4701 * configure.in (LINGUAS): Add 'da'.
4702 * configure: Regenerate.
4703
b3018b5f
NC
47042002-09-10 Michael Snyder <msnyder@redhat.com>
4705
4706 * irix-core.c (do_sections, do_sections64): New functions.
51020317 4707 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
4708 do_sections64, depending on corefile (32-bit or 64-bit).
4709
2f21f25e
RH
47102002-09-09 Richard Henderson <rth@redhat.com>
4711
4712 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
4713 and PCREL21F like PCREL21B.
4714
28b94e7c
KB
47152002-09-04 Kevin Buettner <kevinb@redhat.com>
4716
51020317
AM
4717 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
4718 vector.
28b94e7c 4719
5cec6941
NC
47202002-09-02 Nick Clifton <nickc@redhat.com>
4721
4722 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
4723 names instead of cryptically overloaded bfd_reloc error
4724 codes.
4725 (v850_elf_relocate_section): Likewise.
4726 (v850_elf_relax_section): Replace caching of external symbols
4727 with caching of internal symbols obtained from calling
4728 bfd_elf_get_elf_syms().
51020317 4729 Fixup problems with freeing cached allocated memory blocks.
5cec6941 4730
3b77b1d5
AM
47312002-09-02 Alan Modra <amodra@bigpond.net.au>
4732
638524b5
AM
4733 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
4734 (bfd_pj_arch): Use bfd_default_scan.
4735 * cpu-v850.c (scan): Remove.
4736 (N): Use bfd_default_scan.
4737 * cpu-z8k.c (scan_mach): Remove.
4738 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
4739 first. Use bfd_default_scan.
4740
250d94fd
AM
4741 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
4742 bfd_mach constants.
4743 (ecoff_get_magic): Likewise.
4744 * elf32-v850.c (v850_elf_object_p): Likewise.
4745 (v850_elf_final_write_processing): Likewise.
4746 * mipsbsd.c (MY(set_arch_mach)): Likewise.
4747 (MY(write_object_contents)): Likewise.
4748 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
4749 * coffcode.h (coff_write_object_contents): Likewise.
4750 (coff_set_arch_mach_hook): Add comment describing machine == 0.
4751 Remove unnecessary "machine" assignments.
4752 (coff_write_relocs): Test for the absolute section sym by testing
4753 section and flags.
4754
3b77b1d5
AM
4755 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
4756 and bfd_mach_i386_i386_intel_syntax.
250d94fd 4757 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 4758
e5b45b83
DA
47592002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
4760
4761 * bfd-in.h (align_power): Cast constants to bfd_vma type.
4762 * bfd-in2.h (align_power): Likewise.
4763
37f45cf8
AM
47642002-08-30 Alan Modra <amodra@bigpond.net.au>
4765
4766 * Makefile.am: Run "make dep-am".
4767 * Makefile.in: Regenerate.
4768
4769 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
4770 * cpu-powerpc.c (powerpc_compatible): Likewise.
4771 * cpu-rs6000.c (rs6000_compatible): Likewise.
4772
86aba9db
NC
47732002-08-28 Catherine Moore <clm@redhat.com>
4774
9b5ecbd0 4775 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
4776 (v850-elf-reloc): Don't resolve pc relative relocs.
4777 (v850_elf_ignore_reloc): New routine.
4778 (v850_elf_final_link_relocate): Handle new relocs.
4779 (v850_elf_relax_delete_bytes ): New routine.
4780 (v850_elf_relax_section): New routine.
4781 (bfd_elf32_bfd_relax_section): Define.
4782 (HOWTO): New entries for new relocs.
4783 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
4784 (BFD_RELOC_V850_LONGJUMP): New reloc.
4785 (BFD_RELOC_V850_ALIGN): New reloc.
4786 * archures.c: Remove redundant v850ea architecture.
4787 * cpu-v850.c: Remove redundant v850ea support.
4788 * libbfd.h: Regenerate.
4789 * bfd-in2.h: Regenerated.
4790
026df7c5
NC
47912002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
4792
4793 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
4794 * configure.in: Add tic4x_coff vector files.
4795 * configure: Regenerate.
4796 * Makefile.am: Add tic4x target.
4797 * Makefile.in: Regenerate.
4798
47992002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4800
4801 * archures.c: Add the BFD arch type tic4x.
4802 * bfd-in.h: Add BFD_IN_MEMORY flag.
4803 * coff-tic4x.c: New file.
4804 * coffswap.h (coff_swap_sym_out): Add preadjuster.
4805 * cpu-tic4x.c: New file.
4806 * targets.c: Added tic4x- in list of xvecs.
4807 * ticoff.h: New file.
4808 * bfd-in2.h: Regenerate.
4809
88f7bcd5
NC
48102002-08-27 Adam Nemet <anemet@lnxw.com>
4811
4812 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
4813 bit of DT_INIT and DT_FINI for Thumb functions.
4814
c8e48751
AM
48152002-08-26 Alan Modra <amodra@bigpond.net.au>
4816
4817 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
4818
2846975a
AM
48192002-08-26 Alan Modra <amodra@bigpond.net.au>
4820
4821 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
4822
067653c5
AM
48232002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4824
4825 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
4826 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
4827 Likewise.
4828 (struct elf_sh_pcrel_relocs_copied): Removed.
4829 (struct elf_sh_dyn_relocs): New.
4830 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
4831 field with dyn_relocs.
4832 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
4833 sections and sym_sec.
4834 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
4835 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
4836 (sh_elf_create_dynamic_sections): Use create_got_section instead
4837 of _bfd_elf_create_got_section.
4838 (sh_elf_check_relocs): Likewise.
4839 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
4840 sections.
4841 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
4842 sh_elf_relocate_section, sh_elf_check_relocs,
4843 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
4844 Likewise.
4845 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
4846 dynamic relocations and avoiding the copy relocation when we
4847 didn't find any dynamic relocations in the section which has
4848 contents or is read-only.
4849 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4850 (sh_elf_size_dynamic_sections): Don't reset the size of
4851 .rela.got section even if dynamic_sections_created flag is off.
4852 Don't use sh_elf_discard_copies. Scan all input bfd and use
4853 allocate_dynrelocs. Call readonly_dynrelocs to determine
4854 whether we need DT_TEXTREL.
4855 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
4856 whether the symbol was never referred to.
4857 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
4858 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
4859 (sh_elf_check_relocs): Call create_got_section if the short-cut
4860 to .got is null. Increment reference counters only instead of
4861 allocating space on dynamic sections here. Don't conditionalize
4862 uninitialized got.offset value when marking the symbol as a
4863 global offset table entry. Keep relocations for symbols satisfied
4864 by a dynamic library to avoid copy relocations for the symbol.
4865 Set dynobj field of an elf hash table if needed.
4866 (sh_elf_finish_dynamic_sections): Handle null section pointer
4867 correctly.
4868 (elf_backend_copy_indirect_symbol): Defined.
4869 (elf_backend_can_refcount): Defined.
4870
7e326afc
NC
48712002-08-23 Nick Clifton <nickc@redhat.com>
4872
4873 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
4874 previous change. Add comment explaining why.
4875
c8614e8e
AM
48762002-08-23 Stephen Clarke <stephen.clarke@superh.com>
4877
4878 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
4879 contents of .got.plt[2] to tr0, not address of .got.plt.
4880 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
4881 patching absolute plt entry. For shmedia plt entry, set bottom bit
4882 of branch to plt0 as this is a branch to an shmedia instruction.
4883 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
4884 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
4885 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
4886 branch to plt0.
4887 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
4888 patching absolute plt entry. For shmedia plt entry, branch to
4889 plt0 is now ptrel, so use relative offset. Set bottom bit of
4890 branch target as it is a branch to an shmedia instruction.
4891
3b587c71
AM
48922002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
4893 Richard Shann <richard.shann@superh.com>
4894
4895 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
4896 value if .init is an SHmedia function. Similarly for DT_FINI.
4897 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 4898
957dcaa8
AM
48992002-08-23 Stephen Clarke <stephen.clarke@superh.com>
4900
3b587c71 4901 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 4902 dynamic section.
3b587c71 4903 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 4904
a4263c47
NC
49052002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4906
4907 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 4908 byte read when reading the return address register column.
a4263c47 4909
db4ed121
NC
49102002-08-22 Nick Clifton <nickc@redhat.com>
4911
4912 * config.bfd: Add powepc64-*-*bsd* target.
4913
ed71e111
NC
49142002-08-22 Graeme Peterson <gp@qnx.com>
4915
4916 * Makefile.am: Add entries for elf32-shqnx.c
4917 * Makefile.in: Regenerate.
4918 * config.bfd: Add support sh-*-nto* target.
4919 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
4920 * configure: Regenerate.
4921 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
4922 * elf32-sh.c: Do not include elf32-target.h if
4923 ELF32_SH_C_INCLUDED is defined.
4924 * elf32-shqnx.c: New file: Support for QNX.
4925 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
4926
0ab72ee2
NC
49272002-08-22 Nick Clifton <nickc@redhat.com>
4928
75c83283
NC
4929 * po/tr.po: Updated Turkish translation.
4930
0ab72ee2
NC
4931 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
4932 symbols are not read.
4933
56780f18
AM
49342002-08-22 Alan Modra <amodra@bigpond.net.au>
4935
4936 * elf32-m68hc11.c: Formatting fixes.
4937 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
4938 * elf32-m68hc12.c: Formatting fixes.
4939 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
4940
b48fa14c
AM
49412002-08-22 Alan Modra <amodra@bigpond.net.au>
4942
a7c71b0c
AM
4943 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
4944 SEC_DATA.
4945 (pmac_xcoff_vec): Likewise.
4946 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4947 (aix5coff64_vec): Likewise.
4948
56780f18
AM
49492002-08-22 Alan Modra <amodra@bigpond.net.au>
4950
b48fa14c
AM
4951 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
4952 param to elf_backend_copy_indirect_symbol.
4953 (_bfd_elf_link_hash_copy_indirect): Likewise.
4954 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
4955 calls to copy_indirect_symbol.
4956 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
4957 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
4958 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4959 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
4960 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4961 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
4962 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
4963 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4964 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4965 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
4966 test refcounts for "used" values.
4967
8c2ab17d
AM
49682002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
4969
4970 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
4971 argument declaration.
4972
d62b1198 49732002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
4974
4975 * archures.c (bfd_mach_ppc_e500): Added.
4976 * bfd-in2.h: Rebuilt.
d62b1198
EZ
4977 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
4978
9f88ba09
AM
49792002-08-19 Alan Modra <amodra@bigpond.net.au>
4980
4981 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
4982
df622259
AC
49832002-08-17 Andrew Cagney <ac131313@redhat.com>
4984
4985 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 4986 `bfd_byte'.
df622259 4987
44c410de
SC
49882002-08-17 Stan Cox <scox@redhat.com>
4989
4990 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
4991 IRIX 6 segment layout for NEWABI.
4992
4972a8e9
SC
49932002-08-16 Stephen Clarke <stephen.clarke@superh.com>
4994
1049f94e 4995 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 4996 symbols when looking for section referred to by a relocation.
1049f94e 4997 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 4998
c5cd6d62
AM
49992002-08-15 Alan Modra <amodra@bigpond.net.au>
5000
5001 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5002
0741c7be
HPN
50032002-08-15 Hans-Peter Nilsson <hp@axis.com>
5004
5005 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5006 missing check for whether the symbol is referenced by DSO before
5007 unexporting it as an unneeded dynamic symbol.
5008
e8d5d179
L
50092002-08-14 H.J. Lu <hjl@gnu.org>
5010
5011 * libbfd.h: Regenerate.
5012
e9229007
L
50132002-08-14 H.J. Lu <hjl@gnu.org>
5014
5015 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5016
1fd03b5a
SC
50172002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5018
5019 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5020 instructions.
5021 (m68hc11_direct_relax): New to define table of relaxable instructions.
5022 (find_relaxable_insn): New, find a relaxable insn.
5023 (compare_reloc): New to compare two relocs.
5024 (m68hc11_elf_relax_section): New, relax text sections.
5025 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5026 (elf32_m68hc11_check_relocs): New function for GC support.
5027 (elf32_m68hc11_relocate_section): New function for GC support.
5028 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5029 (elf_backend_check_relocs): Likewise.
5030 (elf_backend_relocate_section): Likewise.
5031
c828c771
L
50322002-08-13 H.J. Lu <hjl@gnu.org>
5033
5034 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5035 definitions in shared objects when checking symbol with
5036 undefined version.
5037
9b701e44
SC
50382002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5039
5040 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5041 (elf32_m68hc11_gc_sweep_hook): Likewise.
5042 (elf_backend_gc_mark_hook): Define for GC section support.
5043 (elf_backend_gc_sweep_hook): Likewise.
5044 (elf_backend_can_gc_sections): Likewise.
5045
5046 * elf32-m68hc12.c: Likewise.
5047
96405e3c
SC
50482002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5049
5050 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5051 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5052 (_bfd_m68hc11_elf_set_private_flags): New function.
5053 Use them to set/check/print ELF flags specific to 68HC11.
5054
5055 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5056 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5057 (_bfd_m68hc12_elf_set_private_flags): New function.
5058 Use them to set/check/print ELF flags specific to 68HC12.
5059
dae78fb0
SC
50602002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5061
5062 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5063 fix masks for PC-rel relocs.
5064 (m68hc11_elf_ignore_reloc): New function.
5065
5066 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5067 68HC12 banked addressing relocs.
5068 (m68hc12_phys_addr): New to compute physical address of banked memory.
5069 (m68hc12_phys_page): Likewise for page.
5070 (m68hc12_addr_is_banked): New to see if address is in banked area.
5071 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5072
3dbfec86
SC
50732002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5074
5075 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5076 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5077 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5078 * bfd-in2.h: Regenerate.
5079
871da94f
L
50802002-08-12 H.J. Lu <hjl@gnu.org>
5081
5082 * elflink.h (elf_add_default_symbol): Preserve section across
5083 elf_merge_symbol.
5084
59bc061d
NC
50852002-08-09 Graeme Peterson <gp@qnx.com>
5086
51020317 5087 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
5088 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5089 * Makefile.in: Regenerate.
5090 * config.bfd: Add support for powerpc{le}-*-nto targets.
5091 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5092 * configure: Regenerate.
5093 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5094 common file "elf32-qnx.h", and now include that file.
5095 * elf32-qnx.h: New file: QNX specific common elf backend.
5096 * elf32-ppc.c: Do not include elf32-target.h if
5097 ELF32_PPC_C_INCLUDED is defined.
5098 * elf32-ppcqnx.c: New file: Support for QNX.
5099 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5100 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5101
2b692c59
NC
51022002-08-09 Nick Clifton <nickc@redhat.com>
5103
5104 * po/sv.po: Updated Swedish translation.
5105
d0c7ff07
TS
51062002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5107
5108 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5109 g->global_gotsym is NULL.
5110
d8bbe778
L
51112002-08-08 H.J. Lu <hjl@gnu.org>
5112
c5cd6d62 5113 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
5114 overrides an indirect versioned symbol.
5115
c366c25e
JJ
51162002-08-08 Jakub Jelinek <jakub@redhat.com>
5117
5118 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5119 for R_386_TLS_TPOFF32 relocs against symndx 0.
5120
31941635
L
51212002-08-07 H.J. Lu <hjl@gnu.org>
5122
5123 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5124 with undefined version if needed.
5125 (elf_link_assign_sym_version): Match a default symbol with a
5126 version without definition. No need to hide the default
5127 definition separately.
5128
0f3bd64f
AM
51292002-08-08 Alan Modra <amodra@bigpond.net.au>
5130
7330fb86
AM
5131 * elflink.h (elf_link_output_extsym): Don't output symbols from
5132 SEC_EXCLUDE sections.
5133
0f3bd64f
AM
5134 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5135
a4aa0fb7
AM
51362002-08-07 Alan Modra <amodra@bigpond.net.au>
5137
5138 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5139 entries.
5140
34ea4a36
TS
51412002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5142
5143 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5144 mismatch.
5145
141ff970
TS
51462002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5147
5148 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5149
28458e7e
TS
51502002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5151
5152 * elf32-mips.c (mips_reloc_map): Fix typo.
5153
0121a3da
AM
51542002-08-06 Alan Modra <amodra@bigpond.net.au>
5155
5156 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5157
d006db6c
AM
51582002-08-06 Alan Modra <amodra@bigpond.net.au>
5159
5160 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5161
8ea80f08
AM
51622002-08-06 Alan Modra <amodra@bigpond.net.au>
5163
2a52da53
AM
5164 * libxcoff.h: Use PARAMS on function declarations.
5165 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5166 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5167
8ea80f08
AM
5168 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5169 addend.
5170 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5171
cf9ab45b
AM
51722002-08-06 Alan Modra <amodra@bigpond.net.au>
5173
5174 * coff-rs6000.c: Formatting fixes.
5175 (xcoff_calculate_relocation): Use PARAMS in declaration.
5176 (xcoff_complain_overflow): Likewise.
5177 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5178 (bfd_xcoff_backend_data): Remove useless comments.
5179 (rs6000coff_vec): Likewise.
5180 (bfd_pmac_xcoff_backend_data): Likewise.
5181 (pmac_xcoff_vec): Likewise.
8ea80f08 5182
cf9ab45b
AM
5183 * coff64-rs6000.c: Formatting fixes.
5184 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5185 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5186 (bfd_xcoff_backend_data): Remove useless comments.
5187 (rs6000coff64_vec): Likewise.
5188 (bfd_xcoff_aix5_backend_data): Likewise.
5189 (aix5coff64_vec): Likewise.
5190
48bfecdd
AM
51912002-08-06 Alan Modra <amodra@bigpond.net.au>
5192
a78eab4e
AM
5193 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5194 mask entries. Use complain_overflow_dont for R_REF.
5195 (xcoff_reloc_type_ba): Revert last change.
5196 (xcoff_reloc_type_br): Likewise.
5197 (xcoff_reloc_type_crel): Likewise.
5198 (xcoff_ppc_relocate_section): Likewise.
5199 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5200 (xcoff64_ppc_relocate_section): Likewise.
5201 (xcoff64_howto_table): Revert some of last change to mask entries.
5202 Use complain_overflow_dont for R_REF.
5203
48bfecdd
AM
5204 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5205 relocs with bitsize == 16 have size = 1.
5206 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5207 (xcoff_reloc_type_br): Likewise.
5208 (xcoff_reloc_type_crel): Likewise.
5209 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5210 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5211 dst_mask adjustment.
5212 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5213 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5214 bitsize == 16 have size = 1.
5215
fd13ed0c
DC
52162002-08-01 Denis Chertykov <denisc@overta.ru>
5217
5218 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5219 (struct misc): New field isymbuf. All free_* fields removed.
5220 (symbol_value): Pass in internal syms. No need to swap syms in.
5221 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5222 possibly cached info.
5223 (tidyup_after_error): Removed.
5224 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5225 misc. Use new field.
5226 (adjust_all_relocations): Use internal syms. No need to swap syms
5227 in and out.
5228 (add_page_insn): Don't use removed fields of struct misc.
5229
24a1ba0f
NC
52302002-08-01 Nick Clifton <nickc@redhat.com>
5231
5232 * elf32-arm.h: Revert previous delta.
5233
a6903459
NC
52342002-08-01 Nick Clifton <nickc@redhat.com>
5235
5236 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5237 * configure: Regenerate.
5238
39a2a3eb
L
52392002-07-31 H.J. Lu <hjl@gnu.org>
5240
5241 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5242 selected.
5243
a0dfa6a8
L
52442002-07-31 H.J. Lu <hjl@gnu.org>
5245
5246 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5247 is selected.
5248
cd67d266
JJ
52492002-07-31 Jakub Jelinek <jakub@redhat.com>
5250
5251 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5252 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5253
4eb6b71c
NC
52542002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5255
5256 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5257 There is no 8 byte relocation type for this architecture.
5258 (do_ns32k_reloc): Use bfd_vma instead of native types.
5259 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5260 returns void.
5261 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5262 rely on generic code to do that.
5263 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5264 to all table entries.
5265 (_bfd_ns32k_relocate_contents): put_data returns void.
5266 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5267 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5268 return void.
5269
f7c33884
NC
52702002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5271
5272 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5273 archive object is target dependant.
5274
8f64befb
NC
52752002-07-31 Adam Nemet <anemet@lnxw.com>
5276
5277 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5278 (THUMB_PLT_ENTRY_SIZE): New macro.
5279 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5280 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5281 ARM_PLT_ENTRY_SIZE.
5282 (elf32_arm_plt_entry): Likewise.
5283 (elf_backend_plt_header_size): Likewise.
5284 (elf32_thumb_plt0_entry): New global.
5285 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5286 into .plt.thumb.
5287 (elf32_thumb_plt_entry): New global.
5288 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5289 Thumb entries. Set the bottom bit of the corresponding GOT entry
5290 for a Thumb PLT entry.
5291 (struct elf32_arm_plt_entry_info): New structure.
5292 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5293 type.
5294 (elf32_arm_link_hash_newfunc): Initialize new member.
5295 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5296 relocations against the PLT.
5297 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5298 first_rel_type if this is the first time we encounter the symbol.
5299 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5300 Determine if relocation needs a PLT entry. Set first_rel_type if
5301 this is the first time we encounter the symbol
5302 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5303 functions as well.
5304 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5305 (elf32_arm_create_dynamic_sections): New function. Create the
5306 .plt.thumb section.
5307 (elf_backend_create_dynamic_sections): Call it.
5308
47badb7b
NC
53092002-07-31 Nick Clifton <nickc@redhat.com>
5310
5311 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5312 'alternative' in order to avoid shadowing global symbol of the
5313 same name.
5314 * bfd-in2.h: Regenerate.
5315 * libbfd.h: Regenerate.
5316 * libcoff.h: Regenerate.
5317
8a397dad
TS
53182002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5319
5320 * Makefile.am: Add n32 ABI support.
5321 * Makefile.in: Regenerate.
5322 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5323 bit vectors for mips*-*-linux targets as optional.
5324 * configure.in: Add n32 ABI vectors.
5325 * configure: Regenerate.
5326 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5327 * elfn32-mips.c: New file, n32 ABI support.
5328 * targets.c: Add n32 ABI vectors.
5329
7e392df6 53302002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 5331
7e392df6
NC
5332 * elfarmqnx-nabi.c: New file: Support for QNX.
5333 * config.bfd: Add support for arm-*-nto target.
5334 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5335 * configure: Regenerate.
5336 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5337 * Makefile.in: Regenerate.
5338 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5339 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5340 * elfarm-nabi.c: Do not include elf32-arm.h if
5341 ELFARM_NABI_C_INCLUDED is defined.
5342 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 5343
7e392df6 53442002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 5345
83e1617e
NC
5346 * po/sv.po: Updated Swedish translation.
5347
704afa60
JJ
53482002-07-30 Jakub Jelinek <jakub@redhat.com>
5349
5350 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5351
487e54f2
AM
53522002-07-30 Alan Modra <amodra@bigpond.net.au>
5353
5354 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5355 * archive.c (bfd_generic_archive_p): Likewise.
5356 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5357 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5358 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5359 (xcoff64_archive_p): Likewise.
5360 (xcoff64_openr_next_archived_file): Likewise.
5361 (xcoff64_archive_p): Clean up tdata properly on error.
5362 * coffgen.c (coff_real_object_p): Likewise.
5363 (coff_object_p): Release filehdr and opthdr.
5364 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5365 * ieee.c (ieee_archive_p): Likewise.
5366 * ihex.c (ihex_object_p): Likewise.
5367 (ihex_mkobject): Always allocate tdata.
5368 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5369 * srec.c (srec_mkobject): Always allocate tdata.
5370 (srec_object_p): Clean up tdata properly on error.
5371 (symbolsrec_object_p): Likewise.
5372 * versados.c (versados_object_p): Likewise.
5373 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5374 and bfd_realloc instead of realloc.
5375 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5376 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5377 place of bfd_malloc, simplifying error freeing. Free hash table too.
5378 (vms_object_p): Clean up tdata on error.
5379 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5380 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5381
9d46020e
AM
53822002-07-30 Alan Modra <amodra@bigpond.net.au>
5383
5384 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5385
fb39dac1
RS
53862002-07-26 Chris Demetriou <cgd@broadcom.com>
5387
5388 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5389 flags into resulting BFD.
5390
7a624474
AM
53912002-07-26 Alan Modra <amodra@bigpond.net.au>
5392
5393 From John Reiser <jreiser@BitWagon.com>
5394 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5395 tls_ldm_got.refcount.
5396
a4382ec6
TS
53972002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5398
5399 * elf64-mips.c: Update TODO comment.
5400 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5401 mips_elf64_gprel16_reloca): Remove prototypes.
5402 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5403 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5404 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5405 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5406 R_MIPS_HIGHEST.
5407 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5408 R_MIPS_GOT16. Remove wrong comments.
5409 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5410 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5411 from elf32-mips.c.
5412 (mips_elf64_hi16_reloc): Fix formatting.
5413 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5414 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5415 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5416 (mips_elf64_gprel16_reloc): Make static. Add check for
5417 partial_inplace.
5418 (mips_elf64_gprel16_reloca): Remove.
5419 (mips_elf64_literal_reloc): New function.
5420 (mips_elf64_gprel32_reloc): Fix formatting.
5421 (mips_elf64_shift6_reloc): Fix comment. Make static.
5422 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5423 elf32-mips.c.
5424 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5425 elf32-mips.c
5426 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5427 specific relocations.
5428 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5429 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5430 (ELF_MAXPAGESIZE): Add comment.
5431
219576a4
NC
54322002-07-25 Nick Clifton <nickc@redhat.com>
5433
5434 * po/sv.po: Updated Swedish translation.
5435 * po/es.po: Updated Spanish translation.
5436 * po/fr.po: Updated French translation.
5437
8c58d23b
AM
54382002-07-25 Alan Modra <amodra@bigpond.net.au>
5439
5440 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5441 as elf_link_record_local_dynamic_symbol.
5442 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5443 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5444 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5445 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5446 attempt is made to record a symbol in a discarded section, and
5447 return `2' in that case.
5448
ff3063f5
NC
54492002-07-24 Nick Clifton <nickc@redhat.com>
5450
5451 * po/sv.po: Updated Swedish translation.
5452 * po/es.po: Updated Spanish translation.
5453
f0fe0e16
AM
54542002-07-23 Alan Modra <amodra@bigpond.net.au>
5455
c1fb5f8a
AM
5456 * po/SRC-POTFILES.in: Regenerate.
5457
f0fe0e16
AM
5458 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5459 immediately. Remove code handling relocatable linking.
5460 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5461 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5462 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 5463 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
5464 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5465 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5466 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5467 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5468 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5469 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5470 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5471 * elf32-avr.c (elf_backend_rela_normal): Define.
5472 * elf32-cris.c: Likewise.
5473 * elf32-fr30.c: Likewise.
de2d743e 5474 * elf32-frv.c: Likewise.
f0fe0e16
AM
5475 * elf32-h8300.c: Likewise.
5476 * elf32-hppa.c: Likewise.
5477 * elf32-ip2k.c: Likewise.
5478 * elf32-sparc.c: Likewise.
5479 * elf32-v850.c: Likewise.
5480 * elf32-vax.c: Likewise.
5481 * elf64-hppa.c: Likewise.
5482 * elf64-sparc.c: Likewise.
5483 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 5484 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
5485 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5486 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5487 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5488 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5489 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5490 * elf-m10200.c (USE_RELA): Don't define.
5491 * elf-m10300.c: Likewise.
de2d743e 5492 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
5493 * elf32-i370.c: Likewise.
5494 * elf32-ip2k.c: Likewise.
5495 * elf32-m68k.c: Likewise.
5496 * elf32-mcore.c: Likewise.
5497 * elf32-ppc.c: Likewise.
5498 * elf32-s390.c: Likewise.
5499 * elf32-vax.c: Likewise.
5500 * elf64-ppc.c: Likewise.
5501 * elf64-s390.c: Likewise.
5502 * elf64-x86-64.c: Likewise.
5503 * elfxx-ia64.c: Likewise.
5504 * elf32-avr.c (USE_REL): Don't undef.
5505 * elf32-ip2k.c: Likewise.
5506
5e8d7549
NC
55072002-07-23 Nick Clifton <nickc@redhat.com>
5508
5509 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5510 'want_p_paddr_set_to_zero'.
5511 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5512 to false;
5513 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5514 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5515
9e12c7db
NC
55162002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5517
5518 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5519 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5520 show the Copyright string.
5521 Minor formatting tidy ups.
5522
0461a601
NC
55232002-07-23 Nick Clifton <nickc@redhat.com>
5524
ff3063f5
NC
5525 * po/fr.po: Updated French translation.
5526 * po/sv.po: Updated Swedish translation.
0461a601 5527
fad2542d
AM
55282002-07-23 Alan Modra <amodra@bigpond.net.au>
5529
5530 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5531 when outputting relocs.
5532
c0647bfc
JT
55332002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5534
5535 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5536 DT_PLTGOT into the dynamic section if there is a PLT.
5537
d01414a5
TS
55382002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5539
5540 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5541 elf32-mips.c.
5542 (_bfd_mips_elf_write_section): Likewise.
5543 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5544 (_bfd_mips_elf_write_section): Likewise.
5545 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5546 (elf32_mips_write_section): Likewise.
5547 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5548 (_bfd_mips_elf_write_section): Likewise.
5549
40c97fc6
AM
55502002-07-19 Alan Modra <amodra@bigpond.net.au>
5551
5552 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5553 PT_IA_64_UNWIND segments for a given section.
5554
58378160
L
55552002-07-17 H.J. Lu <hjl@gnu.org>
5556
5557 * Makefile.am: Fix a typo.
5558 * Makefile.in: Regenerate.
5559
cf88bb9f
NC
55602002-07-15 Denis Chertykov <denisc@overta.ru>
5561 Frank Ch. Eigler <fche@redhat.com>
5562 Ben Elliston <bje@redhat.com>
5563 Alan Lehotsky <alehotsky@cygnus.com>
5564 John Healy <jhealy@redhat.com>
5565 Graham Stott <grahams@redhat.com>
5566 Jeff Johnston <jjohnstn@redhat.com>
5567
5568 * Makefile.am: Add support for ip2k.
5569 * Makefile.in: Regenerate.
5570 * doc/Makefile.in: Regenerate.
5571 * archures.c: Add support for ip2k.
5572 * config.bfd: Add support for ip2k.
5573 * configure.in: Add support for ip2k.
5574 * configure: Regenerate.
5575 * reloc.c: Add support for ip2k.
5576 * targets.c: Add support for ip2k.
5577 * bfd-in2.h: Regenerate.
5578 * libbfd.h: Regenerate.
5579 * cpu-ip2k.c: New file.
5580 * elf32-ip2k.c: New file.
5581
0dafd5f6
RE
55822002-07-17 Ian Rickards <irickard@arm.com>
5583
40c97fc6 5584 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
5585 just return the filename.
5586
36b08f12
AM
55872002-07-16 Moritz Jodeit <moritz@jodeit.org>
5588
5589 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
5590
58821868
AM
55912002-07-16 Alan Modra <amodra@bigpond.net.au>
5592
5593 * elflink.h: Formatting fixes, tidy prototypes.
5594 (elf_link_assign_sym_version): Move common code out of loop.
5595
c89583f8
AM
55962002-07-16 Alan Modra <amodra@bigpond.net.au>
5597
5598 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
5599 reloc section size is zero. Correct reloc output location.
5600
ba94744e
AM
56012002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5602
5603 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
5604 the final type for the e_fsel selector when generating PA2.0W code.
5605 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
5606 relocations.
5607
96a94295
L
56082002-07-14 H.J. Lu <hjl@gnu.org>
5609
5610 * elflink.h (elf_link_assign_sym_version): Hide the default
5611 definition if there is a hidden versioned definition.
5612
6849c52f
HPN
56132002-07-12 Hans-Peter Nilsson <hp@axis.com>
5614
5615 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
5616 dynamic reference test in assertion when initializing GOT with
5617 static contents. Just assert that there are either no dynamic
5618 sections, the symbol is defined in the regular objects or that the
5619 symbol is undef weak. Tweak comment.
5620 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
5621 only if the symbol isn't defined in the program and isn't undef
5622 weak.
5623 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
5624 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
5625 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
5626 (elf_cris_discard_excess_program_dynamics): Don't consider
5627 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
5628
239e1f3a
AM
56292002-07-11 Alan Modra <amodra@bigpond.net.au>
5630
5631 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
5632 unresolved debugging relocs in dynamic applications.
5633 * elf32-s390.c (elf_s390_relocate_section): Likewise.
5634 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5635 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
5636 * elf64-s390.c (elf_s390_relocate_section): Likewise.
5637 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5638 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
5639
2f6d9989
AM
56402002-07-10 Alan Modra <amodra@bigpond.net.au>
5641
f5e87a1d
AM
5642 * elf64-ppc.c (ONES): Define.
5643 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
5644 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
5645 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
5646
2f6d9989
AM
5647 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
5648 (ppc64_elf_set_private_flags): Delete.
5649 (ppc64_elf_section_from_shdr): Delete.
5650 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
5651 (ppc64_elf_fake_sections): Delete.
5652 (bfd_elf64_bfd_set_private_flags): Don't define.
5653 (bfd_elf64_get_symbol_info): Likewise.
5654 (elf_backend_section_from_shdr): Likewise.
5655 (elf_backend_fake_sections): Likewise.
5656
0594c12d
AM
56572002-07-10 Marco Walther <Marco.Walther@sun.com>
5658
5659 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
5660 when not already set.
5661 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
5662 (elf_backend_fake_sections): Define.
5663
699cb9b8
AM
56642002-07-10 Alan Modra <amodra@bigpond.net.au>
5665
5666 * merge.c (_bfd_merge_section): Remove redundant output_section check.
5667 Formatting.
5668 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
5669
0a4787a0
HPN
56702002-07-09 Hans-Peter Nilsson <hp@axis.com>
5671
5672 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
5673 NULL sym_hashes to just before use.
5674 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
5675 symbol with non-default visibility.
5676 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
5677 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
5678 Ditto.
5679 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
5680 symbol with non-default visibility.
5681 (cris_elf_check_relocs): At tests for local symbol before
5682 increasing h->plt.refcount, also check for non-default
5683 visibility. Ditto when checking for local symbol to eliminate
5684 pc-relative runtime relocs.
5685
aecc8f8a
AM
56862002-07-08 Alan Modra <amodra@bigpond.net.au>
5687
5688 * elf.c: Formatting.
5689 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
5690 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
5691 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
5692 segments.
5693
e9168c1e
MM
56942002-07-07 Mark Mitchell <mark@codesourcery.com>
5695 Alan Modra <amodra@bigpond.net.au>
5696
5697 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
5698 account the impact of relocation count overflow when computing
5699 section offsets.
5700 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
5701 or not to apply the PE COFF reloc overflow handling. Fix a
5702 fencepost error in deciding whether or not to use that technique.
5703
6cdc0ccc
AM
57042002-07-07 Alan Modra <amodra@bigpond.net.au>
5705
5706 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
5707 change type of locsyms.
5708 (bfd_elf_get_elf_syms): Declare.
5709 * elf.c (bfd_elf_get_elf_syms): New function.
5710 (group_signature): Use bfd_elf_get_elf_syms.
5711 (bfd_section_from_r_symndx): Likewise.
5712 * elfcode.h (elf_slurp_symbol_table): Likewise.
5713 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5714 (elf_link_add_object_symbols): Likewise. Reorganise to increase
5715 locality of various data structures. Properly free internal relocs.
5716 (elf_bfd_final_link): Properly free internal relocs.
5717 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
5718 (elf_link_input_bfd): Likewise.
5719 (elf_gc_mark): Likewise. Properly free internal relocs.
5720 (elf_gc_sweep): Properly free internal relocs.
5721 (elf_reloc_symbol_deleted_p): No need to swap syms in.
5722 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
5723 internal relocs.
5724 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
5725 Properly free possibly cached info.
5726 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
5727 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
5728 symbol swapping code.
5729 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
5730 Properly free possibly cached info.
5731 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
5732 (mn10300_elf_relax_delete_bytes): Likewise.
5733 (mn10300_elf_symbol_address_p): Likewise.
5734 (mn10300_elf_get_relocated_section_contents): Likewise.
5735 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
5736 (elf32_h8_relax_delete_bytes): Likewise.
5737 (elf32_h8_symbol_address_p): Likewise.
5738 (elf32_h8_get_relocated_section_contents): Likewise.
5739 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
5740 (m32r_elf_relax_delete_bytes): Likewise.
5741 (m32r_elf_get_relocated_section_contents): Likewise.
5742 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
5743 elf_section_data to determine whether cached.
5744 (sh_elf_relax_section): As above for elf-m10200.c.
5745 (sh_elf_relax_delete_bytes): Likewise.
5746 (sh_elf_get_relocated_section_contents): Likewise.
5747 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
5748 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
5749 reading of local syms.
5750 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5751 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
5752 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
5753 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
5754 relocs.
5755 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
5756 free internal relocs and section contents. Don't read symbols.
5757 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
5758 (elf32_hppa_size_stubs): Don't free local syms.
5759 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
5760 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
5761 possibly cached info.
5762 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5763 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
5764 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
5765 all_local_syms.
5766 (get_local_syms): Delete function.
5767 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
5768 on exit.
5769 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
5770
b3212001
JW
57712002-07-05 Jim Wilson <wilson@redhat.com>
5772
5773 * syms.c (decode_section_type): New.
5774 (bfd_decode_symclass): Call decode_section_type.
5775
894bb1ee
JJ
57762002-07-04 Jakub Jelinek <jakub@redhat.com>
5777
5778 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
5779 section content start.
5780 Reported by Michael Schumacher <mike@hightec-rt.com>.
5781
bc0ba537
AM
57822002-07-04 Alan Modra <amodra@bigpond.net.au>
5783
9b5ecbd0 5784 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
5785 link order code. Don't actually remove the output section here;
5786 Just set a flag for the linker to do so.
5787 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
5788 sections when setting up output section dynsyms.
5789
797fc050
AM
57902002-07-04 Alan Modra <amodra@bigpond.net.au>
5791
5792 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
5793 fudge.
5794 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
5795 libs here instead.
5796
99881371
MS
57972002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5798
5799 * elf64-s390.c (create_got_section): Set .got section alignment to
5800 8 bytes.
5801 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
5802
47d9a591
AM
58032002-07-02 Alan Modra <amodra@bigpond.net.au>
5804
5805 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
5806
179d3252
JT
58072002-07-01 Matt Thomas <matt@3am-software.com>
5808
5809 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
5810 to EF_VAX_*.
5811
4a14403c
TS
58122002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5813
5814 * elfxx-mips.c (ABI_64_P): Fix comment.
5815 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
5816 new section names for N64 ABI.
5817 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
5818 (mips_elf_calculate_relocation): Code formatting.
5819 (mips_elf_create_dynamic_relocation): Likewise.
5820 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
5821 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
5822 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
5823 in any NewABI.
5824 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
5825 for NewABI.
5826 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
5827 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
5828 here, too.
5829
607c0e09
AS
58302002-07-01 Andreas Schwab <schwab@suse.de>
5831
5832 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
5833 R_X86_64_64 to R_X86_64_RELATIVE.
5834
ba26fd96
AM
58352002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
5836
5837 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
5838 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
5839 Run "make dep-am".
5840 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
5841 host_aout_vec.
5842 * configure.in (vaxbsd_vec): Add.
5843 * targets.c (vaxbsd_vec): Add.
5844 * Makefile.in: Rebuild.
5845 * configure: Rebuild.
5846 * po/SRC-POTFILES.in: Rebuild.
5847
1e2f5b6e
AM
58482002-07-01 Alan Modra <amodra@bigpond.net.au>
5849
5850 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
5851 examining to gc_mark_hook, rather than the bfd.
5852 (elf_gc_sections): Adjust.
5853 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
5854 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
5855 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
5856 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
5857 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
5858 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
5859 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
5860 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
5861 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
5862 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
5863 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
5864 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
5865 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
5866 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
5867 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
5868 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
5869 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
5870 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
5871 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
5872 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
5873 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
5874 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
5875 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
5876 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5877 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
5878 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
5879 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
5880 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
5881 redundant local sym tests.
5882 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
5883 (link_hash_newfunc): Init is_entry.
5884 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
5885 (ppc64_elf_link_hash_table_create): Init all_local_syms.
5886 (create_linkage_sections): Use bfd_make_section_anyway rather than
5887 bfd_make_section.
5888 (ppc64_elf_mark_entry_syms): New function.
5889 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
5890 up opd entry to function section map.
5891 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
5892 relocs that reference the opd section.
5893 (edit_opd): New function.
5894 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
5895 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
5896 (get_local_syms): Do so here. Exit if we already have local syms.
5897 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
5898 read local syms on non-ELF input.
5899 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
5900 than duplicating it's function here. Adjust free of internal
5901 relocs to suit.
5902 (ppc64_elf_relocate_section): Adjust local syms in opd section.
5903 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
5904 * elf32-hppa.c (elf32_hppa_size_stubs): Call
5905 _bfd_elf32_link_read_relocs rather than duplicating it's function
5906 here. Adjust free of internal relocs to suit.
5907
1b71fb54
AJ
59082002-07-01 Andreas Jaeger <aj@suse.de>
5909
5910 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
5911 are not allowed in shared libs code, enforce -fPIC.
5912
8d28f606
HPN
59132002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
5914
5915 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
5916 trailing zero-sequences when there's previous left-over data.
5917
5ac81c74
JL
59182002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
5919
5920 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
5921 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
5922 and opd_rel_sec in order for starting rela section. Check _raw_size.
5923 (elf_backend_reloc_type_class): Define.
5924
91a4d569
AM
59252002-06-27 Kevin Buettner <kevinb@redhat.com>
5926
5927 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
5928 DWARF2 formats.
5929
feee612b
AM
59302002-06-27 Alan Modra <amodra@bigpond.net.au>
5931
5932 * cpu-powerpc.c: Comment on ordering of arch_info.
5933 * elf32-ppc.c (ppc_elf_object_p): New function.
5934 (elf_backend_object_p): Define.
5935 * elf64-ppc.c (ppc64_elf_object_p): New function.
5936 (elf_backend_object_p): Define.
5937
a4e6cefc
JT
59382002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
5939
5940 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
5941 * configure: Regenerate.
5942
dae2dd0d
NC
59432002-06-25 Jason Eckhardt <jle@rice.edu>
5944
5945 * dwarf2.c (decode_line_info): Check unit->addr_size
5946 to read in the proper number of prologue bytes.
5947
680f9d5c
NC
59482002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
5949
5950 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
5951 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
5952 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
5953 been enabled.
dae2dd0d 5954
680f9d5c
NC
5955 * targets.c (_bfd_target_vector[]): Only include
5956 aix5coff64_vec if 64-bit bfd support has been enabled.
5957
d4c88bbb
AM
59582002-06-25 Alan Modra <amodra@bigpond.net.au>
5959
5960 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
5961 * elf32-hppa.c (hppa_add_stub): Likewise.
5962 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5963 * elflink.h (elf_add_default_symbol): Fix comment typo.
5964 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
5965 (elf_link_add_object_symbols): Likewise.
5966 (elf_link_assign_sym_version): Likewise.
5967 * hash.c (bfd_hash_lookup): Likewise.
5968 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
5969 * section.c (bfd_get_unique_section_name): Likewise.
5970 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
5971 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
5972 (assign_section_numbers): Likewise.
5973 (_bfd_elfcore_make_pseudosection): Likewise.
5974 (elfcore_grok_lwpstatus): Likewise.
5975 (elfcore_grok_win32pstatus): Likewise.
5976 (elfcore_write_note): Constify input params. Use PTR instead of
5977 void *. Include terminating NUL in namesz. Correct padding.
5978 Support NULL "name" param. Use memcpy instead of strcpy.
5979 (elfcore_write_prpsinfo): Constify input params.
5980 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
5981 (elfcore_write_lwpstatus): Likewise.
5982 (elfcore_write_pstatus): Likewise.
5983 (elfcore_write_prfpreg): Likewise.
5984 (elfcore_write_prxfpreg): Likewise.
5985 * elf-bfd.h (elfcore_write_note): Update declaration.
5986 (elfcore_write_prpsinfo): Likewise.
5987 (elfcore_write_prstatus): Likewise.
5988 (elfcore_write_pstatus): Likewise.
5989 (elfcore_write_prfpreg): Likewise.
5990 (elfcore_write_prxfpreg): Likewise.
5991 (elfcore_write_lwpstatus): Likewise.
5992
b0ac09d2
NC
59932002-06-25 Jason Eckhardt <jle@rice.edu>
5994
5995 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
5996 symbols of type stProc and stStaticProc.
5997
59982002-06-25 Nick Clifton <nickc@redhat.com>
5999
6000 * ecoff.c: VArious formatting fixes.
6001
021d6096
AM
60022002-06-25 Alan Modra <amodra@bigpond.net.au>
6003
6004 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6005
82e51918
AM
60062002-06-25 Alan Modra <amodra@bigpond.net.au>
6007
6008 * aout-adobe.c: Don't compare against "true" or "false.
6009 * aout-target.h: Likewise.
6010 * aoutx.h: Likewise.
6011 * archive.c: Likewise.
6012 * bout.c: Likewise.
6013 * cache.c: Likewise.
6014 * coff-a29k.c: Likewise.
6015 * coff-alpha.c: Likewise.
6016 * coff-i386.c: Likewise.
6017 * coff-mips.c: Likewise.
6018 * coff-or32.c: Likewise.
6019 * coff64-rs6000.c: Likewise.
6020 * coffcode.h: Likewise.
6021 * coffgen.c: Likewise.
6022 * cpu-ns32k.c: Likewise.
6023 * ecoff.c: Likewise.
6024 * ecofflink.c: Likewise.
6025 * elf.c: Likewise.
6026 * elf32-arm.h: Likewise.
6027 * elf32-cris.c: Likewise.
6028 * elf32-d30v.c: Likewise.
6029 * elf32-i386.c: Likewise.
6030 * elf32-mcore.c: Likewise.
6031 * elf32-ppc.c: Likewise.
6032 * elf32-sh.c: Likewise.
6033 * elf32-sh64.c: Likewise.
6034 * elf32-v850.c: Likewise.
6035 * elf64-alpha.c: Likewise.
6036 * elf64-sh64.c: Likewise.
6037 * elfcode.h: Likewise.
6038 * elfcore.h: Likewise.
6039 * elflink.h: Likewise.
6040 * elfxx-mips.c: Likewise.
6041 * i386os9k.c: Likewise.
6042 * ieee.c: Likewise.
6043 * libbfd.c: Likewise.
6044 * linker.c: Likewise.
6045 * mmo.c: Likewise.
6046 * nlm32-alpha.c: Likewise.
6047 * nlm32-i386.c: Likewise.
6048 * nlm32-ppc.c: Likewise.
6049 * nlm32-sparc.c: Likewise.
6050 * nlmcode.h: Likewise.
6051 * oasys.c: Likewise.
6052 * pdp11.c: Likewise.
6053 * peicode.h: Likewise.
6054 * reloc.c: Likewise.
6055 * som.c: Likewise.
6056 * srec.c: Likewise.
6057 * tekhex.c: Likewise.
6058 * vms.c: Likewise.
6059 * xcofflink.c: Likewise.
6060 * elf64-sparc.c: Edit comment to not use "== false".
6061
6062 * aoutf1.h: Don't use "? true : false".
6063 * ecoff.c: Likewise.
6064 * format.c: Likewise.
6065 * ieee.c: Likewise.
6066 * linker.c: Likewise.
6067 * mmo.c: Likewise.
6068 * oasys.c: Likewise.
6069
48fc70a2
AM
60702002-06-23 H.J. Lu <hjl@gnu.org>
6071
6072 * elflink.h (elf_link_add_archive_symbols): For the default
6073 version, check references with only one `@' first.
6074
47b7c2db
AM
60752002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6076
6077 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6078 function.
9b5ecbd0 6079 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
6080 symbol table.
6081 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6082 (elf64_hppa_size_dynamic_sections): Revise to use
6083 elf64_hppa_mark_milli_and_exported_functions.
6084 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6085 symbols out of dynamic symbol table.
6086
f5d44ba0
AM
60872002-06-23 Alan Modra <amodra@bigpond.net.au>
6088
bb3fff1e
AM
6089 * Makefile.in: Regenerate.
6090 * libbfd.h: Regenerate.
6091 * bfd-in2.h: Regenerate.
6092 * configure: Regenerate.
6093 * po/SRC-POTFILES.in: Regenerate.
6094
f5d44ba0
AM
6095 * elflink.h: Comment typo fixes.
6096
60972002-06-23 H.J. Lu <hjl@gnu.org>
6098
6099 * elf-bfd.h (elf_link_loaded_list): New structure.
6100 (elf_link_hash_table): Add "loaded".
6101 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6102 * elflink.h (elf_link_check_versioned_symbol): New function.
6103 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6104
cc36acdf
NC
61052002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6106
6107 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 6108 support an ELF style hash table, return true, indicating that
cc36acdf
NC
6109 nothing needed to be done, rather than false, indicating that the
6110 section's size could not be computed.
6111
4e5ba5b7
DB
61122002-06-18 Dave Brolley <brolley@redhat.com>
6113
6114 From Catherine Moore, Michael Meissner, Dave Brolley:
6115 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6116 * targets.c: Support bfd_elf32_frv_vec.
6117 * reloc.c: Add FRV relocs.
6118 * configure.in: Add support for bfd-elf32-frv-vec.
6119 * config.bfd (targ_cpu): Add support for frv-*-elf.
6120 * archures.c: Add frv arch and machines.
6121 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6122 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6123 (BFD32_BACKENDS): Add elf32-frv.lo.
6124 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6125 (cpu-frv.lo): New target.
6126 (elf32-frv.lo): New target.
6127 * cpu-frv.c: New file.
6128 * elf32-frv.c: New file.
6129
7ece0d85
JJ
61302002-06-18 Jakub Jelinek <jakub@redhat.com>
6131
6132 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6133 e_shnum == 0.
6134 Only read the first section header if e_shoff is non-zero.
6135 Don't consider e_shstrndx if there are no sections.
6136
57fb03ac
TR
61372002-06-17 Tom Rix <trix@redhat.com>
6138
6139 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 6140 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
6141 complain_overflow_bitfield.
6142
341ca622
AM
61432002-06-17 Alan Modra <amodra@bigpond.net.au>
6144
767e34d1
AM
6145 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6146 (bfd_fdopenr): Likewise.
6147 (bfd_openstreamr): Likewise.
6148 (bfd_openw): Likewise.
6149
341ca622
AM
6150 * targets.c: Sort target vecs.
6151 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6152 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6153 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6154 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6155 * configure.in: Sort target vecs. Add m88kmach3_vec.
6156 * configure: Regenerate.
6157
dfbbae4c
HPN
61582002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6159
6160 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6161 bpo_reloc_no to break sort order ties, not address of items.
6162
d663e1cd
JL
61632002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6164
6165 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6166 Skip excluded sections in determing __gp value.
6167 (elf_hppa_final_link_relocate): Use the symbol's address in
6168 R_PARISC_FPTR64 relocations that don't need an opd entry.
6169 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6170 (elf64_hppa_finalize_dynreloc): Likewise.
6171 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6172 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6173
a8295218
NC
61742002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6175
6176 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6177 alignment for .bss, .data and .text sections so that sse and sse2
6178 code will work.
6179 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6180
61812002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
6182
6183 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6184 sh[1234]*-elf*.
6185
3db4b612
JL
61862002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6187
2cb69dd3
JL
6188 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6189 dynamic sections.
6190
3db4b612
JL
6191 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6192 for a symbol that has no output section.
6193 (allocate_dynrel_entries): Correct comment.
6194 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6195 unless we want one.
6196 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6197 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6198 with no section. Remove unnecessary parentheses.
6199
f3813499
TR
62002002-06-11 Tom Rix <trix@redhat.com>
6201
6202 * coffcode.h (coff_compute_section_file_positions): Add data
6203 section to AIX loader alignment check.
6204
f5d44ba0 6205 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
6206 alignment to 4 bytes.
6207 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6208 power accessor macro.
6209 (do_shared_object_padding): Remove invalid assertion.
6210
0ebaf185
RS
62112002-06-10 Richard Sandiford <rsandifo@redhat.com>
6212
6213 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6214 for removed output sections.
6215
ebe3e2d1
NC
62162002-06-10 Geoffrey Keating <geoffk@redhat.com>
6217
6218 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6219 htab_alloc.
6220 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6221
0b14c2aa
L
62222002-06-08 H.J. Lu <hjl@gnu.org>
6223
6224 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6225 work around a long long bug in gcc 2.96 on mips.
6226
3c2bfad6
JT
62272002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6228
6229 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6230 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6231 Regenerate dependency lists.
6232 * Makefile.in: Regenerate.
6233 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6234 vax1knetbsd_vec to targ_selvecs.
6235 * configure.in: Add vax1knetbsd_vec.
6236 * configure: Regenerate.
6237 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6238 * vax1knetbsd.c: New file.
6239 * vaxnetbsd.c: Update copyright years.
6240 (TARGET_PAGE_SIZE): Set to 0x1000.
6241 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6242
91149be3
JT
62432002-06-08 Matt Thomas <matt@3am-software.com>
6244
6245 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6246
21e15248
AM
62472002-06-08 Alan Modra <amodra@bigpond.net.au>
6248
6249 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6250
986b7daa
AM
62512002-06-08 Alan Modra <amodra@bigpond.net.au>
6252
e90b95f6
AM
6253 * Makefile.am: Run "make dep-am".
6254 * Makefile.in: Regenerate.
6255
3f9c735e
AM
6256 * armnetbsd.c: Replace CONST with const.
6257 * corefile.c: Likewise.
6258 * elf32-dlx.c: Likewise.
6259 * elf64-mips.c: Likewise.
6260 * mmo.c: Likewise.
6261 * ns32knetbsd.c: Likewise.
6262
986b7daa
AM
6263 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6264 table is elf64-sparc.
6265
5a659663
TS
62662002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6267
6268 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6269 Fix RELA addends to get not shifted in the result. Don't do special
6270 handling of R_MIPS_64 for NewABI.
6271
9bab7074
AM
62722002-06-07 Alan Modra <amodra@bigpond.net.au>
6273
6274 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6275 (NAME(aout,slurp_reloc_table)): Likewise.
6276 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6277 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6278 (xcoff_write_archive_contents_big): Likewise.
6279 (xcoff_generate_rtinit): Likewise.
6280 (xcoff_generate_rtinit): Likewise, and check error return.
6281 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6282 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6283 (coff_get_normalized_symtab): Likewise.
6284 (coff_make_empty_symbol): Likewise.
6285 (bfd_coff_set_symbol_class): Likewise.
6286 * cofflink.c (coff_link_add_symbols): Likewise.
6287 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6288 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6289 (bfd_ecoff_write_accumulated_debug): Likewise.
6290 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6291 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6292 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6293 * ieee.c (do_with_relocs): Use bfd_zalloc.
6294 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6295 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6296 (NAME(aout,slurp_reloc_table)): Likewise.
6297 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6298 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6299 * som.c (som_build_and_write_symbol_table): Likewise.
6300 (som_slurp_string_table): Likewise.
6301 (som_slurp_symbol_table): Likewise.
6302 (som_bfd_ar_write_symbol_stuff): Likewise.
6303 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6304 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6305 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6306 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6307 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6308
1126897b
AM
63092002-06-07 Alan Modra <amodra@bigpond.net.au>
6310
6311 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6312 "group" union.
6313 (elf_group_name): Update.
6314 (elf_group_id): Define.
6315 (bfd_elf_set_group_contents): Declare.
6316 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6317 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6318 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6319 that sym for the signature.
6320 (_bfd_elf_compute_section_file_positions): Don't call
6321 set_group_contents for "ld -r" case.
6322 (swap_out_syms): Use bfd_zalloc.
6323 * elflink.h (elf_link_add_archive_symbols): Likewise.
6324 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6325 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6326
3fad3c7c
AM
63272002-06-07 Alan Modra <amodra@bigpond.net.au>
6328
6329 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6330 relocs in opd for non-shared too.
6331
10f469bf 63322002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
6333
6334 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6335 relocations.
6336
7217313c
NC
63372002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6338
6339 * merge.c: Include libiberty.h.
6340 * elf-strtab.c: Include libiberty.h.
6341
6cb22815
AM
63422002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6343
6344 * peXXigen.c (pe_print_idata): Remove unused variable.
6345
1ed89aa9
NC
63462002-06-06 David Heine <dlheine@tensilica.com>
6347
6348 * elf.c (assign_file_positions_for_segments): Remove unallocated
6349 sections from the section to segment mapping for PT_LOAD segments.
6350 Update comment about empty loadable segments.
6351
644c4c80
RS
63522002-06-06 Richard Sandiford <rsandifo@redhat.com>
6353
6354 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6355 is within the .stabstr section.
6356
f8ecb12b
AM
63572002-06-06 Alan Modra <amodra@bigpond.net.au>
6358
6359 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6360 are "const PTR", not "const PTR *".
6361 (bfd_elf32_swap_symbol_in): Likewise.
6362 (bfd_elf64_swap_symbol_in): Likewise.
6363 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6364 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6365 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6366 (elf_link_add_object_symbols): Likewise.
6367 (elf_link_record_local_dynamic_symbol): Likewise.
6368 (elf_link_input_bfd): Likewise.
6369 (elf_gc_mark): Likewise.
6370 (elf_reloc_symbol_deleted_p): Likewise.
6371 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6372 (mn10200_elf_relax_delete_bytes): Likewise.
6373 (mn10200_elf_symbol_address_p): Likewise.
6374 (mn10200_elf_get_relocated_section_contents): Likewise.
6375 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6376 (mn10300_elf_relax_section): Likewise.
6377 (mn10300_elf_relax_delete_bytes): Likewise.
6378 (mn10300_elf_symbol_address_p): Likewise.
6379 (mn10300_elf_get_relocated_section_contents): Likewise.
6380 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6381 (elf32_h8_relax_delete_bytes): Likewise.
6382 (elf32_h8_symbol_address_p): Likewise.
6383 (elf32_h8_get_relocated_section_contents): Likewise.
6384 * elf32-hppa.c (get_local_syms): Likewise.
6385 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6386 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6387 * elf32-sh.c (sh_elf_relax_section): Likewise.
6388 (sh_elf_relax_delete_bytes): Likewise.
6389 (sh_elf_get_relocated_section_contents): Likewise.
6390 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6391 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6392 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6393 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6394 * elf64-ppc.c (get_local_syms): Likewise.
6395 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6396 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6397
1ed89aa9 63982002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
6399
6400 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6401
73ff0d56
AM
64022002-06-05 Alan Modra <amodra@bigpond.net.au>
6403
9dce4196
AM
6404 * elf.c (group_signature): Swap in the whole symbol, and handle
6405 extracting section symbol names.
6406 (setup_group): Add comment.
6407 (set_group_contents): When called from objcopy or ld, arrange for
6408 section contents to be written. Write group member output section
6409 indices to allow objcopy to reorganize sections.
6410 (_bfd_elf_copy_private_section_data): Copy group info.
6411
73ff0d56
AM
6412 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6413 (bfd_elf32_swap_symbol_in): Update prototype.
6414 (bfd_elf64_swap_symbol_in): Likewise.
6415 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6416 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6417 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6418 (elf_link_add_object_symbols): Likewise.
6419 (elf_link_record_local_dynamic_symbol): Likewise.
6420 (elf_link_input_bfd): Likewise.
6421 (elf_gc_mark): Likewise.
6422 (elf_reloc_symbol_deleted_p): Likewise.
6423 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6424 (mn10200_elf_relax_delete_bytes): Likewise.
6425 (mn10200_elf_symbol_address_p): Likewise.
6426 (mn10200_elf_get_relocated_section_contents): Likewise.
6427 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6428 (mn10300_elf_relax_section): Likewise.
6429 (mn10300_elf_relax_delete_bytes): Likewise.
6430 (mn10300_elf_symbol_address_p): Likewise.
6431 (mn10300_elf_get_relocated_section_contents): Likewise.
6432 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6433 (elf32_h8_relax_delete_bytes): Likewise.
6434 (elf32_h8_symbol_address_p): Likewise.
6435 (elf32_h8_get_relocated_section_contents): Likewise.
6436 * elf32-hppa.c (get_local_syms): Likewise.
6437 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6438 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6439 * elf32-sh.c (sh_elf_relax_section): Likewise.
6440 (sh_elf_relax_delete_bytes): Likewise.
6441 (sh_elf_get_relocated_section_contents): Likewise.
6442 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6443 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6444 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6445 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6446 * elf64-ppc.c (get_local_syms): Likewise.
6447 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6448 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6449 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6450 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6451 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6452 * elf64-mips.c (mips_elf64_size_info): Likewise.
6453 * elf64-s390.c (s390_elf64_size_info): Likewise.
6454 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6455
53bfd6b4
MR
64562002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6457
6458 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6459 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6460 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6461 _bfd_mips_elf_ignore_discarded_relocs.
6462 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6463
d4df96e6
L
64642002-06-05 H.J. Lu <hjl@gnu.org>
6465
6466 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6467 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6468 the SEC_MERGE section.
6469
e61463e1
AM
64702002-06-05 Alan Modra <amodra@bigpond.net.au>
6471
3cac74d0
AM
6472 * coff-alpha.c: Update copyright date.
6473 * coff-mips.c: Likewise.
6474 * xcoff-target.h: Likewise.
6475
e61463e1
AM
6476 * bfd-in.h: Remove "taken from the source" comment.
6477 * libbfd-in.h: Likewise.
6478 * libcoff-in.h: Likewise.
6479 * bfd-in2.h: Regenerate.
6480 * libbfd.h: Regenerate.
6481 * libcoff.h: Regenerate.
6482
6483 * elf.c (bfd_elf_discard_group): Return true.
6484 * elf-bfd.h (bfd_elf_discard_group): Declare.
6485 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6486 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6487 * bfd.c (bfd_discard_group): Define.
6488 * targets.c (struct bfd_target): Add _bfd_discard_group.
6489 (BFD_JUMP_TABLE_LINK): Here too.
6490 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6491 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6492 * aout-target.h (MY_bfd_discard_group): Define.
6493 * aout-tic30.c (MY_bfd_discard_group): Define.
6494 * binary.c (binary_bfd_discard_group): Define.
6495 * bout.c (b_out_bfd_discard_group): Define.
6496 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6497 * coffcode.h (coff_bfd_discard_group): Define.
6498 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6499 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6500 * i386msdos.c (msdos_bfd_discard_group): Define.
6501 * i386os9k.c (os9k_bfd_discard_group): Define.
6502 * ieee.c (ieee_bfd_discard_group): Define.
6503 * ihex.c (ihex_bfd_discard_group): Define.
6504 * mmo.c (mmo_bfd_discard_group): Define.
6505 * nlm-target.h (nlm_bfd_discard_group): Define.
6506 * oasys.c (oasys_bfd_discard_group): Define.
6507 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6508 * som.c (som_bfd_discard_group): Define.
6509 * srec.c (srec_bfd_discard_group): Define.
6510 * tekhex.c (tekhex_bfd_discard_group): Define.
6511 * versados.c (versados_bfd_discard_group): Define.
6512 * vms.c (vms_bfd_discard_group): Define.
6513 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6514 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6515 (aix5coff64_vec): Likewise.
6516 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6517
9cba27b2
JT
65182002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6519
6520 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6521 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6522 (elf32-sh64-com.lo): New dependency list.
6523 * Makefile.in: Regenerate.
6524 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6525 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6526 elf32-sh64-com.lo.
6527 * configure: Regenerate.
6528 * elf32-sh64.c (sh64_address_in_cranges)
6529 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6530 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6531 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6532 * elf32-sh64-com.c: ...here. New file.
6533
8d2c33be
AM
65342002-06-04 Alan Modra <amodra@bigpond.net.au>
6535
6536 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6537 ATTRIBUTE_UNUSED on used params.
6538 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6539 before calling bfd_section_from_elf_index on local syms.
6540 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6541
5b0e55b6
JT
65422002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6543
6544 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6545 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6546 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6547 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6548 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6549 * Makefile.in: Regenerate.
6550 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6551 (sh64-*-netbsd*): New targets.
6552 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6553 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6554 * configure: Regenerate.
6555 * elf32-sh64-nbsd.c: New file.
6556 * elf64-sh64-nbsd.c: New file.
6557 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6558 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6559 bfd_elf64_sh64lnbsd_vec.
6560
b885599b
AM
65612002-06-04 Alan Modra <amodra@bigpond.net.au>
6562
6563 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
6564 (bfd_section_from_shdr): Likewise. Set section name of group
6565 sections from signature.
6566 (group_signature): Split out from setup_group. Ensure symbol table
6567 is available.
6568 (bfd_elf_discard_group): New function.
6569 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
6570 .gnu.linkonce* sections if they are members of a group.
6571 (set_group_contents): Set GRP_COMDAT flag.
6572 * section.c (bfd_discard_group): New function.
6573 * bfd-in.h (bfd_elf_discard_group): Declare.
6574 * bfd-in2.h: Regenerate.
6575 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
6576 (elf_linkonce_p): Define.
6577
90937f86
AM
65782002-06-04 Alan Modra <amodra@bigpond.net.au>
6579
6580 * elf.c (bfd_section_from_shdr): Make "name" const.
6581 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
6582 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
6583 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
6584 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
6585 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
6586 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
6587 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
6588 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
6589 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
6590 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
6591 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
6592
cf6fb9ce
MR
65932002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6594
6595 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
6596 ABI.
6597
cedb70c5
KH
65982002-06-02 Kazu Hirata <kazu@cs.umass.edu>
6599
6600 * elf32-arc.c: Fix formatting.
6601 * elf32-arm.h: Likewise.
6602 * elf32-cris.c: Likewise.
6603 * elf32-dlx.c: Likewise.
6604 * elf32-hppa.c: Likewise.
6605 * elf32-i386.c: Likewise.
6606 * elf32-i386qnx.c: Likewise.
6607 * elf32-or32.c: Likewise.
6608 * elf32-s390.c: Likewise.
6609 * elf32-sh64.c: Likewise.
6610 * elf32-vax.c: Likewise.
6611 * elf32-xstormy16.c: Likewise.
6612 * elf64-alpha.c: Likewise.
6613 * elf64-mmix.c: Likewise.
6614 * elf64-ppc.c: Likewise.
6615 * elf64-s390.c: Likewise.
6616 * elf64-sh64.c: Likewise.
6617 * elf64-x86-64.c: Likewise.
6618
048d873d
RH
66192002-06-02 Richard Henderson <rth@redhat.com>
6620
6621 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
6622 null when there are no got entries for a symbol.
6623 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
6624 uninitialized variable warning.
6625
4a67a098
RH
66262002-06-01 Richard Henderson <rth@redhat.com>
6627
6628 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
6629 undefined symbols here.
6630 (elf64_alpha_relax_section): Do it here. Also test for not
6631 defined in the current module.
6632 (elf64_alpha_relocate_section_r): Split out of ...
6633 (elf64_alpha_relocate_section): ... here. Don't dereference
6634 NULL when looking up local got entries.
6635
f44f99a5
RH
66362002-06-01 Richard Henderson <rth@redhat.com>
6637
6638 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
6639 symbols from JSR relaxation.
6640 (elf64_alpha_size_plt_section_1): New.
6641 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
6642 (elf64_alpha_size_rela_got_1): ... here.
6643 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
6644 (elf64_alpha_size_rela_got_section): ... here.
6645 (elf64_alpha_size_plt_section): New.
6646 (elf64_alpha_relax_section): Call them.
6647 (elf64_alpha_size_got_sections): Remove output_bfd arg.
6648 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
6649
9e756d64
RH
66502002-06-01 Richard Henderson <rth@redhat.com>
6651
6652 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
6653 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
6654 in shared libraries. Fix DTPRELHI and TPRELHI value.
6655 (INSN_ADDQ, INSN_RDUNIQ): New.
6656 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
6657 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
6658 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
6659 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
6660 Handle GOTDTPREL and GOTTPREL relocations.
6661 (elf64_alpha_relax_gprelhilo): New.
6662 (elf64_alpha_relax_tls_get_addr): New.
6663 (elf64_alpha_relax_find_tls_segment): New.
6664 (elf64_alpha_relax_section): Handle TLS relocations.
6665 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
6666 (elf64_alpha_check_relocs): Set it.
6667
c853d7f6
RH
66682002-06-01 Richard Henderson <rth@redhat.com>
6669
b646261c
RH
6670 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
6671
c853d7f6
RH
6672 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
6673 check; don't suppress dynamic relocs for non-allocated sections.
6674
d7e41a96
RH
6675 * elf64-alpha.c: Remove dead code.
6676
5f333394
AM
66772002-05-31 Alan Modra <amodra@bigpond.net.au>
6678
08e0ee05
AM
6679 * bfd-in2.h: Regenerate.
6680 * libbfd.h: Regenerate.
6681 * po/SRC-POTFILES.in: Regenerate.
6682
5f333394
AM
6683 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
6684 space for bss .plt.
6685
caf47ea6
AM
66862002-05-31 Graeme Peterson <gp@qnx.com>
6687
6688 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
6689 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
6690 Run "make dep-am".
6691 * Makefile.in: Regenerate.
6692 * config.bfd: Add i[3456]86-*-nto-qnx* support.
6693 * configure.in: Add bfd_elf32_i386qnx_vec support.
6694 * configure: Regenerate.
6695 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
6696 is_contained_by_filepos, and copy_private_bfd_data_p.
6697 * elf.c (assign_file_positions_for_segments): Call backend
6698 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
6699 (IS_CONTAINED_BY_FILEPOS): Define.
6700 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
6701 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
6702 Fix non-K&R call to _bfd_error_handler.
6703 (_bfd_elf_copy_private_section_data): Use backend
6704 copy_private_bfd_data_p.
6705 * elf32-i386.c: Don't include elfxx-target.h when
6706 ELF32_I386_C_INCLUDED is defined.
6707 * elf32-i386qnx.c: New QNX elf backend file.
6708 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
6709 elf_backend_is_contained_by_filepos, and
6710 elf_backend_do_copy_private_bfd_data.
6711 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
6712
5bc56484
AM
67132002-05-31 Alan Modra <amodra@bigpond.net.au>
6714
6715 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
6716 Move other similar defines to start of file.
6717
1b164155
TR
67182002-05-30 Tom Rix <trix@redhat.com>
6719
6720 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
6721 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
6722
3765b1be
RH
67232002-05-30 Richard Henderson <rth@redhat.com>
6724
6725 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
6726 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
6727 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
6728 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
6729 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
6730 (struct alpha_elf_obj_tdata): Rename total_got_entries and
6731 n_local_got_entries to total_got_size and local_got_size.
6732 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
6733 (alpha_got_entry_size): New.
6734 (elf64_alpha_relax_with_lituse): Use it.
6735 (elf64_alpha_relax_without_lituse): Likewise.
6736 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
6737 (get_got_entry): New.
6738 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
6739 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
6740 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
6741 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
6742 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
6743 (elf64_alpha_calc_got_offsets): Likewise.
6744 (alpha_dynamic_entries_for_reloc): New.
6745 (elf64_alpha_calc_dynrel_sizes): Use it.
6746 (elf64_alpha_size_dynamic_sections): Likewise.
6747 (elf64_alpha_relocate_section): Handle TLS relocations.
6748 * reloc.c: Add Alpha TLS relocations.
6749 * bfd-in2.h, libbfd.h: Rebuild.
6750
5e226794
NC
67512002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
6752
6753 * peXXigen.c (pe_print_idata): Remove double printed
6754 import table lines; add Bound-To comment.
6755
90ace9e9
JT
67562002-05-29 Matt Thomas <matt@3am-software.com>
6757
6758 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
6759 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
6760 (elf32-vax.lo): New rule.
6761 * Makefile.in: Regenerate.
6762 * configure.in (bfd_elf32_vax_vec)
6763 (vaxnetbsd_vec): New vectors.
6764 * configure: Regenerate.
6765 * config.bfd (vax-*-netbsdelf*)
6766 (vax-*-netbsdaout*)
6767 (vax-*-netbsd*): New targets.
6768 * elf32-vax.c: New file.
6769 * reloc.c: Add VAX relocations.
6770 * bfd-in2.h: Regenerate.
6771 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
6772
4a253e81
JT
67732002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
6774
6775 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
6776 and bfd_elf32_bigarm_vec to targ_selvecs.
6777
6e7c73dd
CF
67782002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
6779
6780 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
6781 with auto-imported symbols.
6782
8afb0e02
NC
67832002-05-29 Adam Nemet <anemet@lnxw.com>
6784
6785 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
6786 sections only record bfd.
9bab7074 6787 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 6788 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 6789 * bfd-in2.h: Regenerate.
8afb0e02 6790
a95653f5
NC
67912002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
6792
6793 * syms.c (_bfd_stab_section_find_nearest_line): Move
6794 declaration and initialisation of saw_line and saw_func out of
6795 for loop.
6796
7cdc5bba
AM
67972002-05-29 Alan Modra <amodra@bigpond.net.au>
6798
6799 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
6800 (bfd_elf64_get_symbol_info): Define.
6801 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
6802
4c7aad1c
AM
68032002-05-29 Andrey Volkov <avolkov@transas.com>
6804
6805 * cpu-h8300.c: Make default h8300 machine first in machine list.
6806
d172d4ba
NC
68072002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
6808
6809 * config.bfd: Added DLX configuraton.
6810 * Makefile.am: Added DLX configuraton.
6811 * configure.in: Added DLX configuraton.
6812 * archures.c: Add DLX architecure.
6813 * reloc.c: Add DLX relocs.
6814 * targets.c: Added DLX target vector.
6815 * configure: Regenerate.
6816 * Makefile.in: Regenreate.
6817 * bfd-in2.h: Regenreate.
6818 * elf32-dlx.c: New file: Support DLX target.
6819 * cpu-dlx.c: New file: Support DLX target.
6820
d1329ca3
AM
68212002-05-25 Alan Modra <amodra@bigpond.net.au>
6822
428d0de3
AM
6823 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
6824
d1329ca3
AM
6825 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
6826 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
6827 strings to point inside function code sym string.
6828 (func_desc_adjust): Likewise.
6829 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
6830
3bab7989
ML
68312002-05-24 Michal Ludvig <mludvig@suse.cz>
6832
6833 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
6834 (elf64_x86_64_grok_psinfo): Added.
6835
436e8db0
NC
68362002-05-24 TAMURA Kent <kent@netbsd.org>
6837
6838 * config.bfd: Add a target for i386-netbsdpe.
6839
ea1e4b0d
AM
68402002-05-24 Alan Modra <amodra@bigpond.net.au>
6841
6842 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
6843 and is_func_descriptor.
6844 (func_desc_adjust): Hide function code sym in shared libs unless
6845 there is a matching exported function descriptor sym.
6846
13ae64f3
JJ
68472002-05-23 Jakub Jelinek <jakub@redhat.com>
6848
6849 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
6850 for symbols from SHF_TLS section.
6851 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
6852 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
6853 (map_sections_to_segments): Build PT_TLS segment if necessary.
6854 (assign_file_positions_for_segments): Likewise.
6855 (get_program_header_size): Account for PT_TLS segment.
6856 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
6857 SEC_THREAD_LOCAL sections to STT_TLS.
6858 * reloc.c: Add 386 and IA-64 TLS relocs.
6859 * section.c (SEC_THREAD_LOCAL): Define.
6860 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
6861 Remove.
6862 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
6863 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
6864 unconditionally.
6865 (struct elf_final_link_info): Add first_tls_sec.
6866 (elf_bfd_final_link): Set first_tls_sec.
6867 Compute elf_hash_table (info)->tls_segment.
6868 (elf_link_output_extsym): Handle STT_TLS symbols.
6869 (elf_link_input_bfd): Likewise.
6870 * syms.c (BSF_THREAD_LOCAL): Define.
6871 * bfd-in2.h: Rebuilt.
6872 * libbfd.h: Rebuilt.
6873 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
6874 elf_i386_mkobject, elf_i386_object_p): New functions.
6875 (elf_howto_table): Add TLS relocs.
6876 (elf_i386_reloc_type_lookup): Support TLS relocs.
6877 (elf_i386_info_to_howto_rel): Likewise.
6878 (struct elf_i386_link_hash_entry): Add tls_type.
6879 (struct elf_i386_obj_tdata): New.
6880 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
6881 New macros.
6882 (struct elf_i386_link_hash_table): Add tls_ldm_got.
6883 (link_hash_newfunc): Clear tls_type.
6884 (elf_i386_check_relocs): Support TLS relocs.
6885 (elf_i386_gc_sweep_hook): Likewise.
6886 (allocate_dynrelocs): Likewise.
6887 (elf_i386_size_dynamic_sections): Likewise.
6888 (elf_i386_relocate_section): Likewise.
6889 (elf_i386_finish_dynamic_symbol): Likewise.
6890 (bfd_elf32_mkobject, elf_backend_object_p): Define.
6891 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
6892 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
6893 want_tprel, want_dtpmod, want_dtprel.
6894 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
6895 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
6896 R_IA64_LTOFF_TPREL22.
6897 (elf_code_to_howto_index): Add TLS relocs.
6898 (elfNN_ia64_check_relocs): Support TLS relocs.
6899 (allocate_global_data_got): Account for TLS .got data.
6900 (allocate_dynrel_entries): Account for TLS dynamic relocations.
6901 (elfNN_ia64_install_value): Supprt TLS relocs.
6902 (set_got_entry): Support TLS relocs.
6903 (elfNN_ia64_relocate_section): Likewise.
6904
c62e1cc3
NC
69052002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
6906
6907 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
6908 BLX reloc round the relocation up rather than down.
6909 * coff-arm.c (coff_arm_relocate_section): Likewise.
6910
c5a43a5d
L
69112002-05-21 H.J. Lu (hjl@gnu.org)
6912
6913 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
6914 definition.
6915
afbe61cf
AM
69162002-05-22 Alan Modra <amodra@bigpond.net.au>
6917
6918 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
6919 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
6920
9c07fe7c
AM
69212002-05-22 Alan Modra <amodra@bigpond.net.au>
6922
6923 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
6924 unresolved relocs.
6925 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
6926
21611032
TS
69272002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6928
c5cd6d62 6929 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
6930 non-ELF targets.
6931
41241523
TS
69322002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6933
6934 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
6935 an error value.
6936 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
6937 return with false on error.
6938 (elf_link_input_bfd): Check reloc_emitter return value.
6939
658f2588
JT
69402002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
6941
6942 * config.bfd (armeb-*-netbsdelf*): New target.
6943
c862ae31
AM
69442002-05-20 Alan Modra <amodra@bigpond.net.au>
6945
6946 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
6947 at the plt call stub.
6948
6dd14845
TS
69492002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6950
6951 * cpu-mips.c (mips_compatible): Don't try to check machine
6952 compatibility.
6953
a58d9c34
TR
69542002-05-18 Tom Rix <trix@redhat.com>
6955
9b5ecbd0 6956 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 6957
ef60b7ff
AM
69582002-05-17 Alan Modra <amodra@bigpond.net.au>
6959
6960 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
6961 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
6962 we've already warned about an undefined symbol. Report more
6963 detail on reloc errors.
6964
a703a6ea
AM
69652002-05-17 Alan Modra <amodra@bigpond.net.au>
6966
6967 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
6968 * configure.in: Invoke AM_INSTALL_LIBBFD.
6969 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
6970 (install_libbfd): .. New target.
6971 (uninstall_libbfd): Likewise.
6972 (install-bfdlibLTLIBRARIES): Likewise.
6973 (uninstall-bfdlibLTLIBRARIES): Likewise.
6974 (bfdlibdir): New.
6975 (bfdincludedir): New.
6976 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
6977 * aclocal.m4: Regenerate.
6978 * configure: Regenerate.
6979 * Makefile.in: Regenerate.
6980
2c13d98b
NC
69812002-05-17 Stuart Balfour <sbalfour@cisco.com>
6982
6983 * hash.c (bfd_hash_lookup): Remove computation of len from inside
6984 hash loop.
6985
629936c5
NC
69862002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
6987
6988 * config.bfd: Add targets for sh64-linux (little endian and
6989 big endian).
6990
e4cf60a8
NC
69912002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
6992
6993 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
6994 is located in the same section as the import table. Instead
6995 check, and if necessary load the section containing the thunk.
6996
d1e66cd4
NC
69972002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
6998
6999 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
7000 bfd_bread.
7001 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7002 with bfd_bread.
d1e66cd4 7003
2d653fc7
AM
70042002-05-15 Alan Modra <amodra@bigpond.net.au>
7005
7006 * aix5ppc-core.c: Warning fixes.
7007 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7008 * aout-target.h (MY_bfd_link_just_syms): Define.
7009 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7010 * bfd.c (bfd_link_just_syms): Define.
7011 * binary.c (binary_bfd_link_just_syms): Define.
7012 * bout.c (b_out_bfd_link_just_syms): Define.
7013 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7014 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7015 * coffcode.h (coff_bfd_link_just_syms): Define.
7016 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7017 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7018 (_bfd_elf_link_just_syms): Declare.
7019 * elf.c (_bfd_elf_link_just_syms): New function.
7020 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7021 sections haven't already been discarded by the linker.
7022 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7023 sections and SEC_MERGE sections.
7024 (elf_bfd_discard_info): Similarly here.
7025 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7026 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7027 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7028 * ieee.c (ieee_bfd_link_just_syms): Define.
7029 * ihex.c (ihex_bfd_link_just_syms): Define.
7030 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7031 (_bfd_generic_link_just_syms): Declare.
7032 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7033 * linker.c (_bfd_generic_link_just_syms): New function.
7034 * mmo.c (mmo_bfd_link_just_syms): Define.
7035 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7036 * oasys.c (oasys_bfd_link_just_syms): Define.
7037 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7038 * som.c (som_bfd_link_just_syms): Define.
7039 * srec.c (srec_bfd_link_just_syms): Define.
7040 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7041 (BFD_JUMP_TABLE_LINK): And here.
7042 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7043 * versados.c (versados_bfd_link_just_syms): Define.
7044 * vms.c (vms_bfd_link_just_syms): Define.
7045 * libbfd.h: Regenerate.
7046 * bfd-in2.h: Regenerate.
7047
cb7394f2
TS
70482002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7049
7050 * elf32-mips.c: Remove superfluous definitions copied from
7051 elfxx-mips.c.
7052 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7053 SGIish vectors to check the special case.
7054 (mips_elf_hi16_reloc): Fix comment.
7055 (mips_elf_got16_reloc): Likewise.
7056 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7057 (elf_reloc_map): Code cleanup.
7058 (mips_reloc_map): Add comment.
7059 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7060 (mips_elf32_rtype_to_howto): Likewise.
7061 (mips_elf32_discard_info): Likewise.
7062 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7063 lead to IRIX compatibility now.
7064
8dc1a139
TS
70652002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7066
7067 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7068
2051e1b5
JT
70692002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7070
7071 * config.bfd (shle-*-netbsdelf*): Add target which includes
7072 sh64 support.
7073
83954261
AM
70742002-05-13 David Edelsohn <edelsohn@gnu.org>
7075
7076 * configure.in: Revert 2002-04-07. Instead, auto-configure
7077 HAVE_ST_C_IMPL.
7078 * configure: Regenerate.
7079 * config.in: Regenerate.
7080 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7081 or AIX_5_CORE.
7082
a9bf1154
NC
70832002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7084
7085 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7086 corefiles as well.2
7087 * configure: Regenerate.
7088
3129eb7a
AM
70892002-05-13 Alan Modra <amodra@bigpond.net.au>
7090
7091 * Makefile.am (install-data-local): Install headers to
7092 $(exec_prefix)/include.
7093 * Makefile.in: Regenerate.
7094
a9a32010
DJ
70952002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7096 Daniel Jacobowitz <drow@mvista.com>
7097
7098 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7099 map BFD_RELOC_RVA.
7100
71012002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
7102
7103 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7104 hppa*-*-openbsd*): New targets.
7105 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7106 * configure: Regenerate.
7107
f1f0d9ab
TR
71082002-05-10 Tom Rix <trix@redhat.com>
7109
ea1e4b0d 7110 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
7111 xcoff64_ppc_relocate_section.
7112 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7113 * libxcoff.h: Common xcoff_reloc_type function declaration.
7114
c432ba1a
AM
71152002-05-10 Alan Modra <amodra@bigpond.net.au>
7116
16a10388 7117 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 7118 added in 2002-05-09 commit.
16a10388 7119
c432ba1a
AM
7120 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7121 don't look for stubs on all undefined syms.
7122
4a335f3d
AM
71232002-05-09 Alan Modra <amodra@bigpond.net.au>
7124
8fc39d5d
AM
7125 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7126 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7127 pcrel_offset.
7128
4a335f3d
AM
7129 * elf32-i386.c (elf_howto_table): Comments.
7130 (elf_i386_relocate_section): Handle more relocs for relocatable
7131 linking and against SEC_MERGE sections.
7132
41fcb14e
AM
71332002-05-08 Alan Modra <amodra@bigpond.net.au>
7134
7135 * elf32-ppc.c (ppc_elf_create_got): New function.
7136 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 7137 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
7138 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7139 _bfd_elf_create_got_section.
7140
b491616a
AM
71412002-05-07 Alan Modra <amodra@bigpond.net.au>
7142
7143 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7144 * elfxx-target.h (elf_backend_rela_normal): Define.
7145 (elfNN_bed): Init rela_normal.
7146 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7147 for section symbols here if rela_normal. Simplify abs section test.
7148 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7149 return immediately. Remove code handling relocatable linking.
7150 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7151 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7152 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7153 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7154 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7155 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7156 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7157 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7158 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7159 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7160 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7161 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7162 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7163 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7164 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7165 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7166 * elf-m10200.c (elf_backend_rela_normal): Define.
7167 * elf-m10300.c (elf_backend_rela_normal): Define.
7168 * elf32-fr30.c (elf_backend_rela_normal): Define.
7169 * elf32-i370.c (elf_backend_rela_normal): Define.
7170 * elf32-i860.c (elf_backend_rela_normal): Define.
7171 * elf32-m68k.c (elf_backend_rela_normal): Define.
7172 * elf32-mcore.c (elf_backend_rela_normal): Define.
7173 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7174 * elf32-ppc.c (elf_backend_rela_normal): Define.
7175 * elf32-s390.c (elf_backend_rela_normal): Define.
7176 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7177 * elf64-ppc.c (elf_backend_rela_normal): Define.
7178 * elf64-s390.c (elf_backend_rela_normal): Define.
7179 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7180 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7181 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7182 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7183
df212a7e
NC
71842002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7185
7186 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7187 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7188
3decf53c
AM
71892002-05-06 Alan Modra <amodra@bigpond.net.au>
7190
7191 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7192 when not relocatable. Fix reloc_emitter call for K&R.
7193
f46c2da6
AM
71942002-05-04 Alan Modra <amodra@bigpond.net.au>
7195
7196 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7197 reloading local sym addend mistakenly removed in 2002-05-01 change.
7198
7199 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7200 (read_abbrevs): Change "offset" param to bfd_vma.
7201 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7202 Change "abbrev_offset" to bfd_vma.
7203 (read_indirect_string): Use correct conversion chars in error
7204 message format string, cast bfd_vma's to unsigned long.
7205 (read_abbrevs): Likewise.
7206 (read_attribute_value): Likewise.
7207 (decode_line_info): Likewise.
7208 (scan_unit_for_functions): Likewise.
7209 (parse_comp_unit): Likewise.
7210
59862849
TR
72112002-05-04 Tom Rix <trix@redhat.com>
7212
7213 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7214 (coff_swap_reloc_out): Same.
7215 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7216 (xcoff_swap_reloc_out): Same.
7217 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7218 case some 16 bit relocs. Add reloc value to output.
7219 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 7220 R_RBR. Improve names.
59862849
TR
7221 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7222 (bfd_xcoff_backend_data): Update with new reloc swap names.
7223 (bfd_pmac_xcoff_backend_data) : Same.
7224 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7225 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 7226 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 7227 R_POS. Add reloc value to output.
ea1e4b0d
AM
7228 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7229 bit R_RBR. Improve names, masks.
59862849
TR
7230 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7231 (bfd_xcoff_backend_data): Update with new reloc swap names.
7232 (bfd_xcoff_aix5_backend_data) : Same.
7233
b4655ea9
AM
72342002-05-04 Alan Modra <amodra@bigpond.net.au>
7235
7236 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7237 bfd_count top_index, input_list, all_local_syms.
7238 (elf32_hppa_setup_section_lists): New function, split from
7239 elf32_hppa_size_stubs.
7240 (elf32_hppa_next_input_section): Likewise.
7241 (group_sections): Likewise.
7242 (get_local_syms): Likewise.
7243 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7244 stubs on undefined syms too.
7245 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 7246 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
7247 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7248 (elf32_hppa_next_input_section): Declare.
7249
301e3139
AM
72502002-05-04 Bob Byrnes <byrnes@curl.com>
7251
7252 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7253 _bfd_new_bfd.
7254
7c5fcef7
L
72552002-05-03 H.J. Lu (hjl@gnu.org)
7256
7257 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7258 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7259 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7260 to hide a global symbol.
7261 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 7262 forced_local to true.
7c5fcef7 7263
84de6048
RH
72642002-05-02 Richard Henderson <rth@redhat.com>
7265
7266 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7267 vs SHN_UNDEF to zero.
7268
805fc799
AM
72692002-05-02 Alan Modra <amodra@bigpond.net.au>
7270
c061c2d8
AM
7271 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7272 16 bit reloc.
7273 <R_PPC64_SECTOFF_DS>: Likewise.
7274 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7275 SECTOFF reloc.
7276 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7277 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7278 SECTOFF reloc.
7279
805fc799
AM
7280 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7281 (ppc64_elf_ha_reloc): New function.
7282 (ppc64_elf_brtaken_reloc): New function.
7283 (ppc64_elf_sectoff_reloc): New function.
7284 (ppc64_elf_sectoff_ha_reloc): New function.
7285 (ppc64_elf_toc_reloc): New function.
7286 (ppc64_elf_toc_ha_reloc): New function.
7287 (ppc64_elf_toc64_reloc): New function.
7288 (ppc64_elf_unhandled_reloc): New function.
7289 (ppc64_elf_howto_raw): Use the above.
7290 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7291 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7292 <R_PPC64_SECTOFF_DS>: Likewise.
7293 (IS_ABSOLUTE_RELOC): Update.
7294 (struct ppc_link_hash_table): Add have_undefweak.
7295 (ppc64_elf_link_hash_table_create): Init.
7296 (func_desc_adjust): Set have_undefweak.
7297 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7298 add the .sfpr blr when have_undefweak.
7299 (ppc64_elf_setup_section_lists): Check hash table flavour.
7300 (ppc64_elf_next_input_section): Move output_section->owner test to
7301 ppc64elf.em.
7302 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7303 and relocatable test. Return TOCstart and don't set elf_gp.
7304 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7305 offset calculation. Add assert on weak sym branch tweaks.
7306 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7307 (ppc64_elf_toc): Declare.
7308 (ppc64_elf_next_input_section): Update.
ea1e4b0d 7309
818c39a3
AM
73102002-05-01 Alan Modra <amodra@bigpond.net.au>
7311
7312 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7313 file_name.
7314
721956f4
AM
73152002-05-01 Alan Modra <amodra@bigpond.net.au>
7316
7317 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7318 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7319 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7320 call branches. Correct undefined weak destination.
7321 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7322 .sfpr, and correct case where either only savef* or restf* is
7323 needed.
7324
7325 Long branch stubs, multiple stub sections.
7326 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7327 (ppc64_elf_next_input_section): Declare.
7328 * elf64-ppc.c: Move linker-only prototypes.
7329 (STUB_SUFFIX): Define.
7330 (enum ppc_stub_type): New.
7331 (struct ppc_stub_hash_entry): New.
7332 (struct ppc_branch_hash_entry): New.
7333 (struct ppc_link_hash_entry): Add stub_cache, oh.
7334 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7335 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7336 Rename plt_overflow to stub_error.
7337 (ppc_stub_hash_lookup): Define.
7338 (ppc_branch_hash_lookup): Define.
7339 (stub_hash_newfunc): New function.
7340 (branch_hash_newfunc): New function.
7341 (link_hash_newfunc): Init new fields.
7342 (ppc64_elf_link_hash_table_create): Likewise.
7343 (ppc64_elf_link_hash_table_free): New function.
7344 (ppc_stub_name): New function.
7345 (ppc_get_stub_entry): New function.
7346 (ppc_add_stub): New function.
7347 (create_linkage_sections): Use bfd_make_section_anyway. Create
7348 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7349 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7350 and set up for plt call stubs. Link func and func desc syms.
7351 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7352 (func_desc_adjust): Avoid hash lookup when func desc sym available
7353 via shortcut, and set links when processing.
7354 (ppc64_elf_hide_symbol): Likewise.
7355 (allocate_dynrelocs): Don't allocate stub section here.
7356 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7357 Remove sstub code.
7358 (ppc_type_of_stub): New function.
7359 (build_one_stub): Delete.
7360 (ppc_build_one_stub): New function.
7361 (ppc_size_one_stub): New function.
7362 (ppc64_elf_setup_section_lists): New function.
7363 (ppc64_elf_next_input_section): New function.
7364 (group_sections): New function.
7365 (get_local_syms): New function.
7366 (ppc64_elf_size_stubs): Rewrite.
7367 (ppc64_elf_build_stubs): Rewrite.
7368 (ppc64_elf_relocate_section): Look up stub entry for REL24
7369 relocs. Don't propagate REL14* to dynamic objects. Look for long
7370 branch stubs if REL14* or REL24 relocs won't reach.
7371 (bfd_elf64_bfd_link_hash_table_free): Define.
7372
09c2219b
MM
73732002-04-30 Mark Mitchell <mark@codesourcery.com>
7374
c5cd6d62 7375 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 7376
07b678c0
TR
73772002-04-30 Tom Rix <trix@redhat.com>
7378
7379 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7380 symbol names into the hash table.
7381
dbe341c6
TR
73822002-04-28 Tom Rix <trix@redhat.com>
7383
7384 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 7385 calulating relocations.
dbe341c6 7386 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
7387 (xcoff_ppc_relocate_section): Use relocation and complain function
7388 tables.
7389 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
7390 (xcoff_complain_overflow_signed_func): Same.
7391 (xcoff_complain_overflow_bitfield_func): Same.
7392 (xcoff_complain_overflow_dont_func): Same.
7393 (xcoff_reloc_type_crel): New recot function.
7394 (xcoff_reloc_type_br): Same.
7395 (xcoff_reloc_type_ba): Same.
7396 (xcoff_reloc_type_toc): Same.
7397 (xcoff_reloc_type_rel): Same.
7398 (xcoff_reloc_type_neg): Same.
7399 (xcoff_reloc_type_pos): Same.
7400 (xcoff_reloc_type_fail): Same.
7401 (xcoff_reloc_type_noop): Same.
7402 * libxcoff.h : Declare common parts for xcoff64.
7403 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 7404 and complain function tables.
dbe341c6 7405
985142a4
AM
74062002-04-28 Alan Modra <amodra@bigpond.net.au>
7407
7408 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7409 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7410
eba91044
AM
74112002-04-26 Alan Modra <amodra@bigpond.net.au>
7412
e54fdaa5
AM
7413 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7414 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7415
a50c1845
AM
7416 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7417 same as the output before calling elf_link_input_bfd.
7418
eba91044
AM
7419 * coffcode.h (coff_compute_section_file_positions): Set
7420 section_tail after shuffling section list.
7421
3c25c5f6
NC
74222002-04-24 Christian Groessler <chris@groessler.org>
7423
7424 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7425 addresses are 23bit with a special layout, not plain 32bit
7426 values. Prevent relocation of immediate values.
7427
40d32fc6
CD
74282002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7429
7430 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7431 MIPS-16 ASE flags are set, print something to indicate that.
7432
067fa4a6
AM
74332002-04-23 Alan Modra <amodra@bigpond.net.au>
7434
7435 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7436 under which a plt call stub is used.
7437 (final_link_relocate): Similarly.
7438 (allocate_plt_static): Clear h-plabel except when plt entry is
7439 exclusively used for a plabel.
7440 (allocate_dynrelocs): Use the above to simplify plt sizing.
7441 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7442 (elf32_hppa_link_hash_table_create): Init.
7443 (BL22_RP): Define.
7444 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7445 (elf32_hppa_check_relocs): Set has_22bit_branch.
7446
7447 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7448 (final_link_relocate): Likewise.
7449
af40ce3c
JJ
74502002-04-22 Jakub Jelinek <jakub@redhat.com>
7451
7452 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7453 search table if some FDE is DW_EH_PE_aligned encoded either.
7454 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7455
09ae86c2
JJ
74562002-04-22 Richard Smith <richard@ex-parrot.com>
7457 Jakub Jelinek <jakub@redhat.com>
7458
7459 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7460 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7461 encoded personality.
7462 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7463 for CIE/FDE removal.
7464
deeb2cd7
TR
74652002-04-20 Tom Rix <trix@redhat.com>
7466
7467 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7468
99dc0092
AM
74692002-04-20 Alan Modra <amodra@bigpond.net.au>
7470
aa3d5824
AM
7471 * archures.c (bfd_lookup_arch): Move the list order comment..
7472 (struct bfd_arch_info): ..to where it belongs.
7473 * bfd-in2.h: Regenerate.
7474
99dc0092
AM
7475 * archures.c (bfd_lookup_arch): Add comment on list order.
7476 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7477 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7478 is always at head of list.
7479
7831a775
NC
74802002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7481
7482 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7483 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7484 definition of these functions for ARM_WINCE builds as they are
7485 not used.
ea1e4b0d 7486 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
7487 for ARM_WINCE builds.
7488
74892002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7490
ea1e4b0d 7491 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
7492
74932002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
7494
7495 * cpu-sh.c (scan_mach): Delete.
7496 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7497 (bfd_sh_arch): Likewise.
7498
3d8dbe36
NC
74992002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7500
7501 * ihex.c (ihex_write_object_contents): Fix check for records
7502 crossing 64K boundaries.
7503
4ab82700
AM
75042002-04-16 Alan Modra <amodra@bigpond.net.au>
7505
7506 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7507 type rather than just assuming entries are ELF.
7508 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7509 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7510 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7511 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7512 rather than elf_link_hash_entry.
7513
036fe0fe
RH
75142002-04-15 Richard Henderson <rth@redhat.com>
7515
7516 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7517 n32 binaries.
7518
c4f3d130
NC
75192002-04-15 Michael Snyder <msnyder@redhat.com>
7520
7521 * opncls.c (bfd_close): Write contents if writeable.
7522 Minor formatting tidy-ups.
7523
4ab82700 75242002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
7525
7526 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7527
0c04d169
MS
75282002-04-12 Michael Snyder <msnyder@redhat.com>
7529
7530 * bfd-in.h (bfd_get_section_lma): New access macro.
7531 Minor white-space fix-up.
7532
89d4966f
AM
75332002-04-12 Alan Modra <amodra@bigpond.net.au>
7534
7535 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7536 header pad.
7537
8d0da3c2
DD
75382002-04-09 DJ Delorie <dj@redhat.com>
7539
7540 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7541
05793179
NC
75422002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7543
7544 * coffcode.h (coff_read_word): New.
7545 (coff_compute_checksum): New.
7546 (coff_apply_checksum): New.
7547 (coff_write_object_contents): Call coff_apply_checksum () to
7548 apply checksum to PE image.
7549
46fe4e66
AM
75502002-04-08 Randolph Chung <tausq@debian.org>
7551
7552 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7553 (elf32_hppa_final_link): Split out sorting logic to..
7554 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7555 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7556
3b5b409c
AC
75572002-04-07 Andrew Cagney <ac131313@redhat.com>
7558
7559 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7560 pattern.
7561 * configure: Re-generate.
7562
ac7b6ceb
AC
75632002-04-07 Andrew Cagney <ac131313@redhat.com>
7564
7565 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
7566 is greater or equal to 4.3.3.
7567 * configure: Regenerate.
7568 Fix PR gdb/344.
7569
44aa49bb
HPN
75702002-04-05 Hans-Peter Nilsson <hp@axis.com>
7571
7572 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
7573 R_CRIS_32_PCREL>: Fix typo in name.
7574 (cris_elf_check_relocs): Always create .rela.got here when
7575 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
7576 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
7577 assume it's created.
7578
e2d34d7d
DJ
75792002-04-04 Daniel Jacobowitz <drow@mvista.com>
7580
7581 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
7582 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
7583 define.
7584 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
7585 * bfd.c (bfd_link_hash_table_free): Define.
7586 * binary.c (binary_bfd_link_hash_table_free): Define.
7587 * bout.c (b_out_bfd_link_hash_table_free): Define.
7588 * coff-rs6000.c (rs6000coff_vec): Include
7589 _bfd_generic_link_hash_table_free.
7590 (pmac_xcoff_vec): Likewise.
7591 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
7592 (aix5coff64_vec): Likewise.
7593 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
7594 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
7595 (bfd_elf32_bfd_link_hash_table_free): Define.
7596 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
7597 (bfd_elf32_bfd_link_hash_table_free): Define.
7598 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
7599 define.
7600 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
7601 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
7602 * ieee.c (ieee_bfd_link_hash_table_free): Define.
7603 * ihex.c (ihex_bfd_link_hash_table_free): Define.
7604 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
7605 (_bfd_generic_link_hash_table_free): Add prototype.
7606 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
7607 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
7608 * linker.c (_bfd_generic_link_hash_table_free): New function.
7609 * mmo.c (mmo_bfd_link_hash_table_free): Define.
7610 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
7611 * oasys.c (oasys_bfd_link_hash_table_free): Define.
7612 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
7613 * som.c (som_bfd_link_hash_table_free): Define.
7614 * srec.c (srec_bfd_link_hash_table_free): Define.
7615 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
7616 * versados.c (versados_bfd_link_hash_table_free): Define.
7617 * vms.c (vms_bfd_link_hash_table_free): New function.
7618 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
7619
7620 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
7621 instead of bfd_alloc.
7622 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
7623 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
7624 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
7625 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
7626 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
7627 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
7628 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
7629 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
7630 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
7631 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
7632 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
7633 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
7634 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
7635 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
7636 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
7637 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
7638 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
7639 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
7640 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
7641 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
7642 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
7643 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
7644 * m68klinux.c (linux_link_hash_table_create): Likewise.
7645 * sparclinux.c (linux_link_hash_table_create): Likewise.
7646 * sunos.c (sunos_link_hash_table_create): Likewise.
7647 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
7648
7649 * targets.c: Add _bfd_link_hash_table_free to xvec.
7650
7651 * bfd-in2.h: Regenerate.
7652 * libbfd.h: Regenerate.
7653 * libcoff.h: Regenerate.
7654
830629ab
AM
76552002-04-04 Alan Modra <amodra@bigpond.net.au>
7656
7657 * dep-in.sed: Cope with absolute paths.
7658 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
7659 Run "make dep-am".
7660 * Makefile.in: Regenerate.
7661 * coff-arm.c: Fix copyright date.
7662 * cpu-h8300.c: Likewise.
7663 * cpu-i370.c: Likewise.
7664 * cpu-s390.c: Likewise.
7665 * cpu-mips.c: Likewise.
7666 * po/SRC-POTFILES.in: Regenerate.
7667
c6e90b02
TS
76682002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7669
7670 * Makefile.am: Add elfxx-mips.c to the known backends.
7671 (elf32-mips.lo): remove dependency to coff/external.h.
7672 * Makefile.in: Regenerate.
7673 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
7674 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
7675 accordingly.
7676 * configure: Regenerate.
7677 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
7678 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
7679 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
7680 MIPS specific backend functions.
7681 * elf32-mips.c: Moved most code to elfxx-mips.c.
7682 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
7683 static.
7684 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
7685 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
7686 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
7687 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
7688 interface to allow selection of the right REL or RELA howto table.
7689 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
7690 static. Let it refuse n32 objects.
7691 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
7692 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
7693 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
7694 (elf32_mips_ignore_discarded_relocs): Rename from
7695 _bfd_elf32_mips_ignore_discarded_relocs.
7696 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
7697 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
7698 (elf_mips_howto_table_rela): Remove.
7699 * elf64-mips.c: Moved most code to elfxx-mips.c.
7700 (bfd_elf64_bfd_reloc_type_lookup): Make static.
7701 (mips_elf64_rtype_to_howto): New function.
7702 (mips_elf64_object_p): Likewise.
7703 (elf64_mips_irix_compat): Likewise.
7704 * elfxx-mips.c: New file containing common code merged together from
7705 elf32-mips.c and elf64-mips.c.
7706 * elfxx-mips.h: New file containing MIPS specific prototypes from
7707 elf-bfd.h.
7708 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
7709 elf_backend_mips_rtype_to_howto.
7710
d8dce692
AM
77112002-04-04 Alan Modra <amodra@bigpond.net.au>
7712
7713 * srec.c (MAXCHUNK, Chunk): Revise comments.
7714 (srec_write_record): Correct buffer size.
7715 (srec_write_header): Do without intermediate buffer.
7716 (srec_write_section): Validate Chunk.
7717 (srec_write_terminator): Pass NULL instead of dummy buffer.
7718 (srec_write_symbols): Pass file and symbol names directly to
7719 bfd_bwrite so sprintf won't overflow buffer.
7720
b88a866a
JJ
77212002-04-03 Jakub Jelinek <jakub@redhat.com>
7722
7723 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
7724 PC relative relocs against hidden symbols.
7725 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7726
d7866f04
AM
77272002-04-03 Alan Modra <amodra@bigpond.net.au>
7728
7729 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
7730 LMAs, loop over segments until p_vaddr and p_memsz specify an
7731 extent enclosing the section.
7732
9e81ee67
NC
77332002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
7734
7735 * ihex.c (ihex_write_object_contents): Do not allow records to
7736 cross a 64K boundary - wrap if necessary.
7737
d2b64500
JT
77382002-04-01 Nathan Williams <nathanw@wasabisystems.com>
7739
7740 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
7741 which caused the returned LWP ID to always be 0.
7742
e36f7d53
RH
77432002-04-01 Richard Henderson <rth@redhat.com>
7744
7745 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7746 (elf32_sparc_relocate_section): Use it to figure out when to
7747 initialize .got entries.
7748 * elf64-sparc.c: Similarly.
7749
e92d460e
AM
77502002-03-28 Alan Modra <amodra@bigpond.net.au>
7751
7752 * linker.c (link_action): Ignore duplicate warning syms.
7753 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
7754 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
7755 (elf_adjust_dynamic_symbol): Likewise.
7756 (elf_export_symbol): Likewise.
7757 (elf_link_find_version_dependencies): Likewise.
7758 (elf_link_assign_sym_version): Likewise.
7759 (elf_link_sec_merge_syms): Likewise.
7760 (elf_link_output_extsym): Likewise.
7761 (elf_gc_sweep_symbol): Likewise.
7762 (elf_gc_propagate_vtable_entries_used): Likewise.
7763 (elf_gc_smash_unused_vtentry_relocs): Likewise.
7764 (elf_gc_allocate_got_offsets): Likewise.
7765 (elf_collect_hash_codes): Likewise.
7766 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
7767 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
7768 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7769 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
7770 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
7771 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
7772 (elf_cris_discard_excess_dso_dynamics): Likewise.
7773 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
7774 (mark_PIC_calls): Likewise.
7775 (allocate_plt_static): Likewise.
7776 (allocate_dynrelocs): Likewise.
7777 (readonly_dynrelocs): Likewise.
7778 * elf32-i386.c (allocate_dynrelocs): Likewise.
7779 (readonly_dynrelocs): Likewise.
7780 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
7781 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
7782 * elf32-mips.c (mips_elf_output_extsym): Likewise.
7783 (mips_elf_sort_hash_table_f): Likewise.
7784 (mips_elf_check_mips16_stubs): Likewise.
7785 * elf32-s390.c (allocate_dynrelocs): Likewise.
7786 (readonly_dynrelocs): Likewise.
7787 * elf32-sh.c (sh_elf_discard_copies): Likewise.
7788 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
7789 (xstormy16_relax_plt_realloc): Likewise.
7790 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
7791 (elf64_alpha_output_extsym): Likewise.
7792 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
7793 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
7794 (mips_elf64_check_mips16_stubs): Likewise.
7795 (mips_elf64_output_extsym): Likewise.
7796 * elf64-ppc.c (func_desc_adjust): Likewise.
7797 (allocate_dynrelocs): Likewise.
7798 (readonly_dynrelocs): Likewise.
7799 * elf64-s390.c (allocate_dynrelocs): Likewise.
7800 (readonly_dynrelocs): Likewise.
7801 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
7802 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
7803 (readonly_dynrelocs): Likewise.
7804 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
7805 * aoutx.h (aout_link_write_other_symbol): Likewise.
7806 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
7807 (_bfd_coff_write_global_sym): Likewise.
7808 * i386linux.c (linux_tally_symbols): Likewise.
7809 * m68klinux.c (linux_tally_symbols): Likewise.
7810 * sparclinux.c (linux_tally_symbols): Likewise.
7811 * pdp11.c (aout_link_write_other_symbol): Likewise.
7812 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
7813 * xcofflink.c (xcoff_build_ldsyms): Likewise.
7814 (xcoff_write_global_symbol): Likewise.
7815
7816 * cofflink.c (_bfd_coff_final_link): Formatting.
7817 * cpu-mips.c (mips_compatible): Make static, prototype.
7818 * elf32-i386.c (elf_i386_check_relocs): Formatting.
7819 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
7820 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
7821 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
7822 (mips_elf64_final_link): Likewise.
7823 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
7824 prototype.
7825
2106126f
NC
78262002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
7827
7828 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
7829 (SWAP_OUT_RELOC_OFFSET): Define.
7830
b99d1833
AM
78312002-03-27 Gregory Steuck <greg@nest.cx>
7832
7833 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
7834 terminating NULL if empty symbol table.
7835 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
7836
ad43ed4c
L
78372002-03-26 H.J. Lu (hjl@gnu.org)
7838
7839 * elflink.h (elf_link_input_bfd): Revert the last change since
7840 the gcc exception handling isn't fixed yet.
7841
3851fca4
L
78422002-03-26 H.J. Lu (hjl@gnu.org)
7843
7844 * elflink.h (elf_link_input_bfd): Complain about relocations
7845 against local symbols in discarded sections.
7846
b91afed7
AM
78472002-03-26 Alan Modra <amodra@bigpond.net.au>
7848
7849 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
7850
dba143ef
AM
78512002-03-23 Alan Modra <amodra@bigpond.net.au>
7852
7853 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
7854 section file offset for !SEC_LOAD sections.
7855
ee29b9fb
RE
78562002-03-21 Richard Earnshaw <rearnsha@arm.com>
7857
830629ab
AM
7858 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
7859 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 7860
54327882
AM
78612002-03-21 Alan Modra <amodra@bigpond.net.au>
7862
7863 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
7864 Whitespace changes.
7865 * archive.c: Update copyright date.
7866 * bfd-in2.h: Regenerate.
7867 * libbfd.h: Regenerate.
7868 * Makefile.am: Run "make dep-am"
7869 * Makefile.in: Regenerate.
7870 * po/SRC-POTFILES.in: Regenerate.
7871
1ee24f27
DJ
78722002-03-20 Daniel Jacobowitz <drow@mvista.com>
7873
7874 * dwarf2.c (struct funcinfo): Move up.
7875 (lookup_address_in_function_table): New argument function_ptr.
7876 Set it.
7877 (lookup_address_in_line_table): New argument function. If function
7878 is non-NULL, use it to handle ``addr'' before the first line note of
7879 the function.
7880 (comp_unit_find_nearest_line): Update and swap calls to
7881 lookup_address_in_function_table and lookup_address_in_line_table.
7882 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
7883 N_SLINE encountered if we see an N_FUN before any N_SLINE.
7884
51b9608c
TR
78852002-03-20 Tom Rix <trix@redhat.com>
7886
ea1e4b0d 7887 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 7888 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 7889 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 7890
789c90aa
TR
78912002-03-19 Tom Rix <trix@redhat.com>
7892
ea1e4b0d 7893 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
7894 dynamic objects in archives.
7895
1da54d81
HPN
78962002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
7897
7898 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
7899 STT_NOTYPE symbols to STT_OBJECT.
7900
7831a775 79012002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
7902
7903 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
7904
eb1e0e80
NC
79052002-03-18 Tom Rix <trix@redhat.com>
7906
7907 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
7908 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
7909 * coff-rs6000 (do_pad) : New function for archive padding.
7910 (do_copy) : New function for object file copying in archives.
7911 (do_shared_object_padding) : New function for padding shared
7912 objects to their text section alignment in archives.
7913 (bfd_xcoff_ar_achive_set_magic) : Stub.
7914 (xcoff_write_armap_big) : Use do_copy and do_pad.
7915 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
7916 do_copy and do_pad.
7917 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 7918 bfd_xcoff_magic_number.
eb1e0e80
NC
7919 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
7920 fop.
7921 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
7922 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
7923 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
7924 * rs6000-core.c : Update copyright date.
ea1e4b0d 7925 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
7926 csectpp.
7927 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
7928 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
7929 (coff_set_flags) : Use bfd_xcoff_magic_number.
7930 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
7931 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
7932 * Makefile.am : Same.
7933 * config.bfd : Same.
7934 * targets.c : Same.
7935 * configure : Regnerate.
7936 * Makefile.in : Same.
7937 * bfd-in2.h : Same.
7938
a1c259a1
NC
79392002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
7940
7941 * po/fr.po: Updated version.
7942
4dae1ae7
AM
79432002-03-18 Alan Modra <amodra@bigpond.net.au>
7944
7945 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
7946 * libbfd.h: Regenerate.
7947 * archive.c (coff_write_armap): Pass on failures from
7948 bfd_write_bigendian_4byte_int.
7949
36b4f6e7
L
79502002-03-14 H.J. Lu <hjl@gnu.org>
7951
7952 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
7953 error to bfd_error_nonrepresentable_section for reinit_array
7954 section in DSO.
7955
a1aefc76
NC
79562002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
7957
a181be0a
NC
7958 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
7959 OR it in rather than replacing previously selected flags.
7960
a1aefc76
NC
7961 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
7962 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
7963
c119f9b8
AM
79642002-03-14 Alan Modra <amodra@bigpond.net.au>
7965
7966 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
7967 (N): Use the above.
7968 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
7969 ensure reloc size matches before calling elf_link_input_bfd.
7970 Add an assert to check reloc size when counting output relocs.
7971
c295a511
NC
79722002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
7973
7974 * mmo.c (mmo_get_loc): Return NULL rather than false.
7975
9ce88e60
NC
79762002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
7977
7978 * po/fr.po: Updated version.
7979
4ddafab0
AM
79802002-03-13 Alan Modra <amodra@bigpond.net.au>
7981
b74fa2cd
AM
7982 * archures.c (bfd_default_compatible): Test bits_per_word.
7983 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
7984 bfd_default_compatible.
7985 * cpu-i370.c (i370_compatible): Likewise.
7986 * cpu-sparc.c (sparc_compatible): Likewise.
7987 * cpu-h8300.c (compatible): Test in->arch == out->arch.
7988
40b829d4
AM
7989 * elflink.h: Formatting fixes.
7990 (elf_link_output_extsym): Merge undefined and undef weak cases.
7991
4ddafab0
AM
7992 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
7993 when word size of input matches output word size.
7994
dd53c801
AJ
79952002-03-12 Andreas Jaeger <aj@suse.de>
7996
7997 * cpu-i386.c (i386_compatible): New. Use it instead of
7998 bfd_default_compatible.
7999
aa066ac8
L
80002002-03-07 H.J. Lu (hjl@gnu.org)
8001
8002 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8003 as the type for bfd_reloc_val.
8004
1bf42538
JL
80052002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8006
8007 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8008 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8009 (elf_hppa_final_link_relocate): Correct relocations for indirect
8010 references to local data through the DLT. Fix .opd creation for
8011 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8012 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8013 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8014 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8015 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8016 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8017 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8018
86eaf01e
JJ
80192002-03-05 Jakub Jelinek <jakub@redhat.com>
8020
8021 * merge.c (_bfd_merge_sections): Don't segfault if there
8022 is nothing to merge due to GC.
8023
c44233aa
AM
80242002-03-05 Alan Modra <amodra@bigpond.net.au>
8025
039cc25f
AM
8026 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8027 symbols that have been forced local.
8028
c44233aa
AM
8029 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8030 to output forced local syms for non-shared link.
8031 (elf_link_output_extsym): Tweak condition for calling backend
8032 adjust_dynamic_symbol so that previous behaviour is kept.
8033 Whitespace changes throughout file.
8034
25e27870
L
80352002-03-04 H.J. Lu <hjl@gnu.org>
8036
8037 * elf.c (bfd_section_from_shdr): Handle special sections,
8038 .init_array, .fini_array and .preinit_array.
8039 (elf_fake_sections): Likewise.
8040
8041 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8042 DT entry only if the section is in output for .init_array,
8043 .fini_array and .preinit_array. Complain about .preinit_array
8044 section in DSO.
8045 (elf_bfd_final_link): Warn zero size for .init_array,
8046 .fini_array and .preinit_array sections.
8047
8048 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8049 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8050 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8051 .preinit_array.
8052
bb2a49f2
AM
80532002-03-04 Alan Modra <amodra@bigpond.net.au>
8054
8055 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8056 * configure: Regenerate.
8057
38487e5e
TR
80582002-03-02 Tom Rix <trix@redhat.com>
8059
c44233aa
AM
8060 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8061 symbolic equiv.
38487e5e
TR
8062 * coff-rs6000.c (xcoff_howto_table): Same.
8063
30831527
RH
80642002-03-01 David Mosberger <davidm@hpl.hp.com>
8065
8066 * elflink.h (size_dynamic_sections): If section named
8067 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8068 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8069 ".init_array" and ".fini_array".
8070 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8071 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8072 DT_FINI_ARRAY.
8073
c8e5ddc8
AM
80742002-02-26 Andrew Macleod <amacleod@cygnus.com>
8075
8076 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8077 dynsyms.
8078
96e0dda4
AM
80792002-02-25 Alan Modra <amodra@bigpond.net.au>
8080
1c5b6bf8
AM
8081 * elf64-hppa.h: Update copyright date.
8082
96e0dda4
AM
8083 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8084 (ppc64_elf_relocate_section): Don't generate power4 style branch
8085 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8086
0fb19cbc
JJ
80872002-02-22 Jakub Jelinek <jakub@redhat.com>
8088
8089 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8090 last patch.
8091 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8092
c434dee6
AJ
80932002-02-21 Andreas Jaeger <aj@suse.de>
8094
8095 * elf64-x86-64.c: Major rework that introduces all recent changes
8096 to the x86-64 backend. Get a closer match to elf32-i386.
8097 (struct elf64_x86_64_dyn_relocs): Rename from
8098 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8099 all users.
8100 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8101 sections.
8102 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8103 remove casts, initialize new hash members.
8104 (create_got_section): New.
8105 (elf64_x86_64_create_dynamic_sections): New.
8106 (elf64_x86_64_copy_indirect_symbol): New.
8107 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8108 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8109 Reference count possible .plt and .got entries. Don't test input
8110 section SEC_READONLY here to try to avoid copy relocs, and keep
8111 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8112 DF_TEXTREL here. Delay setting of variables until needed. Cache
8113 pointer to "sreloc" section in elf_section_data. Tweak condition
8114 under which .got created. Report files with bad relocation
8115 section names.
8116 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8117 Reference count possible .plt entries. Don't deallocate .got and
8118 .relgot space here.
8119 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8120 do copy reloc processing for weakdefs. Remove redundant casts and
8121 aborts. Delay setting of vars until needed. Move creation of
8122 dynamic symbols and allocation of .plt and .rela.plt to
8123 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8124 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8125 (allocate_dynrelocs): New.
8126 (readonly_dynrelocs): New.
8127 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8128 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8129 Zero out the dynamic allocated content space.
8130 (elf64_x86_64_discard_copies): Removed.
8131 (elf64_x86_64_relocate_section): Make use of dynamic section
8132 short-cuts. Localise vars, and delay setting. Better error
8133 reporting, replace BFD_ASSERT with abort. Check
8134 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8135 regular object file and tread the weak definition as the normal
8136 one. Don't discard relocs for undefweak or undefined symbols and
8137 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8138 relocs.
8139 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8140 symbols that have been forced local. Use same test to decide if
8141 we can use a relative reloc for got as relocate_section. Expand
8142 SHN_UNDEF comment. Move expressions out of function calls.
8143 Replace BFD_ASSERT with abort.
8144 (bfd_elf64_bfd_final_link): Removed.
8145 (elf_backend_copy_indirect_symbol): Define.
8146
ff3a6ee3
TR
81472002-02-20 Tom Rix <trix@redhat.com>
8148
8149 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8150 (_bfd_xcoff_reloc_type_lookup): Use it.
8151 * coff64-rs6000.c (xcoff64_howto_table): Same.
8152 (xcoff64_reloc_type_lookup): Same.
c434dee6 8153
a68d41fb
AM
81542002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8155
9b5ecbd0 8156 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
8157 little endian.
8158
befc3abb
MS
81592002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8160
8161 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8162 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8163 * bfd-in2.h: Regenerate.
8164 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8165 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8166 with "s390:64-bit".
8167 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8168 (elf_s390_reloc_type_lookup): Likewise.
8169 (elf_s390_check_relocs): Likewise.
8170 (elf_s390_gc_sweep_hook): Likewise.
8171 (elf_s390_relocate_section): Likewise.
8172 (elf_s390_object_p): Use renamed architecture define.
8173 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8174
6eeeec9b
FCE
81752002-02-19 Frank Ch. Eigler <fche@redhat.com>
8176
8177 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8178
0bb2d96a
JJ
81792002-02-19 Jakub Jelinek <jakub@redhat.com>
8180
8181 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8182 absptr -> pcrel optimization for shared libs.
8183 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8184 library cannot be converted to pcrel.
8185 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8186 relative.
8187 * elf32-i386.c (elf_i386_relocate_section): If
8188 _bfd_elf_section_offset returned -2, skip, but make sure the
8189 relocation is installed.
8190 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8191 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8192 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8193 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8194 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8195 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8196 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8197 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8198 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8199 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8200 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8201 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 8202 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
8203 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8204 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8205 _bfd_elf_section_offset returning -2 the same way as -1.
8206 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8207 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8208 and BFD_ASSERT.
8209 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8210
69f284c7
TR
82112002-02-18 Tom Rix <trix@redhat.com>
8212
8213 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8214 (bfd_xcoff_size_dynamic_sections): Same.
8215 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8216 (bfd_xcoff_size_dynamic_sections): Same.
8217 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8218 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8219 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8220 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8221 * bfd-in2.h: Regenerate.
8222
82bd7b59
AM
82232002-02-18 Alan Modra <amodra@bigpond.net.au>
8224
8225 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8226 (struct ppc_link_hash_table): Add sfpr.
8227 (ppc64_elf_link_hash_table_create): Init it.
8228 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8229 .glink out to..
8230 (create_linkage_sections): ..here. Make .sfpr too.
8231 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8232 dynobj early.
8233 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8234 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8235 ._restf* functions, and create as needed.
8236 (func_desc_adjust): Only force_local for shared libs.
8237
ef1355e8
NC
82382002-02-18 David O'Brien <obrien@FreeBSD.org>
8239
8240 * configure.in: Bump version number post 2.12 branching.
8241 * configure: Regenerate.
8242
dfa36a69
HPN
82432002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8244
8245 * mmo.c: Correct and improve comments.
8246 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8247 zero-pad. Use input to fill up non-empty bfd buffer.
8248 (mmo_flush_chunk): New function.
8249 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8250 changed. Don't emit location specifier if VMA is same as
8251 *LAST_VMAP after omitting leading zero contents. Call
8252 mmo_flush_chunk before emitting location specifier.
8253 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8254 with mmo_write_loc_chunk calls.
8255 (mmo_internal_write_section): Call mmo_flush_chunk after
8256 mmo_write_chunk.
8257 (mmo_write_symbols_and_terminator): Move :Main to first position
8258 in symbol array. Add faked one if it does not exist if there are
8259 other symbols. Don't add it if there are no symbols at all. Move
8260 out test for value of :Main from symbol loop. Rename table
8261 fakemain to maintable and variable mainsym to fakemain.
8262
ccf00ab6
RH
82632002-02-15 Richard Henderson <rth@redhat.com>
8264
8265 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8266 section with no got matches any got. Simplify error generaion.
8267
88eaccc2
AM
82682002-02-15 Alan Modra <amodra@bigpond.net.au>
8269
fd96f80f
AM
8270 Support arbitrary length fill patterns.
8271 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8272 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8273 Call default_data_link_order.
8274 (default_fill_link_order): Delete.
8275 (default_data_link_order): New function.
8276 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8277 of bfd_fill_link_order with bfd_data_link_order.
8278 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8279 * elf64-mips.c (mips_elf64_final_link): Likewise.
8280
88eaccc2
AM
8281 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8282 Correct value returned in "end" for "0x<non-hex>".
8283
e2fd756b
NC
82842002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8285
8286 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8287 (scan): Test against 'mach' field in info structure.
8288
edd29cf9
AM
82892002-02-14 Alan Modra <amodra@bigpond.net.au>
8290
8291 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8292
1e30956e 82932002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
8294
8295 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8296 EF_M68000.
8297
bf36db18
NC
82982002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8299
8300 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
8301 non-zero physical addresses when adjusting the LMAs of new
8302 sections.
bf36db18 8303
189c6563
AM
83042002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8305
8306 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8307 from _bfd_elf_hppa_gen_reloc_type.
8308 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8309 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8310 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8311 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8312
e948afaf
AO
83132002-02-12 Alexandre Oliva <aoliva@redhat.com>
8314
8315 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8316 loading its contents if there's nothing to do in it.
8317
19397422
AM
83182002-02-12 Alan Modra <amodra@bigpond.net.au>
8319
0ad3a73b
AM
8320 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8321 64k boundary.
8322
19397422
AM
8323 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8324 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8325 (ppc64_elf_finish_dynamic_sections): Set values for them.
8326
51316059
MS
83272002-02-11 Michael Snyder <msnyder@redhat.com>
8328
8329 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8330 * elf.c (elfcore_grok_pstatus): Add prototype.
8331 (elfcore_grok_lwpstatus): Add prototype.
8332 (elfcore_write_lwpstatus): New function.
8333 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8334
518313c3
AO
83352002-02-11 Alexandre Oliva <aoliva@redhat.com>
8336
8337 * elf32-sh.c: Added missing prototypes.
8338 * elf32-sh64.c: Likewise.
8339 (sh_elf_align_loads): Mark unused args as such.
8340 * elf64-sh64.c: Added missing prototypes.
8341 (struct elf_sh64_link_hash_entry): Fix typo.
8342 (sh_elf64_relocate_section): Fix info argument passed to
8343 _bfd_elf_section_offset.
8344
2c73f9d8
AM
83452002-02-11 Alan Modra <amodra@bigpond.net.au>
8346
8347 * Makefile.am: "make dep-am".
8348 * Makefile.in: Regenerate.
8349 * aclocal.m4: Regenerate.
8350 * config.in: Regenerate.
8351 * configure: Regenerate.
8352
d426c6b0
DJ
83532002-02-10 Daniel Jacobowitz <drow@mvista.com>
8354
8355 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8356 variable warnings.
8357 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8358 comparison warning.
8359 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8360 cast warnings for the common case.
8361
e58ee0cd
HPN
83622002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8363
8364 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8365 vectors.
8366 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8367 vectors.
8368
7793f4d0
RH
83692002-02-09 Richard Henderson <rth@redhat.com>
8370
8371 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8372 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8373 (elf64_alpha_relocate_section): Likewise.
8374 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8375 * bfd-in2.h, libbfd.h: Rebuild.
8376
7e799044
HPN
83772002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8378
8379 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8380 that base-plus-offset reloc accounting is consistent.
8381 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8382 up to date for undefined symbols.
8383
027d73eb
EC
83842002-02-08 Eric Christopher <echristo@redhat.com>
8385
8386 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8387
8388 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8389 sections for the O32 ABI.
8390
517662d4
CD
83912002-02-08 Chris Demetriou <cgd@broadcom.com>
8392
8393 * elf32-arm.h: Fix formatting of _("...").
8394 * elf32-d10v.c: Likewise.
8395 * elf32-m68k.c: Likewise.
8396 * elf32-mips.c: Likewise.
8397
5e37cc46
NC
83982002-02-08 Ivan Guzvinec <ivang@opencores.org>
8399
8400 * coff-or32.c: Fix compile time warning messages.
8401
fbca6ad9
AO
84022002-02-08 Alexandre Oliva <aoliva@redhat.com>
8403
8404 Contribute sh64-elf.
8405 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8406 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8407 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8408 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8409 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8410 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8411 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8412 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8413 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8414 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8415 New relocs.
8416 * libbfd.h, bfd-in2.h: Rebuilt.
8417 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8418 (sh_reloc_map): Map them.
8419 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8420 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8421 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8422 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8423 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8424 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8425 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8426 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8427 datalabel_got_offset.
8428 (sh_elf_link_hash_newfunc): Initialize it.
8429 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 8430 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
8431 GOT and GOTOFF handling to new SHmedia relocation types. Support
8432 GOT_BIAS.
8433 (sh_elf_check_relocs): Likewise.
8434 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8435 PLT entries using movi_shori_putval. Support GOT_BIAS.
8436 (sh_elf_finish_dynamic_sections): Likewise.
8437 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8438 relocation, it's now done by the caller.
8439 (GOT_BIAS): New.
8440 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8441 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8442 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8443 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8444 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8445 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8446 sh64_elf64_hash_table): New.
8447 (sh_elf64_howto_table): Introduce new relocs.
8448 (sh_elf64_info_to_howto): Accept new PIC relocs.
8449 (sh_elf64_relocate_section): Augment the scope of
8450 seen_stt_datalabel. Support new PIC relocs.
8451 (sh_elf64_check_relocs): Support new PIC relocs.
8452 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8453 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8454 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8455 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8456 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8457 movi_shori_putval, movi_3shori_putval,
8458 sh64_elf64_create_dynamic_sections,
8459 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8460 sh64_elf64_size_dynamic_sections,
8461 sh64_elf64_finish_dynamic_symbol,
8462 sh64_elf64_finish_dynamic_sections): New.
8463 (elf_backend_create_dynamic-sections,
8464 bfd_elf64_bfd_link_hash_table_create,
8465 elf_backend_adjust_dynamic_symbol,
8466 elf_backend_size_dynamic_sections,
8467 elf_backend_finish_dynamic_symbol,
8468 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8469 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8470 elf_backend_got_header_size, elf_backend_plt_header_size):
8471 Define.
8472 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8473 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8474 match official numbers and names; moved unmaching ones to the
8475 range 0xf2-0xff.
8476 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 8477 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
8478 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8479 sections.
9b5ecbd0 8480 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
8481 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8482 be aligned.
8483 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 8484 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8485 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8486 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8487 .cranges section with SEC_SORT_ENTRIES set.
8488 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8489 incoming sorted .cranges section.
8490 (sh64_bfd_elf_copy_private_section_data): New.
8491 (sh64_elf_final_write_processing): Only sort .cranges and modify
8492 start address if called by linker.
8493 2001-01-08 Ben Elliston <bje@redhat.com>
8494 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 8495 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 8496 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 8497 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8498 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8499 line. Add comments before all entries.
8500 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8501 comment.
8502 (sh_elf64_reloc): Correct head comment.
8503 (sh_elf64_relocate_section): Correct spacing.
8504 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8505 instead call reloc_dangerous callback.
8506 <case R_SH_SHMEDIA_CODE>: New case.
8507 (sh_elf64_gc_mark_hook): Correct spacing.
8508 (sh_elf64_check_relocs): Ditto.
8509 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8510 New case.
8511 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8512 functions.
8513 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8514 clarify describing comment. Add comments before all entries.
8515 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8516 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 8517 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8518 Sort .cranges section in final link. Prepare to set bit 0 on
8519 entry address.
8520 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8521 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8522 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8523 .cranges section.
8524 (sh64_backend_section_from_shdr): New, to recognize
8525 SHT_SH5_CR_SORTED on incoming .cranges section.
8526 (elf_backend_section_from_shdr): Define.
8527 (sh64_elf_final_write_processing): Sort outgoing .cranges
8528 section. (New, temporarily disabled:) Set bit 0 on entry address
8529 according to ISA type.
8530 (sh64_find_section_for_address): New.
8531 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8532 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8533 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8534 bfd_malloc, not xmalloc.
8535 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8536 global.
8537 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8538 temporarily disabled) setting bit 0 on entry address.
8539 (elf_backend_final_write_processing): Define.
9b5ecbd0 8540 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8541 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8542 be a proper relocation for PTA and PTB rather than a marker.
8543 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8544 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8545 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8546 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8547 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8548 Zero src_mask.
8549 * elf64-sh64.c: Ditto.
8550 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8551 * elf32-sh64.c: Include opcodes/sh64-opc.h
8552 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8553 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8554 parameters. No unused parameters. Caller changed.
8555 <case R_SH_PT_16>: New case.
8556 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8557 * Makefile.in: Regenerate.
9b5ecbd0 8558 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8559 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8560 all code sections.
8561 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8562 (sh64_elf_merge_private_data): Ditto.
8563 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
8564 to access stored section flags.
8565 (sh64_elf_final_write_processing): Return immediately unless
8566 called by linker. Use sh64_elf_section_data (cranges) to get size
8567 of linker-generated cranges entries.
8568 (sh64_elf_copy_private_data): Add missing "return true".
8569 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8570 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 8571 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8572 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
8573 elf64-sh64.c:sh64_elf_fake_sections.
8574 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 8575 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8576 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
8577 (sh64_elf_final_write_processing): New.
8578 (elf_backend_final_write_processing): Define.
8579 (sh64_elf_fake_sections): Get header flags from tdata field.
8580 (sh64_elf_copy_private_data): Do not call
8581 sh64_elf_copy_private_data_internal, just copy e_flags field.
8582 (sh64_elf_merge_private_data): Do not call
8583 sh64_elf_copy_private_data_internal.
9b5ecbd0 8584 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8585 Remove EF_SH64_ABI64, let ELF size make difference.
8586 Remove SH64-specific BFD section flag.
8587 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
8588 containing SHmedia through elf_section_data (asect)->tdata
8589 non-zero, not using a BFD section flag.
8590 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
8591 (sh64_elf_merge_private_data): Similar.
8592 (elf_backend_section_flags): Don't define.
8593 (sh64_elf_backend_section_flags): Delete.
8594 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
8595 not EF_SH64_ABI64.
8596 (sh_elf64_merge_private_data): Similar.
8597 * section.c (Section flags definitions): Don't define
8598 SEC_SH_ISA_SHMEDIA.
8599 (bfd-in2.h): Regenerate.
9b5ecbd0 8600 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8601 Make DataLabel references work with partial linking.
8602 * elf32-sh64.c: Fix formatting.
8603 (sh64_elf_link_output_symbol_hook): New.
8604 (elf_backend_link_output_symbol_hook): Define to
8605 sh64_elf_link_output_symbol_hook.
8606 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
8607 undefined if partial linking. Adjust sanity check.
8608 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
8609 (elf_backend_link_output_symbol_hook): Define to
8610 sh64_elf64_link_output_symbol_hook.
8611 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
8612 undefined if partial linking. Adjust sanity check.
9b5ecbd0 8613 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8614 Implement semantics for inter-file DataLabel references.
8615 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
8616 (sh64_elf64_add_symbol_hook): New.
8617 (sh_elf64_relocate_section): If passing an indirect symbol with
8618 st_type STT_DATALABEL on the way to a symbol with st_other
8619 STO_SH5_ISA32, do not bitor 1 to the relocation.
8620 (elf_backend_add_symbol_hook): Define to
8621 sh64_elf64_add_symbol_hook.
8622 * elf64-sh32.c: Tweak comments.
8623 (DATALABEL_SUFFIX): Define.
8624 (sh64_elf_add_symbol_hook): New.
8625 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
8626 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
8627 symbol with st_type STT_DATALABEL on the way to a symbol with
8628 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 8629 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8630 Pass through STT_DATALABEL.
8631 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
8632 (elf_backend_get_symbol_type): Define.
8633 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
8634 (elf_backend_get_symbol_type): Define.
9b5ecbd0 8635 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8636 * elf32-sh64.c: Tweak comments.
8637 (sh64_elf_copy_private_data_internal): Add prototype.
8638 (bfd_elf32_bfd_set_private_flags): Define.
8639 (sh64_elf_copy_private_data_internal): Compare machine name, not
8640 textual BFD target name, to check whether to copy section flag
8641 SHF_SH5_ISA32.
8642 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
8643 Tweak section-contents-type-mismatch message.
8644 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
8645 Validize reloc-types.
8646 * elf64-sh64.c: New file.
8647 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
8648 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
8649 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
8650 Regenerate dependencies.
8651 * Makefile.in: Regenerate.
8652 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
8653 bfd_elf64_sh64l_vec.
8654 * configure.in: Handle bfd_elf64_sh64_vec and
8655 bfd_elf64_sh64l_vec.
8656 * configure: Regenerate.
8657 * po/POTFILES.in: Regenerate.
8658 * po/bfd.pot: Regenerate.
9b5ecbd0 8659 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8660 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
8661 anything else but EF_SH64 and EF_SH64_ABI64.
8662 (sh64_elf_merge_private_data): Emit error for anything else but
8663 EF_SH64 and EF_SH64_ABI64.
8664 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
8665 from targ_selvecs.
8666 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
8667 bfd_elf32_sh64l_vec as a temporary measure.
8668 * configure: Regenerate.
9b5ecbd0 8669 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8670 * cpu-sh.c (arch_info_struct): Include sh5 item
8671 unconditionalized.
8672 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
8673 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
8674 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
8675 * elf32-sh64.c: Tweak comments.
8676 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
8677 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
8678 (sh64_elf_copy_private_data_internal): Wrap long line.
8679 (sh64_elf_merge_private_data): Rewrite to allow objects from
8680 SH64 subsets to be linked together.
8681 (INCLUDE_SHMEDIA): Define.
8682 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
8683 Parenthesize plus-expression inside or-expression.
8684 <global symbol>: Ditto.
8685 (sh_elf_set_mach_from_flags): Remove code refusing
8686 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 8687 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8688 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
8689 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
8690 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
8691 (sh_elf_relocate_section) <local symbol>: Or 1 in
8692 calculation of relocation if sym->st_other & STO_SH5_ISA32.
8693 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
8694 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
8695 relocation.
9b5ecbd0 8696 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8697 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
8698 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
8699 Regenerate dependencies.
8700 * Makefile.in: Regenerate.
8701 * archures.c: Add bfd_mach_sh5.
8702 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
8703 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
8704 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
8705 * configure: Regenerate.
8706 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
8707 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
8708 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
8709 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
8710 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
8711 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
8712 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
8713 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
8714 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
8715 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
8716 in item for SH5.
8717 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
8718 for SHmedia relocs.
8719 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
8720 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
8721 shmedia_prepare_reloc, goto final_link_relocate if it returns
8722 non-zero, else fail as before.
8723 (sh_elf_set_mach_from_flags): Provide function only if not defined
8724 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
8725 (sh_elf_set_private_flags): Provide function only if not defined
8726 as a macro.
8727 (sh_elf_copy_private_data): Similar.
8728 (sh_elf_merge_private_data): Similar.
8729 * section.c (SEC_SH_ISA_SHMEDIA): New.
8730 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
8731 * elf32-sh64.c: New file.
8732 * libbfd.h: Regenerate.
8733 * bfd-in2.h: Regenerate.
8734 * po/POTFILES.in: Regenerate.
8735 * po/bfd.pot: Regenerate.
8736 * bfd-in2.h: Regenerate.
8737 * libbfd.h: Regenerate.
8738
e108f470
DJ
87392002-02-07 Daniel Jacobowitz <drow@mvista.com>
8740
8741 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
8742 been included, not drag it in.
8743 * bfd-in2.h: Regenerate.
8744
259d18a3
L
87452002-02-06 H.J. Lu (hjl@gnu.org)
8746
8747 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
8748 the mach and ISA fields if necessary.
8749
f13b834e
NC
87502002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
8751
8752 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
8753 ARM architecture when an F_ARM_5 flag is detected, since we cannot
8754 be sure exactly which architecture this represents.
8755
82f6addb
NC
87562002-02-05 Nick Clifton <nickc@redhat.com>
8757
8758 * po/tr.po: Updated translation.
8759
899f54f5
AM
87602002-02-05 Alan Modra <amodra@bigpond.net.au>
8761
8762 From Jimi X <jimix@watson.ibm.com>
8763 * archures (bfd_mach_ppc64): Define.
8764 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
8765 (bfd_powerpc_arch): Define.
8766 * bfd-in2.h: Regenerate.
8767 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
8768 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
8769 (bfd_powerpc_archs): Add default powerpc64 arch.
8770
248866a8
AM
87712002-02-05 Alan Modra <amodra@bigpond.net.au>
8772
8773 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
8774 against section syms in readonly sections. Don't do the global
8775 sym check if we find one.
8776 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
8777 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 8778 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
8779 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
8780 (elf_s390_grok_prstatus): Add missing prototype.
8781
4fa5c2a8
HPN
87822002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
8783
8784 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
8785 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
8786 Call bfd_get_section_by_name only once. Initialize
8787 bpodata->n_bpo_relocs_this_section.
8788 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
8789 referring to DSOs.
8790 (bpo_reloc_request_sort_fn): Don't use difference of values as
8791 return-value.
8792
537c972e
DB
87932002-02-02 David O'Brien <obrien@FreeBSD>
8794
8795 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
8796 version 4.5 and later the same as 5-CURRENT.
8797 * configure: Re-generate.
8798
006336b8
JT
87992002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
8800
8801 * config.bfd (hppa*-*-netbsd*): New target.
8802
6c571f00
PT
88032002-01-31 Philipp Thomas <pthomas@suse.de>
8804
19397422
AM
8805 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
8806 to front of message. Unify messages with elf32-arm.h. Use
8807 commas where neccessary.
8808 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
8809 ERROR in messages. Unify messages with coff-arm.c. Correct
8810 VFP/FPA error message.
8811 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
8812 APCS-32 for translation.
6c571f00 8813
930b4cb2
HPN
88142002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
8815
8816 Perform on-demand global register allocation from
8817 R_MMIX_BASE_PLUS_OFFSET relocs.
8818 * elf64-mmix.c (struct bpo_reloc_section_info, struct
8819 bpo_reloc_request, struct bpo_greg_section_info): New.
8820 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
8821 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
8822 _bfd_mmix_check_all_relocs,
8823 _bfd_mmix_prepare_linker_allocated_gregs,
8824 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
8825 (elf_mmix_howto_table): Correct src_mask for most relocs.
8826 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
8827 case.
8828 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
8829 case. Fix typo in comment. New label do_mmix_reloc.
8830 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
8831 store first object file with a base-plus-offset reloc. Call
8832 mmix_elf_check_common_relocs for the part common with mmo.
8833 (mmix_elf_final_link): Write out linker-allocated register
8834 contents section.
8835 (elf_backend_gc_sweep_hook): Define.
8836 (bfd_elf64_bfd_relax_section): Define.
8837
8838 * mmo.c: Don't include <ctype.h>
8839 (mmo_init): Correct init-once logic.
8840
3e36d993
TR
88412002-02-01 Tom Rix <trix@redhat.com>
8842
8843 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
8844
ba323545
AM
88452002-02-01 Alan Modra <amodra@bigpond.net.au>
8846
8847 * Makefile.am: Run "make dep-am"
8848 * Makefile.in: Regenerate.
8849
012884d6
DB
88502002-01-31 David O'Brien <obrien@FreeBSD>
8851
8852 * configure.in: Recognize the differences in core files from FreeBSD
8853 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
8854 5-CURRENT.
8855 * configure: Regenerate.
8856
3b16e843
NC
88572002-01-31 Ivan Guzvinec <ivang@opencores.org>
8858
8859 * coff-or32.c: New file.
8860 * cpu-or32.c: New file.
8861 * elf32-or32.c: New file.
8862 * archures.c: Add support for or32.
8863 * targets.c: Add support for or32.
8864 * bfd-in2.h: Regenerate.
7dc0ab31 8865 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
8866 coff_write_object_contents): Add support for or32.
8867 * config.bfd: Add target.
8868 * configure.in: Add support for or32.
8869 * configure: Regenerate.
8870 * Makefile.am: Add support for or32.
8871 * Makefile.in: Regenerate.
3b16e843
NC
8872 * po/SRC-POTFILES.in: Add or32 files.
8873 * po/bfd.pot: Regenerate.
7dc0ab31 8874
caf8ca8e
NC
88752002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
8876 Don Lindsay <lindsayd@cisco.com>
8877
8878 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
8879 false' with a return of a bfd_reloc_ error code.
8880
e5dfef09
HPN
88812002-01-31 Hans-Peter Nilsson <hp@axis.com>
8882
8883 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
8884 unexport unreferenced symbols when --export-dynamic. Call
8885 _bfd_elf_strtab_delref when unexporting.
8886
4e4770d0
DJ
88872002-01-30 Daniel Jacobowitz <drow@mvista.com>
8888
8889 * bfd-in.h: Include <stdbool.h> if it is available.
8890 * bfd-in2.h: Regenerated.
8891
e1fa50e7
AM
88922002-01-31 Alan Modra <amodra@bigpond.net.au>
8893
8894 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
8895 not go via the plt.
8896
b5f79c76
NC
88972002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
8898
b5f79c76
NC
8899 * archures.c: Tidy up formatting of embedded comments.
8900 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 8901 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
8902 * reloc.c: Tidy up formatting of ordinary & embedded comments.
8903 * section.c: Tidy up formatting of embedded comments.
8904 * syms.c: Tidy up formatting of embedded comments.
8905 * targets.c: Tidy up formatting of embedded comments.
8906
8907 * bfd-in2.h: Regenerate.
8908
ca09e32b
NC
89092002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
8910
8911 * vms-tir.c (cmd_name): New function.
8912 (tir_cmd_name): New function.
8913 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
8914 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
8915 Fix formatting.
7dc0ab31 8916
ca09e32b
NC
8917 * peXXigen.c (pe_print_idata): Rearrange message to aid in
8918 translation.
9b5ecbd0 8919 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
8920
8921 * libbfd.c (warn_deprecated): Rearrange error message to aid in
8922 translation.
8923
8924 * ihex.c (ihex_write_object_contents): Fix spelling typo.
8925
8926 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
8927
8928 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
8929 message to aid in translation.
8930
8931 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
8932 to aid in translation.
8933
8934 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
8935
7dc0ab31 89362002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
8937
8938 * coff-arm.c, elf32-elf.h: Unify messages.
8939
05f64ac6
NC
89402002-01-30 Nick Clifton <nickc@redhat.com>
8941
8942 * po/sv.po: Updated translation.
8943
f5a3e38a
NC
89442002-01-30 Philipp Thomas <pthomas@suse.de>
8945
8946 * dwarf2.c (read_abbrev): Use full section name in error message.
8947 (decode_line_info): Likewise.
661a3fd4
NC
8948
8949 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
8950 message.
8951
d926e03d
AM
89522002-01-30 Alan Modra <amodra@bigpond.net.au>
8953
8954 * elf64-ppc.c (func_desc_adjust): Only provide missing function
8955 descriptor symbols for undefined function code syms. Clear
8956 ELF_LINK_NON_ELF so that they can stay weak.
8957
030d18fb 89582002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 8959 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
8960
8961 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
8962 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
8963 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
8964 generation.
8965 * bfd-in2.h: Regenerate.
8966
fcc76bea
CD
89672002-01-29 Chris Demetriou <cgd@broadcom.com>
8968
8969 * elf32-mips.c: Add additional comments about HI16 relocation
8970 processing.
8971 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
8972 pc-relative relocations. (Reverts change made on 2001-10-31.)
8973 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
8974 for pc-relative relocations.
8975 (mips_elf_calculate_relocation): Add a comment about a kludge
8976 in the R_MIPS_GNU_REL_HI16 handling.
8977 (_bfd_mips_elf_relocate_section): Implement that kludge;
8978 adjust pc-relative HI16 relocation for difference in HI16 and
8979 LO16 addresses, since it can't easily be done in
8980 mips_elf_calculate_relocation.
8981
f9cd9119
MS
89822002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
8983
8984 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
8985 relocations with PC32 relocations for undefined or weak symbols.
8986 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
8987 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
8988
702248bb
JT
89892002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
8990
8991 * elfcore.h (elf_core_file_p): Improve comment for last change.
8992
4867be41
DJ
89932002-01-27 Daniel Jacobowitz <drow@mvista.com>
8994
8995 * configure: Regenerated.
8996
a94cef6a
JT
89972002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
8998
8999 * elfcore.h (elf_core_file_p): Set the machine architecture
9000 before processing the program headers.
9001
7562a296
HPN
90022002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9003
966abd70
HPN
9004 * configure.in <64-bit configuration>: If using gcc, check and
9005 emit error for egcs-1.1.2.
9006 * configure: Regenerate.
9007
e8eab623
NC
90082002-01-26 Egor Duda <deo@logos-m.ru>
9009
9010 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9011 as possible to avoid stack corruption.
9012
73896efb
RH
90132002-01-26 Richard Henderson <rth@redhat.com>
9014
9015 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9016 for non-allocated sections.
9017
90182002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
9019
9020 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9021 prstat.pr_reg even if it is a struct.
9022
73896efb 90232002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 9024
c5cd6d62 9025 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 9026
3d66c4f7
NC
90272002-01-25 Philipp Thomas <pthomas@suse.de>
9028
9029 * coffgen.c (coff_print_symbol): Don't mark info message
9030 for translation.
9031
9460ecda
NC
90322002-01-25 Nick Clifton <nickc@redhat.com>
9033
9034 * po/fr.po: Updated translation.
9035 * po/es.po: Updated translation.
9036
cc9ff76a
AM
90372002-01-25 Philipp Thomas <pthomas@suse.de>
9038
9039 * coff-alpha.c (alpha_relocate_section): Unify warning message
9040 for GP relative relocations without GP defined.
9041 * coff-mips.c (mips_relocate_section): Likewise.
9042
c68836a9
AM
90432002-01-25 Alan Modra <amodra@bigpond.net.au>
9044
9045 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9046 unsigned overflow when new_offset < old_offset.
9047
e8eab623 90482002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
9049
9050 * bfd.c (_bfd_abort): Fix typo.
9051
8ba89f17
RH
90522002-01-23 Richard Henderson <rth@redhat.com>
9053
9054 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9055 plt entries for undefweak symbols.
9056
c6953948
NC
90572002-01-23 Steve Ellcey <sje@cup.hp.com>
9058
c5cd6d62 9059 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
9060 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9061 (bfd_elf32_h8300_vec): Ditto.
9062
41bd81ab
AM
90632002-01-23 Alan Modra <amodra@bigpond.net.au>
9064
9065 * elf64-ppc.c: Remove stale part of ABI comment.
9066 (NO_OPD_RELOCS): Define.
9067 (ppc64_elf_check_relocs): Use it.
9068 (ppc64_elf_relocate_section): Here too.
9069 (build_one_stub): Don't point function syms at the stub. Instead,
9070 hijack plt.offset.
9071 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9072 really go to the stub. Make all dynamic relocs in opd against
9073 locals.
9074 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9075 plt.offset.
9076
f304919d
RH
90772002-01-22 Richard Henderson <rth@redhat.com>
9078
9079 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9080
c0ef99a7
AM
90812002-01-22 Alan Modra <amodra@bigpond.net.au>
9082
60ee0d4a
AM
9083 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9084 TOC_BASE_OFF adjustment.
9085
c0ef99a7
AM
9086 * Makefile.am: Run "make dep-am".
9087 * Makefile.in: Regenerate.
9088 * po/SRC-POTFILES.in: Regenerate.
9089
64328b46
AM
90902002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9091
9092 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9093 host defines.
9094
59953665 90952002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
9096
9097 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9098 Check for and emit error if sgot is NULL at this point.
9099
9596feea
JT
91002002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9101
9102 * config.bfd (ia64*-*-netbsd*): New target.
9103
7b45c6e1
AM
91042002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9105
9106 * som.c (som_write_space_strings): Comment typo fix.
9107
e5094212
AM
91082002-01-21 Alan Modra <amodra@bigpond.net.au>
9109
e86ce104
AM
9110 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9111 is_func_descriptor fields.
9112 (link_hash_newfunc): Init them.
9113 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9114 dot are candidates for plt entries. When processing .opd relocs,
9115 set function descriptor strings to point inside function code
9116 string, and set new ppc_link_hash_entry fields.
9117 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9118 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9119 function descriptors. It's now done in..
9120 (func_desc_adjust): New.
9121 (ppc64_elf_func_desc_adjust): New.
9122 (define elf_backend_always_size_sections): Define.
9123 (ppc64_elf_hide_symbol): New.
9124 (define elf_backend_hide_symbol): Define.
9125 (allocate_dynrelocs): Remove code looking up function descriptors
9126 as that has been done earlier.
9127 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9128 table.
9129 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9130 up function descriptor.
9131 (build_one_stub): Look up the function code sym. Check for
9132 invalid plt offsets.
9133 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9134 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9135
e5094212
AM
9136 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9137 boolean param.
9138 (_bfd_elf_link_hash_hide_symbol): Likewise.
9139 * elflink.h (elf_link_add_object_symbols): Adjust call to
9140 elf_backend_hide_symbol.
9141 (elf_fix_symbol_flags): Likewise.
9142 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9143 than bfd_alloc.
9144 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9145 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9146 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9147 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9148 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9149 and adjust to suit.
9150 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9151 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9152 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9153
40b8271b
AM
91542002-01-18 Alan Modra <amodra@bigpond.net.au>
9155
9156 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9157 dynamic function descriptor symbol, not the associated function
9158 symbol.
9159
55baa95b
EC
91602002-01-17 Eric Christopher <echristo@redhat.com>
9161
9162 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9163
328577ad
NC
91642002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9165
9166 * po/bfd.pot: Regenerate.
9167 * po/fr.po: Regenerate.
9168
af746e92
AM
91692002-01-17 Alan Modra <amodra@bigpond.net.au>
9170
9171 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9172 Remove "Elf_Internal_Shdr *" param.
9173 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9174 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9175 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9176 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9177 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9178 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9179 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9180 function to override special sections. Remove hdr arg from
9181 backend call, and don't loop.
9182
175e9962
EC
91832002-01-16 Eric Christopher <echristo@redhat.com>
9184
9185 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9186 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9187 relocations requiring gp0 and gp.
9188
96a846ea
RE
91892002-01-16 Richard Earnshaw <rearnsha@arm.com>
9190
175e9962 9191 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
9192 EF_ARM_VFP_FLOAT.
9193 (elf32_arm_print_private_bfd_data): Likewise.
9194
af3ae48d
NC
91952002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9196
9197 * po/tr.po: Import new version.
9198
10ed1bba
AM
91992002-01-16 Alan Modra <amodra@bigpond.net.au>
9200
9201 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9202 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9203 (ORI_R0_R0_0): Correct.
9204
5d1634d7
AM
92052002-01-16 Alan Modra <amodra@bigpond.net.au>
9206
9207 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9208 when plt_not_loaded.
9209 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9210 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9211 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9212 (ppc64_elf_glink_code): Delete.
9213 (PPC64_ELF_GLINK_SIZE): Delete.
9214 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9215 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9216 ORI_R0_R0_0): Define.
9217 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9218 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9219 (ppc64_elf_link_hash_table_create): Init them.
9220 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9221 Don't copy to shared lib.
9222 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9223 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9224 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9225 room for .stub and .glink code.
9226 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9227 DT_PPC64_GLINK.
9228 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9229 bfd_elf64_bfd_final_link.
9230 (bfd_elf64_bfd_final_link): Don't define.
9231 (ppc64_elf_size_stubs): New.
9232 (build_plt_stub): New.
9233 (build_one_stub): New.
9234 (ppc64_elf_build_stubs): New.
9235 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9236 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9237 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9238 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9239 case output sections not separate. Adjust DT_RELASZ to not
9240 include plt relocs. Set reserved got entry. Set got and plt
9241 entry size.
9242 (elf_backend_got_header_size): Set to 8.
9243 * elf64-ppc.h: New file.
9244
c601ffdb
AM
92452002-01-16 Alan Modra <amodra@bigpond.net.au>
9246
9247 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9248 sections, use bfd_section_list_remove.
9249 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9250 * elflink.h (elf_link_add_object_symbols): When removing all
9251 sections, use bfd_section_list_clear.
9252
8fb4cb7f
NC
92532002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9254
9255 * po/sv.po: New file: Swedish translation.
9256 * configure.in (ALL_LINGUAS): Add sv.
9257 * configure: Regenerate.
9258
d3c456e9
JJ
92592002-01-15 Jakub Jelinek <jakub@redhat.com>
9260
9261 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9262 * elf.c (merge_sections_remove_hook): New function.
9263 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9264 _bfd_merge_sections.
9265 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9266 * libbfd.h: Rebuilt.
9267 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9268 Call remove_hook if a SEC_EXCLUDE section is encountered.
9269
1f7fd478
NC
92702002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9271
9272 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9273 (xstormy16_reloc_map): Initialise new field with correct howto
9274 table.
9275 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9276 howto entry.
9277
b87011e9
MS
92782002-01-10 Michael Snyder <msnyder@redhat.com>
9279
9280 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9281 (elfcore_write_pstatus): Use long instead of pid_t;
9282 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9283
175e9962 92842002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
9285
9286 * elf.c: Update copyright years.
9287 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9288 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9289
7c76fa91
MS
92902002-01-08 Michael Snyder <msnyder@redhat.com>
9291
9292 Add capability to write corefile note sections, for gdb.
9293 * elf.c (elfcore_write_note): New function.
9294 (elfcore_write_prpsinfo): New function.
9295 (elfcore_write_prstatus): New function.
9296 (elfcore_write_pstatus): New function.
9297 (elfcore_write_prfpreg): New function.
9298 (elfcore_write_prxfpreg): New function.
97996af6 9299 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 9300
e1fddb6b
AO
93012002-01-08 Alexandre Oliva <aoliva@redhat.com>
9302
9303 * elf.c (elf_fake_sections): Propagate errors from
9304 elf_backend_fake_section.
9305
8d05742f
JT
93062002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9307
9308 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9309 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9310 (elf32-sh-nbsd.lo): New rule.
9311 * Makefile.in: Regenerate.
9312 * config.bfd (sh*le-*-netbsdelf*): New target.
9313 (sh*-*-netbsdelf*): New target.
9314 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9315 (bfd_elf32_shnbsd_vec): New vector.
9316 (bfd_elf32_shlnbsd_vec): New vector.
9317 * configure: Regenerate.
9318 * elf32-sh-nbsd.c: New file.
9319 * targets.c: Update copyright years.
175e9962 9320 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
9321 bfd_elf32_shnbsd_vec.
9322
1dba4cb4
AH
93232002-01-07 Aldy Hernandez <aldyh@redhat.com>
9324
9325 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9326
47b22aef
GK
93272002-01-07 Geoffrey Keating <geoffk@redhat.com>
9328
9329 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9330 of a symbol in a section that will be deleted.
9331
be2d1673
NC
93322002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9333
9334 * po/es.po: New file: Spanish translation.
9335 * configure.in (ALL_LINGUAS): Add es.
9336 * configure: Regenerate.
9337
d9cf1b54
AM
93382002-01-06 Steve Ellcey <sje@cup.hp.com>
9339
9340 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9341 argument so we can handle HP-UX specially.
9342 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9343 (elfNN_hpux_backend_section_from_bfd_section): New for support
9344 of SHN_IA_64_ANSI_COMMON.
9345 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9346 (is_unwind_section_name): Add special HP-UX support.
9347 (elfNN_ia64_section_from_shdr): Add support for more sections.
9348 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9349 add support for more sections.
9350 (elfNN_ia64_additional_program_headers): Modify
9351 is_unwind_section_name call.
9352 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9353 only one unwind section in segment.
9354
3f3c5c34
AM
93552002-01-06 Alan Modra <amodra@bigpond.net.au>
9356
9357 * syms.c (_bfd_generic_make_empty_symbol): New function.
9358 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9359 _bfd_generic_make_empty_symbol.
9360 * libbfd.h: Regenerate.
9361 * bfd-in2.h: Regenerate.
9362 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9363 (hppabsd_core_get_symtab_upper_bound): Don't define.
9364 (hppabsd_core_get_symtab): Likewise.
9365 (hppabsd_core_print_symbol): Likewise.
9366 (hppabsd_core_get_symbol_info): Likewise.
9367 (hppabsd_core_bfd_is_local_label_name): Likewise.
9368 (hppabsd_core_get_lineno): Likewise.
9369 (hppabsd_core_find_nearest_line): Likewise.
9370 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9371 (hppabsd_core_read_minisymbols): Likewise.
9372 (hppabsd_core_minisymbol_to_symbol): Likewise.
9373 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9374 Formatting fixes.
9375 * hpux-core.c: Similarly.
9376 * irix-core.c: Similarly.
9377 * osf-core.c: Similarly.
9378 * sco5-core.c: Similarly.
9379 * binary.c (binary_make_empty_symbol): Remove function, define as
9380 _bfd_generic_make_empty_symbol.
9381 * ihex.c (ihex_make_empty_symbol): Likewise.
9382 * mmo.c (mmo_make_empty_symbol): Likewise.
9383 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9384 * srec.c (srec_make_empty_symbol): Likewise.
9385 * versados.c (versados_make_empty_symbol): Likewise.
9386 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9387 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9388 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9389 rather than _bfd_vms_make_empty_symbol.
9390 * vms-misc.c (new_symbol): Likewise.
9391
3f0a7f7f
AM
93922002-01-05 Alan Modra <amodra@bigpond.net.au>
9393
9e7b37b3
AM
9394 * section.c (bfd_section_init): Remove unnecessary initialisations.
9395 (bfd_section_list_clear): New function.
9396 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9397 (_bfd_strip_section_from_output): Use them.
9398 * coffcode.h (coff_set_alignment_hook): Likewise.
9399 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9400 * elf64-mips.c (mips_elf64_final_link): Likewise.
9401 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9402 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9403 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9404 * bfd-in2.h: Regenerate.
9405
9406 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9407 rather than doing our own section handling. Clean up after errors
9408 with bfd_release and bfd_section_list_clear. Handle unexpected
9409 flags.
9410 * aoutf1.h (sunos4_core_file_p): Likewise.
9411 * aix386-core.c (aix386_core_file_p): Likewise.
9412 * cisco-core.c (cisco_core_file_validate): Likewise.
9413 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9414 * trad-core.c (trad_unix_core_file_p): Likewise.
9415
9b5ecbd0 9416 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
9417 with bfd_release and bfd_section_list_clear.
9418 * hpux-core.c (hpux_core_core_file_p): Likewise.
9419 * irix-core.c (irix_core_core_file_p): Likewise.
9420 * lynx-core.c (lynx_core_file_p): Likewise.
9421 * osf-core.c (osf_core_core_file_p): Likewise.
9422 * rs6000-core.c (rs6000coff_core_p): Likewise.
9423 * sco5-core.c (sco5_core_file_p): Likewise.
9424
3f0a7f7f
AM
9425 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9426 sign extension adjustments without conditionals.
9427
a3aa38ee
JJ
94282002-01-04 Jakub Jelinek <jakub@redhat.com>
9429
9430 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9431 CIE at .eh_frame start is removed due to no FDEs referencing it.
9432
8a8b2d4b
AJ
94332002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9434
9435 * config.bfd (x86_64-*-netbsd*): New target.
9436 * configure.in (x86_64-*-netbsd*): Set COREFILE
9437 to netbsd-core.lo.
9438 * configure: Regenerated.
9439
04b5af89
TR
94402002-01-03 Tom Rix <trix@redhat.com>
9441
9442 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9443 for recent bfd_make_section_anyway change.
9444
51c5503b
NC
94452002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9446
9447 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9448 R_ARM_THM_PC11 reloc.
9449
07f7c046
NC
94502002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9451
9452 * configure.in (LINGUAS): Add ja.
9453 * configure: Regenerate.
9454 * po/ja.po: Import from translation project's web site.
9455
5eefb65f
NC
94562002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9457
9458 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9459 messages to ease translation into other languages.
9460
39e90f10 9461For older changes see ChangeLog-0001
56882138
AM
9462\f
9463Local Variables:
9464mode: change-log
9465left-margin: 8
9466fill-column: 74
9467version-control: never
9468End:
This page took 0.589472 seconds and 4 git commands to generate.