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