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