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