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