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