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