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