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