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