]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
(GNU_ABI_TAG_NETBSD): New tag.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
7d1ebfb2
NC
12003-06-12 Nick Clifton <nickc@redhat.com>
2
3 * opncls.c (calc_crc32): Rename to
4 bfd_calc_gnu_debuglink_crc32 and export.
5 (GNU_DEBUGLINK): Define and use to replace occurrences of
6 hard-coded ".gnu_debuglink" in the code.
7 (get_debug_link_info): Prevent aborts by replacing call to
8 xmalloc with a call to malloc.
9 (find_separate_debug_file): Prevent aborts by replacing calls
10 to xmalloc and xstrdup with calls to malloc and strdup.
11 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
12 section to a bfd.
13 * bfd-in2.h: Regenerate.
14
152003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
16
17 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
18 New target (was i[3-7]86-*-openbsd* before).
19 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
20 (vax-*-openbsd*): New target.
21
d80dcc6a
TS
222003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
23
24 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
25 for n32, too.
26 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
27 (mips_elf_rel_dyn_section): Use appropriate section alignment.
28 (mips_elf_create_got_section): Likewise.
29 (_bfd_mips_elf_create_dynamic_sections): Likewise.
30
a7ebbfdf
TS
312003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
32
33 * elf32-mips.c (mips_elf_generic_reloc): New Function.
34 (elf_mips_howto_table_rel): Use it.
35 (gprel32_with_gp): Move prototype.
36 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
37 Use mips_elf_generic_reloc.
38 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
39 Code cleanup.
40 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
41 zero addend.
42 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
43 as in the other *_gprel*_reloc functions.
44 (gprel32_with_gp): Handle partial_inplace properly.
45 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
46 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
47 Do addend handling directly instead of calling
48 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
49 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
50 of zero addend. Handle partial_inplace properly.
51 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
52 addend.
53 (mips_elf64_gprel16_reloc): Likewise.
54 (mips_elf64_literal_reloc): Likewise.
55 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
56 logic as in the other *_gprel*_reloc functions. Handle
57 partial_inplace properly.
58 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
59 addend. Handle partial_inplace properly.
60 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
61 of calling _bfd_mips_elf_gprel16_with_gp.
62 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
63 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
64 of zero addend.
65 (mips_elf_shift6_reloc): Handle partial_inplace properly.
66 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
67 of calling _bfd_mips_elf_gprel16_with_gp.
68 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
69 partial_inplace properly. Fix wrong addend handling. Fix overflow
70 check.
71 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
72 exported.
73 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
74 (_bfd_mips_elf_relocate_section): Likewise.
75 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
76 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
77 (_bfd_mips_elf_sign_extend): New prototype.
78
49ba19a4
NC
792003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
80
81 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
82 New target (was sparc-*-openbsd* before).
83 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
84
de6e5e1a
NC
85 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
86 * configure: Regenerate.
87
3b443373
L
882003-06-11 H.J. Lu <hongjiu.lu@intel.com>
89
90 * po/Make-in (DESTDIR): New.
91 (install-data-yes): Support $(DESTDIR).
92 (uninstall): Likewise.
93
795bb480
AM
942003-06-11 Alan Modra <amodra@bigpond.net.au>
95
96 * Makefile.am (config.status): Depend on version.h.
97 Run "make dep-am".
98 * Makefile.in: Regenerate.
99 * po/SRC-POTFILES.in: Regenerate.
100
adadcc0c
AM
1012003-06-10 Alan Modra <amodra@bigpond.net.au>
102 Gary Hade <garyhade@us.ibm.com>
103
104 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
105
f4984206
RS
1062003-06-10 Richard Sandiford <rsandifo@redhat.com>
107
108 * archures.c (bfd_mach_h8300sxn): New architecture.
109 * bfd-in2.h: Regenerate.
110 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
111 (h8300sxn_info_struct): New.
112 (h8300sx_info_struct): Link to it.
113 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
114 (elf32_h8_final_write_processing): Likewise.
115
ad8e1ba5
AM
1162003-06-08 Alan Modra <amodra@bigpond.net.au>
117
118 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
119 elfxx-target.h so that we can use elf_backend_got_header_size.
120 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
121 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
122 associated macros.
123 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
124 dst_mask.
125 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
126 ppc_stub_plt_branch_r2off.
127 (struct ppc_stub_hash_entry): Reorganize.
128 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
129 toc_curr, toc_off and emit_stub_syms.
130 (ppc64_elf_link_hash_table_create): Init them.
131 (ppc_stub_name): Correct string size.
132 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
133 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
134 used.
135 (ppc_type_of_stub): Tweak root.type test.
136 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
137 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
138 ppc_stub_plt_branch_r2off.
139 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
140 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
141 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
142 Initialize elf_gp and toc_curr.
143 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
144 (ppc64_elf_next_input_section): Set toc_off.
145 (group_sections): Ensure groups have the same TOC.
146 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
147 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
148 Build new glink stub.
149 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
150 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
151 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
152 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
153 * section.c (struct sec): Rename flag12 to has_gp_reloc.
154 (STD_SECTION): Update.
155 * ecoff.c (bfd_debug_section): Update comment.
156 * bfd-in2.h: Regenerate.
157
90fff0d4
DJ
1582003-06-05 Daniel Jacobowitz <drow@mvista.com>
159
160 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
161 NULL function pointers.
162
c82b20e4
DJ
1632003-06-05 Daniel Jacobowitz <drow@mvista.com>
164
165 * simple.c (bfd_simple_get_relocated_section_contents): Call
166 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
167
53d4437a
SS
1682003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
169
5a5b9651
SS
170 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
171 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
172 swaptables.
173 * coff-tic4x.c: Ditto
53d4437a
SS
174 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
175 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
176 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
177 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
178 swap tables.
53d4437a
SS
179 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
180 * coff-a29k.c: Append COFF_SWAP_TABLE argument
181 * coff-apollo.c: Ditto
182 * coff-arm.c: Ditto
183 * coff-h8300.c: Ditto
184 * coff-h8500.c: Ditto
185 * coff-i960.c: Ditto
186 * coff-m68k.c: Ditto
187 * coff-m88k.c: Ditto
188 * coff-mcore.c: Ditto
189 * coff-sh.c: Ditto
190 * coff-sparc.c: Ditto
191 * coff-tic80.c: Ditto
192 * coff-we32k.c: Ditto
193 * coff-z8k.c: Ditto
194 * coff-w65.c: Ditto
195
736694c8
SS
1962003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
197
198 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
199 initialization bug
200
9ee5e499
JJ
2012003-06-03 Jakub Jelinek <jakub@redhat.com>
202
203 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
204 (bfd_section_from_phdr): Likewise.
205 (map_sections_to_segments): Create PT_GNU_STACK segment header.
206 (get_program_header_size): Count with PT_GNU_STACK.
207 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
208 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
209
6f6f27f8
L
2102003-06-03 H.J. Lu <hongjiu.lu@intel.com>
211
212 * elflink.h (elf_link_input_bfd): Call linker error_handler
213 for discarded definitions.
214
a3b6428f
NC
2152003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
216
217 * syms.c (decode_section_type): Return 'n' if section flags are
218 SEC_HAS_CONTENTS && SEC_READONLY.
219
e30ddb24
NC
2202003-06-03 Nick Clifton <nickc@redhat.com>
221
222 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
223 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
224 (v850_elf_reloc_map): Likewise.
225 (v850_elf_check_relocs): Likewise.
226 (v850_elf_perform_relocation): Likewise.
227 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 228 to make R_V850_REl32 pc-relative.
adadcc0c 229
2558b9a9
KK
2302003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
231
232 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
233 and DT_DEBUG dynamic tag even for position independent executables.
234 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
235
f15398ef
DJ
2362003-06-02 Daniel Jacobowitz <drow@mvista.com>
237
238 * config.bfd: Move obsolete entries out of the range of the
239 targmatch sed script.
240
cad28985
DJ
2412003-06-02 Daniel Jacobowitz <drow@mvista.com>
242
243 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
244
f2c822e3
JJ
2452003-05-31 Jakub Jelinek <jakub@redhat.com>
246
247 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
248 plt entries, not just 8191.
249
c9c27aad
DJ
2502003-05-30 Daniel Jacobowitz <drow@mvista.com>
251
252 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
253 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
254
36af4a4e
JJ
2552003-05-30 Ulrich Drepper <drepper@redhat.com>
256 Jakub Jelinek <jakub@redhat.com>
257
258 * elflink.h (elf_link_add_object_symbols): Use !info->executable
259 instead of info->shared where appropriate.
260 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
261 * elflink.c (_bfd_elf_create_got_section): Likewise.
262 (_bfd_elf_link_create_dynamic_sections): Likewise.
263 (_bfd_elf_link_assign_sym_version): Likewise.
264 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
265 and DT_DEBUG dynamic tag even for position independent executables.
266 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
267 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
268 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
269 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
270 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
271 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
272 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
273 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
274 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
275
f8843e87
AM
2762003-05-30 Kris Warkentin <kewarken@qnx.com>
277
278 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
279 signalled thread.
280 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
281
29e1a6e4
NC
2822003-05-29 Nick Clifton <nickc@redhat.com>
283
284 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
285 Tidy up formatting.
286 * Makefile.am: Add dependency on safe-ctype.h.
287 * Makefile.in: Regenerate.
288
4b555070
TS
2892003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
290
291 * elfxx-mips.c: Don't force symbols local unconditionally.
292
0236e03e
L
2932003-05-28 Alan Modra <amodra@bigpond.net.au>
294
295 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
296 undefined_symbol call.
297
9e4aeb93
RS
2982003-05-27 Richard Sandiford <rsandifo@redhat.com>
299
300 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
301 (mips_elf_link_hash_table): Likewise.
302
d0c728db
TS
3032003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
304
305 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
306 R_MIPS_GNU_REL16_S2 support.
307 (bfd_elf64_bfd_reloc_type_lookup): Use it.
308 (mips_elf64_rtype_to_howto): Use it.
309 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
310 R_MIPS_GNU_REL16_S2 support.
311 (bfd_elf32_bfd_reloc_type_lookup): Use it.
312 (mips_elf_n32_rtype_to_howto): Use it.
313
759ebd76
DA
3142003-05-21 Stuart F. Downing <sdowning@fame.com>
315
316 * som.h: Define PA_2_0 before including a.out.h
317
143d77c5
EC
3182003-05-07 Eric Christopher <echristo@redhat.com>
319 Alexandre Oliva <aoliva@redhat.com>
320
321 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
322 pic tests, change to warning.
323 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
324
cea3d58d
NC
3252003-05-21 Marcus Comstedt <marcus@mc.pp.se>
326
327 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
328 well as shle-...-netbsdelf. Remove duplicate entry.
329
385a4c14
NC
3302003-05-21 Nick Clifton <nickc@redhat.com>
331
60e42408
NC
332 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
333 for X_STORMY16_REL_12 reloc.
334
385a4c14
NC
335 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
336 the type of the has table in the bfd_link_info structure.
337 (bfd_elf_get_runpath_list): Likewise.
338
129b8c20
RM
3392003-05-19 Roland McGrath <roland@redhat.com>
340
341 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
342 * bfd-in.h: Declare it.
343 * bfd-in2.h: Regenerated.
344 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
345 * elf-bfd.h (struct elf_backend_data): New function pointer member
346 elf_backend_bfd_from_remote_memory.
347 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
348 Declare them.
349 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
350 (elfNN_bed): Add that to the initializer.
351
3522003-05-15 Roland McGrath <roland@redhat.com>
353
354 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
355
22d5e339
L
3562003-05-20 Jakub Jelinek <jakub@redhat.com>
357
358 * elflink.h (elf_link_output_extsym): Only issue error about !=
359 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
360
3612003-05-20 H.J. Lu <hongjiu.lu@intel.com>
362
363 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
364 when removing the old definition for symbols with non-default
365 visibility.
366
b645cb17
JE
3672003-05-18 Jason Eckhardt <jle@rice.edu>
368
369 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
370
d2ff124f
AS
3712003-05-17 Andreas Schwab <schwab@suse.de>
372
373 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
374 elf_section_data during processing of pc-relative and absolute
375 relocations.
376 (elf_m68k_relocate_section): Use the cached reloc section instead
377 of computing it again. Fix handling of visibility. Don't modify
378 addend when copying over a relocation into the output.
379
9c7a29a3
AM
3802003-05-17 Alan Modra <amodra@bigpond.net.au>
381
382 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
383 to trim plt entries. Move undefweak non-default visibility test..
384 (allocate_dynrelocs): ..from here.
385 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
386 dynamic_sections_created here. Update comment. Move undefweak
387 non-default visibility test..
388 (allocate_dynrelocs): ..from here. Fix comment.
389 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
390 to trim plt entries. Move undefweak non-default visibility test..
391 (allocate_dynrelocs): ..from here. Fix comment.
392 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
393 STV_DEFAULT rather than comparing with zero.
394 * elflink.c (_bfd_elf_merge_symbol): Likewise.
395 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
396
9bcf4de0
TS
3972003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
398
399 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
400 pointers.
401 (_bfd_set_gp_value): Likewise.
402
5d1db417
MS
4032003-05-16 Michael Snyder <msnyder@redhat.com>
404 From Bernd Schmidt <bernds@redhat.com>
405 * archures.c (bfd_mach_h8300sx): New.
406 * bfd-in2.h: Regenerate.
407 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
408 (h8300sx_info_struct): New.
409 (h8300s_info_struct): Link to it.
410 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
411 (elf32_h8_final_write_processing): Likewise.
412 (elf32_h8_relax_section): Likewise.
413
80c7c40a
NC
4142003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
415
416 * config.bfd: Accept i[3-7]86 variants.
417 * configure.host: Likewise.
418 * configure.in: Likewise.
419 * configure: Regenerate.
420
c1be741f
L
4212003-05-15 H.J. Lu <hongjiu.lu@intel.com>
422
423 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
424 symbol.
425
a15d9d3a
L
4262003-05-15 H.J. Lu <hongjiu.lu@intel.com>
427
428 * elflink.h (elf_link_check_versioned_symbol): Also allow
429 the base version.
430
09695f56
AM
4312003-05-15 Alan Modra <amodra@bigpond.net.au>
432 H.J. Lu <hongjiu.lu@intel.com>
433
434 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
435 (elf_i386_relocate_section): Likewise.
436 * elf32-ppc.c (allocate_dynrelocs): Likewise.
437 (ppc_elf_relocate_section): Likewise.
438 * elf64-ppc.c (allocate_dynrelocs): Likewise.
439 (ppc64_elf_relocate_section): Likewise.
440
40f62fa0
TS
4412003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
442
443 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
444
47247ced
SC
4452003-05-13 Stephane Carrez <stcarrez@nerim.fr>
446
447 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
448 processor capability, allow merge of HC12 and HCS12 in some cases.
449 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
450 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
451 (bfd_m68hc12_arch): Link it.
452 (scan_mach): New function.
453
32dfa85d
AH
4542003-05-13 Andrew Haley <aph@redhat.com>
455
456 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
457
586119b3
AM
4582003-05-13 Alan Modra <amodra@bigpond.net.au>
459 H.J. Lu <hongjiu.lu@intel.com>
460
461 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
462 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
463 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
464 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
465 (ppc_elf_relocate_section): Likewise.
466 * elf64-ppc.c (allocate_dynrelocs): Likewise.
467 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
468 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
469 relocs need no other types.
470 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
471 dynreloc check.
472 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
473 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
474 .got relocs.
475
04e534c3
KK
4762003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
477
478 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
479 copy ELF_LINK_NON_GOT_REF from weakdef.
480 (allocate_dynrelocs): For undef weak syms with non-default
481 visibility, a) don't allocate plt entries, b) don't allocate
482 .got relocs, c) discard dyn rel space
adadcc0c
AM
483 (sh_elf_relocate_section): d) don't generate .got relocs, e)
484 don't generate dynamic relocs.
04e534c3
KK
485 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
486 for weakdefs when symbol already adjusted.
487
0afb2dc0
NC
4882003-05-12 Nick Clifton <nickc@redhat.com>
489
490 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
491 overflow detection for R_XSTORMY16_16 reloc.
492
9d29900b
NC
4932003-05-12 Paul Clarke <paulc@senet.com.au>
494
495 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
496
a48c6a54
JE
4972003-05-11 Jason Eckhardt <jle@rice.edu>
498
499 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
500 adjust upper bits.
501 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
502 proper place.
503 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
504 proper place.
505
44f745a6
AS
5062003-05-11 Andreas Schwab <schwab@suse.de>
507
508 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
509 complicated tests for unresolvable relocs with a simple direct
510 scheme using "unresolved_reloc" var. Report some detail on
511 bfd_reloc_outofrange and similar errors.
512
4ec72bde
MS
5132003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
514
515 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
516 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
517 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
518 * elf64-s390.c: Likewise.
519
64285810
MS
5202003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
521
522 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
523 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
524 ELF_LINK_NON_GOT_REF from weakdef.
525 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
526 already been adjusted before treating it specially.
527 * el64-s390.c: Likwise.
528
82058a73
MS
5292003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
530
531 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
532 non-default visibility, a) don't make them dynamic, b) discard
533 space for dynamic relocs.
534 (elf_s390_relocate_section): Initialize the GOT entries and skip
535 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
536 symbols with non-default visibility.
537 * elf64-s390.c: Likewise.
538
60d8b524
AM
5392003-05-09 Alan Modra <amodra@bigpond.net.au>
540
541 * cpu-arm.c (arm_check_note): Warning fix.
542 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
543 to keep relocs if edited.
544 (iq2000_elf_print_private_bfd_data): Return TRUE.
545 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
546 ELF64_R_SYM.
547 (elfNN_ia64_relax_ldxmov): Warning fix.
548 * xtensa-isa.c (xtensa_add_isa): Warning fix.
549 * xtensa-modules.c (get_num_opcodes): Warning fix.
550
e57b5356
AM
5512003-05-09 Andrey Petrov <petrov@netbsd.org>
552
553 * elf.c (elf_fake_sections): Use correct cast for sh_name.
554
45d6a902
AM
5552003-05-09 Alan Modra <amodra@bigpond.net.au>
556
557 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
558 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
559 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
560 (bfd_elf_record_link_assignment): Move from elflink.h.
561 (_bfd_elf_merge_symbol): Likewise.
562 (_bfd_elf_add_default_symbol): Likewise.
563 (_bfd_elf_export_symbol): Likewise.
564 (_bfd_elf_link_find_version_dependencies): Likewise.
565 (_bfd_elf_link_assign_sym_version): Likewise.
566 (_bfd_elf_link_read_relocs): Likewise.
567 (_bfd_elf_link_size_reloc_section): Likewise.
568 (_bfd_elf_fix_symbol_flags): Likewise.
569 (_bfd_elf_adjust_dynamic_symbol): Likewise.
570 (_bfd_elf_link_sec_merge_syms): Likewise.
571 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
572 and bed->s->sizeof_rela.
573 (_bfd_elf_link_output_relocs): Likewise.
574 * elf-bfd.h (struct elf_size_info): Rename file_align to
575 log_file_align.
576 (struct elf_info_failed): Move from elflink.h.
577 (struct elf_assign_sym_version_info): Likewise.
578 (struct elf_find_verdep_info): Likewise.
579 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
580 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
581 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
582 _bfd_elf_link_assign_sym_version,
583 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
584 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
585 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
586 _bfd_elf_link_sec_merge_syms): Declare.
587 (bfd_elf32_link_create_dynamic_sections): Don't declare.
588 (_bfd_elf32_link_read_relocs): Likewise.
589 (bfd_elf64_link_create_dynamic_sections): Likewise.
590 (_bfd_elf64_link_read_relocs): Likewise.
591 * elflink.h: Move lots o' stuff elsewhere.
592 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
593 (bfd_elf64_record_link_assignment): Likewise.
594 (bfd_elf_record_link_assignment): Declare.
595 * bfd-in2.h: Regenerate.
596 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
597 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
598 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
599 (assign_file_positions_for_segments): Likewise.
600 (assign_file_positions_except_relocs): Likewise.
601 (swap_out_syms, elfcore_write_note): Likewise.
602 * elf-m10200.c: Adjust for changed function names.
603 * elf-m10300.c: Likewise.
604 * elf32-arm.h: Likewise.
605 * elf32-h8300.c: Likewise.
606 * elf32-hppa.c: Likewise.
607 * elf32-ip2k.c: Likewise.
608 * elf32-m32r.c: Likewise.
609 * elf32-m68hc11.c: Likewise.
610 * elf32-m68hc1x.c: Likewise.
611 * elf32-m68k.c: Likewise.
612 * elf32-mips.c: Likewise.
613 * elf32-ppc.c: Likewise.
614 * elf32-sh.c: Likewise.
615 * elf32-v850.c: Likewise.
616 * elf32-xtensa.c: Likewise.
617 * elf64-alpha.c: Likewise.
618 * elf64-hppa.c: Likewise.
619 * elf64-mmix.c: Likewise.
620 * elf64-ppc.c: Likewise.
621 * elf64-sh64.c: Likewise.
622 * elfxx-ia64.c: Likewise.
623 * elfxx-mips.c: Likewise.
624 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
625 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
626 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
627 * elf64-mips.c (mips_elf64_size_info): Likewise.
628 * elf64-s390.c (s390_elf64_size_info): Likewise.
629 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
630
bf1e742e
L
6312003-05-08 H.J. Lu <hongjiu.lu@intel.com>
632
633 * elflink.h (elf_add_default_symbol): After skipping the
634 unversioned symbol, go to non-default one.
635
6a32c710
L
6362003-05-07 H.J. Lu <hongjiu.lu@intel.com>
637
638 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
639 want_plt field.
640 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
641 for symbols with non-default visibility.
642
71552942
L
6432003-05-07 H.J. Lu <hongjiu.lu@intel.com>
644
645 * elflink.h (elf_link_check_versioned_symbol): Also handle the
646 case that a DSO references a hidden symbol which may be
647 satisfied by a versioned symbol in another DSO.
648 (elf_link_output_extsym): Check versioned definition for hidden
649 symbol referenced by a DSO.
650
208c2cd6
NC
6512003-05-07 Nick Clifton <nickc@redhat.com>
652
653 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
654 R_XSTORMY16_16 reloc to ignore overflows.
655
aa701218
AO
6562003-05-06 Alexandre Oliva <aoliva@redhat.com>
657
658 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
659 error message for mixing different-endian files. Check for ABI
660 compatibility of input files with the selected emulation.
661
4e795f50
AM
6622003-05-05 Alan Modra <amodra@bigpond.net.au>
663
664 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
665 non-default visibility, a) don't make them dynamic, b) discard
666 space for dynamic relocs.
667 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
668
669 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
670 non-default visibility, a) don't allocate plt entries, b) don't
671 allocate .got relocs, c) discard dyn rel space,
672 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
673 don't generate dynamic relocs.
674 * elf64-ppc.c (allocate_dynrelocs): As above.
675 (ppc64_elf_relocate_section): As above.
676
4bc6e03a
AJ
6772003-05-05 Andreas Jaeger <aj@suse.de>
678
679 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
680 relocation entries for weak undefined symbols with non-default
681 visibility.
682 (elf64_x86_64_relocate_section): Initialize the GOT entries and
683 skip R_386_32/R_386_PC32 for weak undefined symbols with
684 non-default visibility.
685
ef5aade5
L
6862003-05-04 H.J. Lu <hjl@gnu.org>
687
688 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
689 relocation entries for weak undefined symbols with non-default
690 visibility.
691 (elf_i386_relocate_section): Initialize the GOT entries and
692 skip R_386_32/R_386_PC32 for weak undefined symbols with
693 non-default visibility.
129b8c20 694
ef5aade5
L
695 * elfxx-ia64.c (allocate_fptr): Don't allocate function
696 descriptors for weak undefined symbols with non-default
697 visibility.
698 (allocate_dynrel_entries): Don't allocate relocation entries
699 for symbols resolved to 0.
700 (set_got_entry): Don't install dynamic relocation for weak
701 undefined symbols with non-default visibility.
702 (set_pltoff_entry): Likewise.
703
704 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
705 with non-default visibility.
706 (elf_link_output_extsym): Don't make weak undefined symbols
707 with non-default visibility dynamic.
708
c424e0e9
L
7092003-05-04 H.J. Lu <hjl@gnu.org>
710
711 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
712
d31e3dfe
L
7132003-05-04 H.J. Lu <hjl@gnu.org>
714
715 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
716 symbol dynamic. Check indirection when removing the old
717 definition for symbols with non-default visibility.
718 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
719
4d2e1ff0
NC
7202003-05-02 Nick Clifton <nickc@redhat.com>
721
722 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
723 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
724 unsigned overflow.
725
d40d037c
AJ
7262003-05-02 Andreas Jaeger <aj@suse.de>
727
728 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
729 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
730 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
731 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
732 ELF_LINK_NON_GOT_REF from weakdef.
733
c5d1701e
NC
7342003-05-02 Charles Lepple <clepple@ghz.cc>
735 Nick Clifton <nickc@redhat.com>
736
737 * acinclude.m4: Fix name of --enable-install-libbfd switch.
738 * aclocal.m4: Regenerate.
739 * configure: Regenerate.
740 * Makefile.in: Regenerate.
741
81848ca0
AM
7422003-05-01 Alan Modra <amodra@bigpond.net.au>
743
744 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
745 weakdef sym has already been adjusted before treating it specially.
746 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
747 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
748 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
749 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 750
c7996ad6
L
7512003-04-28 H.J. Lu <hjl@gnu.org>
752
753 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
754 the relax finalize pass.
755
756 * section.c (struct sec): Add need_finalize_relax and remove
757 flag11.
758 (STD_SECTION): Update struct sec initializer.
759 * bfd-in2.h: Regenerated.
760
f006af20
L
7612003-04-28 H.J. Lu <hjl@gnu.org>
762
763 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
764 to copy any information related to dynamic linking when we flip
765 the indirection.
766
1b1fe8fe
L
7672003-04-27 H.J. Lu <hjl@gnu.org>
768
769 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
770 (ELF_LINK_DYNAMIC_WEAK): New.
771
772 * elflink.h (elf_merge_symbol): Add one argument to indicate if
773 a symbol should be skipped. Ignore definitions in dynamic
774 objects for symbols with non-default visibility.
775 (elf_add_default_symbol): Adjusted.
776 (elf_link_add_object_symbols): Check if a symbol should be
777 skipped. Don't merge the visibility field with the one from
778 a dynamic object.
779 (elf_link_check_versioned_symbol): Use undef_bfd.
780 (elf_link_output_extsym): Warn if a forced local symbol is
781 referenced from dynamic objects. Make non-weak undefined symbol
782 with non-default visibility a fatal error.
783
052a450c
DJ
7842003-04-27 Daniel Jacobowitz <drow@mvista.com>
785
786 * configure.in: Bump version on HEAD to 2.14.90.
787 * configure: Regenerated.
788
d204f4c0
SC
7892003-04-26 Stephane Carrez <stcarrez@nerim.fr>
790
791 PR savannah/3331:
792 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
793 when we couldn't relax something.
794
3c0a515d
L
7952003-04-25 Alan Modra <amodra@bigpond.net.au>
796
797 * elflink.h (elf_merge_symbol): When we find a regular definition
798 for an indirect symbol, flip the indirection so that the old
799 direct symbol now points to the new definition.
800
d145330d
RM
8012003-04-24 Roland McGrath <roland@redhat.com>
802
803 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
804
fc0bffd6
AM
8052003-04-24 Alan Modra <amodra@bigpond.net.au>
806
807 * elf32-ppc.c: Formatting and comment fixes.
808 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
809 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
810
8112003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
812
813 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
814 * bfd-in2.h: Rebuilt.
815 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 816 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
817 & H8300SNMAGIC.
818 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
819 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
820 (h8300sn_info_struct, h8300hn_info_struct): New.
821 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
822 (elf32_h8_final_write_processing): Likewise.
823
267fb3c1
KK
8242003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
825
826 * elf32-sh.c (tpoff): New.
827 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
828 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 829 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 830 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 831 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
832 (dtpoff_base): Fix wrong indentation.
833 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
834 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
835 R_SH_TLS_TPOFF32 relocations.
836
ef230218
JR
8372003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
838
839 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
840 * cpu-sh.c: Likewise.
841 * elf32-sh.c: Likewise.
842 * reloc.c (bfd_reloc_code_real): Likewise.
843 * elf32-sh64-com.c: Change comment to refer to SuperH.
844 * elf32-sh64.c: Likewise.
845 * elf64-sh64.c: Likewise.
846 * bfd-in2.h (enum bfd_architecture): Regenerate.
847
8c29f035
AM
8482003-04-23 Alan Modra <amodra@bigpond.net.au>
849
850 From Julien LEMOINE <speedblue@debian.org>
851 * elf32-i386.c (elf_i386_info_to_howto): Delete.
852 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
853
26597c86
NC
8542003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
855
856 * archures.c: Replace references to Mitsubishi M32R with references
857 to Renesas M32R.
858 * relocs.c: Likewise.
859 * bfd-in2.h: Regenerate.
860
cc13e3ef
RH
8612003-04-21 Richard Henderson <rth@redhat.com>
862
863 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
864 executable when a symbol is defined both regular and dynamic.
865
f5a6f915
SC
8662003-04-21 Stephane Carrez <stcarrez@nerim.fr>
867
868 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
869 (elf32-m68hc1x.lo): Update dependencies
870 * configure.in: Add elf32-m68hc1x.lo.
871 * configure: Rebuild.
872 * Makefile.in: Rebuild.
873
3a65329d
SC
8742003-04-21 Stephane Carrez <stcarrez@nerim.fr>
875
876 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
877 (m68hc11_elf_hash_table_create): New function.
878 (elf32_m68hc11_link_hash_table_free): New function.
879 (stub_hash_newfunc): New function.
880 (m68hc11_add_stub): New function.
881 (elf32_m68hc11_add_symbol_hook): New function.
882 (elf32_m68hc11_setup_section_lists): New function.
883 (elf32_m68hc11_next_input_section): New function.
884 (elf32_m68hc11_size_stubs): New function.
885 (elf32_m68hc11_build_stubs): New function.
886 (m68hc11_get_relocation_value): New function.
887 (elf32_m68hc11_relocate_section): Call the above to redirect
888 some relocations to the trampoline code.
889 (m68hc11_elf_export_one_stub): New function.
890 (m68hc11_elf_set_symbol): New function.
891 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
892 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
893 is not yet initialized.
894
895 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
896 (elf32_m68hc11_stub_hash_entry): New struct.
897 (m68hc11_page_info): Add trampoline handler address.
898 (m68hc11_elf_link_hash_table): Add stubs generation members.
899 (elf32_m68hc11_add_symbol_hook): Declare.
900 (elf32_m68hc11_setup_section_lists): Declare.
901 (elf32_m68hc11_size_stubs): Declare.
902 (elf32_m68hc11_build_stubs): Declare.
8c29f035 903
3a65329d
SC
904 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
905 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
906 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
907 (_bfd_m68hc11_elf_set_private_flags): Ditto.
908 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
909 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
910 (bfd_elf32_bfd_link_hash_table_create): Define.
911 (elf_backend_add_symbol_hook): Define.
912 (m68hc11_elf_bfd_link_hash_table_create): New function.
913 (m68hc11_elf_build_one_stub): New function.
914 (m68hc11_elf_size_one_stub): New function.
915 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
916 (bfd_elf32_bfd_link_hash_table_create): Define.
917
918 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
919 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
920 (m68hc12_phys_addr): Ditto.
921 (m68hc12_phys_page): Ditto.
922 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
923 (elf32_m68hc11_gc_mark_hook): Likewise.
924 (elf32_m68hc11_gc_sweep_hook): Likewise.
925 (elf32_m68hc11_check_relocs): Likewise.
926 (elf32_m68hc11_relocate_section): Likewise.
927 (_bfd_m68hc12_elf_set_private_flags): Likewise.
928 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
929 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
930 (m68hc12_elf_build_one_stub): New function.
931 (m68hc12_elf_size_one_stub): New function.
932 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
933 (elf_backend_add_symbol_hook): Define.
934 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
935
4081944f
NC
9362003-04-18 Nick Clifton <nickc@redhat.com>
937
938 * format.c (bfd_check_format_matches): Only check associated
939 vector if the matching_vector has been created.
940
060dc71d
AO
9412003-04-15 Alexandre Oliva <aoliva@redhat.com>
942
943 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
944 2003-04-09's change.
945
a3476bef
NC
9462003-04-15 Brian Ford <ford@vss.fsi.com>
947
948 * peicode.h (coff_swap_scnhdr_in): If a section holds
949 uninitialized data and is from an object file or from an
950 executable image that has not initialized the s_size field, or if
951 the physical size is padded, use the virtual size (stored in
952 s_paddr) instead.
953
ca4fa240
NC
9542003-04-15 H.J. Lu <hjl@gnu.org>
955
956 * elflink.h (elf_link_add_object_symbols): Properly report
957 filename for alignment reduction.
958
c2dcd04e
NC
9592003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
960
961 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
962 * reloc.c: Likewise.
963 * coff-h8300.c: Likewise.
964 * coff-h8500.c: Likewise.
965 * coff-sh.c: Likewise.
966 * cpu-h8300.c: Likewise.
967 * cpu-sh.c: Likewise.
968 * elf32-h8300.c: Likewise.
969 * elf32-sh.c: Likewise.
970 * elf32-sh64-com.c: Likewise.
971 * elf32-sh64.c: Likewise.
972 * elf64-sh64.c: Likewise.
973 * bfd-in2.h: Regenerate.
974
f7661995
NC
9752003-04-14 H.J. Lu <hjl@gnu.org>
976
977 * elflink.h (elf_link_add_object_symbols): Maintain maximum
978 alignment for common symbols. Warn reducing alignment for
979 common symbols. Report old filename when symbol size changes.
980
93a2b7ae
AO
9812003-04-12 Alexandre Oliva <aoliva@redhat.com>
982
983 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
984 occurrences of the same test changed in the previous patch.
985 Optimize.
986
0176c794
AO
9872003-04-11 Alexandre Oliva <aoliva@redhat.com>
988
989 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
990 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
991 GOT_DISP/addend only if the symbol got a global GOT entry.
992
0fdc1bf1
AO
9932003-04-10 Alexandre Oliva <aoliva@redhat.com>
994
995 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
996 GOT_PAGE/GOT_OFST referencing overridable symbol to
997 GOT_DISP/addend.
998 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
999 global symbol as GOT_DISP.
1000
9b8c98a4
BW
10012003-04-10 Bob Wilson <bob.wilson@acm.org>
1002
1003 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
1004 next relocation on an undefined symbol.
1005
ec1659c8
RH
10062003-04-09 Richard Henderson <rth@redhat.com>
1007
1008 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
1009 Ignore relocations against r_symndx == 0.
1010
7dfb07f7
L
10112003-04-09 H.J. Lu <hjl@gnu.org>
1012
1013 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
1014 FALSE for undefined symbols.
1015 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1016
a3805e4e
AO
10172003-04-09 Alexandre Oliva <aoliva@redhat.com>
1018
1019 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
1020 and IRIX-specific shift-to-64-bit 4-byte lengths before following
1021 addr_size.
1022
69931e60
AO
10232003-04-08 Alexandre Oliva <aoliva@redhat.com>
1024
1025 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
1026 pointer size from ABI, not arch_bits_per_address.
1027
59a8c196
KB
10282003-04-07 Kevin Buettner <kevinb@redhat.com>
1029
1030 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
1031 constants for n32 ABI.
1032
8e16317c
NC
10332003-04-06 Andrew Cagney <cagney@redhat.com>
1034
1035 * simple.c (bfd_simple_get_relocated_section_contents): Disable
1036 free that leads to GDB vs BFD memory corruption.
1037
196486be
SC
10382003-04-04 Stephane Carrez <stcarrez@nerim.fr>
1039
1040 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
1041 symbols that mark the end of the section.
1042 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
1043 converting to a relative branch so that the offset is computed after
1044 the relaxation; also relocate a jsr into a bsr if possible but don't
1045 relax them if they are to a far symbol as we need to call the
1046 trampoline code.
1047 (elf_m68hc11_howto_table): Set pcrel_offset to true.
1048
be33c5dd
SS
10492003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1050
1051 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
1052 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
1053 * bfd-in2.h: Regenerate
1054 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
1055 * cpu-tic4x.c: Ditto
1056
ff0c9faf
NC
10572003-04-03 Nick Clifton <nickc@redhat.com>
1058
1059 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
1060 differently for object files and executables.
1061 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
1062 for object files or for executables who have not already
1063 initialised the field.
1064 * libpei.h (bfd_pe_executable_p): New macro. Return true if
1065 the PE format bfd is an executable.
1066
2b98e6c0
AM
10672003-04-03 Alan Modra <amodra@bigpond.net.au>
1068
1069 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
1070 here as it's too early to reliably determine locality.
1071 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 1072 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 1073
92403579
BW
10742003-04-02 Bob Wilson <bob.wilson@acm.org>
1075
1076 * xtensa-modules.c: Remove comment indicating that this is a
1077 generated file.
1078
c45a316a
AM
10792003-04-02 Alan Modra <amodra@bigpond.net.au>
1080
1081 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
1082
e0001a05
NC
10832003-04-01 Bob Wilson <bob.wilson@acm.org>
1084
8c29f035
AM
1085 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
1086 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
1087 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
1088 xtensa-modules.lo.
1089 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
1090 xtensa-modules.c.
1091 (cpu-xtensa.lo): New target.
1092 (elf32-xtensa.lo): Likewise.
1093 (xtensa-isa.lo): Likewise.
1094 (xtensa-modules.lo): Likewise.
1095 * Makefile.in: Regenerate.
1096 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
1097 (bfd_archures_list): Add bfd_xtensa_arch.
1098 * config.bfd: Handle xtensa-*-*.
1099 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
1100 * configure: Regenerate.
1101 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
1102 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
1103 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
1104 (bfd_elf32_xtensa_le_vec): Likewise.
1105 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
1106 * cpu-xtensa.c: New file.
1107 * elf32-xtensa.c: Likewise.
1108 * xtensa-isa.c: Likewise.
1109 * xtensa-modules.c: Likewise.
1110 * libbfd.h: Regenerate.
1111 * bfd-in2.h: Likewise.
e0001a05 1112
5a6c6817
NC
11132003-04-01 Nick Clifton <nickc@redhat.com>
1114
1115 * archures.c (bfd_mach_arm_unknown): Define.
1116 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
1117 bfd_arm_get_mach_from_notes): Prototype.
1118 * bfd-in2.h: Regenerate.
1119 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
1120 bfd_arm_merge_machines.
1121 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
1122 * coffcode.h (coff_set_arch_mach_hook): Call
1123 bfd_arm_get_mach_from_notes.
1124 * coffgen.c (coff_real_object_p): Revert previous delta.
1125 * cpu_arm.c (arm_check_note): New function. Examine a note in a
1126 .note section.
1127 (bfd_arm_merge_machines): New function: Handle the merging of ARM
1128 binaries compiled for different architectures..
1129 (bfd_arm_update_notes): New function: Update an ARM note section.
1130 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
1131 number from an ARM note section.
1132 * elf32-arm.h (elf32_arm_object_p): Use
1133 bfd_arm_get_mach_from_notes.
1134 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
1135 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 1136
0cc1cf99
BE
11372003-04-01 Ben Elliston <bje@wasabisystems.com>
1138
1139 * dwarf2.c (read_attribute_value): Correct typo in comment.
1140
af3ef9fe
NC
11412003-04-01 Nick Clifton <nickc@redhat.com>
1142
1143 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
1144 instead of concat().
1145 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
1146 (add_line_info): Make a copy of the filename when storing it into
1147 the info structure.
af3ef9fe 1148
6e84a906
DJ
11492003-03-31 Andreas Schwab <schwab@suse.de>
1150 Daniel Jacobowitz <drow@mvista.com>
1151
1152 * simple.c (bfd_simple_get_relocated_section_contents): Add
1153 parameter symbol_table. Optionally use it instead of the symbol
1154 table from the bfd. Save and restore output offsets and output
1155 sections around bfd_get_relocated_section_contents. Fix a memory
1156 leak.
1157 (simple_save_output_info, simple_restore_output_info): New
1158 functions.
1159 * bfd-in2.h: Regenerate.
1160 * dwarf2.c (read_abbrevs): Use
1161 bfd_simple_get_relocated_section_contents instead of
1162 bfd_get_section_contents.
1163 (decode_line_info): Likewise.
1164 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
1165 find_rela_addend.
1166 (find_rela_addend): Remove.
1167 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
1168 debugging sections.
1169 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
1170 not bfd_zalloc.
1171
5ed6aba4
NC
11722003-03-31 David Heine <dlheine@suif.stanford.edu>
1173
1174 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
1175 bfd_alloc.
1176 * dwarf2.c (concat_filename): Always allocate space for the
1177 returned filename.
1178 (decode_line_info): Free the allocated filename returned by
1179 concat_filename.
1180 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
1181 * elf.c (copy_private_bfd_data): Likewise.
1182 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
1183 * elflink.h (elf_link_sort_relocs): Fix memory leak.
1184 * format.c (bfd_check_format_matches): Likewise.
1185 * linker.c (bfd_generic_final_link): Likewise.
1186 * opncls.c (find_separate_debug_info): Likewise.
1187 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 1188
5941afc1
L
11892003-03-28 H.J. Lu <hjl@gnu.org>
1190
1191 * elflink.h (elf_link_add_object_symbols): Correctly combine
1192 visibilities.
1193
9d73f260
JJ
11942003-03-27 Jakub Jelinek <jakub@redhat.com>
1195
1196 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
1197 to -1 before recomputing got offsets.
1198
a5ad465a
AS
11992003-03-26 Andreas Schwab <schwab@suse.de>
1200
1201 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1202 (elf_m68k_relocate_section): Use it to correctly handle symbols
1203 forced to be local.
1204 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
1205 entries for symbols that are forced to be local.
1206
d0647110
AO
12072003-03-25 Alexandre Oliva <aoliva@redhat.com>
1208
1209 * elfxx-mips.c (_bfd_mips_relax_section): New function.
1210 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
1211 * elfn32-mips.c, elf64-mips.c: Use it.
1212
e16bb312
NC
12132003-03-25 Stan Cox <scox@redhat.com>
1214 Nick Clifton <nickc@redhat.com>
8c29f035 1215
e16bb312
NC
1216 Contribute support for Intel's iWMMXt chip - an ARM variant:
1217
1218 * archures.c: Add bfd_mach_arm_iWMMXt.
1219 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
1220 * bfd-in2.h: Regenerate.
1221 * libbfd.h: Regenerate.
1222 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
1223 object files to be linked with XScale ones.
1224 (coff_arm_final_link_postscript): Update note section.
1225 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
1226 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
1227 after identifying a coff binary.
1228 * cpu-arm.c (processors): Add iWMMXt.
1229 (arch_inf): Likewise.
1230 * elf32-arm.h (arm_object_p): Handle note section.
1231 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
1232 be linked with XScale ones.
1233 (elf32_arm_section_flags): New function: Set flags on note section.
1234 (elf32_arm_final_write_processing): Handle note section.
1235
25f14c34
DD
12362003-03-21 DJ Delorie <dj@redhat.com>
1237
1238 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
1239 _bfd_elf_rela_local_sym.
1240
04b3329b
L
12412003-03-20 H.J. Lu <hjl@gnu.org>
1242
1243 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
1244 non-ELF outputs.
1245
c25cfdf8
NC
12462003-03-20 Nick Clifton <nickc@redhat.com>
1247
1248 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
1249 $idata5 in case bfd_coff_final_link is not called.
1250
3e1d7f19
JJ
12512003-03-19 Jakub Jelinek <jakub@redhat.com>
1252
1253 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
1254 field.
1255 (canon_reloc_count): Define.
1256 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
1257 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
1258 reloc_count.
1259 (sparc64_elf_canonicalize_reloc): New routine.
1260 (bfd_elf64_canonicalize_reloc): Define.
1261
3fa1d917
JJ
12622003-03-18 Jakub Jelinek <jakub@redhat.com>
1263
1264 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
1265 againt mergeable sections. Take r_addend into account when caching
1266 trampolines.
1267
f86b235a
RH
12682003-03-18 Richard Henderson <rth@redhat.com>
1269
8c29f035
AM
1270 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
1271 local symbols that have no dyninfo.
f86b235a 1272
49ae03bf
NC
12732003-03-14 Gene Smith <gene.smith@siemens.com>
1274
1275 * ieee.c (ieee_write_expression): Handle the case where symbol is
1276 NULL.
1277 General formatting improvements.
1278
6a457e5c
NC
12792003-03-13 Nick Clifton <nickc@redhat.com>
1280
1281 * configure.in (LINGUAS): Add zh_CN.
1282 * configure: Regenerate.
1283 * po/zh_CN.po: New file.
1284
93516ec3
NC
12852003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
1286
1287 * aout-cris.c (BYTES_IN_WORD): Don't define.
1288 aout-encap.c: Likewise.
1289 aout-ns32k.c: Likewise.
1290 aout-tic30.c: Likewise.
1291 hp300bsd.c: Likewise.
1292 i386aout.c: Likewise.
1293 i386dynix.c: Likewise.
1294 i386linux.c: Likewise.
1295 i386lynx.c: Likewise.
1296 i386mach3.c: Likewise.
1297 m68k4knetbsd.c: Likewise.
1298 m68klinux.c: Likewise.
1299 m68klynx.c: Likewise.
1300 m68knetbsd.c: Likewise.
1301 m88kmach3.c: Likewise.
1302 mipsbsd.c: Likewise.
1303 newsos3.c: Likewise.
1304 sparclinux.c: Likewise.
1305 sparclynx.c: Likewise.
1306 sparcnetbsd.c: Likewise.
1307 vaxbsd.c: Likewise. Fix comment formatting.
1308
fee24f1c
AO
13092003-03-12 Alexandre Oliva <aoliva@redhat.com>
1310
0b25d3e6
AO
1311 * Reverted 2003-03-02's patch.
1312
fee24f1c
AO
1313 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
1314 overridable.
1315 * elf64-mips.c (mips_elf64_canonicalize_reloc,
1316 mips_elf64_get_dynamic_reloc_upper_bound,
1317 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
1318 (bfd_elf64_get_canonicalize_reloc,
1319 bfd_elf64_get_dynamic_reloc_upper_bound,
1320 bfd_elf64_canonicalize_dynamic_reloc): Define.
1321 (mips_elf64_slurp_reloc_table): Support dynamic.
1322 (mips_elf64_slurp_one_reloc_table): Adjust.
1323
64fb1839
NC
13242003-03-12 Nick Clifton <nickc@redhat.com>
1325
1326 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
1327 'index' to 'offset' in test for zero value.
1328
908488f1
AO
13292003-03-11 Alexandre Oliva <aoliva@redhat.com>
1330
1331 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
1332 dynamic relocations pointing to local or section symbols, use the
1333 NULL symbol instead. Document the choice to not emit an
1334 additional R_MIPS_64 relocation.
1335
e515b051
AM
13362003-03-11 Alan Modra <amodra@bigpond.net.au>
1337
1338 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
1339 zero index dynamic tls relocs generated for the GOT. Tidy code.
1340 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
1341 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1342
a23b6845
AM
13432003-03-07 Alan Modra <amodra@bigpond.net.au>
1344
87d243f1
AM
1345 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
1346 a tls_get_addr call.
1347
a23b6845
AM
1348 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
1349 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
1350 ELF_LINK_NON_GOT_REF from weakdef.
1351 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
1352 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
1353 ELF_LINK_NON_GOT_REF from weakdef.
1354 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1355 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
1356 ELF_LINK_NON_GOT_REF from weakdef.
1357
2d36fe5f
AH
13582003-03-06 Jakub Jelinek <jakub@redhat.com>
1359 Andrew Haley <aph@redhat.com>
1360
1361 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
1362 output is relocateable.
1363
34f304a7
NC
13642003-03-06 Steven Konopa <skonopa@kgo.csc.com>
1365
1366 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
1367 R_COMMENT.
1368
7b609f53
AM
13692003-03-06 Alan Modra <amodra@bigpond.net.au>
1370
1371 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
1372 error messages.
1373 (ELIMINATE_COPY_RELOCS): Define to zero.
1374 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
1375 TLSLD relocs. Report reloc types on a number of errors. Optimize
1376 LOCAL24PC check for non-local syms. Don't capitalize error messages.
1377 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
1378 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
1379 calculating TLSLD relocs. Report reloc types on a number of errors.
1380 Don't capitalize error messages.
1381
6a0fb186
L
13822003-03-03 H.J. Lu <hjl@gnu.org>
1383
1384 * elfxx-ia64.c (USE_BRL): Removed.
1385 (oor_ip): Removed.
1386
34f304a7 13872003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
1388
1389 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
1390 relocation (no special function), and make it non-partial_inplace.
1391 (sh_elf_relax_section): When creating a bsr, use a consistent value
1392 no matter if the symbol is extern or not; set addend to -4.
1393 Don't swap load / non-load instructions for SH4.
1394 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
1395 rather than if the symbol is external to determine if adjusting the
1396 offset makes sense. Adjust the addend too if appropriate.
1397 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
1398 relocation.
1399
a9d68a1e
NC
14002003-03-03 Nick Clifton <nickc@redhat.com>
1401
1402 * po/da.po: Installed latest translation.
1403
7c2be35c
TS
14042003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1405
1406 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
1407 R_MIPS_PC16 to rightshift 2.
1408 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
1409 (bfd_elf32_bfd_reloc_type_lookup): Support
1410 BFD_RELOC_MIPSEMB_16_PCREL_S2.
1411 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
1412 R_MIPS_PC16 to rightshift 2.
1413 (mips_elf64_howto_table_rela): Likewise.
1414 (mips_reloc_map): Map to rightshifted BFD reloc.
1415 * elfn32-mips.c: The same as in elf64-mips.c.
1416 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
1417 (mips_elf_calculate_relocation): Handle rightshifted addends for
1418 R_MIPS_PC16.
1419 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
1420 MIPS Embedded PIC. Remove superfluous empty COMMENT.
1421 * libbfd.h: Regenerate.
1422 * bfd-in2.h: Regenerate.
1423
484a4f9c
RH
14242003-02-28 Richard Henderson <rth@redhat.com>
1425
1426 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
1427 for ltoff22x relaxation.
1428
2ce40c65
AM
14292003-03-01 Alan Modra <amodra@bigpond.net.au>
1430
1431 * bfd-in.h (_bfd): Don't define.
1432 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
1433 * syms.c: Likewise.
1434 * bfd-in2.h: Regenerate.
1435
2c4c2bc0
RH
14362003-02-27 Richard Henderson <rth@redhat.com>
1437
1438 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
1439 (elfNN_ia64_check_relocs): Set it.
1440 (allocate_global_data_got): Check it.
1441 (allocate_local_got): Likewise.
1442 (allocate_dynrel_entries): Likewise.
1443 (elfNN_ia64_relax_ldxmov): New.
1444 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
1445 (elfNN_ia64_choose_gp): Split out from ...
1446 (elfNN_ia64_final_link): ... here.
8c29f035 1447
c2852e88
AC
14482003-02-27 Andrew Cagney <cagney@redhat.com>
1449
1450 * bfd.c (struct bfd): Rename "struct _bfd".
1451 * bfd-in.h: Update copyright.
1452 (struct bfd): Rename "struct _bfd".
1453 (_bfd): Define for backward compatibility.
1454 * bfd-in2.h: Regenerate.
1455
3f87cb70
AM
14562003-02-25 Alan Modra <amodra@bigpond.net.au>
1457
3f9a32bd
AM
1458 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
1459 and rel_hdr2 when initially counting input relocs rather than after
1460 creating output reloc sections.
4fabe71e
AM
1461 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
1462 sizes.
3f9a32bd 1463
3f87cb70
AM
1464 * Makefile.am: Run "make dep-am".
1465 * Makefile.in: Regenerate.
1466
07c6e936
NC
14672003-02-24 Kris Warkentin <kewarken@qnx.com>
1468
1469 * elf.c (elfcore_read_notes): Add check for QNX style core file.
1470 (elfcore_grog_nto_note): New function.
1471 (elfcore_grog_nto_gregs): New function.
1472 (elfcore_grog_nto_status): New function.
1473
aad5d350
AM
14742003-02-24 Alan Modra <amodra@bigpond.net.au>
1475
1476 * elflink.c (_bfd_elf_create_got_section): Check existing .got
1477 section flags before concluding that we've already been called.
1478 Don't use register keyword.
1479 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
1480 (_bfd_elf_create_linker_section): Formatting.
1481
2ab1486e
NC
14822003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
1483
1484 * coff-h8300.c: Fix typo: intial -> initial.
1485 * coff-ppc.c: Likewise.
1486
70bccea4
AM
14872003-02-20 Alan Modra <amodra@bigpond.net.au>
1488
1489 * elf32-ppc.c: Formatting.
1490 (allocate_dynrelocs): LD and GD relocs against the same sym need
1491 separate GOT entries.
1492 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
1493 entries per symbol.
1494
ee05f2fe
AM
14952003-02-19 Alan Modra <amodra@bigpond.net.au>
1496
26e41594
AM
1497 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
1498 removal. Localize vars. Remove unnecessary dynobj test.
1499 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
1500 of INFO.
1501 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1502 and optimize.
1503 (elf_i386_relocate_section): Likewise.
1504 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
1505 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
1506 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
1507 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
1508 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
1509 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
1510 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
1511 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
1512 Formatting.
1513
f4656909
AM
1514 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
1515 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
1516 test.
1517 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
1518 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1519 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1520 and optimize. Use ELIMINATE_COPY_RELOCS.
1521 (ppc64_elf_relocate_section): Likewise.
1522
ee05f2fe
AM
1523 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
1524 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
1525 (ELIMINATE_COPY_RELOCS): Define.
1526 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
1527 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1528 (MUST_BE_DYN_RELOC): Define.
1529 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
1530 and optimize. Trim dyn_relocs.
1531 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
1532 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
1533 track of pc_rel dyn relocs.
1534 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
1535 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
1536 allocate_dynrelocs. Don't recalculate "sec".
1537
7619e7c7
AM
15382003-02-18 Alan Modra <amodra@bigpond.net.au>
1539
d881513a
AM
1540 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
1541 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
1542 on invalid LD relocs.
1543 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
1544 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
1545 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
1546
7619e7c7
AM
1547 * elf32-ppc.h: New file.
1548 * elf32-ppc.c: Include elf32-ppc.h.
1549 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
1550 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
1551 Add "tls_mask" field.
1552 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
1553 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
1554 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
1555 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
1556 Make use of htab shortcuts throughout file.
1557 (ppc_elf_link_hash_newfunc): Init tls_mask field.
1558 (ppc_elf_link_hash_table_create): Init new fields.
1559 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
1560 (ppc_elf_howto_raw): Add tls relocs.
1561 (ppc_elf_reloc_type_lookup): Handle them.
1562 (ppc_elf_unhandled_reloc): New function.
1563 (ppc_elf_create_got): Stash got section pointer in hash table,
1564 return status. Make .rela.got too.
1565 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
1566 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
1567 NON_GOT_REF set. Don't allocate space in .plt here..
1568 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
1569 not allocating plt entries unnecessarily. Allocate got entries here.
1570 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1571 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
1572 "info" during allocate_dynrelocs hash traversal. Use htab section
1573 shortcuts rather than searching for named sections. Get rid of
1574 "plt" and "strip" booleans.
1575 (update_local_sym_info, bad_shared_reloc): New functions.
1576 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
1577 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
1578 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
1579 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
1580 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
1581 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
1582 relocs that might use a plt entry. Set NON_GOT_REF too.
1583 Enumerate all do-nothing relocs.
1584 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
1585 tls relocs and all plt relocs.
1586 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
1587 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
1588 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
1589 shortcuts.
1590 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
1591 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
1592 entries and got relocs here. Warn on non-zero got reloc addend.
1593 Split out branch taken/not taken reloc code into a separate switch
1594 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
1595 Split out HA reloc adjustments to separate switch statement. Don't
1596 warn on reloc overflow if we've already warned about undefined.
1597 Don't rebuild sym name when reporting errors. Report all possible
1598 errors from _bfd_final_link_relocate.
1599 (bfd_elf32_bfd_final_link): Don't define.
1600
cd27b276
AM
16012003-02-18 Alan Modra <amodra@bigpond.net.au>
1602
1603 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
1604 rebuild sym name when reporting errors.
1605
ae9a127f
NC
16062003-02-17 Nick Clifton <nickc@redhat.com>
1607
3f9a32bd 1608 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
1609 allow_shlib_undefined for shared libraries.
1610 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
1611 of allow_shlib_undefined.
1612 * elf32-cris.c (cris_elf_relocate_section): Likewise.
1613 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1614 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1615 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1616 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1617 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1618 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1619 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1620 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1621 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
1622 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1623 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1624 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1625 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1626 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1627 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
1628
b5f852ea
NC
16292003-02-17 Nick Clifton <nickc@redhat.com>
1630
1631 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
1632 address field to use in the comparison.
3f9a32bd 1633 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 1634
3193e234
NC
16352003-02-14 Bob Wilson <bob.wilson@acm.org>
1636
1637 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
1638 backends when checking if the generic ELF target should be used.
1639
21efdc8d
NC
1640 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
1641 outside of functions, treat values as absolute addresses.
1642
ed781d5d
NC
1643 * bfd.c: Change embedded documentation to use consistent indentation
1644 and to split up long lines. Change informal style of description
1645 for functions lacking real documentation.
1646 * coffcode.h: Break up long lines in embedded documentation.
1647 * format.c: Likewise.
1648 * targets.c: Likewise.
1649 * libcoff.h: Regenerate.
1650 * bfd-in2.h: Regenerate.
1651
58ac9f71
AM
16522003-02-14 Alan Modra <amodra@bigpond.net.au>
1653
1654 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
1655 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
1656 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
1657 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
1658 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
1659 (group_sections): Don't share a stub section if stubs are for a large
1660 section. Adjust comment.
1661 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
1662 !stubs_always_before_branch.
1663 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
1664 treat undefined and undefweak specially when processing dyn relocs.
1665
9147e853
JJ
16662003-02-13 Jakub Jelinek <jakub@redhat.com>
1667
1668 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
1669
427bfd90
NC
16702003-02-13 Nick Clifton <nickc@redhat.com>
1671
1672 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
1673 in computation of offset to insert into BL instruction.
1674
42b5d0ea
NC
16752003-02-11 Uwe Stieber <uwe@wwws.de>
1676
1677 * config.bfd: Add support for kaOS as cross build target system.
1678
a48ebf4d
AM
16792003-02-11 Alan Modra <amodra@bigpond.net.au>
1680
1681 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
1682 .__tls_get_addr too.
1683 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
1684
c95b8a7a
KK
16852003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
1686
1687 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
1688 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
1689 (sh_elf_link_hash_newfunc): Remove the initialization of
1690 tls_tpoff32 field.
1691 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
1692 for which tls_tpoff32 flag is set.
1693 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
1694 of the symbol includes the entry matched with the input_section
1695 and having tls_tpoff32 flag on. When linking statically, set
1696 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
1697 is defined in this executable.
1698 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
1699
a779acda
JJ
17002003-02-10 Jakub Jelinek <jakub@redhat.com>
1701
1702 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
1703 even if there is just non-empty .rela.plt.
1704
fde78edd
NC
17052003-02-10 Nick Clifton <nickc@redhat.com>
1706
1707 * archures.c (bfd_mach_arm_ep9312): Define.
1708 * bfd-in2.h: Regenerate.
1709 * cpu-arm.c (processors[]): Add ep9312.
1710 (bfd_arm_arch): Add ep9312.
1711 * elf32-arm.h (elf32_arm_merge_private_data): Update error
1712 messages and add test for Maverick floating point support.
1713 (elf32_arm_print_private_bfd_data): Handle
1714 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
1715 (elf32_arm_object_p): New function.
1716 (elf_backend_object_p): Define.
fde78edd 1717
e7b938ca
AM
17182003-02-10 Alan Modra <amodra@bigpond.net.au>
1719
1720 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
1721 variables, structure fields or function params to tls_mask or
1722 similar to better reflect usage.
1723 (struct got_entry): Comment.
1724 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
1725 (get_tls_mask): Rename from get_tls_type.
1726
951fd09b
AM
17272003-02-09 Alan Modra <amodra@bigpond.net.au>
1728
1729 * elf64-ppc.c (TLS_GD_LD): Don't define..
1730 (TLS_GD): ..define this instead and update all uses.
1731 (TLS_TPRELGD): Define.
1732 (ppc64_elf_link_hash_table_create): Tweak initialization of
1733 init_refcount and init_offset.
1734 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
1735 Mark second slot of GD or LD toc entries.
1736 (get_tls_type): Return an int. Distinguish toc GD and LD entries
1737 from other tls types.
1738 (ppc64_elf_tls_setup): New function, split out from..
1739 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
1740 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
1741 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
1742 return value to properly decide whether toc GD and LD entries can
1743 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
1744 to determine GD or LD rather than looking at TLS_LD flag. Don't
1745 attempt to adjust got entry tls_type here..
1746 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
1747 look for possible merges.
1748 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
1749 optimization.
1750 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
1751 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
1752 Make use of return value from get_tls_type to properly detect GD and
1753 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
1754 handle tls_get_addr removal when looking at REL24 relocs, do it when
1755 looking at the previous reloc. Check reloc after DTPMOD64 to determine
1756 GD or LD.
1757 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
1758
acc990f2
AM
17592003-02-08 Alan Modra <amodra@bigpond.net.au>
1760
00b28bb0
AM
1761 * elf32-hppa.c (group_sections): Don't share a stub section if
1762 stubs are for a large section.
1763
acc990f2
AM
1764 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
1765 stubs if !stubs_always_before_branch.
1766
589e6347
NC
17672003-02-07 Nick Clifton <nickc@redhat.com>
1768
1769 * elf.c (swap_out_syms): Generate an error message if an
1770 equivalent output section cannot be found for a symbol.
1771
c328dc3f
JJ
17722003-02-07 Jakub Jelinek <jakub@redhat.com>
1773
1774 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
1775 local_got_entries is NULL.
1776
84f97cb6
AS
17772003-02-06 Andreas Schwab <schwab@suse.de>
1778
1779 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
1780 (read_value): Add parameter is_signed, use signed extraction if
1781 the value is signed.
1782 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
1783 encoding to read_value.
1784
6349e628
AM
17852003-02-06 Alan Modra <amodra@bigpond.net.au>
1786
1787 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
1788 plt info when called to transfer weak sym info.
1789
411e1bfb
AM
17902003-02-05 Alan Modra <amodra@bigpond.net.au>
1791
1792 * reloc.c: Add PPC and PPC64 TLS relocs.
1793 * libbfd.h: Regenerate.
1794 * bfd-in2.h: Regenerate.
1795 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
1796 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
1797 against a 32 bit field.
1798 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
1799 (_ppc64_elf_section_data): Add t_symndx and comments.
1800 (ppc64_elf_section_data): Use elf_section_data macro.
1801 (ppc64_elf_new_section_hook): American spelling.
1802 (struct got_entry, struct plt_entry): New.
1803 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
1804 (struct ppc_stub_hash_entry): Add "addend" field.
1805 (struct ppc_link_hash_entry): Add "tls_type".
1806 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
1807 TLS_EXPLICIT): Define.
1808 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
1809 (link_hash_newfunc): Init new fields.
58ac9f71 1810 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
1811 init_offset to NULL.
1812 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
1813 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
1814 there.
1815 (update_local_sym_info, update_plt_info): New functions.
1816 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
1817 handling to use got.glist rather than got.refcount. Likewise for PLT.
1818 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
1819 (func_desc_adjust): Adjust for new PLT list.
1820 (ppc64_elf_adjust_dynamic_symbol): Likewise.
1821 (get_sym_h, get_tls_type): New functions.
1822 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
1823 (ppc64_elf_tls_optimize): New function.
1824 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
1825 TLS relocs.
1826 (ppc64_elf_size_dynamic_sections): Likewise.
1827 (ppc_type_of_stub): Adjust for new PLT list.
1828 (ppc_build_one_stub): Likewise.
1829 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
1830 calls specially.
1831 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
1832 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
1833 init GOT entries that have a reloc. Generate GOT relocs here..
1834 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
1835 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
1836
0cca5f05
AS
18372003-02-04 Andreas Schwab <schwab@suse.de>
1838
1839 * elf32-m68k.c (elf_m68k_hash_entry): Define.
1840 (elf_m68k_link_hash_traverse): Remove.
1841 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
1842 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
1843 reduce casting.
1844 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
1845 casting.
1846 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
1847 instead of elf_m68k_link_hash_traverse.
1848 (elf_m68k_discard_copies): Change first parameter to pointer to
1849 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
1850 elf_m68k_link_hash_entry is needed.
1851
5cab59f6
AM
18522003-02-04 Alan Modra <amodra@bigpond.net.au>
1853
1854 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
1855 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
1856 "got" union, and declare as gotplt_union. Use gotplt_uinion for
1857 "plt" field.
1858 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
1859 Add "init_offset" field.
1860 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
1861 (elf_local_got_ents): Declare.
1862 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
1863 and "plt".
1864 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
1865 (_bfd_elf_link_hash_table_init): Set "init_offset".
1866 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
1867 from init_offset.
1868 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
1869
1870 * elf.c (bfd_elf_local_sym_name): Split out from..
1871 (group_signature): ..here.
1872 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
1873
68bfbfcc
AM
18742003-02-04 Alan Modra <amodra@bigpond.net.au>
1875
1876 * elf-bfd.h (enum elf_link_info_type): Remove.
1877 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
1878 to struct sec. Remove linkonce_p field.
1879 (elf_linkonce_p): Delete.
1880 (elf_discarded_section): Update for sec_info_type change.
1881 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
1882 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
1883 (ELF_INFO_TYPE_NONE): Define.
1884 (ELF_INFO_TYPE_STABS): Define.
1885 (ELF_INFO_TYPE_MERGE): Define.
1886 (ELF_INFO_TYPE_EH_FRAME): Define.
1887 (ELF_INFO_TYPE_JUST_SYMS): Define.
1888 (STD_SECTION): Update struct sec initializer.
1889 * ecoff.c (bfd_debug_section): Likewise.
1890 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
1891 * elflink.h: Likewise.
1892 * elf-eh-frame.c: Likewise.
1893 * elf64-alpha.c: Likewise.
1894 * elfxx-ia64.c: Likewise.
1895 * elfxx-mips.c: Likewise.
1896 * bfd-in2.h: Regenerate.
1897
1898 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
1899 referring to used_by_bfd.
1900 * elf64-sparc.c (sec_do_relax): Likewise.
1901 * elf64-mmix.c (mmix_elf_section_data): Likewise.
1902 * elfxx-mips.c (mips_elf_section_data): Likewise.
1903 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
1904 (ieee_get_section_contents): Likewise.
1905 (ieee_new_section_hook): Formatting.
1906 (ieee_canonicalize_reloc): Remove commented out code.
1907 * mmo.c (mmo_section_data): Define. Use throughout file.
1908 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
1909
31f7ba04
NC
19102003-01-31 Graydon Hoare <graydon@redhat.com>
1911
1912 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
1913 * Makefile.in: Regenerate.
1914 * opncls.c (calc_crc32, get_debug_link_info,
1915 seperate_debug_file_exists, find_seperate_debug_file): New
1916 internal functions.
1917 (bfd_follow_gnu_debuglink): New function. Follow the pointer
1918 contained inside a .gnu_debuglink section.
1919 * bfd-in2.h: Regenerate.
1920
38985a1c
AO
19212003-01-29 Alexandre Oliva <aoliva@redhat.com>
1922
1923 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
1924 entry->abfd when it's NULL.
1925
4bb9a95f
AO
19262003-01-27 Alexandre Oliva <aoliva@redhat.com>
1927
1928 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
1929 _bfd_elf_section_offset returning -2 the same way as -1.
1930
f4416af6
AO
1931 * elfxx-mips.c (mips_elf_multi_got): New function.
1932 (struct mips_got_entry): Make symndx and gotidx signed. Moved
1933 addend into union along with address and link hash entry.
1934 (struct mips_got_info): Added bfd2got and next.
1935 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
1936 (mips_elf_got_section, mips_elf_create_got_section): Use
1937 SEC_EXCLUDE bit to tell whether we really need the got
1938 section. Take boolean arguments to disregard an excluded
1939 section, or to create it as excluded. Adjust all callers.
1940 Use mips_elf_got_section all over.
1941 (mips_elf_local_got_index, mips_elf_got_page,
1942 mips_elf_got16_entry): Take input bfd as argument, and pass it
1943 on to mips_elf_create_local_got_entry.
1944 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
1945 Take input bfd as argument, and manage entries in the
1946 appropriate GOT.
1947 (mips_elf_got_offset_from_index): Take input bfd as argument,
1948 and use it to adjust the GP offset of the bfd.
1949 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
1950 unreferenced GOT entries of global symbols to the end.
1951 (mips_elf_record_global_got_symbol): Take input bfd as
1952 argument. Add entries to the master GOT hash table.
1953 (struct mips_elf_bfd2got_hash): New.
1954 (struct mips_elf_got_per_bfd_arg): New.
1955 (struct mips_elf_set_global_got_offset_arg): New.
1956 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
1957 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
1958 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
1959 mips_elf_merge_gots, mips_elf_set_global_got_offset,
1960 mips_elf_resolve_final_got_entry,
1961 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
1962 mips_elf_got_for_ibfd): New functions.
1963 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
1964 (MIPS_ELF_GOT_MAX_SIZE): New macro.
1965 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
1966 (mips_elf_got_entry_hash): Take new fields into account. Use
1967 mips_elf_hash_bfd_vma.
1968 (mips_elf_got_entry_eq): Take new fields into account.
1969 (mips_elf_create_got_section): Initialize new fields.
1970 (mips_elf_calculate_relocation): Pass input_bfd to functions
1971 that now take it. Adjust gp for the input_bfd.
1972 (mips_elf_allocate_dynamic_relocation,
1973 mips_elf_create_dynamic_relocation,
1974 _bfd_mips_elf_create_dynamic_sections): Use...
1975 (mips_elf_rel_dyn_section): New function. Borrow code from...
1976 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
1977 now take it. Create the got section if needed, even if
1978 excluded, before recording a global got symbol. Move some
1979 code to...
1980 (mips_elf_record_local_got_symbol): New fn.
1981 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
1982 Compute multi-got global entries offsets. Move GOT code to...
1983 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
1984 if the GOT is too big.
1985 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
1986 undefweak symbol to zero. Generate dynamic relocations for
1987 non-primary GOT entries for global symbols.
1988 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
1989 case. Generate dynamic relocations for local got entries.
1990 Sort dynamic relocations on N64 too, using...
1991 (sort_dynamic_relocs_64): New fns.
1992 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
1993 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
1994
52b69c9e
AO
19952003-01-27 Alexandre Oliva <aoliva@redhat.com>
1996
1997 * bfd.c (struct _bfd): Added id field.
1998 * opncls.c (_bfd_id_counter): New static variable.
1999 (_bfd_new_bfd): Use it.
2000 * bfd-in2.h: Rebuilt.
2001
71e5db1c
AM
20022003-01-25 Alan Modra <amodra@bigpond.net.au>
2003
2004 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
2005
b9734f35
JJ
20062003-01-25 Jakub Jelinek <jakub@redhat.com>
2007
2008 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
2009 (elf32_sparc_rev32_howto): New variable.
2010 (sparc_reloc_map): Add TLS relocs.
2011 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
2012 Handle REV32.
2013 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
2014 New functions.
2015 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
2016 struct elf32_sparc_link_hash_table):
2017 New structures.
2018 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
2019 elf32_sparc_hash_table): Define.
2020 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
2021 create_got_section, elf32_sparc_create_dynamic_sections,
2022 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
2023 functions.
2024 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
2025 reference counting.
2026 (elf32_sparc_gc_sweep_hook): Likewise.
2027 (elf32_sparc_adjust_dynamic_symbol): Likewise.
2028 (elf32_sparc_size_dynamic_sections): Likewise.
2029 (elf32_sparc_relocate_section): Likewise.
2030 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
2031 New functions.
2032 (elf32_sparc_object_p): Allocate backend private object data.
2033 (bfd_elf32_bfd_link_hash_table_create,
2034 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
2035 elf_backend_can_refcount): Define.
2036 (elf_backend_create_dynamic_sections): Define to
2037 elf32_sparc_create_dynamic_sections.
2038 * reloc.c: Add SPARC TLS relocs.
2039 * bfd-in2.h, libbfd.h: Rebuilt.
2040 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
2041 (sparc_reloc_map): Likewise.
2042
69fc87f1
MS
20432003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
2044
2045 * bfd-in2.h: Regenerate.
2046 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
2047 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
2048 (elf_howto_table): Add TLS relocs.
2049 (elf_s390_reloc_type_lookup): Likewise.
2050 (elf_s390_link_hash_entry): Add tls_type.
2051 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
2052 New macros.
2053 (elf_s390_link_hash_table): Add tls_ldm_got.
2054 (link_hash_newfunc): Initialize tls_type.
2055 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
2056 (elf_s390_copy_indirect_symbol): Copy tls_type information.
2057 (elf_s390_check_relocs): Support TLS relocs.
2058 (elf_s390_gc_sweep_hook): Likewise.
2059 (allocate_dynrelocs): Likewise.
2060 (elf_s390_size_dynamic_sections): Likewise.
2061 (elf_s390_relocate_section): Likewise.
2062 (elf_s390_finish_dynamic_symbol): Likewise.
2063 (bfd_elf32_mkobject): Define for TLS.
2064 * elf64-s390.c: Same changes as for elf32-s390.c.
2065 * libbfd.h: Regenerate.
2066 * reloc.c: Add s390 TLS relocations.
2067
c5d1701e 20682003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
2069
2070 * aclocal.m4: Fix name of --enable-install-libbfd switch.
2071
5177500f
NC
20722003-01-23 Nick Clifton <nickc@redhat.com>
2073
2074 * Add sh2e support:
2075
2076 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
2077
2078 * archures.c (bfd_mach_sh2e): Added.
2079 * bfd-in2.h: Rebuilt.
2080 * cpu-sh.c (arch_info_struct): Added SH2e.
2081 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
2082
f0abc2a1
AM
20832003-01-23 Alan Modra <amodra@bigpond.net.au>
2084
2085 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
2086 dynindx to an int. Rearrange for better packing.
2087 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
2088 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
2089 * elf32-sh64.h: New. Split out from include/elf/sh.h.
2090 (struct _sh64_elf_section_data): New struct.
2091 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
2092 * elf32-sh64-com.c: Include elf32-sh64.h.
2093 * elf32-sh64.c: Likewise.
2094 (sh64_elf_new_section_hook): New function.
2095 (bfd_elf32_new_section_hook): Define.
2096 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
2097 (sh64_bfd_elf_copy_private_section_data): Likewise.
2098 (sh64_elf_final_write_processing): Likewise.
2099 * elf32-sparc.c (struct elf32_sparc_section_data): New.
2100 (elf32_sparc_new_section_hook): New function.
2101 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2102 (sec_do_relax): Define.
2103 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
2104 (elf32_sparc_relocate_section): Likewise.
2105 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
2106 * elf64-mmix.c (struct _mmix_elf_section_data): New.
2107 (mmix_elf_section_data): Define. Use throughout file.
2108 (mmix_elf_new_section_hook): New function.
2109 (bfd_elf64_new_section_hook): Define.
2110 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
2111 (ppc64_elf_section_data): Define. Use throughout.
2112 (ppc64_elf_new_section_hook): New function.
2113 (bfd_elf64_new_section_hook): Define.
2114 * elf64-sparc.c (struct sparc64_elf_section_data): New.
2115 (sparc64_elf_new_section_hook): New function.
2116 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
2117 (sec_do_relax): Define.
2118 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
2119 (sparc64_elf_relocate_section): Likewise.
2120 (bfd_elf64_new_section_hook): Define.
2121 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
2122 * elfxx-mips.c (struct _mips_elf_section_data): New.
2123 (mips_elf_section_data): Define. Use throughout.
2124 (_bfd_mips_elf_new_section_hook): New function.
2125 (mips_elf_create_got_section): Don't alloc used_by_bfd.
2126 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
2127 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
2128 * Makefile.am: Run "make dep-am".
2129 * Makefile.in: Regenerate.
2130
cc03ec80
RH
21312003-01-21 Richard Henderson <rth@redhat.com>
2132
2133 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
2134 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
2135 (elf64_alpha_adjust_dynamic_symbol): Set them.
2136 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
2137 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
2138 symbol index when relaxing LDM to TPREL.
2139 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
2140 relocs, even if the target isn't locally defined.
2141 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
2142 (elf64_alpha_relocate_section): Likewise. Force TP-relative
2143 relocs vs symndx 0 to the tp base.
2144
da896d3f
NC
21452003-01-21 Fabio Alemagna <falemagn@aros.org>
2146
2147 * config.bfd: Handle i[3456]86-*-aros*.
2148
7fce784e
AS
21492003-01-21 Andreas Schwab <schwab@suse.de>
2150
2151 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
2152 (struct ppc_elf_link_hash_entry): Define.
2153 (ppc_elf_hash_entry): New function.
2154 (struct ppc_elf_link_hash_table): Define.
2155 (ppc_elf_hash_table): New function.
2156 (ppc_elf_link_hash_newfunc): New function.
2157 (ppc_elf_link_hash_table_create): New function.
2158 (ppc_elf_copy_indirect_symbol): New function.
2159 (allocate_dynrelocs): New function.
2160 (readonly_dynrelocs): New function.
2161 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
2162 relocs and determine DT_TEXTREL.
2163 (ppc_elf_check_relocs): Don't do that here, just count the
2164 dynamic relocs.
2165 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
2166 removed section.
2167 (bfd_elf32_bfd_link_hash_table_create): Define.
2168 (elf_backend_copy_indirect_symbol): Define.
2169
1bbc9cec
RH
21702003-01-21 Richard Henderson <rth@redhat.com>
2171
2172 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
2173 TPREL also get a reloc if shared. Remove SREL support.
2174 (elf64_alpha_emit_dynrel): New.
acc990f2 2175 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
2176 and GOTTPREL relocs to local symbols against the tp base.
2177 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
2178
2179 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
2180 use count before clobbering r_type.
2181 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
2182 ordering would mean dataflow inspection is necessary.
2183
0da35f8b
SS
21842003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
2185
2186 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 2187
571fe01f
NC
21882003-01-20 Fabio Alemagna <falemagn@aros.org>
2189
2190 * elf32-sh.c: Treat elfNN_bed like other macros defined in
2191 elfxx-target.h and #undef it before #define'ing it.
2192 * elf32-i386.c: Likewise.
acc990f2
AM
2193 * elf32-sh64.c: Likewise.
2194 * elf64-alpha.c: Likewise.
2195 * elf64-sh64.c: Likewise.
571fe01f 2196
5236c819
MS
21972003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
2198
2199 * bfd-in2.h: Regenerate.
2200 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
2201 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
2202 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
2203 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
2204 R_390_PLTOFF32 and R_390_PLTOFF64.
2205 (elf_s390_reloc_type_lookup): Likewise.
2206 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
2207 of GOTPLT references to a function.
2208 (link_hash_newfunc): Initialize gotplt_refcount.
2209 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
2210 and creation of the got section out of the main switch. Add support
2211 for the gotoff, gotplt and pltoff relocations.
2212 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
2213 and pltoff.
2214 (elf_s390_adjust_gotplt): New function.
2215 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
2216 plt entries.
2217 (allocate_dynrelocs): Add comment.
2218 (elf_s390_relocate_section): Change r_type to unsigned. Add support
2219 for gotoff, gotplt and pltoff relocations.
2220 * elf64-s390.c: Same changes as for elf32-s390.c.
2221 * libbfd.h: Regenerate.
2222 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
2223 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
2224 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
2225 and BFD_RELOC_390_PLTOFF64.
2226
a823975a
JJ
22272003-01-18 Jakub Jelinek <jakub@redhat.com>
2228
2229 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
2230 R_IA64_TPREL64[LM]SB against non-global symbol properly.
2231
b3dfd7fe
JJ
22322003-01-16 Jakub Jelinek <jakub@redhat.com>
2233
2234 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
2235 self_dtpmod_done and self_dtpmod_offset.
2236 (allocate_global_data_got): Only use one got entry for all
2237 dtpmod relocs against local symbols.
2238 (allocate_dynrel_entries): Only need .rela.got entry for
2239 dtpmod against global symbol.
2240 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
2241 Reserve space in .rela.got for the local dtpmod entry.
2242 (set_got_entry): Initialize the common local dtpmod .got entry.
2243 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
2244 and R_IA_64_DTPREL64MSB.
2245
04c9666a
AM
22462003-01-16 Alan Modra <amodra@bigpond.net.au>
2247
2248 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
2249 (R_PPC_*): Rename all occurrences to R_PPC64_*.
2250 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
2251 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
2252 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
2253 relative relocs, not with absolute ones.
2254 * Makefile.am: Run "make dep-am".
2255 * Makefile.in: Regenerate.
2256 * po/SRC-POTFILES.in: Regenerate.
2257
c87f1ff7
AS
22582003-01-15 Andreas Schwab <schwab@suse.de>
2259
2260 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
2261 relocation against a non-allocated readonly section.
2262
86bbe32f
AM
22632003-01-10 Alan Modra <amodra@bigpond.net.au>
2264
2265 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
2266 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
2267
32d95f29
KD
22682002-01-08 Klee Dienes <kdienes@apple.com>
2269
2270 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
2271 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
2272 * Makefile.in: Regenerate.
acc990f2 2273
ab7d0aa0
AO
22742003-01-08 Alexandre Oliva <aoliva@redhat.com>
2275
2276 * elfn32-mips.c (prev_reloc_section): New.
2277 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
2278 (SET_RELOC_ADDEND): Parenthesize macro argument.
2279
95d0f04a
DA
22802003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
2281
2282 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
2283 adjust addil instructions if the symbol has no section.
2284
5c9e189c
DD
22852003-01-07 DJ Delorie <dj@redhat.com>
2286
2287 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
2288 partial_inplace.
2289
3e829b4a
AS
22902003-01-07 Andreas Schwab <schwab@suse.de>
2291
2292 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
2293 PC relative relocations.
2294 (elf_m68k_discard_copies): Set it here instead.
2295
a75473eb
SC
22962002-01-02 Ben Elliston <bje@redhat.com>
2297 Jeff Johnston <jjohnstn@redhat.com>
2298
2299 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
2300 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
2301 (BFD32_BACKENDS): Add elf32-iq2000.lo.
2302 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
2303 (cpu-iq2000.lo): New target.
2304 * Makefile.in: Regenerate.
2305 * config.bfd: Handle iq2000-*-elf.
2306 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
2307 (bfd_archures_list): Add bfd_iq2000_arch.
2308 * configure.in: Handle bfd_elf32_iq2000_vec.
2309 * configure: Regenerate.
acc990f2 2310 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
2311 and BFD_RELOC_IQ2000_UHI16.
2312 * targets.c (bfd_elf32_iq2000_vec): Declare.
2313 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
2314 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
2315 * cpu-iq2000.c: New file.
2316 * elf32-iq2000.c: Likewise.
2317 * libbfd.h: Regenerate.
2318 * bfd-in2.h: Likewise.
2319
64543e1a
RS
23202003-01-02 Richard Sandiford <rsandifo@redhat.com>
2321
2322 * elfxx-mips.c: Include libiberty.h.
2323 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
2324 (mips_set_isa_flags): New function, split out from...
2325 (_bfd_mips_elf_final_write_processing): ...here. Only call
2326 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
2327 (mips_mach_extensions): New array.
2328 (mips_32bit_flags_p): New function.
2329 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
2330 Use mips_32bit_flags_p to check if one binary is 32-bit and the
2331 other is 64-bit. When adopting IBFD's architecture, adopt the
2332 bfd_mach as well as the flags.
2333
4852a44e
NC
23342003-01-02 Nick Kelsey <nickk@ubicom.com>
2335
2336 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
2337 fix internal errors, fix bad code generation, fix incorrect stabs
2338 information, and improve ability to eliminate redundant page
2339 instructions. Added code to ip2k_final_link_relocate to self-verify
2340 the linker relaxation. Fix formatting problems.
2341
af7ee8bf
CD
23422002-12-30 Chris Demetriou <cgd@broadcom.com>
2343
2344 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
2345 * archures.c (bfd_mach_mipsisa32r2): New define.
2346 * bfd-in2.h: Regenerate.
2347 * cpu-mips.c (I_mipsisa32r2): New enum value.
2348 (arch_info_struct): Add entry for I_mipsisa32r2.
2349 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
2350 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
2351 (_bfd_mips_elf_final_write_processing): Add
2352 bfd_mach_mipsisa32r2 case.
2353 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
2354 binaries marked as using MIPS32 Release 2.
2355
2469cfa2
NC
23562002-12-30 Dmitry Diky <diwil@mail.ru>
2357
2358 * Makefile.am: Add msp430 target.
2359 * configure.in: Likewise.
2360 * Makefile.in: Regenerate.
2361 * configure: Regenerate.
2362 * archures.c: Add msp430 architecture vector.
2363 * config.bfd: Likewise.
2364 * reloc.c: Add msp430 relocs.
2365 * targets.c: Add msp320 target.
2366 * cpu-msp430.c: New file: msp430 cpu detection.
2367 * elf32-msp430.c: New file: msp430 reloc processing.
2368 * bfd-in2.h: Regenerate.
2369 * libbfd.h: Regenerate.
2370
eecdbe52
JJ
23712002-12-28 Jakub Jelinek <jakub@redhat.com>
2372
2373 * elf.c (elf_sort_sections): Don't reorder .tbss.
2374 (assign_file_positions_for_segments): Only adjust off/voff
2375 for increased alignment in PT_LOAD or PT_NOTE segment,
2376 but adjust p_filesz for .tbss too. in PT_LOAD consider
2377 .tbss to have zero memory size.
2378 (copy_private_bfd_data) [SECTION_SIZE]: Define.
2379 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
2380 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
2381 into PT_TLS segment. Never put SHF_TLS sections in
2382 segments other than PT_TLS or PT_LOAD.
2383
2384 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
2385 sh_entsize.
2386
213e90f4
DD
23872002-12-23 DJ Delorie <dj@redhat.com>
2388
2389 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
2390
75828352
AM
23912002-12-23 Alan Modra <amodra@bigpond.net.au>
2392
2393 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
2394
312b768e
NC
23952002-12-23 Nick Clifton <nickc@redhat.com>
2396
2397 * archures.c (bfd_arch_get_compatible): Add third parameter
2398 'accept_unknowns'. Only accept unknown format BFDs if
2399 accept_unknowns is true, or if the format is "binary".
acc990f2 2400 * bfd-in2.h: Regenerate.
312b768e 2401
63222ec9
NC
24022002-12-21 Nick Clifton <nickc@redhat.com>
2403
2404 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
2405 that subtracted 8 from pc relative relocations.
2406
19852a2a
KH
24072002-12-20 Kazu Hirata <kazu@cs.umass.edu>
2408
2409 * coff-h8300.c: Fix comment typos.
2410 * coffcode.h: Likewise.
2411 * cpu-cris.c: Likewise.
2412 * elf32-vax.c: Likewise.
2413 * genlink.h: Likewise.
2414 * linker.c: Likewise.
2415 * som.c: Likewise.
2416 * tekhex.c: Likewise.
2417 * vms-misc.c: Likewise.
2418
5fd63999
DD
24192002-12-20 DJ Delorie <dj@redhat.com>
2420
2421 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
2422 * libbfd.h: Regenerate.
2423 * bfd-in2.h: Regenerate.
2424 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
2425 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 2426
4ee79850
KH
24272002-12-19 Kazu Hirata <kazu@cs.umass.edu>
2428
2429 * doc/bfdint.texi: Fix typos.
2430
66e25bab
AM
24312002-12-20 Paul Eggert <eggert@twinsun.com>
2432
2433 Port to POSIX 1003.1-2001.
2434 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
2435 * configure.in (build-warnings): Likewise.
2436 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
2437 * aclocal.m4: Regenerate.
2438 * config.in: Regenerate.
2439 * configure: Regenerate.
2440
7dc77aaa
AM
24412002-12-19 Alan Modra <amodra@bigpond.net.au>
2442
0171ee92
AM
2443 * coff-h8300.c: Include libiberty.h.
2444 (h8300_reloc16_extra_cases): Check the hash table creator before
2445 referencing h8300 specific fields. Stash the hash table pointer
2446 in a local var. Comment typo fixes.
2447 (h8300_bfd_link_add_symbols): Likewise.
2448
7dc77aaa
AM
2449 * bfd/reloc.c (struct reloc_howto_struct): Revise src_mask and
2450 dst_mask comments.
2451 * bfd-in2.h: Regenerate.
2452
47388f4c
AM
24532002-12-18 Alan Modra <amodra@bigpond.net.au>
2454
2455 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
2456 code a little. Comment on dynamic relocs against section symbols.
2457
1b3e3744
AM
24582002-12-17 Roger Sayle <roger@eyesopen.com>
2459
2460 * configure.host (ia64-*-hpux*): Support 64 bit targets using
2461 the HP compiler's "long long".
2462
46f2b541
DD
24632002-12-16 Andrew MacLeod <amacleod@redhat.com>
2464
2465 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
2466 and R_XSTORMY16_HI16) howto entries.
2467 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 2468 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
2469 determine the start of the second reloc table.
2470
af738ea7
NC
24712002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
2472
2473 * ecofflink.c: Fix the reading of the debugging information
2474 of Tru64/Alpha binaries that are produced by recent Compaq
2475 compilers.
2476 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
2477 table.
2478 (lookup_line): Because of the strange information sometimes
2479 generated by Compaq's recent compilers, change how the FDR
2480 table is searched so that PDRs (procedure descriptors) are
2481 correctly found. Note that this change is really more of a hack;
2482 however, I have included extensive documentation as to why
2483 this is the best solution short of an extensive rewrite or
2484 another hack.
2485 (fdrtab_lookup): Add comments to explain the algorithm.
2486
5354b572
AO
24872002-12-12 Alexandre Oliva <aoliva@redhat.com>
2488
2489 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
2490 initializers to match struct declaration.
2491
ab3acfbe
AM
24922002-12-12 Alan Modra <amodra@bigpond.net.au>
2493
2494 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
2495 * elf.c (get_program_header_size): Likewise.
2496 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
2497 (m32r_elf_generic_reloc): Likewise.
2498 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
2499 * elflink.h (elf_bfd_discard_info): Likewise.
2500
6348e046
AM
25012002-12-12 Alan Modra <amodra@bigpond.net.au>
2502
2503 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
2504 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
2505 DT_RELSZ adjustment, not output section. Avoid writing tags when
2506 unchanged. Don't assume linker script is sane, adjust DT_REL too.
2507 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
2508 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
2509 DT_RELASZ adjustment, not output section. Avoid writing tags when
2510 unchanged. Adjust DT_RELA.
2511 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
2512 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
2513
2e7a68a8
AO
25142002-12-12 Alexandre Oliva <aoliva@redhat.com>
2515
2516 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
2517 addend by 4.
2518
b15e6682
AO
25192002-12-12 Alexandre Oliva <aoliva@redhat.com>
2520
2521 * elfxx-mips.c (struct mips_got_entry): New.
2522 (struct mips_got_info): Added got_entries field.
2523 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
2524 (mips_elf_local_got_index, mips_elf_got_page,
2525 mips_elf_got16_entry): Re-implement in terms of new...
2526 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
2527 Change return type.
2528 (mips_elf_highest): Warning clean-up.
2529 (mips_elf_create_got_section): Initialize got_entries.
2530 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
2531 local got size.
2532 (_bfd_mips_elf_size_dynamic_sections): Do not account for
2533 GOT_PAGE entries, since we now reuse GOT16 entries.
2534
e6af3a53
NC
25352002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
2536
2537 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
2538 read-only section that lies after .text and before .data to be
2539 written into the output file and included in a_text.
2540 (translate_to_native_sym_flags): If an otherwise unrepresentable
2541 section was merged with .text, convert its symbols to N_TEXT
2542 symbols.
2543 * libaout.h (aout_section_merge_with_text_p): New macro.
2544
cf3d882d
AM
25452002-12-08 Alan Modra <amodra@bigpond.net.au>
2546
2547 * bfd-in.h: Comment typo fix. Formatting.
2548 * bfd-in2.h: Regenerate.
2549 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
2550 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
2551 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
2552
2f9bd3f6
RH
25532002-12-05 Richard Henderson <rth@redhat.com>
2554
2555 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
2556 Only send PCREL21B though the plt. Fix installed reloc type.
2557 (elfNN_ia64_relocate_section): Give error for dynamic reloc
2558 against PCREL22 or PCREL64I; clean up error messages for
2559 branch relocs.
2560
d0112f73
KB
25612002-12-04 Kevin Buettner <kevinb@redhat.com>
2562
2563 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
2564 New functions.
2565 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
2566
c10d9d8f
JW
25672002-12-04 David Mosberger <davidm@hpl.hp.com>
2568
2569 * cpu-ia64-opc.c: Add operand constant "ar.csd".
2570
d48770d4
L
25712002-12-04 H.J. Lu <hjl@gnu.org>
2572
2573 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
2574 BFD address when constructing local name.
2575
b6152c34
AS
25762002-12-04 Andreas Schwab <schwab@suse.de>
2577
2578 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
2579 member.
2580 (elf_m68k_link_hash_table_create): Initialize it.
2581 (elf_m68k_check_relocs): Handle symbols that are forced to be
2582 local due to visibility changes.
2583 (elf_m68k_adjust_dynamic_symbol): Likewise.
2584 (elf_m68k_size_dynamic_sections): Likewise.
2585 (elf_m68k_discard_copies): Likewise.
2586 (elf_m68k_relocate_section): Likewise.
2587
73374ef1
AM
25882002-12-04 Alan Modra <amodra@bigpond.net.au>
2589
2590 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
2591
c5c1944d
AM
25922002-12-04 Alan Modra <amodra@bigpond.net.au>
2593
2594 * srec.c (srec_write_symbols): Restore '$' prefix to address
2595 accidentally removed in 2002-04-04 change.
2596 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
2597
e1a9cb8e
NC
25982002-12-03 Nick Clifton <nickc@redhat.com>
2599
2600 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
2601 (apuinfo_list_add): New function: Add a value to the list.
2602 (apuinfo_list_length): New function: Return the number of
2603 values on the list.
2604 (apuinfo_list_element): New function: Return a value on the
2605 list.
2606 (apuinfo_list_finish): New function: Free the resources used
2607 by the list.
2608 (ppc_elf_begin_write_processing): New function. Scan the
2609 input bfds for apuinfo sections.
2610 (ppc_elf_write_section): New function: Delay the creation of
2611 the contents of an apuinfo section in an output bfd.
2612 (ppc_elf_final_write_processing): New function. Create the
2613 contents of an apuinfo section in an output bfd.
2614 (elf_backend_begin_write_processing): Define.
2615 (elf_backend_final_write_processing): Define.
2616 (elf_backend_write_section): Define.
e1a9cb8e 2617
a823923b
RH
26182002-12-03 Richard Henderson <rth@redhat.com>
2619
2620 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
2621
30491647
SC
26222002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2623
2624 Fix PR savannah/1417:
2625 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
2626 branch if it goes to the start of the deleted region.
2627
bc7c6a90
SC
26282002-12-01 Stephane Carrez <stcarrez@nerim.fr>
2629
2630 * bfd-in2.h (bfd_mach_m6812): Rebuild.
2631 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
2632 bfd_mach_m6812s): Declare.
2633
2634 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
2635 (_bfd_m68hc12_elf_set_private_flags): Call it.
2636 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
2637 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
2638 report microcontroller incompatibilities (HC12 vs HCS12).
2639 (elf_backend_object_p): Update.
2640
b34976b6
AM
26412002-11-30 Alan Modra <amodra@bigpond.net.au>
2642
2643 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
2644 (enum bfd_boolean, boolean): Delete.
2645 (bfd_boolean): Typedef to an int.
2646 (FALSE, TRUE): Define.
2647 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
2648 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
2649 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
2650 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
2651 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
2652 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
2653 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
2654 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
2655 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
2656 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
2657 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
2658 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
2659 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
2660 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
2661 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
2662 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
2663 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
2664 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
2665 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
2666 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
2667 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
2668 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
2669 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
2670 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
2671 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
2672 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2673 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2674 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2675 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
2676 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
2677 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2678 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
2679 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
2680 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
2681 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
2682 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
2683 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
2684 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
2685 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
2686 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
2687 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
2688 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
2689 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
2690 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
2691 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
2692 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
2693 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
2694 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 2695 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
2696 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
2697 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
2698 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
2699 of bfd_boolean vars with TRUE/FALSE. Formatting.
2700 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
2701
947216bf
AM
27022002-11-28 Alan Modra <amodra@bigpond.net.au>
2703
2704 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
2705 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
2706 with Elf_Internal_Rela.
2707 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
2708 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
2709 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
2710 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
2711 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
2712 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
2713 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
2714 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
2715 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2716 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
2717 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
2718 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
2719 throughout instead.
2720 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
2721 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
2722 Remove INLINE keyword.
2723 (elf_swap_reloc_in): Likewise. Also clear r_addend.
2724 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
2725 as a bfd_byte *.
2726 (elf_write_relocs): Consolidate REL and RELA code.
2727 (elf_slurp_reloc_table_from_section): Simplify REL code.
2728 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
2729 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
2730 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
2731 RELA code.
2732 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
2733 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
2734 (elf_link_output_relocs): Likewise.
2735 (elf_reloc_link_order): Likewise.
2736 (elf_finish_pointer_linker_section): Likewise.
2737 (struct elf_link_sort_rela): Remove union.
2738 (elf_link_sort_cmp1): Update to suit.
2739 (elf_link_sort_cmp2): Here too.
2740 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
2741 over-allocation for int_rels_per_ext_rel != 1 case.
2742 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
2743 * elf32-i386.c: Likewise.
2744 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
2745 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
2746 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
2747 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
2748 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
2749 elf64-sparc.c, elf64-x86-64.c: Likewise.
2750 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
2751 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
2752 bfd_elf32_swap_reloc_in.
2753
2754 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
2755 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
2756 (mips_elf64_swap_reloc_in): Zero r_addend.
2757 (mips_elf64_be_swap_reloc_in): Likewise.
2758 (mips_elf64_slurp_one_reloc_table): Simplify.
2759
2760 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
2761 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2762 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2763
1448fa32
KK
27642002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2765
2766 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 2767 unresolved debugging relocs in dynamic applications.
1448fa32
KK
2768 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
2769
73722af0
AM
27702002-11-26 Alan Modra <amodra@bigpond.net.au>
2771
2772 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
2773 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
2774 on a relocatable link. Comment typos.
2775 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
2776 in the order they are declared. Clear elf_hash_value too.
2777 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
2778 eh_info and tls_segment.
2779 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
2780 sorted when discarding relocs by turning them into R_*_NONE.
2781
2782 * libbfd.c (warn_deprecated): Comment spelling.
2783 * po/SRC-POTFILES.in: Regenerate.
2784
7c25b72c
RH
27852002-11-21 Richard Henderson <rth@redhat.com>
2786
2787 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
2788 arch's st_other bits when merging visibilities.
2789 (elf_link_output_extsym): Tidy clearing of visibility field.
2790
dc12c51f
AM
27912002-11-21 Alan Modra <amodra@bigpond.net.au>
2792
2793 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
2794 (SWAP_OUT_RELOC_OFFSET): Define.
2795
963f13ec
AO
27962002-11-20 Alexandre Oliva <aoliva@redhat.com>
2797
2798 * elf.c (_bfd_elf_link_hash_table_init): Make sure
2799 can_refcount is properly extended to the type of
2800 init_refcount.
2801
ee6423ed
AO
28022002-11-19 Alexandre Oliva <aoliva@redhat.com>
2803
4ffba85c
AO
2804 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
2805 (_bfd_mips_elf_relocate_section): Use it.
2806
ee6423ed
AO
2807 * elfxx-mips.c (MNAME): New macro.
2808 (_bfd_mips_elf_check_relocs): Use it.
2809 (_bfd_mips_elf_discard_info): Likewise.
2810 (_bfd_mips_elf_final_link): Likewise.
2811
cdcf6e38
AM
28122002-11-19 Alan Modra <amodra@bigpond.net.au>
2813
2814 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
2815 rel_hdr.sh_size too.
2816
93509525
KD
28172002-11-18 Klee Dienes <kdienes@apple.com>
2818
2819 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
2820 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
2821 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
2822 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
2823 Add dependencies for bfdwin.c, bfdio.c.
2824 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
2825 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
2826 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
2827 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
2828 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
2829 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
2830 bfd_get_size (moved from libbfd.c and bfd.c).
2831 * bfdwin.c New file. Contains _bfd_window_internal,
2832 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
2833 libbfd.c and bfd.c).
2834 * po/SRC-POTFILES.in: Regenerate.
2835 * po/bfd.pot: Regenerate.
2836 * libbfd.h: Regenerate.
2837 * bfd-in2.h: Regenerate.
2838 * aclocal.m4: Regenerate.
2839 * Makefile.in: Regenerate.
2840 * configure: Regenerate.
2841
3ae41454
AM
28422002-11-18 Klee Dienes <kdienes@apple.com>
2843
2844 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
2845
e514ac71
NC
28462002-11-15 Kazu Hirata <kazu@cs.umass.edu>
2847
2848 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
2849 jsr after a short jump.
2850 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
2851
eddc4f81
KD
28522002-11-15 Klee Dienes <kdienes@apple.com>
2853
2854 * pef.c (bfd_pef_convert_architecture): Move declaration of
2855 ARCH_POWERPC and ARCH_M68K to the start of the function.
2856
51908eee
SS
28572002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
2858
2859 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
2860
3416d2e7
HPN
28612002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
2862
2863 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
2864 For bpo_gregs_section->contents, allocate _raw_size, not
2865 _cooked_size.
2866
b1c58715
AM
28672002-11-13 Klee Dienes <kdienes@apple.com>
2868
2869 * config.bfd: Add entries for powerpc-*-darwin and cousins.
2870
077ca68b
L
28712002-11-13 H.J. Lu <hjl@gnu.org>
2872
2873 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
2874
e84d6fca
AM
28752002-11-13 Klee Dienes <kdienes@apple.com>
2876 Alan Modra <amodra@bigpond.net.au>
2877
2878 * bfd.c (struct bfd_preserve): New.
2879 (bfd_preserve_save): New function.
2880 (bfd_preserve_restore): Ditto.
2881 (bfd_preserve_finish): Ditto.
2882 * bfd-in2.h: Regenerate.
2883 * mach-o.c: Formatting.
2884 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
2885 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
2886 (bfd_mach_o_core_p): Ditto.
2887 (bfd_mach_o_scan): Pass in mdata.
2888 * mach-o.h (bfd_mach_o_scan): Update prototype.
2889 * pef.c: Formatting.
2890 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
2891 (bfd_pef_xlib_object_p): Ditto.
2892 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
2893 * pef.h (bfd_pef_scan): Update prototype.
2894 * xsym.c: Formatting, K&R fixes.
2895 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
2896 (bfd_sym_scan): New function split out from bfd_sym_object_p.
2897 * xsym.h (bfd_sym_scan): Declare.
2898 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 2899 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
2900 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
2901
cd24c222
NC
29022002-11-12 Nick Clifton <nickc@redhat.com>
2903
2904 * po/da.po: Updated Danish translation.
2905
99eb2ac8
AM
29062002-11-12 Alan Modra <amodra@bigpond.net.au>
2907
d6fe2dc1
AM
2908 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
2909 relocatable link too.
2910 (elf_link_input_bfd): When emitting relocs, adjust offsets for
2911 eh_frame and stab sections. Zap deleted relocs.
2912 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
2913 (elf_bfd_discard_info): Run for relocatable link too.
2914 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
2915 Handle ld -r case.
2916 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
2917 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
2918
126495ed
AM
2919 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
2920 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
2921 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
2922 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
2923 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
2924 (struct elf_link_hash_table): Add eh_info.
2925 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
2926 (_bfd_elf_discard_section_eh_frame): Update prototype.
2927 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
2928 (_bfd_elf_write_section_eh_frame): Likewise.
2929 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
2930 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
2931 param. Get "hdr_info" from link hash table.
2932 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
2933 header section from link hash table. Save header section to elf_tdata.
2934 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
2935 header section from link hash table. Don't alloc hdr_info. Clear
2936 hdr_sec instead of setting "strip".
2937 (_bfd_elf_eh_frame_section_offset): Formatting.
2938 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
2939 Get header section from link hash table.
2940 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
2941 Get header section from link hash table.
2942 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
2943 (get_program_header_size): Likewise.
2944 (_bfd_elf_section_offset): Formatting.
2945 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
2946 section pointer in link hash table.
2947 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
2948 and _bfd_elf_write_section_eh_frame calls. Update comment about
2949 eh_frame entries.
2950 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
2951 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
2952
2953 * po/SRC-POTFILES.in: Regenerate.
2954
99eb2ac8
AM
2955 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
2956 relocs for discarded FDEs. Remove dead code.
2957 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
2958 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
2959 Tidy conditions under which stabs are edited. Formatting.
2960 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2961 from discarded relocs.
2962 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
2963 section adjustments after testing magic values.
2964
7c319a27
AM
29652002-11-12 Thomas Moestl <tmm@FreeBSD.org>
2966
2967 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
2968 references to large plt symbols.
2969
a95a4550
AM
29702002-11-12 Klee Dienes <kdienes@apple.com>
2971
2972 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
2973 looking for an unused section name.
2974
bc7eab72
KH
29752002-11-11 Kazu Hirata <kazu@cs.umass.edu>
2976
2977 * coff-h8300.c: Fix formatting.
2978 * elf32-h8300.c: Likewise.
2979 * reloc16.c: Likewise.
2980
52585bb8
AM
29812002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
2982
2983 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
2984 section when dynamic section unused; _bfd_strip_section_from_output
2985 instead.
2986
9f632188
AM
29872002-11-08 Alan Modra <amodra@bigpond.net.au>
2988
207b304b
AM
2989 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
2990 and sym_vec.
3b029f65 2991
9f632188
AM
2992 * dwarf2.c: Revert last change.
2993
ec4530b5
NC
29942002-11-07 Michal Ludvig <mludvig@suse.cz>
2995
2996 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
2997 _bfd_dwarf2_find_nearest_line): Use
2998 bfd_simple_get_relocated_section_contents() instead of
2999 bfd_get_section_contents().
3000 * reloc.c (bfd_perform_relocation): Add sanity check.
3001 * simple.c (simple_get_relocated_section_contents): If the section
3002 does not have any relocs associated with it, just return the
3003 unadjusted contents.
3004
205cfeb0
HPN
30052002-11-07 Hans-Peter Nilsson <hp@axis.com>
3006
3007 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
3008 case R_CRIS_32_GOT>: Correct test for filling in constant .got
3009 contents, enabling for a non-DSO, for symbols defined in the
3010 program with --export-dynamic.
3011
87e226ce
AM
30122002-11-07 Alan Modra <amodra@bigpond.net.au>
3013
3014 * elf64-ppc.c: Comment typo fixes.
3015 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
3016
235c4794
NC
30172002-11-07 Nick Clifton <nickc@redhat.com>
3018
3019 * po/da.po: Updated Danish translation.
3020
49179469
AO
30212002-11-06 Alexandre Oliva <aoliva@redhat.com>
3022
3023 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
3024 exactly three internal relocs per external reloc. Set reloc_count
3025 to the external reloc count.
3026
246178f2
NC
30272002-11-06 Klee Dienes <kdienes@apple.com>
3028
3ae41454 3029 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
3030 Fix comment formatting.
3031
3af9a47b
NC
30322002-11-06 Klee Dienes <kdienes@apple.com>
3033
3ae41454 3034 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
3035 xsym.lo.
3036 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
3037 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
3038 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
3039 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
3040 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
3041 sym.
3ae41454 3042 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
3043 * Makefile.in: Regenerate.
3044 * doc/Makefile.in: Regenerate.
3ae41454 3045 * bfd-in2.h: Regenerate.
3af9a47b
NC
3046 * xsym.c: New file. Contains support for the Apple/Metrowerks
3047 xSYM debugging format.
3048 * xsym.h: New file.
3049 * pef.c: New file. Contains support for the Apple Code Fragment
3050 Manager Preferred Executable Format
3051 * pef.h: New file.
3052 * pef-traceback.h: New file. Contains support for parsing PowerPC
3053 traceback tables as used by PEF executables (and perhaps other
3054 systems as well).
3ae41454 3055 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
3056 format.
3057 * mach-o.h: New file.
3058 * mach-o-target.c: New file. Declares the mach-o targets
3059 themselves. Included three times by mach-o.c; each time with a
3060 different set of macros set.
3ae41454 3061
b6821651 30622002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
3063
3064 * Makefile.am: Remove entries for elf32-qnx.[ch].
3065 * Makefile.in: Regenerate.
3066 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
3067 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
3068 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3069 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
3070 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
3071 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
3072 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
3073 * configure: Regenerate.
3074 * elf32-qnx.c: Remove.
3075 * elf32-qnx.h: Remove.
3076 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
3077 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
3078 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
3079 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
3080 * elf32-i386.c: Remove QNX extended bfd support.
3081 * elf32-ppc.c: Remove QNX extended bfd support.
3082 * elf32-sh.c: Remove QNX extended bfd support.
3083 * elfarm-nabi.c: Remove QNX extended bfd support.
3084 * targets.c: Remove qnx vectors.
3085 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
3086 (elf_backend_is_contained_by_filepos): Remove.
3087 (elf_backend_copy_private_bfd_data_p): Remove.
3088 * po/SRC-POTFILES.in: Regenerate.
3089
b6821651
AM
30902002-11-06 David O'Brien <obrien@FreeBSD.org>
3091 Alan Modra <amodra@bigpond.net.au>
3092
3093 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
3094 dynamic relocs against section symbols for the output section vma.
3095
30962002-11-05 Alan Modra <amodra@bigpond.net.au>
3097
3098 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
3099 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
3100
08f74004
AM
31012002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3102 Alan Modra <amodra@bigpond.net.au>
3103
3104 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
3105 vectors in target_selvecs.
3106 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
3107 in target_selvecs.
3108 (sh-*-netbsdelf*): Likewise.
3109 * configure.in (assocvecs): New variable. Handle assocvecs like
3110 selvecs.
3111 * configure: Regenerate.
3112 * format.c (bfd_check_format_matches): Store bfd_target pointers
3113 in matching_vector instead of target names. Select first target
3114 from bfd_associated_vector that matches a list of ambiguous targets.
3115 * targets.c (_bfd_associated_vector): New array.
3116 (bfd_associated_vector): New variable.
3117 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
3118 * libbfd-in.h (bfd_associated_vector): Declare.
3119 * libbfd.h: Regenerate.
3120
89117aab
AM
31212002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
3122
3123 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
3124 non-NULL before dereferencing.
3125
5e9aae3e
KK
31262002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3127
3128 * vms.c (vms_object_p): Restore the start address when returning
3129 NULL.
3130
c97e73dd
AM
31312002-11-04 Alan Modra <amodra@bigpond.net.au>
3132 Hans-Peter Nilsson <hp@axis.com>
3133
3134 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
3135 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
3136 Set up a larger symshndxbuf, and write it out. Free it on
3137 exit rather than freeing symbuf twice. Correct section index
3138 on output section symbol loop.
3139 (elf_link_output_sym): Accumulate symbol extension section
3140 indices, reallocating symshndxbuf rather than writing it out.
3141 (elf_link_flush_output_syms): Don't flush symshndxbuf.
3142 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
3143 Use bfd_zalloc to clear i_shdrp[0] too.
3144
3463048e
SC
31452002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
3146
3147 * elf32-sh64-com.c (sh64_address_in_cranges): Use
3148 _raw_size of cranges section if _cooked_size not yet set.
3149
63a23799
HPN
31502002-11-03 Hans-Peter Nilsson <hp@axis.com>
3151
3152 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
3153 for bfd_elf32_swap_symbol_out.
3154
e68cc12e
DB
31552002-10-31 David O'Brien <obrien@FreeBSD.org>
3156
3157 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
3158 signed and unsigned in comparison.
3159
db4b6d01
DJ
31602002-10-30 Daniel Jacobowitz <drow@mvista.com>
3161
3162 * coffcode.h: Remove extraneous '\'.
3163
840f0243
L
31642002-10-28 H.J. Lu <hjl@gnu.org>
3165
3166 * Makefile.am (targets.lo): Depend on Makefile instead of
3167 config.status.
3168 (archures.lo): Likewise.
3169 * Makefile.in: Regenerated.
3170
05a7e2db
JT
31712002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
3172
3173 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
3174 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
3175 targ_selvecs.
3176
a0087177
JW
31772002-10-25 Jim Wilson <wilson@redhat.com>
3178
3179 * elf64-sh64.c (sh_elf64_relocate_section): Call
3180 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
3181 of SHF_MERGE section.
3182
8718ac9c
HPN
31832002-10-25 Hans-Peter Nilsson <hp@axis.com>
3184
3185 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
3186
d45913a0
DA
31872002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
3188
3189 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
3190 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
3191 unsigned int.
3192 (NAME(aout,final_link)): Cast enum used in assignment.
3193 (aout_link_write_symbols): Cast enums in comparisons, int values to
3194 boolean, enums in assignments to int.
3195 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3196 (aout_link_input_section_ext): Likewise. Cast enums used in comparisons
3197 with unsigned ints.
3198 (aout_link_reloc_link_order): Cast enum to int in assignment.
3199 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
3200 calls to char *.
3201 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
3202 assignment.
3203 * bfd-in2.h (bfd_set_section_vma): Likewise.
3204 * bfd.c (bfd_record_phdr): Cast enums in assignments.
3205 * binary.c (bfd_alloc): Cast enum to long.
3206 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
3207 * dwarf2.c (read_abbrevs): Add casts to enum types.
3208 (read_attribute_value): Likewise.
3209 (arange_add): Cast result of bfd_zalloc call.
3210 (comp_unit_contains_address): Return true and false.
3211 (comp_unit_find_nearest_line): Cast return to boolean.
3212 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
3213 * gen-aout.c: define macro '_' if not defined.
3214 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
3215 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
3216 (bfd_write_bigendian_4byte_int): Cast return to boolean.
3217 (bfd_seek): Cast bfd_realloc to bfd_byte *.
3218 (bfd_generic_is_local_label_name): Cast return to boolean.
3219 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
3220 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
3221 struct bfd_hash_entry *.
3222 (_bfd_generic_link_hash_newfunc): likewise.
3223 (_bfd_generic_final_link): Cast enum to unsigned int.
3224 * merge.c (sec_merge_emit): Cast return to boolean.
3225 (merge_strings): Add casts to const unsigned char *.
3226 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
3227 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3228 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result to
3229 struct bfd_hash_entry *.
3230 (bfd_set_section_content): Add cast to PTR in comparison.
3231 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
3232 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
3233 simple_dummy_unattached_reloc,
3234 bfd_simple_get_relocated_section_contents): Add K&R declarations and
3235 function definitions.
3236 * srec.c (S3Forced): Initialize to false.
3237 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
3238 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
3239 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
3240 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
3241 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
3242 comparisons.
3243
475c2a7e
JJ
32442002-10-23 Jakub Jelinek <jakub@redhat.com>
3245
3246 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
3247 relocs into shared lib non-allocated reloc sections.
3248
e82ce529
AM
32492002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
3250
3251 * dwarf2.c (add_line_info): Ensure that the line_info_table is
3252 sorted even when given an out-of-order line sequence.
3253 (lookup_address_in_line_info_table): When an exact VMA match is
3254 not found, return line information with the closest VMA.
3255
f2482cb2
NC
32562002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
3257
3258 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
3259 HPUX 11.00 patch PHSS_26559.
3260
c1fd6598
AO
32612002-10-22 Alexandre Oliva <aoliva@redhat.com>
3262
3263 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
3264 the options section into a separate section unless IRIX 6
3265 compatibility is enabled.
3266
033fd5f9
AO
32672002-10-22 Alexandre Oliva <aoliva@redhat.com>
3268
3269 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
3270 into arrays.
3271 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
3272 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
3273 into account.
3274 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
3275 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
3276
ef485c01
AM
32772002-10-21 Graeme Peterson <gp@qnx.com>
3278
3279 * targets.c (_bfd_target_vector): Add missing qnx vectors.
3280
b50afec9
AM
32812002-10-21 Alan Modra <amodra@bigpond.net.au>
3282
3283 * targets.c (bfd_target_list): Don't return the default target twice.
3284
5fe39cae
AM
32852002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
3286
3287 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
3288 perror with bfd_perror.
3289
5d603aa9
L
32902002-10-19 H.J. Lu <hjl@gnu.org>
3291
3292 * elflink.h (elf_link_add_object_symbols): Correctly handle
3293 DT_RPATH and DT_RUNPATH.
3294
e377ab71
MK
32952002-10-19 Mark Kettenis <kettenis@gnu.org>
3296
3297 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
3298
0d09fec6
DC
32992002-10-17 Denis Chertykov <denisc@overta.ru>
3300
3301 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
3302 for ip2k port.
3303
acf8aed4
AM
33042002-10-17 Alan Modra <amodra@bigpond.net.au>
3305
3306 * elfxx-target.h (USE_REL): Don't define as 1.
3307 * elf32-arm.h (USE_REL): Provide a default define of 0.
3308 Use #if rather than #ifdef when testing USE_REL.
3309 * elf32-m32r.c: Likewise.
3310
3311 * elf32-arc.c (USE_REL): Define as 1.
3312 * elf32-d10v.c (USE_REL): Likewise.
3313 * elf32-m32r.c (USE_REL): Likewise.
3314 * elf32-m68hc11.c (USE_REL): Likewise.
3315 * elf32-m68hc12.c (USE_REL): Likewise.
3316 * elf32-or32.c (USE_REL): Likewise.
3317 * elfarm-nabi.c (USE_REL): Likewise.
3318
f52d1d64
JJ
33192002-10-16 Jakub Jelinek <jakub@redhat.com>
3320
3321 * config.bfd (s390-*-linux*): Add targ64_selvecs.
3322 (s390x-*-linux*): Add targ_selvecs.
3323
2bc3c89a
AM
33242002-10-16 Alan Modra <amodra@bigpond.net.au>
3325
3326 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 3327 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
3328 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
3329 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
3330 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
3331 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
3332 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
3333 (SOURCE_HFILES): Add elf32-qnx.h.
3334 (BUILD_HFILES): Add bfdver.h.
3335 Run "make dep-am".
3336 * Makefile.in: Regenerate.
3337 * configure.in Update bfd vector dependencies.
3338 * configure: Regenerate.
3339 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
3340 * elf32-i386qnx.c: Likewise.
3341 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
3342 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
3343 * elf32-sh-lin.c: Likewise.
3344 * elf32-shqnx.c: Likewise.
3345 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
3346 * elf32-sh64-nbsd.c: Likewise.
3347 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
3348 * elf64-sh64-nbsd.c: Likewise.
3349 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
3350 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
3351 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
3352 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
3353 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
3354 (elf_backend_is_contained_by_filepos): Likewise.
3355 (elf_backend_copy_private_bfd_data_p): Likewise.
3356 Globalize and move functions to..
3357 * elf32-qnx.c: ..here. New file.
3358 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
3359 emit target vectors when INCLUDE_SHMEDIA.
3360 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
3361 end of file.
3362 * elf64-sh64.c: Remove ELF_ARCH test.
3363 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
3364 * po/BLD-POTFILES.in: Regenerate.
3365 * po/SRC-POTFILES.in: Regenerate.
3366
90c9df85
AM
33672002-10-16 Alan Modra <amodra@bigpond.net.au>
3368
366f2964
AM
3369 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
3370 loaded with --just-symbols.
3371
90c9df85
AM
3372 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
3373 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3374 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3375 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
3376
2238051f
RH
33772002-10-15 Richard Henderson <rth@redhat.com>
3378
3379 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
3380 (BFD64_BACKENDS_CFILES): Likewise.
3381 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
3382 * elf64-alpha-fbsd.c: Remove file, move code ...
3383 * elf64-alpha.c: ... here.
3384 * Makefile.in, configure: Rebuild.
3385
64e04ecd
RH
33862002-10-14 Richard Henderson <rth@redhat.com>
3387
3388 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
3389 VALUE, not ADDEND.
3390
396a6083
SC
33912002-10-14 Stephen Clarke <stephen.clarke@superh.com>
3392
3393 * elf32-sh.c (elf_sh_link_hash_entry): Replace
3394 datalabel_got_offset with union of datalabel_got
3395 offset and refcount.
3396 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
3397 (allocate_dynrelocs): Delete unnecessary code for
3398 STT_DATALABEL type. Create entry in got for
3399 datalabel version of symbol if datalabel_got.refcount > 0.
3400 (sh_elf_relocate_section): Use datalabel_got union.
3401 (sh_elf_gc_sweep_hook): Pull common code to initialize
3402 h and eh out of switch statement. Declare seen_stt_datalabel.
3403 Initialize it. Decrement datalabel_got.refcount for
3404 got relocs when seen_stt_datalabel is true.
3405 Decrement local_got_refcounts entry for datalabel got relocs
3406 of local symbols.
3407 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
3408 (sh_elf_check_relocs): Declare seen_stt_datalabel.
3409 Initialize it. When seen_stt_datalabel is true, increment
3410 datalabel_got refcount rather than got.refcount.
3411 (sh_elf_finish_dynamic_symbol): Create relocs to
3412 initialize got entry for datalabel version of symbol.
3413
6a0735ef
AM
34142002-10-14 Alan Modra <amodra@bigpond.net.au>
3415
3416 * Makefile.am: Run "make dep-am".
3417 (BFD_H_FILES): Remove version.h.
3418 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
3419 * version.h: ..to here.
3420 * configure.in (bfd_version_date): Remove.
3421 (AC_OUTPUT): Make bfdver.h from version.h.
3422 * bfd.c: #include "bfdver.h".
3423 * vms-hdr.c: Likewise.
3424 * Makefile.in: Regenerate.
3425 * bfd-in2.h: Regenerate.
3426 * configure: Regenerate.
3427 * po/SRC-POTFILES.in: Regenerate.
3428
686e4055
AM
34292002-10-14 Alan Modra <amodra@bigpond.net.au>
3430
3431 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
3432 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
3433 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
3434 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
3435 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
3436 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
3437 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
3438 bfd_mach_ip2022, bfd_mach_ip2022ext,
3439 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
3440 * bfd-in2.h: Regenerate.
3441
019dca2b
KK
34422002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3443
3444 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
3445 endian vector to targ_selvecs.
3446
bce03d3d
AO
34472002-10-13 Alexandre Oliva <aoliva@redhat.com>
3448
3449 * elfxx-mips.c (mips_elf_calculate_relocation): Take
3450 save_addend argument. Don't apply the 32-bit mask to a
3451 GPREL32 value if it's to be used in another relocation. Don't
3452 use forced-check computation of local_p to decide whether to
3453 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
3454 of the addend of a non-in-place GPREL16 relocation.
3455 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
3456 mips_elf_calculate_relocation().
3457
9b691193
SC
34582002-10-12 Stephane Carrez <stcarrez@nerim.fr>
3459
3460 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
3461 with symbols in other sections if we relaxed something; the sections
3462 output offsets must be re-computed before.
3463
1f4c5b47
SC
34642002-10-12 Stephane Carrez <stcarrez@nerim.fr>
3465
3466 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
3467 handling to use Elf_Internal_Sym.
3468 (m68hc11_elf_relax_delete_bytes): Likewise.
3469
5dc97655
KK
34702002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3471
3472 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
3473 sh_elf_object_p, dtpoff_base): New functions.
3474 (sh_elf_howto_table): Add TLS relocs.
3475 (sh_reloc_map): Likewise.
3476 (sh_elf_info_to_howto): Support TLS relocs.
3477 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
3478 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
3479 New macros.
3480 (sh_elf_obj_tdata): New.
3481 (elf_sh_link_hash_table): Add tls_ldm_got.
3482 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
3483 (allocate_dynrelocs): Support TLS relocs.
3484 (sh_elf_size_dynamic_sections): Likewise.
3485 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
3486 .rela.got section when found already. Return false after printing
3487 error about unresolvable relocation.
3488 (sh_elf_gc_sweep_hook): Support TLS relocs.
3489 (sh_elf_check_relocs): Likewise.
3490 (sh_elf_finish_dynamic_symbol): Likewise.
3491 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
3492 * reloc.c: Add SH TLS relocs.
3493 * bfd-in2.h, libbfd.h: Regenerate.
3494
6a0735ef
AM
34952002-10-11 Daniel Jacobowitz <drow@mvista.com>
3496
3497 * Makefile.in: Regenerated.
3498
af39267e
DJ
34992002-10-11 Daniel Jacobowitz <drow@mvista.com>
3500
3501 * Makefile.am: Run dep-am.
6a0735ef 3502 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
3503 (BFD32_LIBS): Add simple.lo.
3504 (BFD32_LIBS_CFILES): Add simple.c.
3505 * Makefile.in: Regenerated.
3506 * bfd-in2.h: Regenerated.
3507 * simple.c: New file.
3508
0be617ce
AM
35092002-10-11 Alan Modra <amodra@bigpond.net.au>
3510
14a793b2
AM
3511 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
3512 (record_thumb_to_arm_glue): Likewise.
3513 * ecoff.c (ecoff_link_add_externals): Likewise.
3514 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
3515 (record_thumb_to_arm_glue): Likewise.
3516 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
3517 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
3518 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
3519 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
3520 * elf64-ppc.c (func_desc_adjust): Likewise.
3521 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
3522 (sh64_elf64_create_dynamic_sections): Likewise.
3523 * elflink.c (_bfd_elf_create_got_section): Likewise.
3524 (_bfd_elf_create_dynamic_sections): Likewise.
3525 (_bfd_elf_create_linker_section): Likewise.
3526 * elflink.h (elf_add_default_symbol): Likewise.
3527 (elf_link_create_dynamic_sections): Likewise.
3528 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
3529 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
3530 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
3531 (_bfd_mips_elf_add_symbol_hook): Likewise.
3532 (_bfd_mips_elf_create_dynamic_sections): Likewise.
3533 * linker.c (generic_link_add_symbol_list): Likewise.
3534 * xcofflink.c (xcoff_link_add_symbols): Likewise.
3535
3536 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
3537
0be617ce 3538 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 3539 completely removed. Correct local sym adjustment.
0be617ce 3540
0a4ef3f4
SC
35412002-10-10 Stephen Clarke <stephen.clarke@superh.com>
3542
3543 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
3544 Correct mistake in calculation of address of .got.
3545 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
3546 elf_sh64_pic_plt_entry_le): Likewise.
3547
efacd36e
SC
35482002-10-09 Richard Shann <richard.shann@superh.com>
3549 Stephen Clarke <stephen.clarke@superh.com>
3550
3551 * Makefile.am: Add entries for elf32-sh64-lin.c and
3552 elf64-sh64-lin.c. Regenerate.
3553 * Makefile.in: Regenerate.
3554 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
3555 to use sh64 vectors rather than sh vectors.
3556 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
3557 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3558 * configure: Regenerate.
3559 * elf32-sh64-lin.c: New file.
3560 * elf64-sh64-lin.c: New file.
3561 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
3562 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
3563
299bf759
L
35642002-10-08 H.J. Lu <hjl@gnu.org>
3565
3566 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
3567 IE->LE transition for R_386_TLS_IE.
3568
51020317
AM
35692002-10-08 Alan Modra <amodra@bigpond.net.au>
3570
3571 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
3572
a8fcf378
NC
35732002-10-07 Mark Elbrecht <snowball3@softhome.net>
3574
51020317
AM
3575 * cofflink.c (mark_relocs): Don't mark relocations in excluded
3576 sections.
a8fcf378 3577
a16d5acb
AM
35782002-10-07 Alan Modra <amodra@bigpond.net.au>
3579
a6b511bd
AM
3580 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
3581 code.
3582
a16d5acb
AM
3583 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
3584
7c4a37eb
AM
35852002-10-06 Alan Modra <amodra@bigpond.net.au>
3586
3587 * opncls.c: Formatting.
3588 (_bfd_new_bfd): Use a smaller section hash table.
3589
7c4ca42d
AO
35902002-10-05 Alexandre Oliva <aoliva@redhat.com>
3591
3592 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
3593 of the other two relocations packed with a REL32 to NONE.
3594
4989d792
SC
35952002-10-02 Stephen Clarke <stephen.clarke@superh.com>
3596
3597 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
3598 (sh_elf_link_hash_newfunc): Initialize it.
3599 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
3600 to got.refcount for symbols that are forced local or when
3601 we have direct got refs.
3602 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
3603 to correctly adjust got.refcount and plt.refcount.
3604 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
3605 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 3606
7c445aa3
JJ
36072002-10-01 Jakub Jelinek <jakub@redhat.com>
3608
3609 * elf32-i386.c (elf_i386_relocate_section): Fix
3610 movl foo@indntpoff, %eax IE->LE transition.
3611
abcf1d52
JJ
36122002-10-01 Jakub Jelinek <jakub@redhat.com>
3613
3614 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
3615 sequence and its transitions.
3616
a45bb67d
JJ
36172002-10-01 Jakub Jelinek <jakub@redhat.com>
3618
3619 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
3620 to st_value + addend in non-code sections.
3621 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
3622 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
3623
00707a0e 36242002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
3625 Ken Raeburn <raeburn@cygnus.com>
3626 Aldy Hernandez <aldyh@redhat.com>
3627 Eric Christopher <echristo@redhat.com>
3628 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
3629
3630 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
3631 (bfd_mach_mips5500): New.
3632 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
3633 (arch_info_struct): Add corresponding entries here.
3634 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
3635 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
3636 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
3637 bfd_mach_mips5400 and bfd_mach_mips5500.
3638 (_bfd_mips_elf_mach_extends_p): New function.
3639 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
3640 the EF_MIPS_MACH flags.
3641 * bfd-in2.h: Regenerate.
3642
624f0b25
JT
36432002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
3644
3645 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
3646 .got sections.
3647
b89fe0ee
AM
36482002-09-28 Alan Modra <amodra@bigpond.net.au>
3649
3650 * elf.c (map_sections_to_segments): Correct test for start of
3651 writable section in the same page as end of read-only section.
3652
b29635ba
JT
36532002-09-27 Matt Thomas <matt@3am-software.com>
3654
3655 * elf32-vax.c (elf_vax_check_relocs): Remove unused
3656 local_got_refcounts usage. Remove allocation of got slot.
3657 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
3658 Remove de-allocation of got slot.
3659 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
3660 traversal for elf_vax_instantiate_got_entries. Allow empty .got
3661 sections to be GC'ed.
3662 (elf_vax_instantiate_got_entries): New function.
3663 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
3664 tests that are now handled by elf_vax_instantiate_got_entries.
3665 Assert GOT entry falls within .got section size. Remove redundant
3666 comparisions. Fix comments.
3667
bffbf940
JJ
36682002-09-27 Jakub Jelinek <jakub@redhat.com>
3669
3670 * reloc.c: Add x86-64 TLS relocs.
3671 * bfd-in2.h, libbfd.h: Rebuilt.
3672 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
3673 relocs. Add TLS relocs.
3674 (x86_64_reloc_map): Add TLS relocs.
3675 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
3676 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
3677 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
3678 (elf64_x86_64_hash_entry): Define.
3679 (struct elf64_x86_64_obj_tdata): New.
3680 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
3681 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
3682 (link_hash_newfunc): Initialize tls_type.
3683 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
3684 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
3685 (elf64_x86_64_mkobject): New.
3686 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
3687 (elf64_x86_64_tls_transition): New.
3688 (elf64_x86_64_check_relocs): Add r_type variable and use it.
3689 Handle TLS relocs.
3690 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
3691 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
3692 (elf64_x86_64_size_dynamic_sections): Likewise.
3693 (dtpoff_base, tpoff): New.
3694 (elf64_x86_64_relocate_section): Handle TLS relocs.
3695 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
3696 entries.
3697 (bfd_elf64_mkobject): Define.
3698
3699 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
3700 DF_STATIC_TLS if shared.
3701
14366460
TS
37022002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3703
3704 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
3705 empty relocation sections.
3706
9f951329
AM
37072002-09-26 Alan Modra <amodra@bigpond.net.au>
3708
3709 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
3710 (ppc64_elf_build_stubs): Build them here instead.
3711
6b3ac709
JJ
37122002-09-24 Jakub Jelinek <jakub@redhat.com>
3713
3714 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
3715 addend into r_addend, not *r_offset.
3716 (elf32_sparc_finish_dynamic_symbol): Likewise.
3717 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
3718 R_SPARC_RELATIVE's r_offset.
3719
e2f6d277
NC
37202002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
3721
3722 * dwarf2.c (decode_line_info): Update to correctly decode
3723 the (non-standard DWARF2) out-of-order address sequences
3724 generated by the Intel C++ 6.0 compiler for ia64-Linux.
3725
f3961b2b
DD
37262002-09-23 Mark Elbrecht <snowball3@softhome.net>
3727
3728 * config.bfd: For DJGPP targets, match with any cpu and any machine.
3729
ad34bc37
AM
37302002-09-23 Alan Modra <amodra@bigpond.net.au>
3731
3732 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
3733 for discarded FDEs. Remove redundant assignment.
3734 * elflink.h (elf_bfd_discard_info): Save edited relocs.
3735
82988bff
L
37362002-09-22 H.J. Lu <hjl@gnu.org>
3737
3738 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
3739 the relocation count between different .reloc sections.
3740
5ad8645c
AM
37412002-09-21 Alan Modra <amodra@bigpond.net.au>
3742
5f819128
AM
3743 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
3744 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
3745 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
3746 R_PPC_EMB_RELSDA.
3747
5ad8645c
AM
3748 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
3749 unsigned. Move "symcount" assignment out of loop.
3750 * Makefile.am: Run "make dep-am".
3751 * Makefile.in: Regenerate.
3752 * configure: Regenerate.
3753 * po/SRC-POTFILES.in: Regnerate.
3754
75936555
NC
37552002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3756
3757 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
3758 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
3759 (e.g. IRIX64).
3760
2243deae
L
37612002-09-19 Jakub Jelinek <jakub@redhat.com>
3762
3763 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
3764 even if generating R_PPC_RELATIVE reloc.
3765 (ppc_elf_relocate_section): Make sure relocation is performed
3766 if skip == -2. Clear memory at r_offset when creating dynamic
3767 relocation.
3768
37e55690
JJ
37692002-09-19 Jakub Jelinek <jakub@redhat.com>
3770
3771 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
3772 BFD_RELOC_386_TLS_GOTIE): Add.
3773 * bfd-in2.h, libbfd.h: Rebuilt.
3774 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
3775 and R_386_TLS_GOTIE.
3776 (elf_i386_reloc_type_lookup): Handle it.
3777 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
3778 char instead of enum, change GOT_* into defines.
3779 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
3780 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3781 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
3782 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
3783 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
3784 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3785 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3786 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3787 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
3788 tls_type is GOT_TLS_IE_BOTH.
3789 (elf_i386_size_dynamic_sections): Likewise.
3790 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
3791 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
3792 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
3793 all 4 GOT_TLS_* TLS types.
3794
8e67855b
NC
37952002-09-19 Nick Clifton <nickc@redhat.com>
3796
3797 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
3798 follow indirect links.
3799
1c59ba3f
NC
38002002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
3801
3802 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
3803 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
3804 on 64 bit machines.
3805 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
3806 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
3807 ECOFF information: 'ioptMax' refers to the actual *size*
3808 of the optimization symtab, not the number of entries.
1c59ba3f 3809
9d7404b7
NC
38102002-09-19 Daniel Jacobowitz <drow@mvista.com>
3811
3812 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
3813 ELF_LINK_HASH_NEEDS_PLT logic.
3814
05a487dc
DJ
38152002-09-18 Daniel Jacobowitz <drow@mvista.com>
3816
3817 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3818 correct relocation count.
3819
1f70368c
DJ
38202002-09-17 Daniel Jacobowitz <drow@mvista.com>
3821
3822 * bfd-in.h (bfd_get_dynamic_symcount): Define.
3823 * bfd.c (struct _bfd): Add dynsymcount.
3824 * bfd-in2.h: Regenerated.
3825 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
3826 abfd->dynsymcount.
3827 * elfcode.h (elf_slurp_reloc_table_from_section): Check
3828 for overflow.
3829
51020317 38302002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
3831
3832 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
3833 (mips_elf64_final_gp): Don't make up gp value.
3834 * elfn32-mips.c (mips_elf_final_gp): Likewise.
3835 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
3836 .MIPS.options/.options section.
3837
290062cc
DB
38382002-09-17 David O'Brien <obrien@FreeBSD.org>
3839
3840 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
3841 It is benign for FreeBSD < 4.1. Minor reformatting.
3842 * elf64-alpha-fbsd.c: Likewise.
3843
c5c1f40c
JJ
38442002-09-17 Jakub Jelinek <jakub@redhat.com>
3845
ca1eb0ba
JJ
3846 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
3847 addend.
c5c1f40c 3848
562ace6b
AM
38492002-09-17 Alan Modra <amodra@bigpond.net.au>
3850
3851 * elf64-alpha.c (alpha_elf_size_info): Make static.
3852
5af6ead6
AM
38532002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
3854
3855 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
3856 * cpu-tic4x.c: Ditto.
3857
cb9512fc
TS
38582002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3859
3860 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
3861 duplicate define.
3862
4ada7262
DB
38632002-09-16 Bruno Haible <bruno@clisp.org>
3864
3865 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
3866 by a target variant implementation.
3867 * elf64-alpha.c: Likewise.
3868 * elf32-i386-fbsd.c: New file.
3869 * elf64-alpha-fbsd.c: New file.
3870 * targets.c: Support bfd_elf32_i386_freebsd_vec and
3871 bfd_elf64_alpha_freebsd_vec.
3872 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
3873 bfd_elf64_alpha_freebsd_vec.
3874 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
3875 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
3876 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
3877 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
3878 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
3879 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
3880 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
3881
6a30718d
JJ
38822002-09-12 Jakub Jelinek <jakub@redhat.com>
3883
3884 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
3885 NULL.
3886 (elf_i386_relocate_section): Return false after printing error about
3887 unresolvable relocation.
3888
6cf9e9fe
NC
38892002-09-12 Nick Clifton <nickc@redhat.com>
3890
3891 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
3892 R_ARM_THM_PC11.
3893
10f469bf
DJ
38942002-09-11 Jeffrey Law <law@redhat.com>
3895
3896 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
3897
dc43ada5
NC
38982002-09-11 Andrew Haley <aph@cambridge.redhat.com>
3899
3900 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
3901 line_ptr before deciding we've found a symbol.
3902
e09f4395
NC
39032002-09-11 Nick Clifton <nickc@redhat.com>
3904
3905 * po/da.po: New Danish translation file.
3906 * configure.in (LINGUAS): Add 'da'.
3907 * configure: Regenerate.
3908
b3018b5f
NC
39092002-09-10 Michael Snyder <msnyder@redhat.com>
3910
3911 * irix-core.c (do_sections, do_sections64): New functions.
51020317 3912 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
3913 do_sections64, depending on corefile (32-bit or 64-bit).
3914
2f21f25e
RH
39152002-09-09 Richard Henderson <rth@redhat.com>
3916
3917 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
3918 and PCREL21F like PCREL21B.
3919
28b94e7c
KB
39202002-09-04 Kevin Buettner <kevinb@redhat.com>
3921
51020317
AM
3922 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
3923 vector.
28b94e7c 3924
5cec6941
NC
39252002-09-02 Nick Clifton <nickc@redhat.com>
3926
3927 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
3928 names instead of cryptically overloaded bfd_reloc error
3929 codes.
3930 (v850_elf_relocate_section): Likewise.
3931 (v850_elf_relax_section): Replace caching of external symbols
3932 with caching of internal symbols obtained from calling
3933 bfd_elf_get_elf_syms().
51020317 3934 Fixup problems with freeing cached allocated memory blocks.
5cec6941 3935
3b77b1d5
AM
39362002-09-02 Alan Modra <amodra@bigpond.net.au>
3937
638524b5
AM
3938 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
3939 (bfd_pj_arch): Use bfd_default_scan.
3940 * cpu-v850.c (scan): Remove.
3941 (N): Use bfd_default_scan.
3942 * cpu-z8k.c (scan_mach): Remove.
3943 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
3944 first. Use bfd_default_scan.
3945
250d94fd
AM
3946 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
3947 bfd_mach constants.
3948 (ecoff_get_magic): Likewise.
3949 * elf32-v850.c (v850_elf_object_p): Likewise.
3950 (v850_elf_final_write_processing): Likewise.
3951 * mipsbsd.c (MY(set_arch_mach)): Likewise.
3952 (MY(write_object_contents)): Likewise.
3953 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
3954 * coffcode.h (coff_write_object_contents): Likewise.
3955 (coff_set_arch_mach_hook): Add comment describing machine == 0.
3956 Remove unnecessary "machine" assignments.
3957 (coff_write_relocs): Test for the absolute section sym by testing
3958 section and flags.
3959
3b77b1d5
AM
3960 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
3961 and bfd_mach_i386_i386_intel_syntax.
250d94fd 3962 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 3963
e5b45b83
DA
39642002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
3965
3966 * bfd-in.h (align_power): Cast constants to bfd_vma type.
3967 * bfd-in2.h (align_power): Likewise.
3968
37f45cf8
AM
39692002-08-30 Alan Modra <amodra@bigpond.net.au>
3970
3971 * Makefile.am: Run "make dep-am".
3972 * Makefile.in: Regenerate.
3973
3974 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
3975 * cpu-powerpc.c (powerpc_compatible): Likewise.
3976 * cpu-rs6000.c (rs6000_compatible): Likewise.
3977
86aba9db
NC
39782002-08-28 Catherine Moore <clm@redhat.com>
3979
3980 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
3981 (v850-elf-reloc): Don't resolve pc relative relocs.
3982 (v850_elf_ignore_reloc): New routine.
3983 (v850_elf_final_link_relocate): Handle new relocs.
3984 (v850_elf_relax_delete_bytes ): New routine.
3985 (v850_elf_relax_section): New routine.
3986 (bfd_elf32_bfd_relax_section): Define.
3987 (HOWTO): New entries for new relocs.
3988 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
3989 (BFD_RELOC_V850_LONGJUMP): New reloc.
3990 (BFD_RELOC_V850_ALIGN): New reloc.
3991 * archures.c: Remove redundant v850ea architecture.
3992 * cpu-v850.c: Remove redundant v850ea support.
3993 * libbfd.h: Regenerate.
3994 * bfd-in2.h: Regenerated.
3995
026df7c5
NC
39962002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
3997
3998 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
3999 * configure.in: Add tic4x_coff vector files.
4000 * configure: Regenerate.
4001 * Makefile.am: Add tic4x target.
4002 * Makefile.in: Regenerate.
4003
40042002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
4005
4006 * archures.c: Add the BFD arch type tic4x.
4007 * bfd-in.h: Add BFD_IN_MEMORY flag.
4008 * coff-tic4x.c: New file.
4009 * coffswap.h (coff_swap_sym_out): Add preadjuster.
4010 * cpu-tic4x.c: New file.
4011 * targets.c: Added tic4x- in list of xvecs.
4012 * ticoff.h: New file.
4013 * bfd-in2.h: Regenerate.
4014
88f7bcd5
NC
40152002-08-27 Adam Nemet <anemet@lnxw.com>
4016
4017 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
4018 bit of DT_INIT and DT_FINI for Thumb functions.
4019
c8e48751
AM
40202002-08-26 Alan Modra <amodra@bigpond.net.au>
4021
4022 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
4023
2846975a
AM
40242002-08-26 Alan Modra <amodra@bigpond.net.au>
4025
4026 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
4027
067653c5
AM
40282002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4029
4030 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
4031 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
4032 Likewise.
4033 (struct elf_sh_pcrel_relocs_copied): Removed.
4034 (struct elf_sh_dyn_relocs): New.
4035 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
4036 field with dyn_relocs.
4037 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
4038 sections and sym_sec.
4039 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
4040 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
4041 (sh_elf_create_dynamic_sections): Use create_got_section instead
4042 of _bfd_elf_create_got_section.
4043 (sh_elf_check_relocs): Likewise.
4044 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
4045 sections.
4046 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
4047 sh_elf_relocate_section, sh_elf_check_relocs,
4048 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
4049 Likewise.
4050 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
4051 dynamic relocations and avoiding the copy relocation when we
4052 didn't find any dynamic relocations in the section which has
4053 contents or is read-only.
4054 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
4055 (sh_elf_size_dynamic_sections): Don't reset the size of
4056 .rela.got section even if dynamic_sections_created flag is off.
4057 Don't use sh_elf_discard_copies. Scan all input bfd and use
4058 allocate_dynrelocs. Call readonly_dynrelocs to determine
4059 whether we need DT_TEXTREL.
4060 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
4061 whether the symbol was never referred to.
4062 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
4063 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
4064 (sh_elf_check_relocs): Call create_got_section if the short-cut
4065 to .got is null. Increment reference counters only instead of
4066 allocating space on dynamic sections here. Don't conditionalize
4067 uninitialized got.offset value when marking the symbol as a
4068 global offset table entry. Keep relocations for symbols satisfied
4069 by a dynamic library to avoid copy relocations for the symbol.
4070 Set dynobj field of an elf hash table if needed.
4071 (sh_elf_finish_dynamic_sections): Handle null section pointer
4072 correctly.
4073 (elf_backend_copy_indirect_symbol): Defined.
4074 (elf_backend_can_refcount): Defined.
4075
7e326afc
NC
40762002-08-23 Nick Clifton <nickc@redhat.com>
4077
4078 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
4079 previous change. Add comment explaining why.
4080
c8614e8e
AM
40812002-08-23 Stephen Clarke <stephen.clarke@superh.com>
4082
4083 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
4084 contents of .got.plt[2] to tr0, not address of .got.plt.
4085 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
4086 patching absolute plt entry. For shmedia plt entry, set bottom bit
4087 of branch to plt0 as this is a branch to an shmedia instruction.
4088 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
4089 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
4090 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
4091 branch to plt0.
4092 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
4093 patching absolute plt entry. For shmedia plt entry, branch to
4094 plt0 is now ptrel, so use relative offset. Set bottom bit of
4095 branch target as it is a branch to an shmedia instruction.
4096
3b587c71
AM
40972002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
4098 Richard Shann <richard.shann@superh.com>
4099
4100 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
4101 value if .init is an SHmedia function. Similarly for DT_FINI.
4102 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 4103
957dcaa8
AM
41042002-08-23 Stephen Clarke <stephen.clarke@superh.com>
4105
3b587c71 4106 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 4107 dynamic section.
3b587c71 4108 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 4109
a4263c47
NC
41102002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4111
4112 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 4113 byte read when reading the return address register column.
a4263c47 4114
db4ed121
NC
41152002-08-22 Nick Clifton <nickc@redhat.com>
4116
4117 * config.bfd: Add powepc64-*-*bsd* target.
4118
ed71e111
NC
41192002-08-22 Graeme Peterson <gp@qnx.com>
4120
4121 * Makefile.am: Add entries for elf32-shqnx.c
4122 * Makefile.in: Regenerate.
4123 * config.bfd: Add support sh-*-nto* target.
4124 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
4125 * configure: Regenerate.
4126 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
4127 * elf32-sh.c: Do not include elf32-target.h if
4128 ELF32_SH_C_INCLUDED is defined.
4129 * elf32-shqnx.c: New file: Support for QNX.
4130 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
4131
0ab72ee2
NC
41322002-08-22 Nick Clifton <nickc@redhat.com>
4133
75c83283
NC
4134 * po/tr.po: Updated Turkish translation.
4135
0ab72ee2
NC
4136 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
4137 symbols are not read.
4138
56780f18
AM
41392002-08-22 Alan Modra <amodra@bigpond.net.au>
4140
4141 * elf32-m68hc11.c: Formatting fixes.
4142 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
4143 * elf32-m68hc12.c: Formatting fixes.
4144 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
4145
b48fa14c
AM
41462002-08-22 Alan Modra <amodra@bigpond.net.au>
4147
a7c71b0c
AM
4148 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
4149 SEC_DATA.
4150 (pmac_xcoff_vec): Likewise.
4151 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
4152 (aix5coff64_vec): Likewise.
4153
56780f18
AM
41542002-08-22 Alan Modra <amodra@bigpond.net.au>
4155
b48fa14c
AM
4156 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
4157 param to elf_backend_copy_indirect_symbol.
4158 (_bfd_elf_link_hash_copy_indirect): Likewise.
4159 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
4160 calls to copy_indirect_symbol.
4161 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
4162 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
4163 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4164 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
4165 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
4166 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
4167 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
4168 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4169 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
4170 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
4171 test refcounts for "used" values.
4172
8c2ab17d
AM
41732002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
4174
4175 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
4176 argument declaration.
4177
d62b1198 41782002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
4179
4180 * archures.c (bfd_mach_ppc_e500): Added.
4181 * bfd-in2.h: Rebuilt.
d62b1198
EZ
4182 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
4183
9f88ba09
AM
41842002-08-19 Alan Modra <amodra@bigpond.net.au>
4185
4186 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
4187
df622259
AC
41882002-08-17 Andrew Cagney <ac131313@redhat.com>
4189
4190 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 4191 `bfd_byte'.
df622259 4192
44c410de
SC
41932002-08-17 Stan Cox <scox@redhat.com>
4194
4195 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
4196 IRIX 6 segment layout for NEWABI.
4197
4972a8e9
SC
41982002-08-16 Stephen Clarke <stephen.clarke@superh.com>
4199
4200 * bfd/elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4201 symbols when looking for section referred to by a relocation.
4202 * bfd/elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 4203
c5cd6d62
AM
42042002-08-15 Alan Modra <amodra@bigpond.net.au>
4205
4206 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
4207
0741c7be
HPN
42082002-08-15 Hans-Peter Nilsson <hp@axis.com>
4209
4210 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
4211 missing check for whether the symbol is referenced by DSO before
4212 unexporting it as an unneeded dynamic symbol.
4213
e8d5d179
L
42142002-08-14 H.J. Lu <hjl@gnu.org>
4215
4216 * libbfd.h: Regenerate.
4217
e9229007
L
42182002-08-14 H.J. Lu <hjl@gnu.org>
4219
4220 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
4221
1fd03b5a
SC
42222002-08-14 Stephane Carrez <stcarrez@nerim.fr>
4223
4224 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
4225 instructions.
4226 (m68hc11_direct_relax): New to define table of relaxable instructions.
4227 (find_relaxable_insn): New, find a relaxable insn.
4228 (compare_reloc): New to compare two relocs.
4229 (m68hc11_elf_relax_section): New, relax text sections.
4230 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
4231 (elf32_m68hc11_check_relocs): New function for GC support.
4232 (elf32_m68hc11_relocate_section): New function for GC support.
4233 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
4234 (elf_backend_check_relocs): Likewise.
4235 (elf_backend_relocate_section): Likewise.
4236
c828c771
L
42372002-08-13 H.J. Lu <hjl@gnu.org>
4238
4239 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
4240 definitions in shared objects when checking symbol with
4241 undefined version.
4242
9b701e44
SC
42432002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4244
4245 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
4246 (elf32_m68hc11_gc_sweep_hook): Likewise.
4247 (elf_backend_gc_mark_hook): Define for GC section support.
4248 (elf_backend_gc_sweep_hook): Likewise.
4249 (elf_backend_can_gc_sections): Likewise.
4250
4251 * elf32-m68hc12.c: Likewise.
4252
96405e3c
SC
42532002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4254
4255 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
4256 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
4257 (_bfd_m68hc11_elf_set_private_flags): New function.
4258 Use them to set/check/print ELF flags specific to 68HC11.
4259
4260 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
4261 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
4262 (_bfd_m68hc12_elf_set_private_flags): New function.
4263 Use them to set/check/print ELF flags specific to 68HC12.
4264
dae78fb0
SC
42652002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4266
4267 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
4268 fix masks for PC-rel relocs.
4269 (m68hc11_elf_ignore_reloc): New function.
4270
4271 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
4272 68HC12 banked addressing relocs.
4273 (m68hc12_phys_addr): New to compute physical address of banked memory.
4274 (m68hc12_phys_page): Likewise for page.
4275 (m68hc12_addr_is_banked): New to see if address is in banked area.
4276 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
4277
3dbfec86
SC
42782002-08-13 Stephane Carrez <stcarrez@nerim.fr>
4279
4280 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
4281 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
4282 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
4283 * bfd-in2.h: Regenerate.
4284
871da94f
L
42852002-08-12 H.J. Lu <hjl@gnu.org>
4286
4287 * elflink.h (elf_add_default_symbol): Preserve section across
4288 elf_merge_symbol.
4289
59bc061d
NC
42902002-08-09 Graeme Peterson <gp@qnx.com>
4291
51020317 4292 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
4293 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
4294 * Makefile.in: Regenerate.
4295 * config.bfd: Add support for powerpc{le}-*-nto targets.
4296 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
4297 * configure: Regenerate.
4298 * elf32-i386qnx.c: Moved backend functions into a QNX specific
4299 common file "elf32-qnx.h", and now include that file.
4300 * elf32-qnx.h: New file: QNX specific common elf backend.
4301 * elf32-ppc.c: Do not include elf32-target.h if
4302 ELF32_PPC_C_INCLUDED is defined.
4303 * elf32-ppcqnx.c: New file: Support for QNX.
4304 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
4305 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
4306
2b692c59
NC
43072002-08-09 Nick Clifton <nickc@redhat.com>
4308
4309 * po/sv.po: Updated Swedish translation.
4310
d0c7ff07
TS
43112002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4312
4313 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
4314 g->global_gotsym is NULL.
4315
d8bbe778
L
43162002-08-08 H.J. Lu <hjl@gnu.org>
4317
c5cd6d62 4318 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
4319 overrides an indirect versioned symbol.
4320
c366c25e
JJ
43212002-08-08 Jakub Jelinek <jakub@redhat.com>
4322
4323 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
4324 for R_386_TLS_TPOFF32 relocs against symndx 0.
4325
31941635
L
43262002-08-07 H.J. Lu <hjl@gnu.org>
4327
4328 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
4329 with undefined version if needed.
4330 (elf_link_assign_sym_version): Match a default symbol with a
4331 version without definition. No need to hide the default
4332 definition separately.
4333
0f3bd64f
AM
43342002-08-08 Alan Modra <amodra@bigpond.net.au>
4335
7330fb86
AM
4336 * elflink.h (elf_link_output_extsym): Don't output symbols from
4337 SEC_EXCLUDE sections.
4338
0f3bd64f
AM
4339 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
4340
a4aa0fb7
AM
43412002-08-07 Alan Modra <amodra@bigpond.net.au>
4342
4343 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
4344 entries.
4345
34ea4a36
TS
43462002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4347
4348 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
4349 mismatch.
4350
141ff970
TS
43512002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4352
4353 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
4354
28458e7e
TS
43552002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4356
4357 * elf32-mips.c (mips_reloc_map): Fix typo.
4358
0121a3da
AM
43592002-08-06 Alan Modra <amodra@bigpond.net.au>
4360
4361 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
4362
d006db6c
AM
43632002-08-06 Alan Modra <amodra@bigpond.net.au>
4364
4365 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
4366
8ea80f08
AM
43672002-08-06 Alan Modra <amodra@bigpond.net.au>
4368
2a52da53
AM
4369 * libxcoff.h: Use PARAMS on function declarations.
4370 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
4371 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
4372
8ea80f08
AM
4373 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
4374 addend.
4375 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
4376
cf9ab45b
AM
43772002-08-06 Alan Modra <amodra@bigpond.net.au>
4378
4379 * coff-rs6000.c: Formatting fixes.
4380 (xcoff_calculate_relocation): Use PARAMS in declaration.
4381 (xcoff_complain_overflow): Likewise.
4382 (xcoff_ppc_relocate_section): Use old-style function pointer call.
4383 (bfd_xcoff_backend_data): Remove useless comments.
4384 (rs6000coff_vec): Likewise.
4385 (bfd_pmac_xcoff_backend_data): Likewise.
4386 (pmac_xcoff_vec): Likewise.
8ea80f08 4387
cf9ab45b
AM
4388 * coff64-rs6000.c: Formatting fixes.
4389 (xcoff64_calculate_relocation): Use PARAMS in declaration.
4390 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
4391 (bfd_xcoff_backend_data): Remove useless comments.
4392 (rs6000coff64_vec): Likewise.
4393 (bfd_xcoff_aix5_backend_data): Likewise.
4394 (aix5coff64_vec): Likewise.
4395
48bfecdd
AM
43962002-08-06 Alan Modra <amodra@bigpond.net.au>
4397
a78eab4e
AM
4398 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
4399 mask entries. Use complain_overflow_dont for R_REF.
4400 (xcoff_reloc_type_ba): Revert last change.
4401 (xcoff_reloc_type_br): Likewise.
4402 (xcoff_reloc_type_crel): Likewise.
4403 (xcoff_ppc_relocate_section): Likewise.
4404 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
4405 (xcoff64_ppc_relocate_section): Likewise.
4406 (xcoff64_howto_table): Revert some of last change to mask entries.
4407 Use complain_overflow_dont for R_REF.
4408
48bfecdd
AM
4409 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
4410 relocs with bitsize == 16 have size = 1.
4411 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
4412 (xcoff_reloc_type_br): Likewise.
4413 (xcoff_reloc_type_crel): Likewise.
4414 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4415 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
4416 dst_mask adjustment.
4417 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
4418 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
4419 bitsize == 16 have size = 1.
4420
fd13ed0c
DC
44212002-08-01 Denis Chertykov <denisc@overta.ru>
4422
4423 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
4424 (struct misc): New field isymbuf. All free_* fields removed.
4425 (symbol_value): Pass in internal syms. No need to swap syms in.
4426 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
4427 possibly cached info.
4428 (tidyup_after_error): Removed.
4429 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
4430 misc. Use new field.
4431 (adjust_all_relocations): Use internal syms. No need to swap syms
4432 in and out.
4433 (add_page_insn): Don't use removed fields of struct misc.
4434
24a1ba0f
NC
44352002-08-01 Nick Clifton <nickc@redhat.com>
4436
4437 * elf32-arm.h: Revert previous delta.
4438
a6903459
NC
44392002-08-01 Nick Clifton <nickc@redhat.com>
4440
4441 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
4442 * configure: Regenerate.
4443
39a2a3eb
L
44442002-07-31 H.J. Lu <hjl@gnu.org>
4445
4446 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
4447 selected.
4448
a0dfa6a8
L
44492002-07-31 H.J. Lu <hjl@gnu.org>
4450
4451 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
4452 is selected.
4453
cd67d266
JJ
44542002-07-31 Jakub Jelinek <jakub@redhat.com>
4455
4456 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
4457 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
4458
4eb6b71c
NC
44592002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
4460
4461 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
4462 There is no 8 byte relocation type for this architecture.
4463 (do_ns32k_reloc): Use bfd_vma instead of native types.
4464 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
4465 returns void.
4466 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
4467 rely on generic code to do that.
4468 * aout-ns32k.c (howto_table): Add appropriate overflow detection
4469 to all table entries.
4470 (_bfd_ns32k_relocate_contents): put_data returns void.
4471 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
4472 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
4473 return void.
4474
f7c33884
NC
44752002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
4476
4477 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
4478 archive object is target dependant.
4479
8f64befb
NC
44802002-07-31 Adam Nemet <anemet@lnxw.com>
4481
4482 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
4483 (THUMB_PLT_ENTRY_SIZE): New macro.
4484 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
4485 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
4486 ARM_PLT_ENTRY_SIZE.
4487 (elf32_arm_plt_entry): Likewise.
4488 (elf_backend_plt_header_size): Likewise.
4489 (elf32_thumb_plt0_entry): New global.
4490 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
4491 into .plt.thumb.
4492 (elf32_thumb_plt_entry): New global.
4493 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
4494 Thumb entries. Set the bottom bit of the corresponding GOT entry
4495 for a Thumb PLT entry.
4496 (struct elf32_arm_plt_entry_info): New structure.
4497 (struct elf32_arm_link_hash_entry, plt_info): New member of this
4498 type.
4499 (elf32_arm_link_hash_newfunc): Initialize new member.
4500 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
4501 relocations against the PLT.
4502 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
4503 first_rel_type if this is the first time we encounter the symbol.
4504 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
4505 Determine if relocation needs a PLT entry. Set first_rel_type if
4506 this is the first time we encounter the symbol
4507 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
4508 functions as well.
4509 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
4510 (elf32_arm_create_dynamic_sections): New function. Create the
4511 .plt.thumb section.
4512 (elf_backend_create_dynamic_sections): Call it.
4513
47badb7b
NC
45142002-07-31 Nick Clifton <nickc@redhat.com>
4515
4516 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
4517 'alternative' in order to avoid shadowing global symbol of the
4518 same name.
4519 * bfd-in2.h: Regenerate.
4520 * libbfd.h: Regenerate.
4521 * libcoff.h: Regenerate.
4522
8a397dad
TS
45232002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4524
4525 * Makefile.am: Add n32 ABI support.
4526 * Makefile.in: Regenerate.
4527 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
4528 bit vectors for mips*-*-linux targets as optional.
4529 * configure.in: Add n32 ABI vectors.
4530 * configure: Regenerate.
4531 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
4532 * elfn32-mips.c: New file, n32 ABI support.
4533 * targets.c: Add n32 ABI vectors.
4534
7e392df6 45352002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 4536
7e392df6
NC
4537 * elfarmqnx-nabi.c: New file: Support for QNX.
4538 * config.bfd: Add support for arm-*-nto target.
4539 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
4540 * configure: Regenerate.
4541 * Makefile.am: Add entries for elfarmqnx-nabi.c.
4542 * Makefile.in: Regenerate.
4543 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
4544 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
4545 * elfarm-nabi.c: Do not include elf32-arm.h if
4546 ELFARM_NABI_C_INCLUDED is defined.
4547 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 4548
7e392df6 45492002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 4550
83e1617e
NC
4551 * po/sv.po: Updated Swedish translation.
4552
704afa60
JJ
45532002-07-30 Jakub Jelinek <jakub@redhat.com>
4554
4555 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
4556
487e54f2
AM
45572002-07-30 Alan Modra <amodra@bigpond.net.au>
4558
4559 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
4560 * archive.c (bfd_generic_archive_p): Likewise.
4561 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
4562 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
4563 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
4564 (xcoff64_archive_p): Likewise.
4565 (xcoff64_openr_next_archived_file): Likewise.
4566 (xcoff64_archive_p): Clean up tdata properly on error.
4567 * coffgen.c (coff_real_object_p): Likewise.
4568 (coff_object_p): Release filehdr and opthdr.
4569 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
4570 * ieee.c (ieee_archive_p): Likewise.
4571 * ihex.c (ihex_object_p): Likewise.
4572 (ihex_mkobject): Always allocate tdata.
4573 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
4574 * srec.c (srec_mkobject): Always allocate tdata.
4575 (srec_object_p): Clean up tdata properly on error.
4576 (symbolsrec_object_p): Likewise.
4577 * versados.c (versados_object_p): Likewise.
4578 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
4579 and bfd_realloc instead of realloc.
4580 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
4581 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
4582 place of bfd_malloc, simplifying error freeing. Free hash table too.
4583 (vms_object_p): Clean up tdata on error.
4584 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
4585 (vms_close_and_cleanup): Adjust for bfd_alloc use.
4586
9d46020e
AM
45872002-07-30 Alan Modra <amodra@bigpond.net.au>
4588
4589 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
4590
fb39dac1
RS
45912002-07-26 Chris Demetriou <cgd@broadcom.com>
4592
4593 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
4594 flags into resulting BFD.
4595
7a624474
AM
45962002-07-26 Alan Modra <amodra@bigpond.net.au>
4597
4598 From John Reiser <jreiser@BitWagon.com>
4599 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
4600 tls_ldm_got.refcount.
4601
a4382ec6
TS
46022002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4603
4604 * elf64-mips.c: Update TODO comment.
4605 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
4606 mips_elf64_gprel16_reloca): Remove prototypes.
4607 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
4608 (UNUSED_RELOC): Replace by EMPTY_RELOC.
4609 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
4610 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
4611 R_MIPS_HIGHEST.
4612 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
4613 R_MIPS_GOT16. Remove wrong comments.
4614 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
4615 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
4616 from elf32-mips.c.
4617 (mips_elf64_hi16_reloc): Fix formatting.
4618 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
4619 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
4620 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
4621 (mips_elf64_gprel16_reloc): Make static. Add check for
4622 partial_inplace.
4623 (mips_elf64_gprel16_reloca): Remove.
4624 (mips_elf64_literal_reloc): New function.
4625 (mips_elf64_gprel32_reloc): Fix formatting.
4626 (mips_elf64_shift6_reloc): Fix comment. Make static.
4627 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
4628 elf32-mips.c.
4629 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
4630 elf32-mips.c
4631 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
4632 specific relocations.
4633 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
4634 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
4635 (ELF_MAXPAGESIZE): Add comment.
4636
219576a4
NC
46372002-07-25 Nick Clifton <nickc@redhat.com>
4638
4639 * po/sv.po: Updated Swedish translation.
4640 * po/es.po: Updated Spanish translation.
4641 * po/fr.po: Updated French translation.
4642
8c58d23b
AM
46432002-07-25 Alan Modra <amodra@bigpond.net.au>
4644
4645 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
4646 as elf_link_record_local_dynamic_symbol.
4647 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
4648 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
4649 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
4650 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
4651 attempt is made to record a symbol in a discarded section, and
4652 return `2' in that case.
4653
ff3063f5
NC
46542002-07-24 Nick Clifton <nickc@redhat.com>
4655
4656 * po/sv.po: Updated Swedish translation.
4657 * po/es.po: Updated Spanish translation.
4658
f0fe0e16
AM
46592002-07-23 Alan Modra <amodra@bigpond.net.au>
4660
c1fb5f8a
AM
4661 * po/SRC-POTFILES.in: Regenerate.
4662
f0fe0e16
AM
4663 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
4664 immediately. Remove code handling relocatable linking.
4665 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
4666 * elf32-cris.c (cris_elf_relocate_section): Likewise.
4667 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 4668 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
4669 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
4670 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
4671 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4672 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4673 * elf32-v850.c (v850_elf_relocate_section): Likewise.
4674 * elf32-vax.c (elf_vax_relocate_section): Likewise.
4675 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4676 * elf32-avr.c (elf_backend_rela_normal): Define.
4677 * elf32-cris.c: Likewise.
4678 * elf32-fr30.c: Likewise.
de2d743e 4679 * elf32-frv.c: Likewise.
f0fe0e16
AM
4680 * elf32-h8300.c: Likewise.
4681 * elf32-hppa.c: Likewise.
4682 * elf32-ip2k.c: Likewise.
4683 * elf32-sparc.c: Likewise.
4684 * elf32-v850.c: Likewise.
4685 * elf32-vax.c: Likewise.
4686 * elf64-hppa.c: Likewise.
4687 * elf64-sparc.c: Likewise.
4688 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 4689 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
4690 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
4691 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
4692 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
4693 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
4694 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
4695 * elf-m10200.c (USE_RELA): Don't define.
4696 * elf-m10300.c: Likewise.
de2d743e 4697 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
4698 * elf32-i370.c: Likewise.
4699 * elf32-ip2k.c: Likewise.
4700 * elf32-m68k.c: Likewise.
4701 * elf32-mcore.c: Likewise.
4702 * elf32-ppc.c: Likewise.
4703 * elf32-s390.c: Likewise.
4704 * elf32-vax.c: Likewise.
4705 * elf64-ppc.c: Likewise.
4706 * elf64-s390.c: Likewise.
4707 * elf64-x86-64.c: Likewise.
4708 * elfxx-ia64.c: Likewise.
4709 * elf32-avr.c (USE_REL): Don't undef.
4710 * elf32-ip2k.c: Likewise.
4711
5e8d7549
NC
47122002-07-23 Nick Clifton <nickc@redhat.com>
4713
4714 * elf-bfd.h (struct elf_backend_data): Add new bitfield
4715 'want_p_paddr_set_to_zero'.
4716 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
4717 to false;
4718 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
4719 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
4720
9e12c7db
NC
47212002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
4722
4723 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
4724 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
4725 show the Copyright string.
4726 Minor formatting tidy ups.
4727
0461a601
NC
47282002-07-23 Nick Clifton <nickc@redhat.com>
4729
ff3063f5
NC
4730 * po/fr.po: Updated French translation.
4731 * po/sv.po: Updated Swedish translation.
0461a601 4732
fad2542d
AM
47332002-07-23 Alan Modra <amodra@bigpond.net.au>
4734
4735 * elflink.h (elf_link_input_bfd): Don't change internal symbols
4736 when outputting relocs.
4737
c0647bfc
JT
47382002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
4739
4740 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
4741 DT_PLTGOT into the dynamic section if there is a PLT.
4742
d01414a5
TS
47432002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4744
4745 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
4746 elf32-mips.c.
4747 (_bfd_mips_elf_write_section): Likewise.
4748 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
4749 (_bfd_mips_elf_write_section): Likewise.
4750 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
4751 (elf32_mips_write_section): Likewise.
4752 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
4753 (_bfd_mips_elf_write_section): Likewise.
4754
40c97fc6
AM
47552002-07-19 Alan Modra <amodra@bigpond.net.au>
4756
4757 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
4758 PT_IA_64_UNWIND segments for a given section.
4759
58378160
L
47602002-07-17 H.J. Lu <hjl@gnu.org>
4761
4762 * Makefile.am: Fix a typo.
4763 * Makefile.in: Regenerate.
4764
cf88bb9f
NC
47652002-07-15 Denis Chertykov <denisc@overta.ru>
4766 Frank Ch. Eigler <fche@redhat.com>
4767 Ben Elliston <bje@redhat.com>
4768 Alan Lehotsky <alehotsky@cygnus.com>
4769 John Healy <jhealy@redhat.com>
4770 Graham Stott <grahams@redhat.com>
4771 Jeff Johnston <jjohnstn@redhat.com>
4772
4773 * Makefile.am: Add support for ip2k.
4774 * Makefile.in: Regenerate.
4775 * doc/Makefile.in: Regenerate.
4776 * archures.c: Add support for ip2k.
4777 * config.bfd: Add support for ip2k.
4778 * configure.in: Add support for ip2k.
4779 * configure: Regenerate.
4780 * reloc.c: Add support for ip2k.
4781 * targets.c: Add support for ip2k.
4782 * bfd-in2.h: Regenerate.
4783 * libbfd.h: Regenerate.
4784 * cpu-ip2k.c: New file.
4785 * elf32-ip2k.c: New file.
4786
0dafd5f6
RE
47872002-07-17 Ian Rickards <irickard@arm.com>
4788
40c97fc6 4789 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
4790 just return the filename.
4791
36b08f12
AM
47922002-07-16 Moritz Jodeit <moritz@jodeit.org>
4793
4794 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
4795
58821868
AM
47962002-07-16 Alan Modra <amodra@bigpond.net.au>
4797
4798 * elflink.h: Formatting fixes, tidy prototypes.
4799 (elf_link_assign_sym_version): Move common code out of loop.
4800
c89583f8
AM
48012002-07-16 Alan Modra <amodra@bigpond.net.au>
4802
4803 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
4804 reloc section size is zero. Correct reloc output location.
4805
ba94744e
AM
48062002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
4807
4808 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
4809 the final type for the e_fsel selector when generating PA2.0W code.
4810 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
4811 relocations.
4812
96a94295
L
48132002-07-14 H.J. Lu <hjl@gnu.org>
4814
4815 * elflink.h (elf_link_assign_sym_version): Hide the default
4816 definition if there is a hidden versioned definition.
4817
6849c52f
HPN
48182002-07-12 Hans-Peter Nilsson <hp@axis.com>
4819
4820 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
4821 dynamic reference test in assertion when initializing GOT with
4822 static contents. Just assert that there are either no dynamic
4823 sections, the symbol is defined in the regular objects or that the
4824 symbol is undef weak. Tweak comment.
4825 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
4826 only if the symbol isn't defined in the program and isn't undef
4827 weak.
4828 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
4829 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
4830 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
4831 (elf_cris_discard_excess_program_dynamics): Don't consider
4832 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
4833
239e1f3a
AM
48342002-07-11 Alan Modra <amodra@bigpond.net.au>
4835
4836 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
4837 unresolved debugging relocs in dynamic applications.
4838 * elf32-s390.c (elf_s390_relocate_section): Likewise.
4839 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
4840 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
4841 * elf64-s390.c (elf_s390_relocate_section): Likewise.
4842 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
4843 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
4844
2f6d9989
AM
48452002-07-10 Alan Modra <amodra@bigpond.net.au>
4846
f5e87a1d
AM
4847 * elf64-ppc.c (ONES): Define.
4848 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
4849 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
4850 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
4851
2f6d9989
AM
4852 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
4853 (ppc64_elf_set_private_flags): Delete.
4854 (ppc64_elf_section_from_shdr): Delete.
4855 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
4856 (ppc64_elf_fake_sections): Delete.
4857 (bfd_elf64_bfd_set_private_flags): Don't define.
4858 (bfd_elf64_get_symbol_info): Likewise.
4859 (elf_backend_section_from_shdr): Likewise.
4860 (elf_backend_fake_sections): Likewise.
4861
0594c12d
AM
48622002-07-10 Marco Walther <Marco.Walther@sun.com>
4863
4864 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
4865 when not already set.
4866 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
4867 (elf_backend_fake_sections): Define.
4868
699cb9b8
AM
48692002-07-10 Alan Modra <amodra@bigpond.net.au>
4870
4871 * merge.c (_bfd_merge_section): Remove redundant output_section check.
4872 Formatting.
4873 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
4874
0a4787a0
HPN
48752002-07-09 Hans-Peter Nilsson <hp@axis.com>
4876
4877 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
4878 NULL sym_hashes to just before use.
4879 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
4880 symbol with non-default visibility.
4881 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
4882 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
4883 Ditto.
4884 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
4885 symbol with non-default visibility.
4886 (cris_elf_check_relocs): At tests for local symbol before
4887 increasing h->plt.refcount, also check for non-default
4888 visibility. Ditto when checking for local symbol to eliminate
4889 pc-relative runtime relocs.
4890
aecc8f8a
AM
48912002-07-08 Alan Modra <amodra@bigpond.net.au>
4892
4893 * elf.c: Formatting.
4894 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
4895 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
4896 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
4897 segments.
4898
e9168c1e
MM
48992002-07-07 Mark Mitchell <mark@codesourcery.com>
4900 Alan Modra <amodra@bigpond.net.au>
4901
4902 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
4903 account the impact of relocation count overflow when computing
4904 section offsets.
4905 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
4906 or not to apply the PE COFF reloc overflow handling. Fix a
4907 fencepost error in deciding whether or not to use that technique.
4908
6cdc0ccc
AM
49092002-07-07 Alan Modra <amodra@bigpond.net.au>
4910
4911 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
4912 change type of locsyms.
4913 (bfd_elf_get_elf_syms): Declare.
4914 * elf.c (bfd_elf_get_elf_syms): New function.
4915 (group_signature): Use bfd_elf_get_elf_syms.
4916 (bfd_section_from_r_symndx): Likewise.
4917 * elfcode.h (elf_slurp_symbol_table): Likewise.
4918 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
4919 (elf_link_add_object_symbols): Likewise. Reorganise to increase
4920 locality of various data structures. Properly free internal relocs.
4921 (elf_bfd_final_link): Properly free internal relocs.
4922 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
4923 (elf_link_input_bfd): Likewise.
4924 (elf_gc_mark): Likewise. Properly free internal relocs.
4925 (elf_gc_sweep): Properly free internal relocs.
4926 (elf_reloc_symbol_deleted_p): No need to swap syms in.
4927 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
4928 internal relocs.
4929 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
4930 Properly free possibly cached info.
4931 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
4932 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
4933 symbol swapping code.
4934 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
4935 Properly free possibly cached info.
4936 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
4937 (mn10300_elf_relax_delete_bytes): Likewise.
4938 (mn10300_elf_symbol_address_p): Likewise.
4939 (mn10300_elf_get_relocated_section_contents): Likewise.
4940 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
4941 (elf32_h8_relax_delete_bytes): Likewise.
4942 (elf32_h8_symbol_address_p): Likewise.
4943 (elf32_h8_get_relocated_section_contents): Likewise.
4944 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
4945 (m32r_elf_relax_delete_bytes): Likewise.
4946 (m32r_elf_get_relocated_section_contents): Likewise.
4947 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
4948 elf_section_data to determine whether cached.
4949 (sh_elf_relax_section): As above for elf-m10200.c.
4950 (sh_elf_relax_delete_bytes): Likewise.
4951 (sh_elf_get_relocated_section_contents): Likewise.
4952 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
4953 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
4954 reading of local syms.
4955 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
4956 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
4957 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
4958 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
4959 relocs.
4960 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
4961 free internal relocs and section contents. Don't read symbols.
4962 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
4963 (elf32_hppa_size_stubs): Don't free local syms.
4964 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
4965 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
4966 possibly cached info.
4967 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
4968 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
4969 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
4970 all_local_syms.
4971 (get_local_syms): Delete function.
4972 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
4973 on exit.
4974 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
4975
b3212001
JW
49762002-07-05 Jim Wilson <wilson@redhat.com>
4977
4978 * syms.c (decode_section_type): New.
4979 (bfd_decode_symclass): Call decode_section_type.
4980
894bb1ee
JJ
49812002-07-04 Jakub Jelinek <jakub@redhat.com>
4982
4983 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
4984 section content start.
4985 Reported by Michael Schumacher <mike@hightec-rt.com>.
4986
bc0ba537
AM
49872002-07-04 Alan Modra <amodra@bigpond.net.au>
4988
4989 * section.c (_bfd_strip_section_from_output): Remove unnecessary
4990 link order code. Don't actually remove the output section here;
4991 Just set a flag for the linker to do so.
4992 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
4993 sections when setting up output section dynsyms.
4994
797fc050
AM
49952002-07-04 Alan Modra <amodra@bigpond.net.au>
4996
4997 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
4998 fudge.
4999 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
5000 libs here instead.
5001
99881371
MS
50022002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5003
5004 * elf64-s390.c (create_got_section): Set .got section alignment to
5005 8 bytes.
5006 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
5007
47d9a591
AM
50082002-07-02 Alan Modra <amodra@bigpond.net.au>
5009
5010 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
5011
179d3252
JT
50122002-07-01 Matt Thomas <matt@3am-software.com>
5013
5014 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
5015 to EF_VAX_*.
5016
4a14403c
TS
50172002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5018
5019 * elfxx-mips.c (ABI_64_P): Fix comment.
5020 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
5021 new section names for N64 ABI.
5022 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
5023 (mips_elf_calculate_relocation): Code formatting.
5024 (mips_elf_create_dynamic_relocation): Likewise.
5025 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
5026 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
5027 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
5028 in any NewABI.
5029 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
5030 for NewABI.
5031 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
5032 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
5033 here, too.
5034
607c0e09
AS
50352002-07-01 Andreas Schwab <schwab@suse.de>
5036
5037 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
5038 R_X86_64_64 to R_X86_64_RELATIVE.
5039
ba26fd96
AM
50402002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
5041
5042 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
5043 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
5044 Run "make dep-am".
5045 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
5046 host_aout_vec.
5047 * configure.in (vaxbsd_vec): Add.
5048 * targets.c (vaxbsd_vec): Add.
5049 * Makefile.in: Rebuild.
5050 * configure: Rebuild.
5051 * po/SRC-POTFILES.in: Rebuild.
5052
1e2f5b6e
AM
50532002-07-01 Alan Modra <amodra@bigpond.net.au>
5054
5055 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
5056 examining to gc_mark_hook, rather than the bfd.
5057 (elf_gc_sections): Adjust.
5058 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
5059 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
5060 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
5061 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
5062 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
5063 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
5064 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
5065 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
5066 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
5067 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
5068 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
5069 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
5070 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
5071 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
5072 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
5073 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
5074 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
5075 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
5076 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
5077 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
5078 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
5079 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
5080 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
5081 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5082 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
5083 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
5084 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
5085 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
5086 redundant local sym tests.
5087 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
5088 (link_hash_newfunc): Init is_entry.
5089 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
5090 (ppc64_elf_link_hash_table_create): Init all_local_syms.
5091 (create_linkage_sections): Use bfd_make_section_anyway rather than
5092 bfd_make_section.
5093 (ppc64_elf_mark_entry_syms): New function.
5094 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
5095 up opd entry to function section map.
5096 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
5097 relocs that reference the opd section.
5098 (edit_opd): New function.
5099 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
5100 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
5101 (get_local_syms): Do so here. Exit if we already have local syms.
5102 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
5103 read local syms on non-ELF input.
5104 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
5105 than duplicating it's function here. Adjust free of internal
5106 relocs to suit.
5107 (ppc64_elf_relocate_section): Adjust local syms in opd section.
5108 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
5109 * elf32-hppa.c (elf32_hppa_size_stubs): Call
5110 _bfd_elf32_link_read_relocs rather than duplicating it's function
5111 here. Adjust free of internal relocs to suit.
5112
1b71fb54
AJ
51132002-07-01 Andreas Jaeger <aj@suse.de>
5114
5115 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
5116 are not allowed in shared libs code, enforce -fPIC.
5117
8d28f606
HPN
51182002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
5119
5120 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
5121 trailing zero-sequences when there's previous left-over data.
5122
5ac81c74
JL
51232002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
5124
5125 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
5126 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
5127 and opd_rel_sec in order for starting rela section. Check _raw_size.
5128 (elf_backend_reloc_type_class): Define.
5129
91a4d569
AM
51302002-06-27 Kevin Buettner <kevinb@redhat.com>
5131
5132 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
5133 DWARF2 formats.
5134
feee612b
AM
51352002-06-27 Alan Modra <amodra@bigpond.net.au>
5136
5137 * cpu-powerpc.c: Comment on ordering of arch_info.
5138 * elf32-ppc.c (ppc_elf_object_p): New function.
5139 (elf_backend_object_p): Define.
5140 * elf64-ppc.c (ppc64_elf_object_p): New function.
5141 (elf_backend_object_p): Define.
5142
a4e6cefc
JT
51432002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
5144
5145 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
5146 * configure: Regenerate.
5147
dae2dd0d
NC
51482002-06-25 Jason Eckhardt <jle@rice.edu>
5149
5150 * dwarf2.c (decode_line_info): Check unit->addr_size
5151 to read in the proper number of prologue bytes.
5152
680f9d5c
NC
51532002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
5154
5155 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
5156 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
5157 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
5158 been enabled.
dae2dd0d 5159
680f9d5c
NC
5160 * targets.c (_bfd_target_vector[]): Only include
5161 aix5coff64_vec if 64-bit bfd support has been enabled.
5162
d4c88bbb
AM
51632002-06-25 Alan Modra <amodra@bigpond.net.au>
5164
5165 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
5166 * elf32-hppa.c (hppa_add_stub): Likewise.
5167 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
5168 * elflink.h (elf_add_default_symbol): Fix comment typo.
5169 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
5170 (elf_link_add_object_symbols): Likewise.
5171 (elf_link_assign_sym_version): Likewise.
5172 * hash.c (bfd_hash_lookup): Likewise.
5173 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
5174 * section.c (bfd_get_unique_section_name): Likewise.
5175 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
5176 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
5177 (assign_section_numbers): Likewise.
5178 (_bfd_elfcore_make_pseudosection): Likewise.
5179 (elfcore_grok_lwpstatus): Likewise.
5180 (elfcore_grok_win32pstatus): Likewise.
5181 (elfcore_write_note): Constify input params. Use PTR instead of
5182 void *. Include terminating NUL in namesz. Correct padding.
5183 Support NULL "name" param. Use memcpy instead of strcpy.
5184 (elfcore_write_prpsinfo): Constify input params.
5185 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
5186 (elfcore_write_lwpstatus): Likewise.
5187 (elfcore_write_pstatus): Likewise.
5188 (elfcore_write_prfpreg): Likewise.
5189 (elfcore_write_prxfpreg): Likewise.
5190 * elf-bfd.h (elfcore_write_note): Update declaration.
5191 (elfcore_write_prpsinfo): Likewise.
5192 (elfcore_write_prstatus): Likewise.
5193 (elfcore_write_pstatus): Likewise.
5194 (elfcore_write_prfpreg): Likewise.
5195 (elfcore_write_prxfpreg): Likewise.
5196 (elfcore_write_lwpstatus): Likewise.
5197
b0ac09d2
NC
51982002-06-25 Jason Eckhardt <jle@rice.edu>
5199
5200 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
5201 symbols of type stProc and stStaticProc.
5202
52032002-06-25 Nick Clifton <nickc@redhat.com>
5204
5205 * ecoff.c: VArious formatting fixes.
5206
021d6096
AM
52072002-06-25 Alan Modra <amodra@bigpond.net.au>
5208
5209 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
5210
82e51918
AM
52112002-06-25 Alan Modra <amodra@bigpond.net.au>
5212
5213 * aout-adobe.c: Don't compare against "true" or "false.
5214 * aout-target.h: Likewise.
5215 * aoutx.h: Likewise.
5216 * archive.c: Likewise.
5217 * bout.c: Likewise.
5218 * cache.c: Likewise.
5219 * coff-a29k.c: Likewise.
5220 * coff-alpha.c: Likewise.
5221 * coff-i386.c: Likewise.
5222 * coff-mips.c: Likewise.
5223 * coff-or32.c: Likewise.
5224 * coff64-rs6000.c: Likewise.
5225 * coffcode.h: Likewise.
5226 * coffgen.c: Likewise.
5227 * cpu-ns32k.c: Likewise.
5228 * ecoff.c: Likewise.
5229 * ecofflink.c: Likewise.
5230 * elf.c: Likewise.
5231 * elf32-arm.h: Likewise.
5232 * elf32-cris.c: Likewise.
5233 * elf32-d30v.c: Likewise.
5234 * elf32-i386.c: Likewise.
5235 * elf32-mcore.c: Likewise.
5236 * elf32-ppc.c: Likewise.
5237 * elf32-sh.c: Likewise.
5238 * elf32-sh64.c: Likewise.
5239 * elf32-v850.c: Likewise.
5240 * elf64-alpha.c: Likewise.
5241 * elf64-sh64.c: Likewise.
5242 * elfcode.h: Likewise.
5243 * elfcore.h: Likewise.
5244 * elflink.h: Likewise.
5245 * elfxx-mips.c: Likewise.
5246 * i386os9k.c: Likewise.
5247 * ieee.c: Likewise.
5248 * libbfd.c: Likewise.
5249 * linker.c: Likewise.
5250 * mmo.c: Likewise.
5251 * nlm32-alpha.c: Likewise.
5252 * nlm32-i386.c: Likewise.
5253 * nlm32-ppc.c: Likewise.
5254 * nlm32-sparc.c: Likewise.
5255 * nlmcode.h: Likewise.
5256 * oasys.c: Likewise.
5257 * pdp11.c: Likewise.
5258 * peicode.h: Likewise.
5259 * reloc.c: Likewise.
5260 * som.c: Likewise.
5261 * srec.c: Likewise.
5262 * tekhex.c: Likewise.
5263 * vms.c: Likewise.
5264 * xcofflink.c: Likewise.
5265 * elf64-sparc.c: Edit comment to not use "== false".
5266
5267 * aoutf1.h: Don't use "? true : false".
5268 * ecoff.c: Likewise.
5269 * format.c: Likewise.
5270 * ieee.c: Likewise.
5271 * linker.c: Likewise.
5272 * mmo.c: Likewise.
5273 * oasys.c: Likewise.
5274
48fc70a2
AM
52752002-06-23 H.J. Lu <hjl@gnu.org>
5276
5277 * elflink.h (elf_link_add_archive_symbols): For the default
5278 version, check references with only one `@' first.
5279
47b7c2db
AM
52802002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
5281
5282 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
5283 function.
5284 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
5285 symbol table.
5286 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
5287 (elf64_hppa_size_dynamic_sections): Revise to use
5288 elf64_hppa_mark_milli_and_exported_functions.
5289 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
5290 symbols out of dynamic symbol table.
5291
f5d44ba0
AM
52922002-06-23 Alan Modra <amodra@bigpond.net.au>
5293
bb3fff1e
AM
5294 * Makefile.in: Regenerate.
5295 * libbfd.h: Regenerate.
5296 * bfd-in2.h: Regenerate.
5297 * configure: Regenerate.
5298 * po/SRC-POTFILES.in: Regenerate.
5299
f5d44ba0
AM
5300 * elflink.h: Comment typo fixes.
5301
53022002-06-23 H.J. Lu <hjl@gnu.org>
5303
5304 * elf-bfd.h (elf_link_loaded_list): New structure.
5305 (elf_link_hash_table): Add "loaded".
5306 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
5307 * elflink.h (elf_link_check_versioned_symbol): New function.
5308 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
5309
cc36acdf
NC
53102002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
5311
5312 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 5313 support an ELF style hash table, return true, indicating that
cc36acdf
NC
5314 nothing needed to be done, rather than false, indicating that the
5315 section's size could not be computed.
5316
4e5ba5b7
DB
53172002-06-18 Dave Brolley <brolley@redhat.com>
5318
5319 From Catherine Moore, Michael Meissner, Dave Brolley:
5320 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
5321 * targets.c: Support bfd_elf32_frv_vec.
5322 * reloc.c: Add FRV relocs.
5323 * configure.in: Add support for bfd-elf32-frv-vec.
5324 * config.bfd (targ_cpu): Add support for frv-*-elf.
5325 * archures.c: Add frv arch and machines.
5326 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
5327 (ALL_MACHINES_CFILES): Add cpu-frv.c.
5328 (BFD32_BACKENDS): Add elf32-frv.lo.
5329 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
5330 (cpu-frv.lo): New target.
5331 (elf32-frv.lo): New target.
5332 * cpu-frv.c: New file.
5333 * elf32-frv.c: New file.
5334
7ece0d85
JJ
53352002-06-18 Jakub Jelinek <jakub@redhat.com>
5336
5337 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
5338 e_shnum == 0.
5339 Only read the first section header if e_shoff is non-zero.
5340 Don't consider e_shstrndx if there are no sections.
5341
57fb03ac
TR
53422002-06-17 Tom Rix <trix@redhat.com>
5343
5344 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 5345 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
5346 complain_overflow_bitfield.
5347
341ca622
AM
53482002-06-17 Alan Modra <amodra@bigpond.net.au>
5349
767e34d1
AM
5350 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
5351 (bfd_fdopenr): Likewise.
5352 (bfd_openstreamr): Likewise.
5353 (bfd_openw): Likewise.
5354
341ca622
AM
5355 * targets.c: Sort target vecs.
5356 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
5357 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
5358 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
5359 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
5360 * configure.in: Sort target vecs. Add m88kmach3_vec.
5361 * configure: Regenerate.
5362
dfbbae4c
HPN
53632002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
5364
5365 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
5366 bpo_reloc_no to break sort order ties, not address of items.
5367
d663e1cd
JL
53682002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
5369
5370 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
5371 Skip excluded sections in determing __gp value.
5372 (elf_hppa_final_link_relocate): Use the symbol's address in
5373 R_PARISC_FPTR64 relocations that don't need an opd entry.
5374 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
5375 (elf64_hppa_finalize_dynreloc): Likewise.
5376 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
5377 (elf64_hppa_finish_dynamic_symbol): Break up assert.
5378
a8295218
NC
53792002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
5380
5381 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
5382 alignment for .bss, .data and .text sections so that sse and sse2
5383 code will work.
5384 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
5385
53862002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
5387
5388 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
5389 sh[1234]*-elf*.
5390
3db4b612
JL
53912002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
5392
2cb69dd3
JL
5393 * elflink.h (elf_bfd_final_link): Improve error handling for missing
5394 dynamic sections.
5395
3db4b612
JL
5396 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
5397 for a symbol that has no output section.
5398 (allocate_dynrel_entries): Correct comment.
5399 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
5400 unless we want one.
5401 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
5402 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
5403 with no section. Remove unnecessary parentheses.
5404
f3813499
TR
54052002-06-11 Tom Rix <trix@redhat.com>
5406
5407 * coffcode.h (coff_compute_section_file_positions): Add data
5408 section to AIX loader alignment check.
5409
f5d44ba0 5410 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
5411 alignment to 4 bytes.
5412 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
5413 power accessor macro.
5414 (do_shared_object_padding): Remove invalid assertion.
5415
0ebaf185
RS
54162002-06-10 Richard Sandiford <rsandifo@redhat.com>
5417
5418 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
5419 for removed output sections.
5420
ebe3e2d1
NC
54212002-06-10 Geoffrey Keating <geoffk@redhat.com>
5422
5423 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
5424 htab_alloc.
5425 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
5426
0b14c2aa
L
54272002-06-08 H.J. Lu <hjl@gnu.org>
5428
5429 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
5430 work around a long long bug in gcc 2.96 on mips.
5431
3c2bfad6
JT
54322002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
5433
5434 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
5435 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
5436 Regenerate dependency lists.
5437 * Makefile.in: Regenerate.
5438 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
5439 vax1knetbsd_vec to targ_selvecs.
5440 * configure.in: Add vax1knetbsd_vec.
5441 * configure: Regenerate.
5442 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
5443 * vax1knetbsd.c: New file.
5444 * vaxnetbsd.c: Update copyright years.
5445 (TARGET_PAGE_SIZE): Set to 0x1000.
5446 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
5447
91149be3
JT
54482002-06-08 Matt Thomas <matt@3am-software.com>
5449
5450 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
5451
21e15248
AM
54522002-06-08 Alan Modra <amodra@bigpond.net.au>
5453
5454 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
5455
986b7daa
AM
54562002-06-08 Alan Modra <amodra@bigpond.net.au>
5457
e90b95f6
AM
5458 * Makefile.am: Run "make dep-am".
5459 * Makefile.in: Regenerate.
5460
3f9c735e
AM
5461 * armnetbsd.c: Replace CONST with const.
5462 * corefile.c: Likewise.
5463 * elf32-dlx.c: Likewise.
5464 * elf64-mips.c: Likewise.
5465 * mmo.c: Likewise.
5466 * ns32knetbsd.c: Likewise.
5467
986b7daa
AM
5468 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
5469 table is elf64-sparc.
5470
5a659663
TS
54712002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5472
5473 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
5474 Fix RELA addends to get not shifted in the result. Don't do special
5475 handling of R_MIPS_64 for NewABI.
5476
9bab7074
AM
54772002-06-07 Alan Modra <amodra@bigpond.net.au>
5478
5479 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5480 (NAME(aout,slurp_reloc_table)): Likewise.
5481 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
5482 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
5483 (xcoff_write_archive_contents_big): Likewise.
5484 (xcoff_generate_rtinit): Likewise.
5485 (xcoff_generate_rtinit): Likewise, and check error return.
5486 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5487 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
5488 (coff_get_normalized_symtab): Likewise.
5489 (coff_make_empty_symbol): Likewise.
5490 (bfd_coff_set_symbol_class): Likewise.
5491 * cofflink.c (coff_link_add_symbols): Likewise.
5492 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
5493 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
5494 (bfd_ecoff_write_accumulated_debug): Likewise.
5495 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
5496 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
5497 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
5498 * ieee.c (do_with_relocs): Use bfd_zalloc.
5499 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
5500 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
5501 (NAME(aout,slurp_reloc_table)): Likewise.
5502 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
5503 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
5504 * som.c (som_build_and_write_symbol_table): Likewise.
5505 (som_slurp_string_table): Likewise.
5506 (som_slurp_symbol_table): Likewise.
5507 (som_bfd_ar_write_symbol_stuff): Likewise.
5508 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
5509 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
5510 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
5511 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
5512 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
5513
1126897b
AM
55142002-06-07 Alan Modra <amodra@bigpond.net.au>
5515
5516 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
5517 "group" union.
5518 (elf_group_name): Update.
5519 (elf_group_id): Define.
5520 (bfd_elf_set_group_contents): Declare.
5521 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
5522 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
5523 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
5524 that sym for the signature.
5525 (_bfd_elf_compute_section_file_positions): Don't call
5526 set_group_contents for "ld -r" case.
5527 (swap_out_syms): Use bfd_zalloc.
5528 * elflink.h (elf_link_add_archive_symbols): Likewise.
5529 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5530 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
5531
3fad3c7c
AM
55322002-06-07 Alan Modra <amodra@bigpond.net.au>
5533
5534 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
5535 relocs in opd for non-shared too.
5536
10f469bf 55372002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
5538
5539 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
5540 relocations.
5541
7217313c
NC
55422002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
5543
5544 * merge.c: Include libiberty.h.
5545 * elf-strtab.c: Include libiberty.h.
5546
6cb22815
AM
55472002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
5548
5549 * peXXigen.c (pe_print_idata): Remove unused variable.
5550
1ed89aa9
NC
55512002-06-06 David Heine <dlheine@tensilica.com>
5552
5553 * elf.c (assign_file_positions_for_segments): Remove unallocated
5554 sections from the section to segment mapping for PT_LOAD segments.
5555 Update comment about empty loadable segments.
5556
644c4c80
RS
55572002-06-06 Richard Sandiford <rsandifo@redhat.com>
5558
5559 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
5560 is within the .stabstr section.
5561
f8ecb12b
AM
55622002-06-06 Alan Modra <amodra@bigpond.net.au>
5563
5564 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
5565 are "const PTR", not "const PTR *".
5566 (bfd_elf32_swap_symbol_in): Likewise.
5567 (bfd_elf64_swap_symbol_in): Likewise.
5568 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
5569 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5570 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5571 (elf_link_add_object_symbols): Likewise.
5572 (elf_link_record_local_dynamic_symbol): Likewise.
5573 (elf_link_input_bfd): Likewise.
5574 (elf_gc_mark): Likewise.
5575 (elf_reloc_symbol_deleted_p): Likewise.
5576 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5577 (mn10200_elf_relax_delete_bytes): Likewise.
5578 (mn10200_elf_symbol_address_p): Likewise.
5579 (mn10200_elf_get_relocated_section_contents): Likewise.
5580 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5581 (mn10300_elf_relax_section): Likewise.
5582 (mn10300_elf_relax_delete_bytes): Likewise.
5583 (mn10300_elf_symbol_address_p): Likewise.
5584 (mn10300_elf_get_relocated_section_contents): Likewise.
5585 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5586 (elf32_h8_relax_delete_bytes): Likewise.
5587 (elf32_h8_symbol_address_p): Likewise.
5588 (elf32_h8_get_relocated_section_contents): Likewise.
5589 * elf32-hppa.c (get_local_syms): Likewise.
5590 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5591 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5592 * elf32-sh.c (sh_elf_relax_section): Likewise.
5593 (sh_elf_relax_delete_bytes): Likewise.
5594 (sh_elf_get_relocated_section_contents): Likewise.
5595 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5596 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5597 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5598 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5599 * elf64-ppc.c (get_local_syms): Likewise.
5600 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5601 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5602
1ed89aa9 56032002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
5604
5605 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
5606
73ff0d56
AM
56072002-06-05 Alan Modra <amodra@bigpond.net.au>
5608
9dce4196
AM
5609 * elf.c (group_signature): Swap in the whole symbol, and handle
5610 extracting section symbol names.
5611 (setup_group): Add comment.
5612 (set_group_contents): When called from objcopy or ld, arrange for
5613 section contents to be written. Write group member output section
5614 indices to allow objcopy to reorganize sections.
5615 (_bfd_elf_copy_private_section_data): Copy group info.
5616
73ff0d56
AM
5617 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
5618 (bfd_elf32_swap_symbol_in): Update prototype.
5619 (bfd_elf64_swap_symbol_in): Likewise.
5620 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
5621 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
5622 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
5623 (elf_link_add_object_symbols): Likewise.
5624 (elf_link_record_local_dynamic_symbol): Likewise.
5625 (elf_link_input_bfd): Likewise.
5626 (elf_gc_mark): Likewise.
5627 (elf_reloc_symbol_deleted_p): Likewise.
5628 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
5629 (mn10200_elf_relax_delete_bytes): Likewise.
5630 (mn10200_elf_symbol_address_p): Likewise.
5631 (mn10200_elf_get_relocated_section_contents): Likewise.
5632 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
5633 (mn10300_elf_relax_section): Likewise.
5634 (mn10300_elf_relax_delete_bytes): Likewise.
5635 (mn10300_elf_symbol_address_p): Likewise.
5636 (mn10300_elf_get_relocated_section_contents): Likewise.
5637 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5638 (elf32_h8_relax_delete_bytes): Likewise.
5639 (elf32_h8_symbol_address_p): Likewise.
5640 (elf32_h8_get_relocated_section_contents): Likewise.
5641 * elf32-hppa.c (get_local_syms): Likewise.
5642 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
5643 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
5644 * elf32-sh.c (sh_elf_relax_section): Likewise.
5645 (sh_elf_relax_delete_bytes): Likewise.
5646 (sh_elf_get_relocated_section_contents): Likewise.
5647 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
5648 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
5649 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
5650 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
5651 * elf64-ppc.c (get_local_syms): Likewise.
5652 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
5653 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
5654 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
5655 * elf64-alpha.c (alpha_elf_size_info): Likewise.
5656 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5657 * elf64-mips.c (mips_elf64_size_info): Likewise.
5658 * elf64-s390.c (s390_elf64_size_info): Likewise.
5659 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5660
53bfd6b4
MR
56612002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5662
5663 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
5664 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
5665 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
5666 _bfd_mips_elf_ignore_discarded_relocs.
5667 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
5668
d4df96e6
L
56692002-06-05 H.J. Lu <hjl@gnu.org>
5670
5671 * elfxx-mips.c (mips_elf_calculate_relocation): Call
5672 _bfd_elf_rel_local_sym for STT_SECTION relocations against
5673 the SEC_MERGE section.
5674
e61463e1
AM
56752002-06-05 Alan Modra <amodra@bigpond.net.au>
5676
3cac74d0
AM
5677 * coff-alpha.c: Update copyright date.
5678 * coff-mips.c: Likewise.
5679 * xcoff-target.h: Likewise.
5680
e61463e1
AM
5681 * bfd-in.h: Remove "taken from the source" comment.
5682 * libbfd-in.h: Likewise.
5683 * libcoff-in.h: Likewise.
5684 * bfd-in2.h: Regenerate.
5685 * libbfd.h: Regenerate.
5686 * libcoff.h: Regenerate.
5687
5688 * elf.c (bfd_elf_discard_group): Return true.
5689 * elf-bfd.h (bfd_elf_discard_group): Declare.
5690 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
5691 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
5692 * bfd.c (bfd_discard_group): Define.
5693 * targets.c (struct bfd_target): Add _bfd_discard_group.
5694 (BFD_JUMP_TABLE_LINK): Here too.
5695 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
5696 * aout-adobe.c (aout_32_bfd_discard_group): Define.
5697 * aout-target.h (MY_bfd_discard_group): Define.
5698 * aout-tic30.c (MY_bfd_discard_group): Define.
5699 * binary.c (binary_bfd_discard_group): Define.
5700 * bout.c (b_out_bfd_discard_group): Define.
5701 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
5702 * coffcode.h (coff_bfd_discard_group): Define.
5703 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
5704 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
5705 * i386msdos.c (msdos_bfd_discard_group): Define.
5706 * i386os9k.c (os9k_bfd_discard_group): Define.
5707 * ieee.c (ieee_bfd_discard_group): Define.
5708 * ihex.c (ihex_bfd_discard_group): Define.
5709 * mmo.c (mmo_bfd_discard_group): Define.
5710 * nlm-target.h (nlm_bfd_discard_group): Define.
5711 * oasys.c (oasys_bfd_discard_group): Define.
5712 * ppcboot.c (ppcboot_bfd_discard_group): Define.
5713 * som.c (som_bfd_discard_group): Define.
5714 * srec.c (srec_bfd_discard_group): Define.
5715 * tekhex.c (tekhex_bfd_discard_group): Define.
5716 * versados.c (versados_bfd_discard_group): Define.
5717 * vms.c (vms_bfd_discard_group): Define.
5718 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
5719 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
5720 (aix5coff64_vec): Likewise.
5721 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
5722
9cba27b2
JT
57232002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
5724
5725 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
5726 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
5727 (elf32-sh64-com.lo): New dependency list.
5728 * Makefile.in: Regenerate.
5729 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
5730 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
5731 elf32-sh64-com.lo.
5732 * configure: Regenerate.
5733 * elf32-sh64.c (sh64_address_in_cranges)
5734 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
5735 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
5736 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
5737 * elf32-sh64-com.c: ...here. New file.
5738
8d2c33be
AM
57392002-06-04 Alan Modra <amodra@bigpond.net.au>
5740
5741 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
5742 ATTRIBUTE_UNUSED on used params.
5743 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
5744 before calling bfd_section_from_elf_index on local syms.
5745 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
5746
5b0e55b6
JT
57472002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
5748
5749 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
5750 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
5751 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
5752 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
5753 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
5754 * Makefile.in: Regenerate.
5755 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
5756 (sh64-*-netbsd*): New targets.
5757 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
5758 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
5759 * configure: Regenerate.
5760 * elf32-sh64-nbsd.c: New file.
5761 * elf64-sh64-nbsd.c: New file.
5762 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
5763 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
5764 bfd_elf64_sh64lnbsd_vec.
5765
b885599b
AM
57662002-06-04 Alan Modra <amodra@bigpond.net.au>
5767
5768 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
5769 (bfd_section_from_shdr): Likewise. Set section name of group
5770 sections from signature.
5771 (group_signature): Split out from setup_group. Ensure symbol table
5772 is available.
5773 (bfd_elf_discard_group): New function.
5774 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
5775 .gnu.linkonce* sections if they are members of a group.
5776 (set_group_contents): Set GRP_COMDAT flag.
5777 * section.c (bfd_discard_group): New function.
5778 * bfd-in.h (bfd_elf_discard_group): Declare.
5779 * bfd-in2.h: Regenerate.
5780 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
5781 (elf_linkonce_p): Define.
5782
90937f86
AM
57832002-06-04 Alan Modra <amodra@bigpond.net.au>
5784
5785 * elf.c (bfd_section_from_shdr): Make "name" const.
5786 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
5787 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
5788 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
5789 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
5790 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
5791 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
5792 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
5793 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
5794 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
5795 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
5796 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
5797
cf6fb9ce
MR
57982002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5799
5800 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
5801 ABI.
5802
cedb70c5
KH
58032002-06-02 Kazu Hirata <kazu@cs.umass.edu>
5804
5805 * elf32-arc.c: Fix formatting.
5806 * elf32-arm.h: Likewise.
5807 * elf32-cris.c: Likewise.
5808 * elf32-dlx.c: Likewise.
5809 * elf32-hppa.c: Likewise.
5810 * elf32-i386.c: Likewise.
5811 * elf32-i386qnx.c: Likewise.
5812 * elf32-or32.c: Likewise.
5813 * elf32-s390.c: Likewise.
5814 * elf32-sh64.c: Likewise.
5815 * elf32-vax.c: Likewise.
5816 * elf32-xstormy16.c: Likewise.
5817 * elf64-alpha.c: Likewise.
5818 * elf64-mmix.c: Likewise.
5819 * elf64-ppc.c: Likewise.
5820 * elf64-s390.c: Likewise.
5821 * elf64-sh64.c: Likewise.
5822 * elf64-x86-64.c: Likewise.
5823
048d873d
RH
58242002-06-02 Richard Henderson <rth@redhat.com>
5825
5826 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
5827 null when there are no got entries for a symbol.
5828 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
5829 uninitialized variable warning.
5830
4a67a098
RH
58312002-06-01 Richard Henderson <rth@redhat.com>
5832
5833 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
5834 undefined symbols here.
5835 (elf64_alpha_relax_section): Do it here. Also test for not
5836 defined in the current module.
5837 (elf64_alpha_relocate_section_r): Split out of ...
5838 (elf64_alpha_relocate_section): ... here. Don't dereference
5839 NULL when looking up local got entries.
5840
f44f99a5
RH
58412002-06-01 Richard Henderson <rth@redhat.com>
5842
5843 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
5844 symbols from JSR relaxation.
5845 (elf64_alpha_size_plt_section_1): New.
5846 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
5847 (elf64_alpha_size_rela_got_1): ... here.
5848 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
5849 (elf64_alpha_size_rela_got_section): ... here.
5850 (elf64_alpha_size_plt_section): New.
5851 (elf64_alpha_relax_section): Call them.
5852 (elf64_alpha_size_got_sections): Remove output_bfd arg.
5853 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
5854
9e756d64
RH
58552002-06-01 Richard Henderson <rth@redhat.com>
5856
5857 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
5858 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
5859 in shared libraries. Fix DTPRELHI and TPRELHI value.
5860 (INSN_ADDQ, INSN_RDUNIQ): New.
5861 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
5862 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
5863 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
5864 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
5865 Handle GOTDTPREL and GOTTPREL relocations.
5866 (elf64_alpha_relax_gprelhilo): New.
5867 (elf64_alpha_relax_tls_get_addr): New.
5868 (elf64_alpha_relax_find_tls_segment): New.
5869 (elf64_alpha_relax_section): Handle TLS relocations.
5870 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
5871 (elf64_alpha_check_relocs): Set it.
5872
c853d7f6
RH
58732002-06-01 Richard Henderson <rth@redhat.com>
5874
b646261c
RH
5875 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
5876
c853d7f6
RH
5877 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
5878 check; don't suppress dynamic relocs for non-allocated sections.
5879
d7e41a96
RH
5880 * elf64-alpha.c: Remove dead code.
5881
5f333394
AM
58822002-05-31 Alan Modra <amodra@bigpond.net.au>
5883
08e0ee05
AM
5884 * bfd-in2.h: Regenerate.
5885 * libbfd.h: Regenerate.
5886 * po/SRC-POTFILES.in: Regenerate.
5887
5f333394
AM
5888 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
5889 space for bss .plt.
5890
caf47ea6
AM
58912002-05-31 Graeme Peterson <gp@qnx.com>
5892
5893 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
5894 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
5895 Run "make dep-am".
5896 * Makefile.in: Regenerate.
5897 * config.bfd: Add i[3456]86-*-nto-qnx* support.
5898 * configure.in: Add bfd_elf32_i386qnx_vec support.
5899 * configure: Regenerate.
5900 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
5901 is_contained_by_filepos, and copy_private_bfd_data_p.
5902 * elf.c (assign_file_positions_for_segments): Call backend
5903 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
5904 (IS_CONTAINED_BY_FILEPOS): Define.
5905 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
5906 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
5907 Fix non-K&R call to _bfd_error_handler.
5908 (_bfd_elf_copy_private_section_data): Use backend
5909 copy_private_bfd_data_p.
5910 * elf32-i386.c: Don't include elfxx-target.h when
5911 ELF32_I386_C_INCLUDED is defined.
5912 * elf32-i386qnx.c: New QNX elf backend file.
5913 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
5914 elf_backend_is_contained_by_filepos, and
5915 elf_backend_do_copy_private_bfd_data.
5916 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
5917
5bc56484
AM
59182002-05-31 Alan Modra <amodra@bigpond.net.au>
5919
5920 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
5921 Move other similar defines to start of file.
5922
1b164155
TR
59232002-05-30 Tom Rix <trix@redhat.com>
5924
5925 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
5926 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
5927
3765b1be
RH
59282002-05-30 Richard Henderson <rth@redhat.com>
5929
5930 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
5931 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
5932 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
5933 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
5934 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
5935 (struct alpha_elf_obj_tdata): Rename total_got_entries and
5936 n_local_got_entries to total_got_size and local_got_size.
5937 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
5938 (alpha_got_entry_size): New.
5939 (elf64_alpha_relax_with_lituse): Use it.
5940 (elf64_alpha_relax_without_lituse): Likewise.
5941 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
5942 (get_got_entry): New.
5943 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
5944 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
5945 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
5946 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
5947 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
5948 (elf64_alpha_calc_got_offsets): Likewise.
5949 (alpha_dynamic_entries_for_reloc): New.
5950 (elf64_alpha_calc_dynrel_sizes): Use it.
5951 (elf64_alpha_size_dynamic_sections): Likewise.
5952 (elf64_alpha_relocate_section): Handle TLS relocations.
5953 * reloc.c: Add Alpha TLS relocations.
5954 * bfd-in2.h, libbfd.h: Rebuild.
5955
5e226794
NC
59562002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5957
5958 * peXXigen.c (pe_print_idata): Remove double printed
5959 import table lines; add Bound-To comment.
5960
90ace9e9
JT
59612002-05-29 Matt Thomas <matt@3am-software.com>
5962
5963 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
5964 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
5965 (elf32-vax.lo): New rule.
5966 * Makefile.in: Regenerate.
5967 * configure.in (bfd_elf32_vax_vec)
5968 (vaxnetbsd_vec): New vectors.
5969 * configure: Regenerate.
5970 * config.bfd (vax-*-netbsdelf*)
5971 (vax-*-netbsdaout*)
5972 (vax-*-netbsd*): New targets.
5973 * elf32-vax.c: New file.
5974 * reloc.c: Add VAX relocations.
5975 * bfd-in2.h: Regenerate.
5976 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
5977
4a253e81
JT
59782002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
5979
5980 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
5981 and bfd_elf32_bigarm_vec to targ_selvecs.
5982
6e7c73dd
CF
59832002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
5984
5985 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
5986 with auto-imported symbols.
5987
8afb0e02
NC
59882002-05-29 Adam Nemet <anemet@lnxw.com>
5989
5990 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
5991 sections only record bfd.
9bab7074 5992 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 5993 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 5994 * bfd-in2.h: Regenerate.
8afb0e02 5995
a95653f5
NC
59962002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
5997
5998 * syms.c (_bfd_stab_section_find_nearest_line): Move
5999 declaration and initialisation of saw_line and saw_func out of
6000 for loop.
6001
7cdc5bba
AM
60022002-05-29 Alan Modra <amodra@bigpond.net.au>
6003
6004 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
6005 (bfd_elf64_get_symbol_info): Define.
6006 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
6007
4c7aad1c
AM
60082002-05-29 Andrey Volkov <avolkov@transas.com>
6009
6010 * cpu-h8300.c: Make default h8300 machine first in machine list.
6011
d172d4ba
NC
60122002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
6013
6014 * config.bfd: Added DLX configuraton.
6015 * Makefile.am: Added DLX configuraton.
6016 * configure.in: Added DLX configuraton.
6017 * archures.c: Add DLX architecure.
6018 * reloc.c: Add DLX relocs.
6019 * targets.c: Added DLX target vector.
6020 * configure: Regenerate.
6021 * Makefile.in: Regenreate.
6022 * bfd-in2.h: Regenreate.
6023 * elf32-dlx.c: New file: Support DLX target.
6024 * cpu-dlx.c: New file: Support DLX target.
6025
d1329ca3
AM
60262002-05-25 Alan Modra <amodra@bigpond.net.au>
6027
428d0de3
AM
6028 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
6029
d1329ca3
AM
6030 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
6031 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
6032 strings to point inside function code sym string.
6033 (func_desc_adjust): Likewise.
6034 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
6035
3bab7989
ML
60362002-05-24 Michal Ludvig <mludvig@suse.cz>
6037
6038 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
6039 (elf64_x86_64_grok_psinfo): Added.
6040
436e8db0
NC
60412002-05-24 TAMURA Kent <kent@netbsd.org>
6042
6043 * config.bfd: Add a target for i386-netbsdpe.
6044
ea1e4b0d
AM
60452002-05-24 Alan Modra <amodra@bigpond.net.au>
6046
6047 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
6048 and is_func_descriptor.
6049 (func_desc_adjust): Hide function code sym in shared libs unless
6050 there is a matching exported function descriptor sym.
6051
13ae64f3
JJ
60522002-05-23 Jakub Jelinek <jakub@redhat.com>
6053
6054 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
6055 for symbols from SHF_TLS section.
6056 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
6057 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
6058 (map_sections_to_segments): Build PT_TLS segment if necessary.
6059 (assign_file_positions_for_segments): Likewise.
6060 (get_program_header_size): Account for PT_TLS segment.
6061 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
6062 SEC_THREAD_LOCAL sections to STT_TLS.
6063 * reloc.c: Add 386 and IA-64 TLS relocs.
6064 * section.c (SEC_THREAD_LOCAL): Define.
6065 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
6066 Remove.
6067 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
6068 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
6069 unconditionally.
6070 (struct elf_final_link_info): Add first_tls_sec.
6071 (elf_bfd_final_link): Set first_tls_sec.
6072 Compute elf_hash_table (info)->tls_segment.
6073 (elf_link_output_extsym): Handle STT_TLS symbols.
6074 (elf_link_input_bfd): Likewise.
6075 * syms.c (BSF_THREAD_LOCAL): Define.
6076 * bfd-in2.h: Rebuilt.
6077 * libbfd.h: Rebuilt.
6078 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
6079 elf_i386_mkobject, elf_i386_object_p): New functions.
6080 (elf_howto_table): Add TLS relocs.
6081 (elf_i386_reloc_type_lookup): Support TLS relocs.
6082 (elf_i386_info_to_howto_rel): Likewise.
6083 (struct elf_i386_link_hash_entry): Add tls_type.
6084 (struct elf_i386_obj_tdata): New.
6085 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
6086 New macros.
6087 (struct elf_i386_link_hash_table): Add tls_ldm_got.
6088 (link_hash_newfunc): Clear tls_type.
6089 (elf_i386_check_relocs): Support TLS relocs.
6090 (elf_i386_gc_sweep_hook): Likewise.
6091 (allocate_dynrelocs): Likewise.
6092 (elf_i386_size_dynamic_sections): Likewise.
6093 (elf_i386_relocate_section): Likewise.
6094 (elf_i386_finish_dynamic_symbol): Likewise.
6095 (bfd_elf32_mkobject, elf_backend_object_p): Define.
6096 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
6097 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
6098 want_tprel, want_dtpmod, want_dtprel.
6099 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
6100 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
6101 R_IA64_LTOFF_TPREL22.
6102 (elf_code_to_howto_index): Add TLS relocs.
6103 (elfNN_ia64_check_relocs): Support TLS relocs.
6104 (allocate_global_data_got): Account for TLS .got data.
6105 (allocate_dynrel_entries): Account for TLS dynamic relocations.
6106 (elfNN_ia64_install_value): Supprt TLS relocs.
6107 (set_got_entry): Support TLS relocs.
6108 (elfNN_ia64_relocate_section): Likewise.
6109
c62e1cc3
NC
61102002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
6111
6112 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
6113 BLX reloc round the relocation up rather than down.
6114 * coff-arm.c (coff_arm_relocate_section): Likewise.
6115
c5a43a5d
L
61162002-05-21 H.J. Lu (hjl@gnu.org)
6117
6118 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
6119 definition.
6120
afbe61cf
AM
61212002-05-22 Alan Modra <amodra@bigpond.net.au>
6122
6123 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
6124 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
6125
9c07fe7c
AM
61262002-05-22 Alan Modra <amodra@bigpond.net.au>
6127
6128 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
6129 unresolved relocs.
6130 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
6131
21611032
TS
61322002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6133
c5cd6d62 6134 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
6135 non-ELF targets.
6136
41241523
TS
61372002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6138
6139 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
6140 an error value.
6141 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
6142 return with false on error.
6143 (elf_link_input_bfd): Check reloc_emitter return value.
6144
658f2588
JT
61452002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
6146
6147 * config.bfd (armeb-*-netbsdelf*): New target.
6148
c862ae31
AM
61492002-05-20 Alan Modra <amodra@bigpond.net.au>
6150
6151 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
6152 at the plt call stub.
6153
6dd14845
TS
61542002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6155
6156 * cpu-mips.c (mips_compatible): Don't try to check machine
6157 compatibility.
6158
a58d9c34
TR
61592002-05-18 Tom Rix <trix@redhat.com>
6160
6161 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
6162
ef60b7ff
AM
61632002-05-17 Alan Modra <amodra@bigpond.net.au>
6164
6165 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
6166 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
6167 we've already warned about an undefined symbol. Report more
6168 detail on reloc errors.
6169
a703a6ea
AM
61702002-05-17 Alan Modra <amodra@bigpond.net.au>
6171
6172 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
6173 * configure.in: Invoke AM_INSTALL_LIBBFD.
6174 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
6175 (install_libbfd): .. New target.
6176 (uninstall_libbfd): Likewise.
6177 (install-bfdlibLTLIBRARIES): Likewise.
6178 (uninstall-bfdlibLTLIBRARIES): Likewise.
6179 (bfdlibdir): New.
6180 (bfdincludedir): New.
6181 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
6182 * aclocal.m4: Regenerate.
6183 * configure: Regenerate.
6184 * Makefile.in: Regenerate.
6185
2c13d98b
NC
61862002-05-17 Stuart Balfour <sbalfour@cisco.com>
6187
6188 * hash.c (bfd_hash_lookup): Remove computation of len from inside
6189 hash loop.
6190
629936c5
NC
61912002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
6192
6193 * config.bfd: Add targets for sh64-linux (little endian and
6194 big endian).
6195
e4cf60a8
NC
61962002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
6197
6198 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
6199 is located in the same section as the import table. Instead
6200 check, and if necessary load the section containing the thunk.
6201
d1e66cd4
NC
62022002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
6203
6204 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
6205 bfd_bread.
6206 (xcoff64_core_file_matches_executable_p): Replace bfd_read
6207 with bfd_bread.
d1e66cd4 6208
2d653fc7
AM
62092002-05-15 Alan Modra <amodra@bigpond.net.au>
6210
6211 * aix5ppc-core.c: Warning fixes.
6212 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
6213 * aout-target.h (MY_bfd_link_just_syms): Define.
6214 * aout-tic30.c (MY_bfd_link_just_syms): Define.
6215 * bfd.c (bfd_link_just_syms): Define.
6216 * binary.c (binary_bfd_link_just_syms): Define.
6217 * bout.c (b_out_bfd_link_just_syms): Define.
6218 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
6219 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6220 * coffcode.h (coff_bfd_link_just_syms): Define.
6221 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
6222 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
6223 (_bfd_elf_link_just_syms): Declare.
6224 * elf.c (_bfd_elf_link_just_syms): New function.
6225 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
6226 sections haven't already been discarded by the linker.
6227 * elflink.h (elf_link_add_object_symbols): Likewise for stab
6228 sections and SEC_MERGE sections.
6229 (elf_bfd_discard_info): Similarly here.
6230 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
6231 * i386msdos.c (msdos_bfd_link_just_syms): Define.
6232 * i386os9k.c (os9k_bfd_link_just_syms): Define.
6233 * ieee.c (ieee_bfd_link_just_syms): Define.
6234 * ihex.c (ihex_bfd_link_just_syms): Define.
6235 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
6236 (_bfd_generic_link_just_syms): Declare.
6237 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
6238 * linker.c (_bfd_generic_link_just_syms): New function.
6239 * mmo.c (mmo_bfd_link_just_syms): Define.
6240 * nlm-target.h (nlm_bfd_link_just_syms): Define.
6241 * oasys.c (oasys_bfd_link_just_syms): Define.
6242 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
6243 * som.c (som_bfd_link_just_syms): Define.
6244 * srec.c (srec_bfd_link_just_syms): Define.
6245 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
6246 (BFD_JUMP_TABLE_LINK): And here.
6247 * tekhex.c (tekhex_bfd_link_just_syms): Define.
6248 * versados.c (versados_bfd_link_just_syms): Define.
6249 * vms.c (vms_bfd_link_just_syms): Define.
6250 * libbfd.h: Regenerate.
6251 * bfd-in2.h: Regenerate.
6252
cb7394f2
TS
62532002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6254
6255 * elf32-mips.c: Remove superfluous definitions copied from
6256 elfxx-mips.c.
6257 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
6258 SGIish vectors to check the special case.
6259 (mips_elf_hi16_reloc): Fix comment.
6260 (mips_elf_got16_reloc): Likewise.
6261 (_bfd_mips_elf32_gprel16_reloc): Likewise.
6262 (elf_reloc_map): Code cleanup.
6263 (mips_reloc_map): Add comment.
6264 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
6265 (mips_elf32_rtype_to_howto): Likewise.
6266 (mips_elf32_discard_info): Likewise.
6267 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
6268 lead to IRIX compatibility now.
6269
8dc1a139
TS
62702002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6271
6272 * elfxx-mips.c: Call it IRIX, not Irix in comments.
6273
2051e1b5
JT
62742002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
6275
6276 * config.bfd (shle-*-netbsdelf*): Add target which includes
6277 sh64 support.
6278
83954261
AM
62792002-05-13 David Edelsohn <edelsohn@gnu.org>
6280
6281 * configure.in: Revert 2002-04-07. Instead, auto-configure
6282 HAVE_ST_C_IMPL.
6283 * configure: Regenerate.
6284 * config.in: Regenerate.
6285 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
6286 or AIX_5_CORE.
6287
a9bf1154
NC
62882002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
6289
6290 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
6291 corefiles as well.2
6292 * configure: Regenerate.
6293
3129eb7a
AM
62942002-05-13 Alan Modra <amodra@bigpond.net.au>
6295
6296 * Makefile.am (install-data-local): Install headers to
6297 $(exec_prefix)/include.
6298 * Makefile.in: Regenerate.
6299
a9a32010
DJ
63002002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
6301 Daniel Jacobowitz <drow@mvista.com>
6302
6303 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
6304 map BFD_RELOC_RVA.
6305
63062002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
6307
6308 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
6309 hppa*-*-openbsd*): New targets.
6310 * configure.in (alpha*-*-openbsd*): Set COREFILE.
6311 * configure: Regenerate.
6312
f1f0d9ab
TR
63132002-05-10 Tom Rix <trix@redhat.com>
6314
ea1e4b0d 6315 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
6316 xcoff64_ppc_relocate_section.
6317 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
6318 * libxcoff.h: Common xcoff_reloc_type function declaration.
6319
c432ba1a
AM
63202002-05-10 Alan Modra <amodra@bigpond.net.au>
6321
16a10388 6322 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 6323 added in 2002-05-09 commit.
16a10388 6324
c432ba1a
AM
6325 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
6326 don't look for stubs on all undefined syms.
6327
4a335f3d
AM
63282002-05-09 Alan Modra <amodra@bigpond.net.au>
6329
8fc39d5d
AM
6330 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
6331 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
6332 pcrel_offset.
6333
4a335f3d
AM
6334 * elf32-i386.c (elf_howto_table): Comments.
6335 (elf_i386_relocate_section): Handle more relocs for relocatable
6336 linking and against SEC_MERGE sections.
6337
41fcb14e
AM
63382002-05-08 Alan Modra <amodra@bigpond.net.au>
6339
6340 * elf32-ppc.c (ppc_elf_create_got): New function.
6341 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 6342 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
6343 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
6344 _bfd_elf_create_got_section.
6345
b491616a
AM
63462002-05-07 Alan Modra <amodra@bigpond.net.au>
6347
6348 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
6349 * elfxx-target.h (elf_backend_rela_normal): Define.
6350 (elfNN_bed): Init rela_normal.
6351 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
6352 for section symbols here if rela_normal. Simplify abs section test.
6353 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
6354 return immediately. Remove code handling relocatable linking.
6355 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
6356 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
6357 * elf32-i370.c (i370_elf_relocate_section): Likewise.
6358 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
6359 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
6360 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
6361 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
6362 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
6363 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6364 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
6365 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6366 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6367 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6368 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
6369 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
6370 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
6371 * elf-m10200.c (elf_backend_rela_normal): Define.
6372 * elf-m10300.c (elf_backend_rela_normal): Define.
6373 * elf32-fr30.c (elf_backend_rela_normal): Define.
6374 * elf32-i370.c (elf_backend_rela_normal): Define.
6375 * elf32-i860.c (elf_backend_rela_normal): Define.
6376 * elf32-m68k.c (elf_backend_rela_normal): Define.
6377 * elf32-mcore.c (elf_backend_rela_normal): Define.
6378 * elf32-openrisc.c (elf_backend_rela_normal): Define.
6379 * elf32-ppc.c (elf_backend_rela_normal): Define.
6380 * elf32-s390.c (elf_backend_rela_normal): Define.
6381 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
6382 * elf64-ppc.c (elf_backend_rela_normal): Define.
6383 * elf64-s390.c (elf_backend_rela_normal): Define.
6384 * elf64-x86-64.c (elf_backend_rela_normal): Define.
6385 * elfxx-ia64.c (elf_backend_rela_normal): Define.
6386 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
6387 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
6388
df212a7e
NC
63892002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
6390
6391 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
6392 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
6393
3decf53c
AM
63942002-05-06 Alan Modra <amodra@bigpond.net.au>
6395
6396 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
6397 when not relocatable. Fix reloc_emitter call for K&R.
6398
f46c2da6
AM
63992002-05-04 Alan Modra <amodra@bigpond.net.au>
6400
6401 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
6402 reloading local sym addend mistakenly removed in 2002-05-01 change.
6403
6404 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
6405 (read_abbrevs): Change "offset" param to bfd_vma.
6406 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
6407 Change "abbrev_offset" to bfd_vma.
6408 (read_indirect_string): Use correct conversion chars in error
6409 message format string, cast bfd_vma's to unsigned long.
6410 (read_abbrevs): Likewise.
6411 (read_attribute_value): Likewise.
6412 (decode_line_info): Likewise.
6413 (scan_unit_for_functions): Likewise.
6414 (parse_comp_unit): Likewise.
6415
59862849
TR
64162002-05-04 Tom Rix <trix@redhat.com>
6417
6418 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
6419 (coff_swap_reloc_out): Same.
6420 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
6421 (xcoff_swap_reloc_out): Same.
6422 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
6423 case some 16 bit relocs. Add reloc value to output.
6424 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 6425 R_RBR. Improve names.
59862849
TR
6426 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
6427 (bfd_xcoff_backend_data): Update with new reloc swap names.
6428 (bfd_pmac_xcoff_backend_data) : Same.
6429 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
6430 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 6431 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 6432 R_POS. Add reloc value to output.
ea1e4b0d
AM
6433 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
6434 bit R_RBR. Improve names, masks.
59862849
TR
6435 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
6436 (bfd_xcoff_backend_data): Update with new reloc swap names.
6437 (bfd_xcoff_aix5_backend_data) : Same.
6438
b4655ea9
AM
64392002-05-04 Alan Modra <amodra@bigpond.net.au>
6440
6441 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
6442 bfd_count top_index, input_list, all_local_syms.
6443 (elf32_hppa_setup_section_lists): New function, split from
6444 elf32_hppa_size_stubs.
6445 (elf32_hppa_next_input_section): Likewise.
6446 (group_sections): Likewise.
6447 (get_local_syms): Likewise.
6448 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
6449 stubs on undefined syms too.
6450 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 6451 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
6452 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
6453 (elf32_hppa_next_input_section): Declare.
6454
301e3139
AM
64552002-05-04 Bob Byrnes <byrnes@curl.com>
6456
6457 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
6458 _bfd_new_bfd.
6459
7c5fcef7
L
64602002-05-03 H.J. Lu (hjl@gnu.org)
6461
6462 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
6463 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
6464 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
6465 to hide a global symbol.
6466 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 6467 forced_local to true.
7c5fcef7 6468
84de6048
RH
64692002-05-02 Richard Henderson <rth@redhat.com>
6470
6471 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
6472 vs SHN_UNDEF to zero.
6473
805fc799
AM
64742002-05-02 Alan Modra <amodra@bigpond.net.au>
6475
c061c2d8
AM
6476 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
6477 16 bit reloc.
6478 <R_PPC64_SECTOFF_DS>: Likewise.
6479 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6480 SECTOFF reloc.
6481 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
6482 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
6483 SECTOFF reloc.
6484
805fc799
AM
6485 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
6486 (ppc64_elf_ha_reloc): New function.
6487 (ppc64_elf_brtaken_reloc): New function.
6488 (ppc64_elf_sectoff_reloc): New function.
6489 (ppc64_elf_sectoff_ha_reloc): New function.
6490 (ppc64_elf_toc_reloc): New function.
6491 (ppc64_elf_toc_ha_reloc): New function.
6492 (ppc64_elf_toc64_reloc): New function.
6493 (ppc64_elf_unhandled_reloc): New function.
6494 (ppc64_elf_howto_raw): Use the above.
6495 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
6496 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
6497 <R_PPC64_SECTOFF_DS>: Likewise.
6498 (IS_ABSOLUTE_RELOC): Update.
6499 (struct ppc_link_hash_table): Add have_undefweak.
6500 (ppc64_elf_link_hash_table_create): Init.
6501 (func_desc_adjust): Set have_undefweak.
6502 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
6503 add the .sfpr blr when have_undefweak.
6504 (ppc64_elf_setup_section_lists): Check hash table flavour.
6505 (ppc64_elf_next_input_section): Move output_section->owner test to
6506 ppc64elf.em.
6507 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
6508 and relocatable test. Return TOCstart and don't set elf_gp.
6509 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
6510 offset calculation. Add assert on weak sym branch tweaks.
6511 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
6512 (ppc64_elf_toc): Declare.
6513 (ppc64_elf_next_input_section): Update.
ea1e4b0d 6514
818c39a3
AM
65152002-05-01 Alan Modra <amodra@bigpond.net.au>
6516
6517 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
6518 file_name.
6519
721956f4
AM
65202002-05-01 Alan Modra <amodra@bigpond.net.au>
6521
6522 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
6523 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
6524 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
6525 call branches. Correct undefined weak destination.
6526 (ppc64_elf_func_desc_adjust): Always create at least one blr in
6527 .sfpr, and correct case where either only savef* or restf* is
6528 needed.
6529
6530 Long branch stubs, multiple stub sections.
6531 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
6532 (ppc64_elf_next_input_section): Declare.
6533 * elf64-ppc.c: Move linker-only prototypes.
6534 (STUB_SUFFIX): Define.
6535 (enum ppc_stub_type): New.
6536 (struct ppc_stub_hash_entry): New.
6537 (struct ppc_branch_hash_entry): New.
6538 (struct ppc_link_hash_entry): Add stub_cache, oh.
6539 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
6540 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
6541 Rename plt_overflow to stub_error.
6542 (ppc_stub_hash_lookup): Define.
6543 (ppc_branch_hash_lookup): Define.
6544 (stub_hash_newfunc): New function.
6545 (branch_hash_newfunc): New function.
6546 (link_hash_newfunc): Init new fields.
6547 (ppc64_elf_link_hash_table_create): Likewise.
6548 (ppc64_elf_link_hash_table_free): New function.
6549 (ppc_stub_name): New function.
6550 (ppc_get_stub_entry): New function.
6551 (ppc_add_stub): New function.
6552 (create_linkage_sections): Use bfd_make_section_anyway. Create
6553 .branch_lt and .rela.branch_lt sections. Don't create .stub.
6554 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
6555 and set up for plt call stubs. Link func and func desc syms.
6556 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
6557 (func_desc_adjust): Avoid hash lookup when func desc sym available
6558 via shortcut, and set links when processing.
6559 (ppc64_elf_hide_symbol): Likewise.
6560 (allocate_dynrelocs): Don't allocate stub section here.
6561 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
6562 Remove sstub code.
6563 (ppc_type_of_stub): New function.
6564 (build_one_stub): Delete.
6565 (ppc_build_one_stub): New function.
6566 (ppc_size_one_stub): New function.
6567 (ppc64_elf_setup_section_lists): New function.
6568 (ppc64_elf_next_input_section): New function.
6569 (group_sections): New function.
6570 (get_local_syms): New function.
6571 (ppc64_elf_size_stubs): Rewrite.
6572 (ppc64_elf_build_stubs): Rewrite.
6573 (ppc64_elf_relocate_section): Look up stub entry for REL24
6574 relocs. Don't propagate REL14* to dynamic objects. Look for long
6575 branch stubs if REL14* or REL24 relocs won't reach.
6576 (bfd_elf64_bfd_link_hash_table_free): Define.
6577
09c2219b
MM
65782002-04-30 Mark Mitchell <mark@codesourcery.com>
6579
c5cd6d62 6580 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 6581
07b678c0
TR
65822002-04-30 Tom Rix <trix@redhat.com>
6583
6584 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
6585 symbol names into the hash table.
6586
dbe341c6
TR
65872002-04-28 Tom Rix <trix@redhat.com>
6588
6589 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 6590 calulating relocations.
dbe341c6 6591 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
6592 (xcoff_ppc_relocate_section): Use relocation and complain function
6593 tables.
6594 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
6595 (xcoff_complain_overflow_signed_func): Same.
6596 (xcoff_complain_overflow_bitfield_func): Same.
6597 (xcoff_complain_overflow_dont_func): Same.
6598 (xcoff_reloc_type_crel): New recot function.
6599 (xcoff_reloc_type_br): Same.
6600 (xcoff_reloc_type_ba): Same.
6601 (xcoff_reloc_type_toc): Same.
6602 (xcoff_reloc_type_rel): Same.
6603 (xcoff_reloc_type_neg): Same.
6604 (xcoff_reloc_type_pos): Same.
6605 (xcoff_reloc_type_fail): Same.
6606 (xcoff_reloc_type_noop): Same.
6607 * libxcoff.h : Declare common parts for xcoff64.
6608 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 6609 and complain function tables.
dbe341c6 6610
985142a4
AM
66112002-04-28 Alan Modra <amodra@bigpond.net.au>
6612
6613 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
6614 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
6615
eba91044
AM
66162002-04-26 Alan Modra <amodra@bigpond.net.au>
6617
e54fdaa5
AM
6618 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
6619 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
6620
a50c1845
AM
6621 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
6622 same as the output before calling elf_link_input_bfd.
6623
eba91044
AM
6624 * coffcode.h (coff_compute_section_file_positions): Set
6625 section_tail after shuffling section list.
6626
3c25c5f6
NC
66272002-04-24 Christian Groessler <chris@groessler.org>
6628
6629 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
6630 addresses are 23bit with a special layout, not plain 32bit
6631 values. Prevent relocation of immediate values.
6632
40d32fc6
CD
66332002-04-24 Chris G. Demetriou <cgd@broadcom.com>
6634
6635 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
6636 MIPS-16 ASE flags are set, print something to indicate that.
6637
067fa4a6
AM
66382002-04-23 Alan Modra <amodra@bigpond.net.au>
6639
6640 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
6641 under which a plt call stub is used.
6642 (final_link_relocate): Similarly.
6643 (allocate_plt_static): Clear h-plabel except when plt entry is
6644 exclusively used for a plabel.
6645 (allocate_dynrelocs): Use the above to simplify plt sizing.
6646 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
6647 (elf32_hppa_link_hash_table_create): Init.
6648 (BL22_RP): Define.
6649 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
6650 (elf32_hppa_check_relocs): Set has_22bit_branch.
6651
6652 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
6653 (final_link_relocate): Likewise.
6654
af40ce3c
JJ
66552002-04-22 Jakub Jelinek <jakub@redhat.com>
6656
6657 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
6658 search table if some FDE is DW_EH_PE_aligned encoded either.
6659 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
6660
09ae86c2
JJ
66612002-04-22 Richard Smith <richard@ex-parrot.com>
6662 Jakub Jelinek <jakub@redhat.com>
6663
6664 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
6665 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
6666 encoded personality.
6667 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
6668 for CIE/FDE removal.
6669
deeb2cd7
TR
66702002-04-20 Tom Rix <trix@redhat.com>
6671
6672 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
6673
99dc0092
AM
66742002-04-20 Alan Modra <amodra@bigpond.net.au>
6675
aa3d5824
AM
6676 * archures.c (bfd_lookup_arch): Move the list order comment..
6677 (struct bfd_arch_info): ..to where it belongs.
6678 * bfd-in2.h: Regenerate.
6679
99dc0092
AM
6680 * archures.c (bfd_lookup_arch): Add comment on list order.
6681 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
6682 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
6683 is always at head of list.
6684
7831a775
NC
66852002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
6686
6687 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
6688 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
6689 definition of these functions for ARM_WINCE builds as they are
6690 not used.
ea1e4b0d 6691 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
6692 for ARM_WINCE builds.
6693
66942002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
6695
ea1e4b0d 6696 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
6697
66982002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
6699
6700 * cpu-sh.c (scan_mach): Delete.
6701 (arch_info_struct): Replace scan_mach with bfd_default_scan.
6702 (bfd_sh_arch): Likewise.
6703
3d8dbe36
NC
67042002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
6705
6706 * ihex.c (ihex_write_object_contents): Fix check for records
6707 crossing 64K boundaries.
6708
4ab82700
AM
67092002-04-16 Alan Modra <amodra@bigpond.net.au>
6710
6711 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
6712 type rather than just assuming entries are ELF.
6713 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
6714 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
6715 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
6716 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
6717 rather than elf_link_hash_entry.
6718
036fe0fe
RH
67192002-04-15 Richard Henderson <rth@redhat.com>
6720
6721 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
6722 n32 binaries.
6723
c4f3d130
NC
67242002-04-15 Michael Snyder <msnyder@redhat.com>
6725
6726 * opncls.c (bfd_close): Write contents if writeable.
6727 Minor formatting tidy-ups.
6728
4ab82700 67292002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
6730
6731 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
6732
0c04d169
MS
67332002-04-12 Michael Snyder <msnyder@redhat.com>
6734
6735 * bfd-in.h (bfd_get_section_lma): New access macro.
6736 Minor white-space fix-up.
6737
89d4966f
AM
67382002-04-12 Alan Modra <amodra@bigpond.net.au>
6739
6740 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
6741 header pad.
6742
8d0da3c2
DD
67432002-04-09 DJ Delorie <dj@redhat.com>
6744
6745 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
6746
05793179
NC
67472002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
6748
6749 * coffcode.h (coff_read_word): New.
6750 (coff_compute_checksum): New.
6751 (coff_apply_checksum): New.
6752 (coff_write_object_contents): Call coff_apply_checksum () to
6753 apply checksum to PE image.
6754
46fe4e66
AM
67552002-04-08 Randolph Chung <tausq@debian.org>
6756
6757 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
6758 (elf32_hppa_final_link): Split out sorting logic to..
6759 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
6760 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
6761
3b5b409c
AC
67622002-04-07 Andrew Cagney <ac131313@redhat.com>
6763
6764 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
6765 pattern.
6766 * configure: Re-generate.
6767
ac7b6ceb
AC
67682002-04-07 Andrew Cagney <ac131313@redhat.com>
6769
6770 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
6771 is greater or equal to 4.3.3.
6772 * configure: Regenerate.
6773 Fix PR gdb/344.
6774
44aa49bb
HPN
67752002-04-05 Hans-Peter Nilsson <hp@axis.com>
6776
6777 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
6778 R_CRIS_32_PCREL>: Fix typo in name.
6779 (cris_elf_check_relocs): Always create .rela.got here when
6780 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
6781 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
6782 assume it's created.
6783
e2d34d7d
DJ
67842002-04-04 Daniel Jacobowitz <drow@mvista.com>
6785
6786 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
6787 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
6788 define.
6789 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
6790 * bfd.c (bfd_link_hash_table_free): Define.
6791 * binary.c (binary_bfd_link_hash_table_free): Define.
6792 * bout.c (b_out_bfd_link_hash_table_free): Define.
6793 * coff-rs6000.c (rs6000coff_vec): Include
6794 _bfd_generic_link_hash_table_free.
6795 (pmac_xcoff_vec): Likewise.
6796 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6797 (aix5coff64_vec): Likewise.
6798 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
6799 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
6800 (bfd_elf32_bfd_link_hash_table_free): Define.
6801 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
6802 (bfd_elf32_bfd_link_hash_table_free): Define.
6803 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
6804 define.
6805 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
6806 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
6807 * ieee.c (ieee_bfd_link_hash_table_free): Define.
6808 * ihex.c (ihex_bfd_link_hash_table_free): Define.
6809 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
6810 (_bfd_generic_link_hash_table_free): Add prototype.
6811 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
6812 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
6813 * linker.c (_bfd_generic_link_hash_table_free): New function.
6814 * mmo.c (mmo_bfd_link_hash_table_free): Define.
6815 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
6816 * oasys.c (oasys_bfd_link_hash_table_free): Define.
6817 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
6818 * som.c (som_bfd_link_hash_table_free): Define.
6819 * srec.c (srec_bfd_link_hash_table_free): Define.
6820 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
6821 * versados.c (versados_bfd_link_hash_table_free): Define.
6822 * vms.c (vms_bfd_link_hash_table_free): New function.
6823 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
6824
6825 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
6826 instead of bfd_alloc.
6827 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
6828 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
6829 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
6830 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
6831 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
6832 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
6833 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
6834 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
6835 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
6836 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
6837 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
6838 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
6839 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
6840 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
6841 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
6842 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
6843 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
6844 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
6845 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
6846 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
6847 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
6848 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
6849 * m68klinux.c (linux_link_hash_table_create): Likewise.
6850 * sparclinux.c (linux_link_hash_table_create): Likewise.
6851 * sunos.c (sunos_link_hash_table_create): Likewise.
6852 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
6853
6854 * targets.c: Add _bfd_link_hash_table_free to xvec.
6855
6856 * bfd-in2.h: Regenerate.
6857 * libbfd.h: Regenerate.
6858 * libcoff.h: Regenerate.
6859
830629ab
AM
68602002-04-04 Alan Modra <amodra@bigpond.net.au>
6861
6862 * dep-in.sed: Cope with absolute paths.
6863 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
6864 Run "make dep-am".
6865 * Makefile.in: Regenerate.
6866 * coff-arm.c: Fix copyright date.
6867 * cpu-h8300.c: Likewise.
6868 * cpu-i370.c: Likewise.
6869 * cpu-s390.c: Likewise.
6870 * cpu-mips.c: Likewise.
6871 * po/SRC-POTFILES.in: Regenerate.
6872
c6e90b02
TS
68732002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6874
6875 * Makefile.am: Add elfxx-mips.c to the known backends.
6876 (elf32-mips.lo): remove dependency to coff/external.h.
6877 * Makefile.in: Regenerate.
6878 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
6879 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
6880 accordingly.
6881 * configure: Regenerate.
6882 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
6883 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
6884 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
6885 MIPS specific backend functions.
6886 * elf32-mips.c: Moved most code to elfxx-mips.c.
6887 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
6888 static.
6889 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
6890 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
6891 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
6892 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
6893 interface to allow selection of the right REL or RELA howto table.
6894 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
6895 static. Let it refuse n32 objects.
6896 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
6897 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
6898 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
6899 (elf32_mips_ignore_discarded_relocs): Rename from
6900 _bfd_elf32_mips_ignore_discarded_relocs.
6901 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
6902 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
6903 (elf_mips_howto_table_rela): Remove.
6904 * elf64-mips.c: Moved most code to elfxx-mips.c.
6905 (bfd_elf64_bfd_reloc_type_lookup): Make static.
6906 (mips_elf64_rtype_to_howto): New function.
6907 (mips_elf64_object_p): Likewise.
6908 (elf64_mips_irix_compat): Likewise.
6909 * elfxx-mips.c: New file containing common code merged together from
6910 elf32-mips.c and elf64-mips.c.
6911 * elfxx-mips.h: New file containing MIPS specific prototypes from
6912 elf-bfd.h.
6913 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
6914 elf_backend_mips_rtype_to_howto.
6915
d8dce692
AM
69162002-04-04 Alan Modra <amodra@bigpond.net.au>
6917
6918 * srec.c (MAXCHUNK, Chunk): Revise comments.
6919 (srec_write_record): Correct buffer size.
6920 (srec_write_header): Do without intermediate buffer.
6921 (srec_write_section): Validate Chunk.
6922 (srec_write_terminator): Pass NULL instead of dummy buffer.
6923 (srec_write_symbols): Pass file and symbol names directly to
6924 bfd_bwrite so sprintf won't overflow buffer.
6925
b88a866a
JJ
69262002-04-03 Jakub Jelinek <jakub@redhat.com>
6927
6928 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
6929 PC relative relocs against hidden symbols.
6930 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6931
d7866f04
AM
69322002-04-03 Alan Modra <amodra@bigpond.net.au>
6933
6934 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
6935 LMAs, loop over segments until p_vaddr and p_memsz specify an
6936 extent enclosing the section.
6937
9e81ee67
NC
69382002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
6939
6940 * ihex.c (ihex_write_object_contents): Do not allow records to
6941 cross a 64K boundary - wrap if necessary.
6942
d2b64500
JT
69432002-04-01 Nathan Williams <nathanw@wasabisystems.com>
6944
6945 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
6946 which caused the returned LWP ID to always be 0.
6947
e36f7d53
RH
69482002-04-01 Richard Henderson <rth@redhat.com>
6949
6950 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6951 (elf32_sparc_relocate_section): Use it to figure out when to
6952 initialize .got entries.
6953 * elf64-sparc.c: Similarly.
6954
e92d460e
AM
69552002-03-28 Alan Modra <amodra@bigpond.net.au>
6956
6957 * linker.c (link_action): Ignore duplicate warning syms.
6958 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
6959 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
6960 (elf_adjust_dynamic_symbol): Likewise.
6961 (elf_export_symbol): Likewise.
6962 (elf_link_find_version_dependencies): Likewise.
6963 (elf_link_assign_sym_version): Likewise.
6964 (elf_link_sec_merge_syms): Likewise.
6965 (elf_link_output_extsym): Likewise.
6966 (elf_gc_sweep_symbol): Likewise.
6967 (elf_gc_propagate_vtable_entries_used): Likewise.
6968 (elf_gc_smash_unused_vtentry_relocs): Likewise.
6969 (elf_gc_allocate_got_offsets): Likewise.
6970 (elf_collect_hash_codes): Likewise.
6971 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
6972 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
6973 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
6974 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
6975 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
6976 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
6977 (elf_cris_discard_excess_dso_dynamics): Likewise.
6978 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
6979 (mark_PIC_calls): Likewise.
6980 (allocate_plt_static): Likewise.
6981 (allocate_dynrelocs): Likewise.
6982 (readonly_dynrelocs): Likewise.
6983 * elf32-i386.c (allocate_dynrelocs): Likewise.
6984 (readonly_dynrelocs): Likewise.
6985 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
6986 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
6987 * elf32-mips.c (mips_elf_output_extsym): Likewise.
6988 (mips_elf_sort_hash_table_f): Likewise.
6989 (mips_elf_check_mips16_stubs): Likewise.
6990 * elf32-s390.c (allocate_dynrelocs): Likewise.
6991 (readonly_dynrelocs): Likewise.
6992 * elf32-sh.c (sh_elf_discard_copies): Likewise.
6993 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
6994 (xstormy16_relax_plt_realloc): Likewise.
6995 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
6996 (elf64_alpha_output_extsym): Likewise.
6997 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
6998 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
6999 (mips_elf64_check_mips16_stubs): Likewise.
7000 (mips_elf64_output_extsym): Likewise.
7001 * elf64-ppc.c (func_desc_adjust): Likewise.
7002 (allocate_dynrelocs): Likewise.
7003 (readonly_dynrelocs): Likewise.
7004 * elf64-s390.c (allocate_dynrelocs): Likewise.
7005 (readonly_dynrelocs): Likewise.
7006 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
7007 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
7008 (readonly_dynrelocs): Likewise.
7009 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
7010 * aoutx.h (aout_link_write_other_symbol): Likewise.
7011 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
7012 (_bfd_coff_write_global_sym): Likewise.
7013 * i386linux.c (linux_tally_symbols): Likewise.
7014 * m68klinux.c (linux_tally_symbols): Likewise.
7015 * sparclinux.c (linux_tally_symbols): Likewise.
7016 * pdp11.c (aout_link_write_other_symbol): Likewise.
7017 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
7018 * xcofflink.c (xcoff_build_ldsyms): Likewise.
7019 (xcoff_write_global_symbol): Likewise.
7020
7021 * cofflink.c (_bfd_coff_final_link): Formatting.
7022 * cpu-mips.c (mips_compatible): Make static, prototype.
7023 * elf32-i386.c (elf_i386_check_relocs): Formatting.
7024 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
7025 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
7026 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
7027 (mips_elf64_final_link): Likewise.
7028 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
7029 prototype.
7030
2106126f
NC
70312002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
7032
7033 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
7034 (SWAP_OUT_RELOC_OFFSET): Define.
7035
b99d1833
AM
70362002-03-27 Gregory Steuck <greg@nest.cx>
7037
7038 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
7039 terminating NULL if empty symbol table.
7040 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
7041
ad43ed4c
L
70422002-03-26 H.J. Lu (hjl@gnu.org)
7043
7044 * elflink.h (elf_link_input_bfd): Revert the last change since
7045 the gcc exception handling isn't fixed yet.
7046
3851fca4
L
70472002-03-26 H.J. Lu (hjl@gnu.org)
7048
7049 * elflink.h (elf_link_input_bfd): Complain about relocations
7050 against local symbols in discarded sections.
7051
b91afed7
AM
70522002-03-26 Alan Modra <amodra@bigpond.net.au>
7053
7054 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
7055
dba143ef
AM
70562002-03-23 Alan Modra <amodra@bigpond.net.au>
7057
7058 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
7059 section file offset for !SEC_LOAD sections.
7060
ee29b9fb
RE
70612002-03-21 Richard Earnshaw <rearnsha@arm.com>
7062
830629ab
AM
7063 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
7064 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 7065
54327882
AM
70662002-03-21 Alan Modra <amodra@bigpond.net.au>
7067
7068 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
7069 Whitespace changes.
7070 * archive.c: Update copyright date.
7071 * bfd-in2.h: Regenerate.
7072 * libbfd.h: Regenerate.
7073 * Makefile.am: Run "make dep-am"
7074 * Makefile.in: Regenerate.
7075 * po/SRC-POTFILES.in: Regenerate.
7076
1ee24f27
DJ
70772002-03-20 Daniel Jacobowitz <drow@mvista.com>
7078
7079 * dwarf2.c (struct funcinfo): Move up.
7080 (lookup_address_in_function_table): New argument function_ptr.
7081 Set it.
7082 (lookup_address_in_line_table): New argument function. If function
7083 is non-NULL, use it to handle ``addr'' before the first line note of
7084 the function.
7085 (comp_unit_find_nearest_line): Update and swap calls to
7086 lookup_address_in_function_table and lookup_address_in_line_table.
7087 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
7088 N_SLINE encountered if we see an N_FUN before any N_SLINE.
7089
51b9608c
TR
70902002-03-20 Tom Rix <trix@redhat.com>
7091
ea1e4b0d 7092 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 7093 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
ea1e4b0d 7094 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 7095
789c90aa
TR
70962002-03-19 Tom Rix <trix@redhat.com>
7097
ea1e4b0d 7098 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
7099 dynamic objects in archives.
7100
1da54d81
HPN
71012002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
7102
7103 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
7104 STT_NOTYPE symbols to STT_OBJECT.
7105
7831a775 71062002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
7107
7108 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
7109
eb1e0e80
NC
71102002-03-18 Tom Rix <trix@redhat.com>
7111
7112 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
7113 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
7114 * coff-rs6000 (do_pad) : New function for archive padding.
7115 (do_copy) : New function for object file copying in archives.
7116 (do_shared_object_padding) : New function for padding shared
7117 objects to their text section alignment in archives.
7118 (bfd_xcoff_ar_achive_set_magic) : Stub.
7119 (xcoff_write_armap_big) : Use do_copy and do_pad.
7120 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
7121 do_copy and do_pad.
7122 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 7123 bfd_xcoff_magic_number.
eb1e0e80
NC
7124 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
7125 fop.
7126 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
7127 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
7128 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
7129 * rs6000-core.c : Update copyright date.
ea1e4b0d 7130 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
7131 csectpp.
7132 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
7133 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
7134 (coff_set_flags) : Use bfd_xcoff_magic_number.
7135 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
7136 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
7137 * Makefile.am : Same.
7138 * config.bfd : Same.
7139 * targets.c : Same.
7140 * configure : Regnerate.
7141 * Makefile.in : Same.
7142 * bfd-in2.h : Same.
7143
a1c259a1
NC
71442002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
7145
7146 * po/fr.po: Updated version.
7147
4dae1ae7
AM
71482002-03-18 Alan Modra <amodra@bigpond.net.au>
7149
7150 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
7151 * libbfd.h: Regenerate.
7152 * archive.c (coff_write_armap): Pass on failures from
7153 bfd_write_bigendian_4byte_int.
7154
36b4f6e7
L
71552002-03-14 H.J. Lu <hjl@gnu.org>
7156
7157 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
7158 error to bfd_error_nonrepresentable_section for reinit_array
7159 section in DSO.
7160
a1aefc76
NC
71612002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
7162
a181be0a
NC
7163 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
7164 OR it in rather than replacing previously selected flags.
7165
a1aefc76
NC
7166 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
7167 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
7168
c119f9b8
AM
71692002-03-14 Alan Modra <amodra@bigpond.net.au>
7170
7171 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
7172 (N): Use the above.
7173 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
7174 ensure reloc size matches before calling elf_link_input_bfd.
7175 Add an assert to check reloc size when counting output relocs.
7176
c295a511
NC
71772002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
7178
7179 * mmo.c (mmo_get_loc): Return NULL rather than false.
7180
9ce88e60
NC
71812002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
7182
7183 * po/fr.po: Updated version.
7184
4ddafab0
AM
71852002-03-13 Alan Modra <amodra@bigpond.net.au>
7186
b74fa2cd
AM
7187 * archures.c (bfd_default_compatible): Test bits_per_word.
7188 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
7189 bfd_default_compatible.
7190 * cpu-i370.c (i370_compatible): Likewise.
7191 * cpu-sparc.c (sparc_compatible): Likewise.
7192 * cpu-h8300.c (compatible): Test in->arch == out->arch.
7193
40b829d4
AM
7194 * elflink.h: Formatting fixes.
7195 (elf_link_output_extsym): Merge undefined and undef weak cases.
7196
4ddafab0
AM
7197 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
7198 when word size of input matches output word size.
7199
dd53c801
AJ
72002002-03-12 Andreas Jaeger <aj@suse.de>
7201
7202 * cpu-i386.c (i386_compatible): New. Use it instead of
7203 bfd_default_compatible.
7204
aa066ac8
L
72052002-03-07 H.J. Lu (hjl@gnu.org)
7206
7207 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
7208 as the type for bfd_reloc_val.
7209
1bf42538
JL
72102002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
7211
7212 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
7213 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
7214 (elf_hppa_final_link_relocate): Correct relocations for indirect
7215 references to local data through the DLT. Fix .opd creation for
7216 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
7217 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
7218 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
7219 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7220 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
7221 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
7222 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
7223
86eaf01e
JJ
72242002-03-05 Jakub Jelinek <jakub@redhat.com>
7225
7226 * merge.c (_bfd_merge_sections): Don't segfault if there
7227 is nothing to merge due to GC.
7228
c44233aa
AM
72292002-03-05 Alan Modra <amodra@bigpond.net.au>
7230
039cc25f
AM
7231 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
7232 symbols that have been forced local.
7233
c44233aa
AM
7234 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
7235 to output forced local syms for non-shared link.
7236 (elf_link_output_extsym): Tweak condition for calling backend
7237 adjust_dynamic_symbol so that previous behaviour is kept.
7238 Whitespace changes throughout file.
7239
25e27870
L
72402002-03-04 H.J. Lu <hjl@gnu.org>
7241
7242 * elf.c (bfd_section_from_shdr): Handle special sections,
7243 .init_array, .fini_array and .preinit_array.
7244 (elf_fake_sections): Likewise.
7245
7246 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
7247 DT entry only if the section is in output for .init_array,
7248 .fini_array and .preinit_array. Complain about .preinit_array
7249 section in DSO.
7250 (elf_bfd_final_link): Warn zero size for .init_array,
7251 .fini_array and .preinit_array sections.
7252
7253 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
7254 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
7255 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
7256 .preinit_array.
7257
bb2a49f2
AM
72582002-03-04 Alan Modra <amodra@bigpond.net.au>
7259
7260 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
7261 * configure: Regenerate.
7262
38487e5e
TR
72632002-03-02 Tom Rix <trix@redhat.com>
7264
c44233aa
AM
7265 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
7266 symbolic equiv.
38487e5e
TR
7267 * coff-rs6000.c (xcoff_howto_table): Same.
7268
30831527
RH
72692002-03-01 David Mosberger <davidm@hpl.hp.com>
7270
7271 * elflink.h (size_dynamic_sections): If section named
7272 ".preinit_array" exists, create DT_PREINIT_ARRAY and
7273 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
7274 ".init_array" and ".fini_array".
7275 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
7276 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
7277 DT_FINI_ARRAY.
7278
c8e5ddc8
AM
72792002-02-26 Andrew Macleod <amacleod@cygnus.com>
7280
7281 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
7282 dynsyms.
7283
96e0dda4
AM
72842002-02-25 Alan Modra <amodra@bigpond.net.au>
7285
1c5b6bf8
AM
7286 * elf64-hppa.h: Update copyright date.
7287
96e0dda4
AM
7288 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
7289 (ppc64_elf_relocate_section): Don't generate power4 style branch
7290 hints for *_BRTAKEN and *_BRNTAKEN relocs.
7291
0fb19cbc
JJ
72922002-02-22 Jakub Jelinek <jakub@redhat.com>
7293
7294 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
7295 last patch.
7296 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7297
c434dee6
AJ
72982002-02-21 Andreas Jaeger <aj@suse.de>
7299
7300 * elf64-x86-64.c: Major rework that introduces all recent changes
7301 to the x86-64 backend. Get a closer match to elf32-i386.
7302 (struct elf64_x86_64_dyn_relocs): Rename from
7303 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
7304 all users.
7305 (struct elf64_x86_64_link_hash_table): Add short cuts to some
7306 sections.
7307 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
7308 remove casts, initialize new hash members.
7309 (create_got_section): New.
7310 (elf64_x86_64_create_dynamic_sections): New.
7311 (elf64_x86_64_copy_indirect_symbol): New.
7312 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
7313 relocs, .got or .relgot here but do it in allocate_dynrelocs.
7314 Reference count possible .plt and .got entries. Don't test input
7315 section SEC_READONLY here to try to avoid copy relocs, and keep
7316 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
7317 DF_TEXTREL here. Delay setting of variables until needed. Cache
7318 pointer to "sreloc" section in elf_section_data. Tweak condition
7319 under which .got created. Report files with bad relocation
7320 section names.
7321 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
7322 Reference count possible .plt entries. Don't deallocate .got and
7323 .relgot space here.
7324 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
7325 do copy reloc processing for weakdefs. Remove redundant casts and
7326 aborts. Delay setting of vars until needed. Move creation of
7327 dynamic symbols and allocation of .plt and .rela.plt to
7328 allocate_dynrelocs. Replace BFD_ASSERT with abort.
7329 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
7330 (allocate_dynrelocs): New.
7331 (readonly_dynrelocs): New.
7332 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
7333 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
7334 Zero out the dynamic allocated content space.
7335 (elf64_x86_64_discard_copies): Removed.
7336 (elf64_x86_64_relocate_section): Make use of dynamic section
7337 short-cuts. Localise vars, and delay setting. Better error
7338 reporting, replace BFD_ASSERT with abort. Check
7339 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
7340 regular object file and tread the weak definition as the normal
7341 one. Don't discard relocs for undefweak or undefined symbols and
7342 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
7343 relocs.
7344 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
7345 symbols that have been forced local. Use same test to decide if
7346 we can use a relative reloc for got as relocate_section. Expand
7347 SHN_UNDEF comment. Move expressions out of function calls.
7348 Replace BFD_ASSERT with abort.
7349 (bfd_elf64_bfd_final_link): Removed.
7350 (elf_backend_copy_indirect_symbol): Define.
7351
ff3a6ee3
TR
73522002-02-20 Tom Rix <trix@redhat.com>
7353
7354 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
7355 (_bfd_xcoff_reloc_type_lookup): Use it.
7356 * coff64-rs6000.c (xcoff64_howto_table): Same.
7357 (xcoff64_reloc_type_lookup): Same.
c434dee6 7358
a68d41fb
AM
73592002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
7360
7361 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
7362 little endian.
7363
befc3abb
MS
73642002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
7365
7366 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
7367 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
7368 * bfd-in2.h: Regenerate.
7369 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
7370 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
7371 with "s390:64-bit".
7372 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
7373 (elf_s390_reloc_type_lookup): Likewise.
7374 (elf_s390_check_relocs): Likewise.
7375 (elf_s390_gc_sweep_hook): Likewise.
7376 (elf_s390_relocate_section): Likewise.
7377 (elf_s390_object_p): Use renamed architecture define.
7378 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
7379
6eeeec9b
FCE
73802002-02-19 Frank Ch. Eigler <fche@redhat.com>
7381
7382 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
7383
0bb2d96a
JJ
73842002-02-19 Jakub Jelinek <jakub@redhat.com>
7385
7386 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
7387 absptr -> pcrel optimization for shared libs.
7388 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
7389 library cannot be converted to pcrel.
7390 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
7391 relative.
7392 * elf32-i386.c (elf_i386_relocate_section): If
7393 _bfd_elf_section_offset returned -2, skip, but make sure the
7394 relocation is installed.
7395 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
7396 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7397 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7398 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7399 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7400 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7401 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7402 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7403 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7404 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7405 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7406 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7407 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7408 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7409 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
7410 _bfd_elf_section_offset returning -2 the same way as -1.
7411 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
7412 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
7413 and BFD_ASSERT.
7414 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
7415
69f284c7
TR
74162002-02-18 Tom Rix <trix@redhat.com>
7417
7418 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
7419 (bfd_xcoff_size_dynamic_sections): Same.
7420 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
7421 (bfd_xcoff_size_dynamic_sections): Same.
7422 * coff-rs6000.c (xcoff_generate_rtinit): Same.
7423 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
7424 * libxcoff.h (struct xcoff_backend_data_rec): Same.
7425 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
7426 * bfd-in2.h: Regenerate.
7427
82bd7b59
AM
74282002-02-18 Alan Modra <amodra@bigpond.net.au>
7429
7430 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
7431 (struct ppc_link_hash_table): Add sfpr.
7432 (ppc64_elf_link_hash_table_create): Init it.
7433 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
7434 .glink out to..
7435 (create_linkage_sections): ..here. Make .sfpr too.
7436 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
7437 dynobj early.
7438 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
7439 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
7440 ._restf* functions, and create as needed.
7441 (func_desc_adjust): Only force_local for shared libs.
7442
ef1355e8
NC
74432002-02-18 David O'Brien <obrien@FreeBSD.org>
7444
7445 * configure.in: Bump version number post 2.12 branching.
7446 * configure: Regenerate.
7447
dfa36a69
HPN
74482002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
7449
7450 * mmo.c: Correct and improve comments.
7451 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
7452 zero-pad. Use input to fill up non-empty bfd buffer.
7453 (mmo_flush_chunk): New function.
7454 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
7455 changed. Don't emit location specifier if VMA is same as
7456 *LAST_VMAP after omitting leading zero contents. Call
7457 mmo_flush_chunk before emitting location specifier.
7458 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
7459 with mmo_write_loc_chunk calls.
7460 (mmo_internal_write_section): Call mmo_flush_chunk after
7461 mmo_write_chunk.
7462 (mmo_write_symbols_and_terminator): Move :Main to first position
7463 in symbol array. Add faked one if it does not exist if there are
7464 other symbols. Don't add it if there are no symbols at all. Move
7465 out test for value of :Main from symbol loop. Rename table
7466 fakemain to maintable and variable mainsym to fakemain.
7467
ccf00ab6
RH
74682002-02-15 Richard Henderson <rth@redhat.com>
7469
7470 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
7471 section with no got matches any got. Simplify error generaion.
7472
88eaccc2
AM
74732002-02-15 Alan Modra <amodra@bigpond.net.au>
7474
fd96f80f
AM
7475 Support arbitrary length fill patterns.
7476 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
7477 (_bfd_default_link_order): Remove bfd_fill_link_order code.
7478 Call default_data_link_order.
7479 (default_fill_link_order): Delete.
7480 (default_data_link_order): New function.
7481 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
7482 of bfd_fill_link_order with bfd_data_link_order.
7483 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
7484 * elf64-mips.c (mips_elf64_final_link): Likewise.
7485
88eaccc2
AM
7486 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
7487 Correct value returned in "end" for "0x<non-hex>".
7488
e2fd756b
NC
74892002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
7490
7491 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
7492 (scan): Test against 'mach' field in info structure.
7493
edd29cf9
AM
74942002-02-14 Alan Modra <amodra@bigpond.net.au>
7495
7496 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
7497
1e30956e 74982002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
7499
7500 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
7501 EF_M68000.
7502
bf36db18
NC
75032002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
7504
7505 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
7506 non-zero physical addresses when adjusting the LMAs of new
7507 sections.
bf36db18 7508
189c6563
AM
75092002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7510
7511 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
7512 from _bfd_elf_hppa_gen_reloc_type.
7513 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
7514 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
7515 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
7516 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
7517
e948afaf
AO
75182002-02-12 Alexandre Oliva <aoliva@redhat.com>
7519
7520 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
7521 loading its contents if there's nothing to do in it.
7522
19397422
AM
75232002-02-12 Alan Modra <amodra@bigpond.net.au>
7524
0ad3a73b
AM
7525 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
7526 64k boundary.
7527
19397422
AM
7528 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
7529 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
7530 (ppc64_elf_finish_dynamic_sections): Set values for them.
7531
51316059
MS
75322002-02-11 Michael Snyder <msnyder@redhat.com>
7533
7534 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
7535 * elf.c (elfcore_grok_pstatus): Add prototype.
7536 (elfcore_grok_lwpstatus): Add prototype.
7537 (elfcore_write_lwpstatus): New function.
7538 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
7539
518313c3
AO
75402002-02-11 Alexandre Oliva <aoliva@redhat.com>
7541
7542 * elf32-sh.c: Added missing prototypes.
7543 * elf32-sh64.c: Likewise.
7544 (sh_elf_align_loads): Mark unused args as such.
7545 * elf64-sh64.c: Added missing prototypes.
7546 (struct elf_sh64_link_hash_entry): Fix typo.
7547 (sh_elf64_relocate_section): Fix info argument passed to
7548 _bfd_elf_section_offset.
7549
2c73f9d8
AM
75502002-02-11 Alan Modra <amodra@bigpond.net.au>
7551
7552 * Makefile.am: "make dep-am".
7553 * Makefile.in: Regenerate.
7554 * aclocal.m4: Regenerate.
7555 * config.in: Regenerate.
7556 * configure: Regenerate.
7557
d426c6b0
DJ
75582002-02-10 Daniel Jacobowitz <drow@mvista.com>
7559
7560 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
7561 variable warnings.
7562 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
7563 comparison warning.
7564 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
7565 cast warnings for the common case.
7566
e58ee0cd
HPN
75672002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
7568
7569 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
7570 vectors.
7571 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
7572 vectors.
7573
7793f4d0
RH
75742002-02-09 Richard Henderson <rth@redhat.com>
7575
7576 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
7577 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
7578 (elf64_alpha_relocate_section): Likewise.
7579 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
7580 * bfd-in2.h, libbfd.h: Rebuild.
7581
7e799044
HPN
75822002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
7583
7584 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
7585 that base-plus-offset reloc accounting is consistent.
7586 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
7587 up to date for undefined symbols.
7588
027d73eb
EC
75892002-02-08 Eric Christopher <echristo@redhat.com>
7590
7591 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
7592
7593 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
7594 sections for the O32 ABI.
7595
517662d4
CD
75962002-02-08 Chris Demetriou <cgd@broadcom.com>
7597
7598 * elf32-arm.h: Fix formatting of _("...").
7599 * elf32-d10v.c: Likewise.
7600 * elf32-m68k.c: Likewise.
7601 * elf32-mips.c: Likewise.
7602
5e37cc46
NC
76032002-02-08 Ivan Guzvinec <ivang@opencores.org>
7604
7605 * coff-or32.c: Fix compile time warning messages.
7606
fbca6ad9
AO
76072002-02-08 Alexandre Oliva <aoliva@redhat.com>
7608
7609 Contribute sh64-elf.
7610 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
7611 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
7612 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
7613 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
7614 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
7615 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
7616 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
7617 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
7618 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
7619 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
7620 New relocs.
7621 * libbfd.h, bfd-in2.h: Rebuilt.
7622 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
7623 (sh_reloc_map): Map them.
7624 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
7625 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
7626 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
7627 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
7628 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
7629 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
7630 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
7631 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
7632 datalabel_got_offset.
7633 (sh_elf_link_hash_newfunc): Initialize it.
7634 (sh_elf_relocate_section): Augment the scope of
7635 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
7636 GOT and GOTOFF handling to new SHmedia relocation types. Support
7637 GOT_BIAS.
7638 (sh_elf_check_relocs): Likewise.
7639 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
7640 PLT entries using movi_shori_putval. Support GOT_BIAS.
7641 (sh_elf_finish_dynamic_sections): Likewise.
7642 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
7643 relocation, it's now done by the caller.
7644 (GOT_BIAS): New.
7645 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
7646 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
7647 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
7648 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
7649 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
7650 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
7651 sh64_elf64_hash_table): New.
7652 (sh_elf64_howto_table): Introduce new relocs.
7653 (sh_elf64_info_to_howto): Accept new PIC relocs.
7654 (sh_elf64_relocate_section): Augment the scope of
7655 seen_stt_datalabel. Support new PIC relocs.
7656 (sh_elf64_check_relocs): Support new PIC relocs.
7657 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
7658 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
7659 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
7660 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
7661 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
7662 movi_shori_putval, movi_3shori_putval,
7663 sh64_elf64_create_dynamic_sections,
7664 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
7665 sh64_elf64_size_dynamic_sections,
7666 sh64_elf64_finish_dynamic_symbol,
7667 sh64_elf64_finish_dynamic_sections): New.
7668 (elf_backend_create_dynamic-sections,
7669 bfd_elf64_bfd_link_hash_table_create,
7670 elf_backend_adjust_dynamic_symbol,
7671 elf_backend_size_dynamic_sections,
7672 elf_backend_finish_dynamic_symbol,
7673 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
7674 elf_backend_plt_readonly, elf_backend_want_plt_sym,
7675 elf_backend_got_header_size, elf_backend_plt_header_size):
7676 Define.
7677 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
7678 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
7679 match official numbers and names; moved unmaching ones to the
7680 range 0xf2-0xff.
7681 * elf32-sh64.c, elf64-sh64.c: Likewise.
7682 2001-03-12 DJ Delorie <dj@redhat.com>
7683 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
7684 sections.
7685 2001-03-12 DJ Delorie <dj@redhat.com>
7686 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
7687 be aligned.
7688 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
7689 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
7690 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
7691 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
7692 .cranges section with SEC_SORT_ENTRIES set.
7693 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
7694 incoming sorted .cranges section.
7695 (sh64_bfd_elf_copy_private_section_data): New.
7696 (sh64_elf_final_write_processing): Only sort .cranges and modify
7697 start address if called by linker.
7698 2001-01-08 Ben Elliston <bje@redhat.com>
7699 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
7700 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
7701 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
7702 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
7703 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
7704 line. Add comments before all entries.
7705 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
7706 comment.
7707 (sh_elf64_reloc): Correct head comment.
7708 (sh_elf64_relocate_section): Correct spacing.
7709 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
7710 instead call reloc_dangerous callback.
7711 <case R_SH_SHMEDIA_CODE>: New case.
7712 (sh_elf64_gc_mark_hook): Correct spacing.
7713 (sh_elf64_check_relocs): Ditto.
7714 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
7715 New case.
7716 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
7717 functions.
7718 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
7719 clarify describing comment. Add comments before all entries.
7720 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
7721 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
7722 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
7723 Sort .cranges section in final link. Prepare to set bit 0 on
7724 entry address.
7725 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
7726 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
7727 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
7728 .cranges section.
7729 (sh64_backend_section_from_shdr): New, to recognize
7730 SHT_SH5_CR_SORTED on incoming .cranges section.
7731 (elf_backend_section_from_shdr): Define.
7732 (sh64_elf_final_write_processing): Sort outgoing .cranges
7733 section. (New, temporarily disabled:) Set bit 0 on entry address
7734 according to ISA type.
7735 (sh64_find_section_for_address): New.
7736 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
7737 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
7738 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
7739 bfd_malloc, not xmalloc.
7740 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
7741 global.
7742 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
7743 temporarily disabled) setting bit 0 on entry address.
7744 (elf_backend_final_write_processing): Define.
7745 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
7746 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
7747 be a proper relocation for PTA and PTB rather than a marker.
7748 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
7749 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
7750 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
7751 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
7752 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
7753 Zero src_mask.
7754 * elf64-sh64.c: Ditto.
7755 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
7756 * elf32-sh64.c: Include opcodes/sh64-opc.h
7757 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
7758 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
7759 parameters. No unused parameters. Caller changed.
7760 <case R_SH_PT_16>: New case.
7761 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
7762 * Makefile.in: Regenerate.
7763 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
7764 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
7765 all code sections.
7766 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7767 (sh64_elf_merge_private_data): Ditto.
7768 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
7769 to access stored section flags.
7770 (sh64_elf_final_write_processing): Return immediately unless
7771 called by linker. Use sh64_elf_section_data (cranges) to get size
7772 of linker-generated cranges entries.
7773 (sh64_elf_copy_private_data): Add missing "return true".
7774 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
7775 (sh_elf64_merge_private_data): Ditto.
7776 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
7777 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
7778 elf64-sh64.c:sh64_elf_fake_sections.
7779 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
7780 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
7781 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
7782 (sh64_elf_final_write_processing): New.
7783 (elf_backend_final_write_processing): Define.
7784 (sh64_elf_fake_sections): Get header flags from tdata field.
7785 (sh64_elf_copy_private_data): Do not call
7786 sh64_elf_copy_private_data_internal, just copy e_flags field.
7787 (sh64_elf_merge_private_data): Do not call
7788 sh64_elf_copy_private_data_internal.
7789 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
7790 Remove EF_SH64_ABI64, let ELF size make difference.
7791 Remove SH64-specific BFD section flag.
7792 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
7793 containing SHmedia through elf_section_data (asect)->tdata
7794 non-zero, not using a BFD section flag.
7795 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
7796 (sh64_elf_merge_private_data): Similar.
7797 (elf_backend_section_flags): Don't define.
7798 (sh64_elf_backend_section_flags): Delete.
7799 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
7800 not EF_SH64_ABI64.
7801 (sh_elf64_merge_private_data): Similar.
7802 * section.c (Section flags definitions): Don't define
7803 SEC_SH_ISA_SHMEDIA.
7804 (bfd-in2.h): Regenerate.
7805 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
7806 Make DataLabel references work with partial linking.
7807 * elf32-sh64.c: Fix formatting.
7808 (sh64_elf_link_output_symbol_hook): New.
7809 (elf_backend_link_output_symbol_hook): Define to
7810 sh64_elf_link_output_symbol_hook.
7811 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
7812 undefined if partial linking. Adjust sanity check.
7813 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
7814 (elf_backend_link_output_symbol_hook): Define to
7815 sh64_elf64_link_output_symbol_hook.
7816 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
7817 undefined if partial linking. Adjust sanity check.
7818 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
7819 Implement semantics for inter-file DataLabel references.
7820 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
7821 (sh64_elf64_add_symbol_hook): New.
7822 (sh_elf64_relocate_section): If passing an indirect symbol with
7823 st_type STT_DATALABEL on the way to a symbol with st_other
7824 STO_SH5_ISA32, do not bitor 1 to the relocation.
7825 (elf_backend_add_symbol_hook): Define to
7826 sh64_elf64_add_symbol_hook.
7827 * elf64-sh32.c: Tweak comments.
7828 (DATALABEL_SUFFIX): Define.
7829 (sh64_elf_add_symbol_hook): New.
7830 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
7831 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
7832 symbol with st_type STT_DATALABEL on the way to a symbol with
7833 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
7834 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
7835 Pass through STT_DATALABEL.
7836 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
7837 (elf_backend_get_symbol_type): Define.
7838 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
7839 (elf_backend_get_symbol_type): Define.
7840 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
7841 * elf32-sh64.c: Tweak comments.
7842 (sh64_elf_copy_private_data_internal): Add prototype.
7843 (bfd_elf32_bfd_set_private_flags): Define.
7844 (sh64_elf_copy_private_data_internal): Compare machine name, not
7845 textual BFD target name, to check whether to copy section flag
7846 SHF_SH5_ISA32.
7847 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
7848 Tweak section-contents-type-mismatch message.
7849 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
7850 Validize reloc-types.
7851 * elf64-sh64.c: New file.
7852 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
7853 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
7854 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
7855 Regenerate dependencies.
7856 * Makefile.in: Regenerate.
7857 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
7858 bfd_elf64_sh64l_vec.
7859 * configure.in: Handle bfd_elf64_sh64_vec and
7860 bfd_elf64_sh64l_vec.
7861 * configure: Regenerate.
7862 * po/POTFILES.in: Regenerate.
7863 * po/bfd.pot: Regenerate.
7864 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
7865 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
7866 anything else but EF_SH64 and EF_SH64_ABI64.
7867 (sh64_elf_merge_private_data): Emit error for anything else but
7868 EF_SH64 and EF_SH64_ABI64.
7869 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
7870 from targ_selvecs.
7871 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
7872 bfd_elf32_sh64l_vec as a temporary measure.
7873 * configure: Regenerate.
7874 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
7875 * cpu-sh.c (arch_info_struct): Include sh5 item
7876 unconditionalized.
7877 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
7878 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
7879 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
7880 * elf32-sh64.c: Tweak comments.
7881 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
7882 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
7883 (sh64_elf_copy_private_data_internal): Wrap long line.
7884 (sh64_elf_merge_private_data): Rewrite to allow objects from
7885 SH64 subsets to be linked together.
7886 (INCLUDE_SHMEDIA): Define.
7887 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
7888 Parenthesize plus-expression inside or-expression.
7889 <global symbol>: Ditto.
7890 (sh_elf_set_mach_from_flags): Remove code refusing
7891 deleted EF_SH64_32BIT_ABI flag.
7892 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
7893 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
7894 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
7895 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
7896 (sh_elf_relocate_section) <local symbol>: Or 1 in
7897 calculation of relocation if sym->st_other & STO_SH5_ISA32.
7898 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
7899 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
7900 relocation.
7901 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
7902 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
7903 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
7904 Regenerate dependencies.
7905 * Makefile.in: Regenerate.
7906 * archures.c: Add bfd_mach_sh5.
7907 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
7908 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
7909 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
7910 * configure: Regenerate.
7911 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
7912 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
7913 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
7914 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
7915 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
7916 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
7917 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
7918 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
7919 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
7920 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
7921 in item for SH5.
7922 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
7923 for SHmedia relocs.
7924 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
7925 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
7926 shmedia_prepare_reloc, goto final_link_relocate if it returns
7927 non-zero, else fail as before.
7928 (sh_elf_set_mach_from_flags): Provide function only if not defined
7929 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
7930 (sh_elf_set_private_flags): Provide function only if not defined
7931 as a macro.
7932 (sh_elf_copy_private_data): Similar.
7933 (sh_elf_merge_private_data): Similar.
7934 * section.c (SEC_SH_ISA_SHMEDIA): New.
7935 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
7936 * elf32-sh64.c: New file.
7937 * libbfd.h: Regenerate.
7938 * bfd-in2.h: Regenerate.
7939 * po/POTFILES.in: Regenerate.
7940 * po/bfd.pot: Regenerate.
7941 * bfd-in2.h: Regenerate.
7942 * libbfd.h: Regenerate.
7943
e108f470
DJ
79442002-02-07 Daniel Jacobowitz <drow@mvista.com>
7945
7946 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
7947 been included, not drag it in.
7948 * bfd-in2.h: Regenerate.
7949
259d18a3
L
79502002-02-06 H.J. Lu (hjl@gnu.org)
7951
7952 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
7953 the mach and ISA fields if necessary.
7954
f13b834e
NC
79552002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
7956
7957 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
7958 ARM architecture when an F_ARM_5 flag is detected, since we cannot
7959 be sure exactly which architecture this represents.
7960
82f6addb
NC
79612002-02-05 Nick Clifton <nickc@redhat.com>
7962
7963 * po/tr.po: Updated translation.
7964
899f54f5
AM
79652002-02-05 Alan Modra <amodra@bigpond.net.au>
7966
7967 From Jimi X <jimix@watson.ibm.com>
7968 * archures (bfd_mach_ppc64): Define.
7969 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
7970 (bfd_powerpc_arch): Define.
7971 * bfd-in2.h: Regenerate.
7972 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
7973 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
7974 (bfd_powerpc_archs): Add default powerpc64 arch.
7975
248866a8
AM
79762002-02-05 Alan Modra <amodra@bigpond.net.au>
7977
7978 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
7979 against section syms in readonly sections. Don't do the global
7980 sym check if we find one.
7981 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
7982 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 7983 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
7984 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
7985 (elf_s390_grok_prstatus): Add missing prototype.
7986
4fa5c2a8
HPN
79872002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
7988
7989 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
7990 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
7991 Call bfd_get_section_by_name only once. Initialize
7992 bpodata->n_bpo_relocs_this_section.
7993 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
7994 referring to DSOs.
7995 (bpo_reloc_request_sort_fn): Don't use difference of values as
7996 return-value.
7997
537c972e
DB
79982002-02-02 David O'Brien <obrien@FreeBSD>
7999
8000 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
8001 version 4.5 and later the same as 5-CURRENT.
8002 * configure: Re-generate.
8003
006336b8
JT
80042002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
8005
8006 * config.bfd (hppa*-*-netbsd*): New target.
8007
6c571f00
PT
80082002-01-31 Philipp Thomas <pthomas@suse.de>
8009
19397422
AM
8010 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
8011 to front of message. Unify messages with elf32-arm.h. Use
8012 commas where neccessary.
8013 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
8014 ERROR in messages. Unify messages with coff-arm.c. Correct
8015 VFP/FPA error message.
8016 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
8017 APCS-32 for translation.
6c571f00 8018
930b4cb2
HPN
80192002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
8020
8021 Perform on-demand global register allocation from
8022 R_MMIX_BASE_PLUS_OFFSET relocs.
8023 * elf64-mmix.c (struct bpo_reloc_section_info, struct
8024 bpo_reloc_request, struct bpo_greg_section_info): New.
8025 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
8026 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
8027 _bfd_mmix_check_all_relocs,
8028 _bfd_mmix_prepare_linker_allocated_gregs,
8029 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
8030 (elf_mmix_howto_table): Correct src_mask for most relocs.
8031 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
8032 case.
8033 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
8034 case. Fix typo in comment. New label do_mmix_reloc.
8035 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
8036 store first object file with a base-plus-offset reloc. Call
8037 mmix_elf_check_common_relocs for the part common with mmo.
8038 (mmix_elf_final_link): Write out linker-allocated register
8039 contents section.
8040 (elf_backend_gc_sweep_hook): Define.
8041 (bfd_elf64_bfd_relax_section): Define.
8042
8043 * mmo.c: Don't include <ctype.h>
8044 (mmo_init): Correct init-once logic.
8045
3e36d993
TR
80462002-02-01 Tom Rix <trix@redhat.com>
8047
8048 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
8049
ba323545
AM
80502002-02-01 Alan Modra <amodra@bigpond.net.au>
8051
8052 * Makefile.am: Run "make dep-am"
8053 * Makefile.in: Regenerate.
8054
012884d6
DB
80552002-01-31 David O'Brien <obrien@FreeBSD>
8056
8057 * configure.in: Recognize the differences in core files from FreeBSD
8058 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
8059 5-CURRENT.
8060 * configure: Regenerate.
8061
3b16e843
NC
80622002-01-31 Ivan Guzvinec <ivang@opencores.org>
8063
8064 * coff-or32.c: New file.
8065 * cpu-or32.c: New file.
8066 * elf32-or32.c: New file.
8067 * archures.c: Add support for or32.
8068 * targets.c: Add support for or32.
8069 * bfd-in2.h: Regenerate.
7dc0ab31 8070 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
8071 coff_write_object_contents): Add support for or32.
8072 * config.bfd: Add target.
8073 * configure.in: Add support for or32.
8074 * configure: Regenerate.
8075 * Makefile.am: Add support for or32.
8076 * Makefile.in: Regenerate.
3b16e843
NC
8077 * po/SRC-POTFILES.in: Add or32 files.
8078 * po/bfd.pot: Regenerate.
7dc0ab31 8079
caf8ca8e
NC
80802002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
8081 Don Lindsay <lindsayd@cisco.com>
8082
8083 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
8084 false' with a return of a bfd_reloc_ error code.
8085
e5dfef09
HPN
80862002-01-31 Hans-Peter Nilsson <hp@axis.com>
8087
8088 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
8089 unexport unreferenced symbols when --export-dynamic. Call
8090 _bfd_elf_strtab_delref when unexporting.
8091
4e4770d0
DJ
80922002-01-30 Daniel Jacobowitz <drow@mvista.com>
8093
8094 * bfd-in.h: Include <stdbool.h> if it is available.
8095 * bfd-in2.h: Regenerated.
8096
e1fa50e7
AM
80972002-01-31 Alan Modra <amodra@bigpond.net.au>
8098
8099 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
8100 not go via the plt.
8101
b5f79c76
NC
81022002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
8103
b5f79c76
NC
8104 * archures.c: Tidy up formatting of embedded comments.
8105 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 8106 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
8107 * reloc.c: Tidy up formatting of ordinary & embedded comments.
8108 * section.c: Tidy up formatting of embedded comments.
8109 * syms.c: Tidy up formatting of embedded comments.
8110 * targets.c: Tidy up formatting of embedded comments.
8111
8112 * bfd-in2.h: Regenerate.
8113
ca09e32b
NC
81142002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
8115
8116 * vms-tir.c (cmd_name): New function.
8117 (tir_cmd_name): New function.
8118 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
8119 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
8120 Fix formatting.
7dc0ab31 8121
ca09e32b
NC
8122 * peXXigen.c (pe_print_idata): Rearrange message to aid in
8123 translation.
8124 (pe_print_pdata): Rearrange message to aid in translation.
8125
8126 * libbfd.c (warn_deprecated): Rearrange error message to aid in
8127 translation.
8128
8129 * ihex.c (ihex_write_object_contents): Fix spelling typo.
8130
8131 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
8132
8133 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
8134 message to aid in translation.
8135
8136 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
8137 to aid in translation.
8138
8139 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
8140
7dc0ab31 81412002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
8142
8143 * coff-arm.c, elf32-elf.h: Unify messages.
8144
05f64ac6
NC
81452002-01-30 Nick Clifton <nickc@redhat.com>
8146
8147 * po/sv.po: Updated translation.
8148
f5a3e38a
NC
81492002-01-30 Philipp Thomas <pthomas@suse.de>
8150
8151 * dwarf2.c (read_abbrev): Use full section name in error message.
8152 (decode_line_info): Likewise.
661a3fd4
NC
8153
8154 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
8155 message.
8156
d926e03d
AM
81572002-01-30 Alan Modra <amodra@bigpond.net.au>
8158
8159 * elf64-ppc.c (func_desc_adjust): Only provide missing function
8160 descriptor symbols for undefined function code syms. Clear
8161 ELF_LINK_NON_ELF so that they can stay weak.
8162
030d18fb 81632002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 8164 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
8165
8166 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
8167 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
8168 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
8169 generation.
8170 * bfd-in2.h: Regenerate.
8171
fcc76bea
CD
81722002-01-29 Chris Demetriou <cgd@broadcom.com>
8173
8174 * elf32-mips.c: Add additional comments about HI16 relocation
8175 processing.
8176 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
8177 pc-relative relocations. (Reverts change made on 2001-10-31.)
8178 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
8179 for pc-relative relocations.
8180 (mips_elf_calculate_relocation): Add a comment about a kludge
8181 in the R_MIPS_GNU_REL_HI16 handling.
8182 (_bfd_mips_elf_relocate_section): Implement that kludge;
8183 adjust pc-relative HI16 relocation for difference in HI16 and
8184 LO16 addresses, since it can't easily be done in
8185 mips_elf_calculate_relocation.
8186
f9cd9119
MS
81872002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
8188
8189 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
8190 relocations with PC32 relocations for undefined or weak symbols.
8191 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
8192 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
8193
702248bb
JT
81942002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
8195
8196 * elfcore.h (elf_core_file_p): Improve comment for last change.
8197
4867be41
DJ
81982002-01-27 Daniel Jacobowitz <drow@mvista.com>
8199
8200 * configure: Regenerated.
8201
a94cef6a
JT
82022002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
8203
8204 * elfcore.h (elf_core_file_p): Set the machine architecture
8205 before processing the program headers.
8206
7562a296
HPN
82072002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
8208
966abd70
HPN
8209 * configure.in <64-bit configuration>: If using gcc, check and
8210 emit error for egcs-1.1.2.
8211 * configure: Regenerate.
8212
e8eab623
NC
82132002-01-26 Egor Duda <deo@logos-m.ru>
8214
8215 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
8216 as possible to avoid stack corruption.
8217
73896efb
RH
82182002-01-26 Richard Henderson <rth@redhat.com>
8219
8220 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
8221 for non-allocated sections.
8222
82232002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
8224
8225 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
8226 prstat.pr_reg even if it is a struct.
8227
73896efb 82282002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 8229
c5cd6d62 8230 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 8231
3d66c4f7
NC
82322002-01-25 Philipp Thomas <pthomas@suse.de>
8233
8234 * coffgen.c (coff_print_symbol): Don't mark info message
8235 for translation.
8236
9460ecda
NC
82372002-01-25 Nick Clifton <nickc@redhat.com>
8238
8239 * po/fr.po: Updated translation.
8240 * po/es.po: Updated translation.
8241
cc9ff76a
AM
82422002-01-25 Philipp Thomas <pthomas@suse.de>
8243
8244 * coff-alpha.c (alpha_relocate_section): Unify warning message
8245 for GP relative relocations without GP defined.
8246 * coff-mips.c (mips_relocate_section): Likewise.
8247
c68836a9
AM
82482002-01-25 Alan Modra <amodra@bigpond.net.au>
8249
8250 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
8251 unsigned overflow when new_offset < old_offset.
8252
e8eab623 82532002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
8254
8255 * bfd.c (_bfd_abort): Fix typo.
8256
8ba89f17
RH
82572002-01-23 Richard Henderson <rth@redhat.com>
8258
8259 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
8260 plt entries for undefweak symbols.
8261
c6953948
NC
82622002-01-23 Steve Ellcey <sje@cup.hp.com>
8263
c5cd6d62 8264 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
8265 (bfd_elf64_ia64_hpux_big_vec): Ditto.
8266 (bfd_elf32_h8300_vec): Ditto.
8267
41bd81ab
AM
82682002-01-23 Alan Modra <amodra@bigpond.net.au>
8269
8270 * elf64-ppc.c: Remove stale part of ABI comment.
8271 (NO_OPD_RELOCS): Define.
8272 (ppc64_elf_check_relocs): Use it.
8273 (ppc64_elf_relocate_section): Here too.
8274 (build_one_stub): Don't point function syms at the stub. Instead,
8275 hijack plt.offset.
8276 (ppc64_elf_relocate_section): Check whether REL24 relocs should
8277 really go to the stub. Make all dynamic relocs in opd against
8278 locals.
8279 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
8280 plt.offset.
8281
f304919d
RH
82822002-01-22 Richard Henderson <rth@redhat.com>
8283
8284 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
8285
c0ef99a7
AM
82862002-01-22 Alan Modra <amodra@bigpond.net.au>
8287
60ee0d4a
AM
8288 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
8289 TOC_BASE_OFF adjustment.
8290
c0ef99a7
AM
8291 * Makefile.am: Run "make dep-am".
8292 * Makefile.in: Regenerate.
8293 * po/SRC-POTFILES.in: Regenerate.
8294
64328b46
AM
82952002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
8296
8297 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
8298 host defines.
8299
59953665 83002002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
8301
8302 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
8303 Check for and emit error if sgot is NULL at this point.
8304
9596feea
JT
83052002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
8306
8307 * config.bfd (ia64*-*-netbsd*): New target.
8308
7b45c6e1
AM
83092002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
8310
8311 * som.c (som_write_space_strings): Comment typo fix.
8312
e5094212
AM
83132002-01-21 Alan Modra <amodra@bigpond.net.au>
8314
e86ce104
AM
8315 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
8316 is_func_descriptor fields.
8317 (link_hash_newfunc): Init them.
8318 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
8319 dot are candidates for plt entries. When processing .opd relocs,
8320 set function descriptor strings to point inside function code
8321 string, and set new ppc_link_hash_entry fields.
8322 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
8323 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
8324 function descriptors. It's now done in..
8325 (func_desc_adjust): New.
8326 (ppc64_elf_func_desc_adjust): New.
8327 (define elf_backend_always_size_sections): Define.
8328 (ppc64_elf_hide_symbol): New.
8329 (define elf_backend_hide_symbol): Define.
8330 (allocate_dynrelocs): Remove code looking up function descriptors
8331 as that has been done earlier.
8332 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
8333 table.
8334 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
8335 up function descriptor.
8336 (build_one_stub): Look up the function code sym. Check for
8337 invalid plt offsets.
8338 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
8339 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
8340
e5094212
AM
8341 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
8342 boolean param.
8343 (_bfd_elf_link_hash_hide_symbol): Likewise.
8344 * elflink.h (elf_link_add_object_symbols): Adjust call to
8345 elf_backend_hide_symbol.
8346 (elf_fix_symbol_flags): Likewise.
8347 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
8348 than bfd_alloc.
8349 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
8350 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
8351 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
8352 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
8353 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
8354 and adjust to suit.
8355 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
8356 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
8357 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
8358
40b8271b
AM
83592002-01-18 Alan Modra <amodra@bigpond.net.au>
8360
8361 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
8362 dynamic function descriptor symbol, not the associated function
8363 symbol.
8364
55baa95b
EC
83652002-01-17 Eric Christopher <echristo@redhat.com>
8366
8367 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
8368
328577ad
NC
83692002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
8370
8371 * po/bfd.pot: Regenerate.
8372 * po/fr.po: Regenerate.
8373
af746e92
AM
83742002-01-17 Alan Modra <amodra@bigpond.net.au>
8375
8376 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
8377 Remove "Elf_Internal_Shdr *" param.
8378 (_bfd_mips_elf_section_from_bfd_section): Ditto.
8379 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
8380 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
8381 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
8382 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
8383 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
8384 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
8385 function to override special sections. Remove hdr arg from
8386 backend call, and don't loop.
8387
175e9962
EC
83882002-01-16 Eric Christopher <echristo@redhat.com>
8389
8390 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
8391 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
8392 relocations requiring gp0 and gp.
8393
96a846ea
RE
83942002-01-16 Richard Earnshaw <rearnsha@arm.com>
8395
175e9962 8396 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
8397 EF_ARM_VFP_FLOAT.
8398 (elf32_arm_print_private_bfd_data): Likewise.
8399
af3ae48d
NC
84002002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
8401
8402 * po/tr.po: Import new version.
8403
10ed1bba
AM
84042002-01-16 Alan Modra <amodra@bigpond.net.au>
8405
8406 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
8407 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
8408 (ORI_R0_R0_0): Correct.
8409
5d1634d7
AM
84102002-01-16 Alan Modra <amodra@bigpond.net.au>
8411
8412 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
8413 when plt_not_loaded.
8414 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
8415 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
8416 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
8417 (ppc64_elf_glink_code): Delete.
8418 (PPC64_ELF_GLINK_SIZE): Delete.
8419 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
8420 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
8421 ORI_R0_R0_0): Define.
8422 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
8423 (struct ppc_link_hash_table): Add sstub and plt_overflow.
8424 (ppc64_elf_link_hash_table_create): Init them.
8425 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
8426 Don't copy to shared lib.
8427 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
8428 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
8429 (allocate_dynrelocs <plt>): Don't change function sym here. Make
8430 room for .stub and .glink code.
8431 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
8432 DT_PPC64_GLINK.
8433 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
8434 bfd_elf64_bfd_final_link.
8435 (bfd_elf64_bfd_final_link): Don't define.
8436 (ppc64_elf_size_stubs): New.
8437 (build_plt_stub): New.
8438 (build_one_stub): New.
8439 (ppc64_elf_build_stubs): New.
8440 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
8441 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
8442 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
8443 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
8444 case output sections not separate. Adjust DT_RELASZ to not
8445 include plt relocs. Set reserved got entry. Set got and plt
8446 entry size.
8447 (elf_backend_got_header_size): Set to 8.
8448 * elf64-ppc.h: New file.
8449
c601ffdb
AM
84502002-01-16 Alan Modra <amodra@bigpond.net.au>
8451
8452 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
8453 sections, use bfd_section_list_remove.
8454 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
8455 * elflink.h (elf_link_add_object_symbols): When removing all
8456 sections, use bfd_section_list_clear.
8457
8fb4cb7f
NC
84582002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
8459
8460 * po/sv.po: New file: Swedish translation.
8461 * configure.in (ALL_LINGUAS): Add sv.
8462 * configure: Regenerate.
8463
d3c456e9
JJ
84642002-01-15 Jakub Jelinek <jakub@redhat.com>
8465
8466 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
8467 * elf.c (merge_sections_remove_hook): New function.
8468 (_bfd_elf_merge_sections): Pass it as 3rd argument to
8469 _bfd_merge_sections.
8470 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
8471 * libbfd.h: Rebuilt.
8472 * merge.c (_bfd_merge_sections): Add remove_hook argument.
8473 Call remove_hook if a SEC_EXCLUDE section is encountered.
8474
1f7fd478
NC
84752002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
8476
8477 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
8478 (xstormy16_reloc_map): Initialise new field with correct howto
8479 table.
8480 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
8481 howto entry.
8482
b87011e9
MS
84832002-01-10 Michael Snyder <msnyder@redhat.com>
8484
8485 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
8486 (elfcore_write_pstatus): Use long instead of pid_t;
8487 * elf-bfd.h: Change prototypes to use long instead of pid_t;
8488
175e9962 84892002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
8490
8491 * elf.c: Update copyright years.
8492 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
8493 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
8494
7c76fa91
MS
84952002-01-08 Michael Snyder <msnyder@redhat.com>
8496
8497 Add capability to write corefile note sections, for gdb.
8498 * elf.c (elfcore_write_note): New function.
8499 (elfcore_write_prpsinfo): New function.
8500 (elfcore_write_prstatus): New function.
8501 (elfcore_write_pstatus): New function.
8502 (elfcore_write_prfpreg): New function.
8503 (elfcore_write_prxfpreg): New function.
97996af6 8504 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 8505
e1fddb6b
AO
85062002-01-08 Alexandre Oliva <aoliva@redhat.com>
8507
8508 * elf.c (elf_fake_sections): Propagate errors from
8509 elf_backend_fake_section.
8510
8d05742f
JT
85112002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
8512
8513 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
8514 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
8515 (elf32-sh-nbsd.lo): New rule.
8516 * Makefile.in: Regenerate.
8517 * config.bfd (sh*le-*-netbsdelf*): New target.
8518 (sh*-*-netbsdelf*): New target.
8519 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
8520 (bfd_elf32_shnbsd_vec): New vector.
8521 (bfd_elf32_shlnbsd_vec): New vector.
8522 * configure: Regenerate.
8523 * elf32-sh-nbsd.c: New file.
8524 * targets.c: Update copyright years.
175e9962 8525 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
8526 bfd_elf32_shnbsd_vec.
8527
1dba4cb4
AH
85282002-01-07 Aldy Hernandez <aldyh@redhat.com>
8529
8530 * coff-rs6000.c (READ20): Use bfd_scan_vma.
8531
47b22aef
GK
85322002-01-07 Geoffrey Keating <geoffk@redhat.com>
8533
8534 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
8535 of a symbol in a section that will be deleted.
8536
be2d1673
NC
85372002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
8538
8539 * po/es.po: New file: Spanish translation.
8540 * configure.in (ALL_LINGUAS): Add es.
8541 * configure: Regenerate.
8542
d9cf1b54
AM
85432002-01-06 Steve Ellcey <sje@cup.hp.com>
8544
8545 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
8546 argument so we can handle HP-UX specially.
8547 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
8548 (elfNN_hpux_backend_section_from_bfd_section): New for support
8549 of SHN_IA_64_ANSI_COMMON.
8550 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
8551 (is_unwind_section_name): Add special HP-UX support.
8552 (elfNN_ia64_section_from_shdr): Add support for more sections.
8553 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
8554 add support for more sections.
8555 (elfNN_ia64_additional_program_headers): Modify
8556 is_unwind_section_name call.
8557 (elfNN_ia64_modify_segment_map): Remove assumption that there is
8558 only one unwind section in segment.
8559
3f3c5c34
AM
85602002-01-06 Alan Modra <amodra@bigpond.net.au>
8561
8562 * syms.c (_bfd_generic_make_empty_symbol): New function.
8563 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
8564 _bfd_generic_make_empty_symbol.
8565 * libbfd.h: Regenerate.
8566 * bfd-in2.h: Regenerate.
8567 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
8568 (hppabsd_core_get_symtab_upper_bound): Don't define.
8569 (hppabsd_core_get_symtab): Likewise.
8570 (hppabsd_core_print_symbol): Likewise.
8571 (hppabsd_core_get_symbol_info): Likewise.
8572 (hppabsd_core_bfd_is_local_label_name): Likewise.
8573 (hppabsd_core_get_lineno): Likewise.
8574 (hppabsd_core_find_nearest_line): Likewise.
8575 (hppabsd_core_bfd_make_debug_symbol): Likewise.
8576 (hppabsd_core_read_minisymbols): Likewise.
8577 (hppabsd_core_minisymbol_to_symbol): Likewise.
8578 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
8579 Formatting fixes.
8580 * hpux-core.c: Similarly.
8581 * irix-core.c: Similarly.
8582 * osf-core.c: Similarly.
8583 * sco5-core.c: Similarly.
8584 * binary.c (binary_make_empty_symbol): Remove function, define as
8585 _bfd_generic_make_empty_symbol.
8586 * ihex.c (ihex_make_empty_symbol): Likewise.
8587 * mmo.c (mmo_make_empty_symbol): Likewise.
8588 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
8589 * srec.c (srec_make_empty_symbol): Likewise.
8590 * versados.c (versados_make_empty_symbol): Likewise.
8591 * vms.c (_bfd_vms_make_empty_symbol): Remove.
8592 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
8593 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
8594 rather than _bfd_vms_make_empty_symbol.
8595 * vms-misc.c (new_symbol): Likewise.
8596
3f0a7f7f
AM
85972002-01-05 Alan Modra <amodra@bigpond.net.au>
8598
9e7b37b3
AM
8599 * section.c (bfd_section_init): Remove unnecessary initialisations.
8600 (bfd_section_list_clear): New function.
8601 (bfd_section_list_remove, bfd_section_list_insert): New macros.
8602 (_bfd_strip_section_from_output): Use them.
8603 * coffcode.h (coff_set_alignment_hook): Likewise.
8604 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
8605 * elf64-mips.c (mips_elf64_final_link): Likewise.
8606 * elf64-mmix.c (mmix_elf_final_link): Likewise.
8607 * sunos.c (sunos_add_dynamic_symbols): Likewise.
8608 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
8609 * bfd-in2.h: Regenerate.
8610
8611 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
8612 rather than doing our own section handling. Clean up after errors
8613 with bfd_release and bfd_section_list_clear. Handle unexpected
8614 flags.
8615 * aoutf1.h (sunos4_core_file_p): Likewise.
8616 * aix386-core.c (aix386_core_file_p): Likewise.
8617 * cisco-core.c (cisco_core_file_validate): Likewise.
8618 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
8619 * trad-core.c (trad_unix_core_file_p): Likewise.
8620
8621 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
8622 with bfd_release and bfd_section_list_clear.
8623 * hpux-core.c (hpux_core_core_file_p): Likewise.
8624 * irix-core.c (irix_core_core_file_p): Likewise.
8625 * lynx-core.c (lynx_core_file_p): Likewise.
8626 * osf-core.c (osf_core_core_file_p): Likewise.
8627 * rs6000-core.c (rs6000coff_core_p): Likewise.
8628 * sco5-core.c (sco5_core_file_p): Likewise.
8629
3f0a7f7f
AM
8630 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
8631 sign extension adjustments without conditionals.
8632
a3aa38ee
JJ
86332002-01-04 Jakub Jelinek <jakub@redhat.com>
8634
8635 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
8636 CIE at .eh_frame start is removed due to no FDEs referencing it.
8637
8a8b2d4b
AJ
86382002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
8639
8640 * config.bfd (x86_64-*-netbsd*): New target.
8641 * configure.in (x86_64-*-netbsd*): Set COREFILE
8642 to netbsd-core.lo.
8643 * configure: Regenerated.
8644
04b5af89
TR
86452002-01-03 Tom Rix <trix@redhat.com>
8646
8647 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
8648 for recent bfd_make_section_anyway change.
8649
51c5503b
NC
86502002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
8651
8652 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
8653 R_ARM_THM_PC11 reloc.
8654
07f7c046
NC
86552002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
8656
8657 * configure.in (LINGUAS): Add ja.
8658 * configure: Regenerate.
8659 * po/ja.po: Import from translation project's web site.
8660
5eefb65f
NC
86612002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
8662
8663 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
8664 messages to ease translation into other languages.
8665
39e90f10 8666For older changes see ChangeLog-0001
56882138
AM
8667\f
8668Local Variables:
8669mode: change-log
8670left-margin: 8
8671fill-column: 74
8672version-control: never
8673End: