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