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