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