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