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