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