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