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