include/opcode/ChangeLog:
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
c1993d04
AM
12003-08-16 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-ppc.c: Don't include elf/ppc.h.
4
792b4a53
RS
52003-08-14 Richard Sandiford <rsandifo@redhat.com>
6
7 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
8 code to work with 64-bit bfds.
9
fdc09da8
AM
102003-08-14 Alan Modra <amodra@bigpond.net.au>
11
12 * dep-in.sed: Remove libintl.h.
13 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
14 (POTFILES.in): Remove target.
15 * Makefile.in: Regenerate.
16
ee87f2da
AM
172003-08-12 Alan Modra <amodra@bigpond.net.au>
18
19 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
20 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
21 use the function sym from the previous reloc.
22
15f40dfc
JJ
232003-08-11 Jakub Jelinek <jakub@redhat.com>
24
25 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
26 fatal if -pie.
27 * elf32-s390.c (elf_s390_relocate_section): Likewise.
28 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
29 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
30 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
31 * elf64-s390.c (elf_s390_relocate_section): Likewise.
32 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
33 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
34 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
35 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
36 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
37 on undefined symbols if -pie.
38 * elf32-sh.c (sh_elf_relocate_section): Likewise.
39
6ab189d5
AM
402003-08-11 Alan Modra <amodra@bigpond.net.au>
41
42 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
43 branch to __libc_start_main.
44
3b260895
NC
452003-08-08 Dmitry Diky <diwil@mail.ru>
46
6ab189d5
AM
47 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
48 gcc order.
3b260895
NC
49 * cpu-msp430.c: Likewise.
50 * elf32-msp430.c: Likewise.
51 * bfd-in2.h: Regenerate.
52
c39a58e6
AM
532003-08-07 Alan Modra <amodra@bigpond.net.au>
54
9c5bfbb7
AM
55 * elfxx-target.h: Remove PTR cast.
56 * targets.c (bfd_target): Make backend_data const void *.
57 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
58 * elf-m10300.c: Likewise.
59 * elf.c: Likewise.
60 * elf32-hppa.c: Likewise.
61 * elf32-i386.c: Likewise.
62 * elf32-m68hc1x.c: Likewise.
63 * elf32-ppc.c: Likewise.
64 * elf32-s390.c: Likewise.
65 * elf32-sh.c: Likewise.
66 * elf32-sh64.c: Likewise.
67 * elf32-sparc.c: Likewise.
68 * elf32-xtensa.c: Likewise.
69 * elf64-mips.c: Likewise.
70 * elf64-ppc.c: Likewise.
71 * elf64-s390.c: Likewise.
72 * elf64-sh64.c: Likewise.
73 * elf64-sparc.c: Likewise.
74 * elf64-x86-64.c: Likewise.
75 * elfcode.h: Likewise.
76 * elfcore.h: Likewise.
77 * elflink.c: Likewise.
78 * elflink.h: Likewise.
79 * elfxx-ia64.c: Likewise.
80 * elfxx-mips.c: Likewise.
81 * elfxx-mips.h: Likewise.
82 * elf.c (prep_headers): Remove useless check for null backend_data.
83 * bfd-in2.h: Regenerate.
84
c39a58e6
AM
85 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
86 (NAME): Use ## rather than CONCAT4 macro.
87 * elfcode.h: Remove one remaining PARAMS macro.
88 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
89 * elf-strtab.c: Likewise.
90 * elf-hppa.h: Likewise.
91 * elf32-hppa.h: Likewise.
92 * elf32-hppa.c: Likewise.
93 (elf32_hppa_add_symbol_hook): Delete.
94 (elf_backend_add_symbol_hook): Don't define.
95 * libhppa.h: Convert to C90. Replace INLINE with inline.
96
97b639ba
AM
972003-08-06 Alan Modra <amodra@bigpond.net.au>
98
99 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
100 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
101 function descriptors, but warn.
102 (ppc_build_one_stub): Remove a couple of vars. Move code creating
103 stub syms so that we can avoid a stub sym if we already have a
104 plt sym. Do not redefine an existing symbol.
105 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
106 glink.
107
9e7d479d
NC
1082003-08-06 Nick Clifton <nickc@redhat.com>
109
110 * po/fr.po: Updated French translation.
111
77f3d027
AM
1122003-08-06 Alan Modra <amodra@bigpond.net.au>
113
114 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
115 SEC_LINKER_CREATED.
116
50d6c878
DJ
1172003-08-05 Daniel Jacobowitz <drow@mvista.com>
118
119 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
120 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
121
14abcef9
NC
1222003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
123
4a21a492 124 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
125 message if the line number table could not be read.
126
8c675694
NC
1272003-08-04 Nick Clifton <nickc@redhat.com>
128
129 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
130 to messages produced for .gnu.warning.SYMBOL sections.
131
268b6b39
AM
1322003-08-04 Alan Modra <amodra@bigpond.net.au>
133
134 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
135 * elfcore.h: Likewise.
136 * elflink.c: Likewise.
137 * elflink.h: Likewise.
138 * elf.c (sym_is_global): Remove INLINE.
139 (align_file_position): Replace INLINE with inline.
140 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
141 (elf_file_p): Replace INLINE with inline.
142
866f48b7
KK
1432003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
144
145 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
146
8651fcf9
L
1472003-08-01 H.J. Lu <hongjiu.lu@intel.com>
148
149 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
150
37cd2629
L
1512003-08-01 H.J. Lu <hongjiu.lu@intel.com>
152
153 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
154 ElfNN_External_Rela instead of Elf64_External_Rela.
155
91fb2a9d
NC
1562003-08-01 Nick Clifton <nickc@redhat.com>
157
158 * config.bfd: Add code to catch obsolete configurations and warn
159 about them unless --enable-obsolete is used. Use this to mark
160 vax-vms port as obsolete.
161
e656e369
AM
1622003-07-30 Alan Modra <amodra@bigpond.net.au>
163
164 * elf32-ppc.c (ppc_elf_install_value): Tidy.
165 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
166 Formatting.
167 * elfxx-target.h: Remove PARAMS macro. Formatting.
168
50bc7936
AM
1692003-07-30 Alan Modra <amodra@bigpond.net.au>
170
171 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
172 * elf64-ppc.c (get_fdh): New function, split out from
173 ppc64_elf_edit_opd.
174 (ppc64_elf_check_relocs): Use get_fdh.
175 (func_desc_adjust): Likewise. Tidy.
176 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
177 exit. Use get_fdh. Account for superfluous dynamic relocs.
178 (ppc64_elf_relocate_section): Warning fix.
179
a62d170c
JE
1802003-07-30 Jason Eckhardt <jle@rice.edu>
181
182 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
183
7734b6e9
JE
1842003-07-30 Jason Eckhardt <jle@rice.edu>
185
186 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
187
37f4508b
AM
1882003-07-30 Randolph Chung <tausq@debian.org>
189
190 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
191 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
192
217aa764
AM
1932003-07-30 Alan Modra <amodra@bigpond.net.au>
194
195 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
196 Replace PTR with void *. Formatting.
197 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
198 (make_mapping): Likewise.
199
494dac0c
AM
2002003-07-29 Alan Modra <amodra@bigpond.net.au>
201
202 * elf64-ppc.c (func_desc_adjust): Give linker created function
203 descriptor symbols a size and type.
204 (ppc64_elf_relocate_section): Correct lq insn test.
205
deaaf2f3
EC
2062003-07-28 Eric Christopher <echristo@redhat.com>
207
208 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
209 (ppc_elf_install_value): New function.
210 (ppc_elf_sort_rela): Remove.
211 (ppc_elf_relax_section): Rewrite. Remove old relaxation
212 and replace with out of range branch stubs.
213 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
214
709e685d
AO
2152003-07-29 Alexandre Oliva <aoliva@redhat.com>
216
217 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
218 from input_bfd.
219
36c506c5
AM
2202003-07-28 Alan Modra <amodra@bigpond.net.au>
221
222 * elf.c (special_sections): Set attributes for .got and .plt.
223
5d35169e
AM
2242003-07-27 Alan Modra <amodra@bigpond.net.au>
225
226 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
227 on function descriptors.
228 (ELIMINATE_COPY_RELOCS): Expand comment.
229 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
230 Do include ".toc1".
231
3cddba1e
L
2322003-07-25 H.J. Lu <hongjiu.lu@intel.com>
233
234 * elf.c (_bfd_elf_new_section_hook): Set the default section
235 type to SHT_NULL.
236 (elf_fake_sections): Set the section type based on asect->flags
237 if it is SHT_NULL. Don't abort on processor specific section
238 types.
239
d622ef4b
L
2402003-07-25 H.J. Lu <hongjiu.lu@intel.com>
241
242 * bfd-in2.h: Regenerated.
243
2f89ff8d
L
2442003-07-25 H.J. Lu <hongjiu.lu@intel.com>
245
246 * elf-bfd.h (bfd_elf_special_section): New.
247 (elf_backend_data): Add special_sections, a pointer to
248 bfd_elf_special_section.
249 (elf_section_type). New.
250 (elf_section_flags): New.
251 (_bfd_elf_get_sec_type_attr): New.
252
253 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
254 real section type/flags.
255 (special_sections): New.
256 (get_special_section): New.
257 (_bfd_elf_get_sec_type_attr): New.
258 (_bfd_elf_new_section_hook): Check special_section to set
259 elf_section_type and elf_section_flags.
260 (elf_fake_sections): Don't use section name to set ELF section
261 data.
262
263 * elf32-m32r.c (m32r_elf_special_sections): New.
264 (elf_backend_special_sections): Defined.
265
266 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
267 (elf_backend_special_sections): Defined.
268
269 * elf32-mcore.c (mcore_elf_special_sections): New.
270 (elf_backend_special_sections): Defined.
271
272 * elf32-ppc.c (ppc_elf_special_sections): New.
273 (elf_backend_special_sections): Defined.
274
275 * elf32-sh64.c (sh64_elf_special_sections): New.
276 (elf_backend_special_sections): Defined.
277
278 * elf32-v850.c (v850_elf_special_sections): New.
279 (elf_backend_special_sections): Defined.
280
281 * elf32-xtensa.c (elf_xtensa_special_sections): New.
282 (elf_backend_special_sections): Defined.
283
284 * elf64-alpha.c (elf64_alpha_special_sections): New.
285 (elf_backend_special_sections): Defined.
286
287 * elf64-hppa.c (elf64_hppa_special_sections): New.
288 (elf_backend_special_sections): Defined.
289
290 * elf64-ppc.c (ppc64_elf_special_sections): New.
291 (elf_backend_special_sections): Defined.
292
293 * elf64-sh64.c (sh64_elf64_special_sections): New.
294 (elf_backend_special_sections): Defined.
295
296 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
297 (elf_backend_special_sections): Defined.
298
299 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
300
301 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
302 (elf_backend_special_sections): Defined.
303
304 * elfxx-target.h (elf_backend_special_sections): New. Default
305 to NULL.
306 (elfNN_bed): Initialize special_sections.
307
308 * section.c (bfd_abs_section): Remove const.
309 (bfd_und_section): Likewise.
310 (bfd_com_section): Likewise.
311 (bfd_ind_section): Likewise.
312
20650579
NC
3132003-07-24 Nick Clifton <nickc@redhat.com>
314
315 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
316 sections are assigned the LOAD attribute.
317
deaaf2f3 3182003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
319
320 * elf32-sh.c: Convert to C90. Replace PTR with void *.
321 * elf32-sh64-com.c: Likewise.
322 * elf32-sh64.c: Likewise.
323 * elf32-sh64.h: Likewise.
324 * elf64-sh64.c: Likewise.
325
3d85aebe
KK
3262003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
327
328 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
329 (allocate_dynrelocs): Likewise.
330 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
331 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
332
834d807b
NC
3332003-07-24 Nick Clifton <nickc@redhat.com>
334
335 * po/fr.po: Updated French translation.
336
571b5725
BW
3372003-07-23 Bob Wilson <bob.wilson@acm.org>
338
339 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
340 near the beginning of the file. Swap order of arguments. Call
341 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
342 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
343 (elf_xtensa_relocate_section): Likewise.
344 (shrink_dynamic_reloc_sections): Likewise.
345
b536dc1e
BW
3462003-07-23 Bob Wilson <bob.wilson@acm.org>
347
348 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
349 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
350 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
351 first printing an error message.
352 (elf_xtensa_finish_dynamic_sections): Likewise.
353 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
354 discarding literal table entries.
355 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
356 (elf_xtensa_do_asm_simplify): Likewise.
357
7f888330
SC
3582003-07-23 Stephane Carrez <stcarrez@nerim.fr>
359
360 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
361 we have a local symbol in common section.
362
ecc27c31
L
3632003-07-22 H.J. Lu <hongjiu.lu@intel.com>
364
365 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
366 weak symbols.
367
f9f3cf65
NC
3682003-07-22 Nick Clifton <nickc@redhat.com>
369
370 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
371 expected RS6000 storage classes.
372
bb32e54f
L
3732003-07-21 H.J. Lu <hongjiu.lu@intel.com>
374
375 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
376 output_bfd unused to silence gcc.
377
796f2a93
NC
3782003-07-21 Nick Clifton <nickc@redhat.com>
379
380 * po/sv.po: Updated Swedish translation.
381
f6c52c13
AM
3822003-07-21 Alan Modra <amodra@bigpond.net.au>
383
384 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
385 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
386 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
387 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
388 now done in _bfd_elf_symbol_refs_local_p.
389 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
390 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
391 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
392
aa37626c
L
3932003-07-18 H.J. Lu <hongjiu.lu@intel.com>
394
395 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
396
1e364ec9
L
3972003-07-18 H.J. Lu <hongjiu.lu@intel.com>
398
399 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
400 (SYMBOL_CALLS_LOCAL): Likewise.
401
402 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
403 immediately if symbol isn't defined locally.
404
986a241f
RH
4052003-07-18 Richard Henderson <rth@redhat.com>
406
407 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
408 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
409 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
410 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
411 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
412 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
413 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
414 Update all callers to provide the relocation being resolved.
415
ac4b3dd8
NC
4162003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
417
418 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
419 targ_cflags.
420
6c37ac4d
NC
4212003-07-17 Nick Clifton <nickc@redhat.com>
422
423 * po/es.po: New Spanish translation.
424 * po/sv.po: New Swedish translation.
425 * po/opcodes.pot: Regenerate.
426
02e6ad56
RH
4272003-07-16 Richard Henderson <rth@redhat.com>
428
429 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
430 * elfxx-ia64.c, targets.c: Likewise.
431
5686517c
RH
4322003-07-16 Richard Henderson <rth@redhat.com>
433
434 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
435 for symbols defined locally plus -Bsymbolic. Tidy logic.
436
5a7ea749
RS
4372003-07-15 Richard Sandiford <rsandifo@redhat.com>
438
439 * archures.c (bfd_mach_mips7000): New.
440 * bfd-in2.h: Regenerated.
441 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
442 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
443 (mips_mach_extensions): Add an entry for it.
444
76bff705
NC
4452003-07-14 Nick Clifton <nickc@redhat.com>
446
447 * po/tr.po: Update with latest version.
448 * po/SRC-POTFILES.in: Regenerate.
449 * po/bfd.pot: Regenerate.
450 * Makfile.in: Regenerate.
451 * configure: Regenerate.
452
d0facd1b
NC
4532003-07-12 Jeff Baker <jbaker@qnx.com>
454
455 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
456 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
457 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
458 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
459
bcb9b88d
NC
4602003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
461
462 * coffcode.h (coff_set_section_contents): Set the
463 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
464
7a9823f1
RS
4652003-07-11 Richard Sandiford <rsandifo@redhat.com>
466
467 * bfd-in.h (bfd_h8300_pad_address): Declare.
468 * bfd-in2.h: Regenerate.
469 * cpu-h8300.c (bfd_h8300_pad_address): New function.
470 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
471 addresses before checking whether they can be relaxed.
472 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
473 Don't complain about overflows in general 8-bit relocations.
474 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
475 Fix handling of R_H8_DIR24A8.
476
c6baf75e
RS
4772003-07-11 Richard Sandiford <rsandifo@redhat.com>
478
479 * elf32-h8300.c: Convert function prototypes and definitions
480 to C90 syntax.
481 * coff-h8300.c: Likewise.
482 * cpu-h8300.c: Likewise.
483
fce00800
AM
4842003-07-11 Alan Modra <amodra@bigpond.net.au>
485
486 * po/SRC-POTFILES.in: Regenerate.
487 * po/bfd.pot: Likewise.
488
e901de89
BW
4892003-07-10 Bob Wilson <bob.wilson@acm.org>
490
491 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
492 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
493 .xt.lit.plt section.
494 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
495 and allocate memory for it.
496 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
497 section to the .got.loc section.
498 (elf_xtensa_finish_dynamic_sections): Fix up call to
499 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
500 the address of .got.loc.
501 (relax_property_section): Shrink .got.loc to match changes in any
502 literal table section.
503 (xtensa_is_property_section): Change to match
504 xtensa_get_property_section_name.
505 (xtensa_is_littable_section): New.
506
eff26f78
L
5072003-07-10 H.J. Lu <hongjiu.lu@intel.com>
508
509 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
510 -1LL.
511
942e0f42
AM
5122003-07-10 Alan Modra <amodra@bigpond.net.au>
513
514 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
515 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
516 Run "make dep-am".
517 * Makefile.in: Regenerate.
518
73c3cd1c
AO
5192003-07-10 Alexandre Oliva <aoliva@redhat.com>
520
521 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
522 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
523 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
524 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
525 * elf32-am33lin.c: Rename global functions.
526 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
527 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
528 * configure.in (bfd_elf32_am33lin_vec): Added.
529 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
530 (elf32-am33lin.lo): List dependencies.
531 * aclocal.m4, configure, Makefile.in: Rebuilt.
532 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
533 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
534 ELF_ARCH was not defined before.
535 (elf_symbol_leading_char): Define if not defined.
536 * elf32-am33lin.c: Override the definitions above.
537 * targets.c (bfd_elf32_am33lin_vec): New.
538
03a12831
AO
5392003-07-09 Alexandre Oliva <aoliva@redhat.com>
540
541 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
542 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
543 pcrel_relocs_copied.
544 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
545 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
546 ld-linux.so.2 to ld.so.1.
547 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
548 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
549 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
550 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
551 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
552 .rela.* section contents with bfd_zalloc.
553 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
554 * elf-m10300.c: Added declarations for functions missing them.
555 Merge some shared-library changes from the i386 back-end. Use
556 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
557 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
558 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
559 members of elf_link_hash_entry. Adjusted references.
560 (mn10300_elf_final_link_relocate): dynobj was already loaded
561 into a local variable, use it.
562 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
563 * elf-m10300.c: Add missing function prototypes.
564 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
565 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
566 relocation for dynamic relocations.
567 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
568 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
569 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
570 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
571 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
572 (_bfd_mn10300_elf_create_got_section): ... here, so that its
573 adress is already known at the time we compute relaxations.
574 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
575 and PLT32 to narrower relocations.
576 * libbfd.h, bfd-in2.h: Rebuilt.
577 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
578 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
579 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
580 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
581 BFD_RELOC_MN10300_RELATIVE): New relocs.
582 * libbfd.h, bfd-in2.h: Rebuilt.
583 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
584 (struct elf32_mn10300_link_hash_entry): Added DSO-related
585 fields.
586 (elf_mn10300_howto): Defined new relocation types.
587 (mn10300_reloc_map): Map them.
588 (_bfd_mn10300_elf_create_got_section): New fn.
589 (mn10300_elf_check_relocs): Handle PIC relocs.
590 (mn10300_elf_final_link_relocate): Likewise.
591 (mn10300_elf_relocate_section): Handle DSOs.
592 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
593 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
594 elf_mn10300_pic_plt_entry): New.
595 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
596 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
597 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
598 elf_mn10300_plt_reloc_offset: New macros.
599 (ELF_DYNAMIC_INTERPRETER): Likewise.
600 (_bfd_mn10300_elf_create_dynamic_sections): New function.
601 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
602 (_bfd_mn10300_elf_discard_copies): Likewise.
603 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
604 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
605 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
606 (elf_backend_can_gc_sections,
607 elf_backend_create_dynamic_sections,
608 elf_backend_adjust_dynamic_sections,
609 elf_backend_size_dynamic_sections,
610 elf_backend_finish_dynamic_symbol,
611 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
612 elf_backend_plt_readonly, elf_backend_want_plt_sym,
613 elf_backend_got_header_size, elf_backend_plt_header_size): New
614 macros.
615
b08fa4d3
AO
6162003-07-09 Alexandre Oliva <aoliva@redhat.com>
617
618 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
619 * elf-m10300.c (compute_function_info): Account for AM33
620 registers in `movm' when computing stack space for `call' when
621 linking for AM33/2.0 link.
622 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
623 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
624 * bfd-in2.h: Rebuilt.
625 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
626 * elf-m10300.c: Updated.
627 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
628 * archures.c (bfd_mach_am332): Defined.
629 * bfd-in2.h: Rebuilt.
630 * cpu-m10300.c (bfd_am332_arch): Defined.
631 (bfd_am33_arch): Chained with am33-2.
632 * elf-m10300.c (elf_mn10300_mach): Handle am332.
633 (_bfd_mn10300_elf_final_write_processing): Likewise.
634
201933ea
L
6352003-07-09 H.J. Lu <hongjiu.lu@intel.com>
636
637 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
638
e717da7e
AM
6392003-07-10 Alan Modra <amodra@bigpond.net.au>
640
641 * elf64-ppc.c (bfd_elf64_mkobject): Define.
642 (struct ppc64_elf_obj_tdata): New.
643 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
644 (ppc64_elf_mkobject): New function.
645 (struct got_entry): Add "owner". Move "tls_type".
646 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
647 (ppc64_elf_init_stub_bfd): New function.
648 (create_got_section): Create header .got in dynobj. Create .got
649 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
650 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
651 Look for dynobj .got, and test it.
652 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
653 (update_local_sym_info): Likewise.
654 (ppc64_elf_check_relocs): Likewise.
655 (ppc64_elf_gc_sweep_hook): Likewise.
656 (ppc64_elf_tls_optimize): Likewise.
657 (allocate_dynrelocs): Likewise.
658 (ppc64_elf_size_dynamic_sections): Likewise.
659 (ppc64_elf_relocate_section): Likewise.
660 (ppc64_elf_next_toc_section): Update comment.
661 (toc_adjusting_stub_needed): Remove unneeded cast.
662 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
663 testing section flags.
664 (ppc64_elf_build_stubs): Likewise.
665 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
666 (ppc64_elf_finish_dynamic_sections): Write out got sections.
667 (func_desc_adjust): Copy over dynamic info for undef weaks.
668 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
669 (ppc64_elf_size_stubs): Update prototype.
670 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
671 input sections rather than scanning dynobj.
672
18ad015f
RS
6732003-07-09 Richard Sandiford <rsandifo@redhat.com>
674
675 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
676 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
677 (mips_elf_create_msym_section): Delete.
678 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
679 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
680 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
681 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
682 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
683 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
684 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
685
e10609d3
RS
6862003-07-09 Richard Sandiford <rsandifo@redhat.com>
687
688 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
689 symbols protected.
690
0d591ff7
RS
6912003-07-09 Richard Sandiford <rsandifo@redhat.com>
692
693 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
694 of relocations whose offset is -2.
695
fdd07405
RS
6962003-07-09 Richard Sandiford <rsandifo@redhat.com>
697
698 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
699 forced-local symbols like other locals. Don't create relocations
700 against STN_UNDEF in irix objects.
701
d2fba50d
RS
7022003-07-09 Richard Sandiford <rsandifo@redhat.com>
703
704 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
705 compatible objects, add the values of defined external symbols
706 to the addend.
707
6eaa6adc
RS
7082003-07-09 Richard Sandiford <rsandifo@redhat.com>
709
710 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
711 initialize a GOT entry to the symbol's st_value.
712
0c83546a
AM
7132003-07-08 Alan Modra <amodra@bigpond.net.au>
714
43c40ab2
AM
715 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
716 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
717 (ppc_elf_tdata): Define.
718 (elf_local_ptr_offsets): Adjust.
719 (ppc_elf_mkobject): New function.
720 (bfd_elf32_mkobject): Define.
721
0c83546a
AM
722 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
723 * elfcore.h (elf_core_file_p): Likewise.
724 * section.c (bfd_section_init): Remove prototype.
725
58111eb7
AM
7262003-07-08 Alan Modra <amodra@bigpond.net.au>
727
728 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
729 field.
730 (enum elf_linker_section_enum): Delete.
731 (struct elf_linker_section): Delete.
732 (struct elf_linker_section_pointers): Delete.
733 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
734 Make linker_section_pointers a void**.
735 (elf_local_ptr_offsets, elf_linker_section): Don't define.
736 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
737 of old item in elf-bfd.h.
738 (struct elf_linker_section): Likewise.
739 (struct elf_linker_section_pointers): Likewise.
740 (elf_local_ptr_offsets): Define.
741 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
742 (ppc_elf_link_hash_newfunc): Init it.
743 (struct ppc_elf_link_hash_table): Add sbss.
744 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
745 individual fields.
746 (elf_create_linker_section): Fold into..
747 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
748 Make rela section here if shared.
749 (elf_find_pointer_linker_section): Pass lsect rather than enum.
750 (elf_create_pointer_linker_section): Adjust. zalloc rather than
751 clearing in a loop.
752 (elf_finish_pointer_linker_section): Adjust. Don't make rela
753 section here.
754 (ppc_elf_check_relocs): Adjust.
755 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
756 creating .sbss by hand.
757 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
758
15f8604d
JJ
7592003-07-04 Jakub Jelinek <jakub@redhat.com>
760
761 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
762 complain_overflow_bitfield.
763 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
764 complain_overflow_bitfield.
765
3368a7fb
JJ
7662003-07-04 Jakub Jelinek <jakub@redhat.com>
767
768 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
769 true even if -pie.
770
9203ba99
JJ
7712003-07-04 Jakub Jelinek <jakub@redhat.com>
772
773 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
774 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
775 !info->executable.
776 (get_fptr): For -pie create .opd as writable section and create
777 .rela.opd as well.
778 (elfNN_ia64_check_relocs): Change info->shared into
779 !info->executable.
780 (allocate_fptr): Likewise.
781 (allocate_dynrel_entries): Account for a relative reloc for -pie
782 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
783 for undefweak symbol. Account for an IPLT reloc in .rela.opd
784 section if -pie.
785 (set_got_entry): Don't create a relative reloc if -pie
786 want_ltoff_fptr for undefweak symbol.
787 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
788 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
789 @fptr().
790
791 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
792 even if -pie.
793 * elf32-i386.c (elf_i386_relocate_section): Likewise.
794 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
795 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
796 * elf64-s390.c (elf_s390_relocate_section): Likewise.
797 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
798 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
799 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
800 * elf32-s390.c (elf_s390_relocate_section): Likewise.
801 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
802
e0a868d1 8032003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
804
805 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
806 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
807 <R_H8_DIR32A16>: Fix type of relocation.
808
35cad4c4
KK
8092003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
810
811 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
812 sections were created already. Remove unnecessary tests of
813 the previous change.
814
03151a5a
KK
8152003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
816
817 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
818 bfd_make_section for existing sections.
819
003d627e
AM
8202003-07-04 Alan Modra <amodra@bigpond.net.au>
821
2293c499
AM
822 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
823 create_got_section if we already have done so.
824 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
825 (sh_elf_check_relocs): Likewise.
826 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
827 htab->root.dynobj instead.
828 (sh_elf_check_relocs): Likewise.
829 (sh_elf_finish_dynamic_sections): Likewise.
830
003d627e
AM
831 * section.c (bfd_make_section): Return NULL for existing section.
832
fa681e5d
AM
8332003-07-04 Alan Modra <amodra@bigpond.net.au>
834
835 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
836 ppc_elf_create_got if we've already done so.
3dab13f6
AM
837
838 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
839 (_bfd_elf_find_pointer_linker_section): Likewise.
840 (bfd_elf32_create_pointer_linker_section): Likewise.
841 (bfd_elf32_finish_pointer_linker_section): Likewise.
842 (bfd_elf64_create_pointer_linker_section): Likewise.
843 (bfd_elf64_finish_pointer_linker_section): Likewise.
844 (_bfd_elf_make_linker_section_rela): Likewise.
845 * elfcode.h (elf_create_pointer_linker_section): Don't define.
846 (elf_finish_pointer_linker_section): Likewise.
847 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
848 (_bfd_elf_create_linker_section): Move this function..
849 (_bfd_elf_find_pointer_linker_section): ..and this..
850 * elflink.h (elf_create_pointer_linker_section): ..and this..
851 (elf_finish_pointer_linker_section): ..and this..
852 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
853 calls.
854 (elf_create_linker_section): Convert to C90, tidy.
855 (elf_find_pointer_linker_section): Likewise.
856 (elf_create_pointer_linker_section): Likewise.
857 (elf_finish_pointer_linker_section): Likewise.
858 * elf32-i370.c: Delete #if 0 code.
859
772119ce
AM
8602003-07-02 Alan Modra <amodra@bigpond.net.au>
861
862 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
863 _restf* to be satisfied by shared libs, and always force them local.
864 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
865 Correct test for "bl".
866 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
867 primary opcode 31.
868
bd1ea41b
MS
8692003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
870
871 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
872 (s390_tls_reloc): New function.
873 (elf_howto_table): Add long displacement relocations R_390_20,
874 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
875 (elf_s390_reloc_type_lookup): Likewise.
876 (elf_s390_check_relocs): Likewise.
877 (elf_s390_gc_sweep_hook): Likewise.
878 (elf_s390_relocate_section): Likewise.
879 * elf64-s390.c: Same changes as for elf32-s390.c.
880 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 881 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
882 BFD_RELOC_390_TLS_GOTIE20.
883 * bfd-in2.h: Regenerate.
884 * libbfd.h: Likewise.
885
113202d6
AM
8862003-06-30 Alan Modra <amodra@bigpond.net.au>
887
888 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
889 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
890
c58b9523
AM
8912003-06-29 Alan Modra <amodra@bigpond.net.au>
892
893 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
894 Replace PTR with void *. Formatting.
895 * archive64.c: Likewise.
896 * archures.c: Likewise.
897 * bfd-in.h: Likewise.
898 * bfd.c: Likewise.
899 * bfdio.c: Likewise.
900 * bfdwin.c: Likewise.
901 * cache.c: Likewise.
902 * corefile.c: Likewise.
903 * format.c: Likewise.
904 * init.c: Likewise.
905 * libbfd-in.h: Likewise.
906 * libbfd.c: Likewise.
907 * linker.c: Likewise.
908 * opncls.c: Likewise.
909 * reloc.c: Likewise.
910 * section.c: Likewise.
911 * simple.c: Likewise.
912 * syms.c: Likewise.
913 * targets.c: Likewise.
914 * bfd-in2.h: Regenerate.
915 * libbfd.h: Regenerate.
916
917 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
918 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
919 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
920 (bfd_getb64): Rewrite without parens.
921 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
922 * cache.c (insert, snip): Remove INLINE.
923 * linker.c (bfd_link_add_undef): Likewise.
924
27482721
AJ
9252003-06-29 Andreas Jaeger <aj@suse.de>
926
927 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
928 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
929 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
930 trim plt entries. Move undefweak non-default visibility test ...
931 (allocate_dynrelocs): ... from here.
932 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
933 Change all callers.
934 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
935 SYMBOL_REFERENCES_LOCAL for dynreloc check.
936 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
937 dynreloc and .got relocs.
938 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
939 for .got relocs.
27482721 940
2b86c02e
TS
9412003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
942
943 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
944
e7c81c25
NC
9452003-06-27 Nick Clifton <nickc@redhat.com>
946
947 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
948 bfd_add_gnu_debuglink_section and only create the section, do not
949 fill in its contents.
950 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
951 contents of a .gnu-debuglink section.
952 * bfd-in2.h: Regenerate.
953
72b4917c
TS
9542003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
955
956 * elfxx-mips.c: Revert .got alignment to 2**4.
957
91709090
TS
9582003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
959
960 * elf32-mips.c: Fix addend for _gp_disp special symbol.
961
7a79a000
TS
9622003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
963
964 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
965 relocation header setup.
966
e47cd125
AM
9672003-06-25 Alan Modra <amodra@bigpond.net.au>
968
969 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
970 (ppc_elf_reloc_type_lookup): Modify comment.
971 (ppc_elf_info_to_howto): Ditto.
972 (ppc_elf_relocate_section): Ditto.
973 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
974
1049f94e
AM
9752003-06-25 Alan Modra <amodra@bigpond.net.au>
976
977 * aout-ns32k.c: Correct spelling of "relocatable".
978 * aoutx.h: Likewise.
979 * bfd-in.h: Likewise.
980 * bfd.c: Likewise.
981 * bout.c: Likewise.
982 * coff-a29k.c: Likewise.
983 * coff-alpha.c: Likewise.
984 * coff-arm.c: Likewise.
985 * coff-i386.c: Likewise.
986 * coff-i860.c: Likewise.
987 * coff-i960.c: Likewise.
988 * coff-m68k.c: Likewise.
989 * coff-m88k.c: Likewise.
990 * coff-mcore.c: Likewise.
991 * coff-mips.c: Likewise.
992 * coff-or32.c: Likewise.
993 * coff-ppc.c: Likewise.
994 * coff-rs6000.c: Likewise.
995 * coff-sh.c: Likewise.
996 * coff-tic80.c: Likewise.
997 * coff64-rs6000.c: Likewise.
998 * cofflink.c: Likewise.
999 * cpu-ns32k.c: Likewise.
1000 * ecoff.c: Likewise.
1001 * ecofflink.c: Likewise.
1002 * elf-bfd.h: Likewise.
1003 * elf-eh-frame.c: Likewise.
1004 * elf-hppa.h: Likewise.
1005 * elf-m10200.c: Likewise.
1006 * elf-m10300.c: Likewise.
1007 * elf.c: Likewise.
1008 * elf32-arm.h: Likewise.
1009 * elf32-avr.c: Likewise.
1010 * elf32-cris.c: Likewise.
1011 * elf32-d10v.c: Likewise.
1012 * elf32-dlx.c: Likewise.
1013 * elf32-fr30.c: Likewise.
1014 * elf32-frv.c: Likewise.
1015 * elf32-h8300.c: Likewise.
1016 * elf32-hppa.c: Likewise.
1017 * elf32-i370.c: Likewise.
1018 * elf32-i386.c: Likewise.
1019 * elf32-i860.c: Likewise.
1020 * elf32-i960.c: Likewise.
1021 * elf32-ip2k.c: Likewise.
1022 * elf32-iq2000.c: Likewise.
1023 * elf32-m32r.c: Likewise.
1024 * elf32-m68hc11.c: Likewise.
1025 * elf32-m68hc1x.c: Likewise.
1026 * elf32-m68k.c: Likewise.
1027 * elf32-mcore.c: Likewise.
1028 * elf32-mips.c: Likewise.
1029 * elf32-msp430.c: Likewise.
1030 * elf32-openrisc.c: Likewise.
1031 * elf32-ppc.c: Likewise.
1032 * elf32-s390.c: Likewise.
1033 * elf32-sh.c: Likewise.
1034 * elf32-sh64.c: Likewise.
1035 * elf32-sparc.c: Likewise.
1036 * elf32-v850.c: Likewise.
1037 * elf32-vax.c: Likewise.
1038 * elf32-xstormy16.c: Likewise.
1039 * elf32-xtensa.c: Likewise.
1040 * elf64-alpha.c: Likewise.
1041 * elf64-hppa.c: Likewise.
1042 * elf64-mips.c: Likewise.
1043 * elf64-mmix.c: Likewise.
1044 * elf64-ppc.c: Likewise.
1045 * elf64-s390.c: Likewise.
1046 * elf64-sh64.c: Likewise.
1047 * elf64-sparc.c: Likewise.
1048 * elf64-x86-64.c: Likewise.
1049 * elfcode.h: Likewise.
1050 * elflink.h: Likewise.
1051 * elfn32-mips.c: Likewise.
1052 * elfxx-ia64.c: Likewise.
1053 * elfxx-mips.c: Likewise.
1054 * i386linux.c: Likewise.
1055 * ieee.c: Likewise.
1056 * libcoff-in.h: Likewise.
1057 * linker.c: Likewise.
1058 * m68klinux.c: Likewise.
1059 * pdp11.c: Likewise.
1060 * pe-mips.c: Likewise.
1061 * peXXigen.c: Likewise.
1062 * reloc.c: Likewise.
1063 * reloc16.c: Likewise.
1064 * sparclinux.c: Likewise.
1065 * sunos.c: Likewise.
1066 * syms.c: Likewise.
1067 * versados.c: Likewise.
1068 * vms.c: Likewise.
1069 * xcofflink.c: Likewise.
1070 * bfd-in2.h: Regenerate.
1071 * libcoff.h: Regenerate.
1072 * libbfd.h: Regenerate.
1073
55fd94b0
AM
10742003-06-24 Alan Modra <amodra@bigpond.net.au>
1075
d85f2c7d
AM
1076 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
1077 local sym errors.
1078
55fd94b0
AM
1079 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
1080 prototypes and casts. Replace PTR with void *. Formatting.
1081 * elf32-ppc.c: Likewise. Break long strings too.
1082 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
1083 (ppc_elf_unhandled_reloc): Internationalize error message.
1084 * elf32-ppc.h: Remove PARAMS.
1085
88810f8c
MM
10862003-06-23 Mark Mitchell <mark@codesourcery.com>
1087
1088 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
1089 APUinfo slots.
1090 (ppc_elf_final_write_processing): Likewise.
1091
6e35c4da
L
10922003-06-23 H.J. Lu <hongjiu.lu@intel.com>
1093
1094 * elflink.h (elf_link_input_bfd): Check raw size when using
1095 kept_section to preserve debug information discarded by
1096 linkonce.
1097
8f3bab57
AM
10982003-06-20 Alan Modra <amodra@bigpond.net.au>
1099
1100 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
1101 (ppc64_elf_setup_section_lists): Set it.
1102 (ppc64_elf_relocate_section): Check sym section id against top_id.
1103 (ppc_build_one_stub): Comment on top_id.
1104
efbc813e
NC
11052003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
1106
1107 * config.bfd: Add tic4x-*-rtems*.
1108
4ce794b7
AM
11092003-06-20 Alan Modra <amodra@bigpond.net.au>
1110
1111 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
1112 prototypes and casts. Replace PTR with void *. Format copyright.
1113 Mention ABI links.
1114 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
1115 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
1116 (ppc_type_of_stub): Make r_type an enum.
1117 (ppc64_elf_size_stubs): Likewise.
1118 * elf64-ppc.h: Remove PARAMS macro.
1119
d2a300cf
AM
11202003-06-19 Alan Modra <amodra@bigpond.net.au>
1121
3254fd24
AM
1122 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
1123 elf hash tab fields.
1124
d2a300cf
AM
1125 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
1126 (ppc64_elf_info_to_howto): Likewise.
1127 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
1128 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
1129
83615de0
AM
11302003-06-19 Alan Modra <amodra@bigpond.net.au>
1131
1132 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
1133 reloc overflow on discarded eh_frame entries.
1134
9b5ecbd0
AM
11352003-06-19 Alan Modra <amodra@bigpond.net.au>
1136
1137 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
1138 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
1139 Return error condition.
1140 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
1141 that have has_gp_reloc set.
1142 (struct ppc_link_hash_table): Add stub_count.
1143 (ppc_build_one_stub): Increment it.
1144 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
1145 individual fields.
1146 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
1147
64c456e1
AM
11482003-06-18 Alan Modra <amodra@bigpond.net.au>
1149
1150 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
1151 size calculation from addend. Round size up.
1152
3dab95d3
HPN
11532003-06-18 Hans-Peter Nilsson <hp@axis.com>
1154
1155 * elf32-cris.c (cris_elf_relocate_section) <case
1156 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
1157 symbol from a normal object or an undefined weak symbol.
1158
0b13192e
AM
11592003-06-18 Alan Modra <amodra@bigpond.net.au>
1160
1161 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
1162 R_PPC64_TOC relocs.
1163
f97b9cb8
L
11642003-06-17 H.J. Lu <hongjiu.lu@intel.com>
1165
1166 * section.c (struct sec): Put back kept_section.
1167 (STD_SECTION): Put back kept_section initialization.
1168 * bfd-in2.h: Regenerate.
1169
1170 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
1171 sections for relocateable output. Use kept_section to preserve
1172 debug information discarded by linkonce.
1173
9f1c3a0a
L
11742003-06-17 Roland McGrath <roland@redhat.com>
1175
1176 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
1177 segment-relative relocation between different segments.
1178
734b6cf9
AM
11792003-06-17 Alan Modra <amodra@bigpond.net.au>
1180
1cf1f670
AM
1181 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
1182 optimizations earlier.
1183
734b6cf9
AM
1184 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
1185 Restore previous input_list type.
1186 (ppc64_elf_link_hash_table_create): Undo last change.
1187 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
1188 per output section, but don't bother with bfd_abs_section marker.
1189 (ppc64_elf_next_input_section): Adjust for multiple input section
1190 lists.
1191 (group_sections): Likewise.
1192
23fbd6fa
JJ
11932003-06-17 Jakub Jelinek <jakub@redhat.com>
1194
1195 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
1196 *r_offset == r_addend for RELATIVE relocs against .got.
1197
dad27d18
AM
11982003-06-17 Alan Modra <amodra@bigpond.net.au>
1199
1200 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
1201
b613960a
NC
12022003-06-17 Nick Clifton <nickc@redhat.com>
1203
1204 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
1205 in the vtable_entries_used array to allow for the accessing
1206 the largest element.
b613960a 1207
000732f7
AM
12082003-06-17 Alan Modra <amodra@bigpond.net.au>
1209
3d6f9012
AM
1210 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
1211 input_list.
1212 (ppc64_elf_link_hash_table_create): Init input_list here.
1213 (ppc64_elf_setup_section_lists): Remove code setting up input lists
1214 per output section. Set toc_off for abs and other standard sections.
1215 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
1216 (ppc64_elf_next_input_section): Adjust for single input section list.
1217 Don't set toc_curr from input bfds that haven't set elf_gp.
1218 (group_sections): Adjust for single input section list.
1219
000732f7
AM
1220 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
1221
81407a69
AM
12222003-06-16 Alan Modra <amodra@bigpond.net.au>
1223
1224 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
1225 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
1226 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
1227 got section for RELATIVE relocs. Fix wrong comment. Change condition
1228 under which dynamic relocs update the section contents.
1229
a06a29f2
NC
12302003-06-13 Robert Millan <zeratul2@wanadoo.es>
1231
1232 * config.bfd: Add i386-netbsd-gnu target.
1233
7d1ebfb2
NC
12342003-06-12 Nick Clifton <nickc@redhat.com>
1235
1236 * opncls.c (calc_crc32): Rename to
1237 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 1238 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 1239 hard-coded ".gnu_debuglink" in the code.
81407a69 1240 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 1241 xmalloc with a call to malloc.
81407a69 1242 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 1243 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 1244 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
1245 section to a bfd.
1246 * bfd-in2.h: Regenerate.
1247
12482003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1249
7d1ebfb2
NC
1250 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
1251 New target (was i[3-7]86-*-openbsd* before).
1252 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
1253 (vax-*-openbsd*): New target.
1254
d80dcc6a
TS
12552003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1256
1257 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
1258 for n32, too.
1259 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
1260 (mips_elf_rel_dyn_section): Use appropriate section alignment.
1261 (mips_elf_create_got_section): Likewise.
1262 (_bfd_mips_elf_create_dynamic_sections): Likewise.
1263
a7ebbfdf
TS
12642003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1265
1266 * elf32-mips.c (mips_elf_generic_reloc): New Function.
1267 (elf_mips_howto_table_rel): Use it.
1268 (gprel32_with_gp): Move prototype.
1269 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1270 Use mips_elf_generic_reloc.
1271 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
1272 Code cleanup.
1273 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
1274 zero addend.
1275 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
1276 as in the other *_gprel*_reloc functions.
1277 (gprel32_with_gp): Handle partial_inplace properly.
1278 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
1279 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
1280 Do addend handling directly instead of calling
1281 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
1282 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
1283 of zero addend. Handle partial_inplace properly.
1284 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
1285 addend.
1286 (mips_elf64_gprel16_reloc): Likewise.
1287 (mips_elf64_literal_reloc): Likewise.
1288 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
1289 logic as in the other *_gprel*_reloc functions. Handle
1290 partial_inplace properly.
1291 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
1292 addend. Handle partial_inplace properly.
1293 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1294 of calling _bfd_mips_elf_gprel16_with_gp.
1295 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
1296 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
1297 of zero addend.
1298 (mips_elf_shift6_reloc): Handle partial_inplace properly.
1299 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
1300 of calling _bfd_mips_elf_gprel16_with_gp.
1301 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
1302 partial_inplace properly. Fix wrong addend handling. Fix overflow
1303 check.
1304 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
1305 exported.
1306 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
1307 (_bfd_mips_elf_relocate_section): Likewise.
1308 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
1309 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
1310 (_bfd_mips_elf_sign_extend): New prototype.
1311
49ba19a4 13122003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 1313
49ba19a4
NC
1314 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
1315 New target (was sparc-*-openbsd* before).
1316 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 1317
de6e5e1a
NC
1318 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
1319 * configure: Regenerate.
1320
3b443373
L
13212003-06-11 H.J. Lu <hongjiu.lu@intel.com>
1322
1323 * po/Make-in (DESTDIR): New.
1324 (install-data-yes): Support $(DESTDIR).
1325 (uninstall): Likewise.
1326
795bb480
AM
13272003-06-11 Alan Modra <amodra@bigpond.net.au>
1328
1329 * Makefile.am (config.status): Depend on version.h.
1330 Run "make dep-am".
1331 * Makefile.in: Regenerate.
1332 * po/SRC-POTFILES.in: Regenerate.
1333
adadcc0c
AM
13342003-06-10 Alan Modra <amodra@bigpond.net.au>
1335 Gary Hade <garyhade@us.ibm.com>
1336
1337 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
1338
f4984206
RS
13392003-06-10 Richard Sandiford <rsandifo@redhat.com>
1340
1341 * archures.c (bfd_mach_h8300sxn): New architecture.
1342 * bfd-in2.h: Regenerate.
1343 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
1344 (h8300sxn_info_struct): New.
1345 (h8300sx_info_struct): Link to it.
1346 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
1347 (elf32_h8_final_write_processing): Likewise.
1348
ad8e1ba5
AM
13492003-06-08 Alan Modra <amodra@bigpond.net.au>
1350
1351 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
1352 elfxx-target.h so that we can use elf_backend_got_header_size.
1353 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
1354 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
1355 associated macros.
1356 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
1357 dst_mask.
1358 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
1359 ppc_stub_plt_branch_r2off.
1360 (struct ppc_stub_hash_entry): Reorganize.
1361 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
1362 toc_curr, toc_off and emit_stub_syms.
1363 (ppc64_elf_link_hash_table_create): Init them.
1364 (ppc_stub_name): Correct string size.
1365 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
1366 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
1367 used.
1368 (ppc_type_of_stub): Tweak root.type test.
1369 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
1370 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
1371 ppc_stub_plt_branch_r2off.
1372 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
1373 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
1374 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
1375 Initialize elf_gp and toc_curr.
1376 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
1377 (ppc64_elf_next_input_section): Set toc_off.
1378 (group_sections): Ensure groups have the same TOC.
1379 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
1380 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
1381 Build new glink stub.
1382 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
1383 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
1384 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
1385 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
1386 * section.c (struct sec): Rename flag12 to has_gp_reloc.
1387 (STD_SECTION): Update.
1388 * ecoff.c (bfd_debug_section): Update comment.
1389 * bfd-in2.h: Regenerate.
1390
90fff0d4
DJ
13912003-06-05 Daniel Jacobowitz <drow@mvista.com>
1392
1393 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
1394 NULL function pointers.
1395
c82b20e4
DJ
13962003-06-05 Daniel Jacobowitz <drow@mvista.com>
1397
1398 * simple.c (bfd_simple_get_relocated_section_contents): Call
1399 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
1400
53d4437a
SS
14012003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1402
5a5b9651
SS
1403 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
1404 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
1405 swaptables.
1406 * coff-tic4x.c: Ditto
53d4437a
SS
1407 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
1408 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
1409 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
1410 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
1411 swap tables.
53d4437a
SS
1412 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
1413 * coff-a29k.c: Append COFF_SWAP_TABLE argument
1414 * coff-apollo.c: Ditto
1415 * coff-arm.c: Ditto
1416 * coff-h8300.c: Ditto
1417 * coff-h8500.c: Ditto
1418 * coff-i960.c: Ditto
1419 * coff-m68k.c: Ditto
1420 * coff-m88k.c: Ditto
1421 * coff-mcore.c: Ditto
1422 * coff-sh.c: Ditto
1423 * coff-sparc.c: Ditto
1424 * coff-tic80.c: Ditto
1425 * coff-we32k.c: Ditto
1426 * coff-z8k.c: Ditto
1427 * coff-w65.c: Ditto
1428
736694c8
SS
14292003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
1430
1431 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
1432 initialization bug
1433
9ee5e499
JJ
14342003-06-03 Jakub Jelinek <jakub@redhat.com>
1435
1436 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
1437 (bfd_section_from_phdr): Likewise.
1438 (map_sections_to_segments): Create PT_GNU_STACK segment header.
1439 (get_program_header_size): Count with PT_GNU_STACK.
1440 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
1441 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
1442
6f6f27f8
L
14432003-06-03 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 * elflink.h (elf_link_input_bfd): Call linker error_handler
1446 for discarded definitions.
1447
a3b6428f
NC
14482003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
1449
1450 * syms.c (decode_section_type): Return 'n' if section flags are
1451 SEC_HAS_CONTENTS && SEC_READONLY.
1452
e30ddb24
NC
14532003-06-03 Nick Clifton <nickc@redhat.com>
1454
1455 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
1456 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
1457 (v850_elf_reloc_map): Likewise.
1458 (v850_elf_check_relocs): Likewise.
1459 (v850_elf_perform_relocation): Likewise.
1460 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 1461 to make R_V850_REl32 pc-relative.
adadcc0c 1462
2558b9a9
KK
14632003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1464
1465 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
1466 and DT_DEBUG dynamic tag even for position independent executables.
1467 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
1468
f15398ef
DJ
14692003-06-02 Daniel Jacobowitz <drow@mvista.com>
1470
1471 * config.bfd: Move obsolete entries out of the range of the
1472 targmatch sed script.
1473
cad28985
DJ
14742003-06-02 Daniel Jacobowitz <drow@mvista.com>
1475
1476 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
1477
f2c822e3
JJ
14782003-05-31 Jakub Jelinek <jakub@redhat.com>
1479
1480 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
1481 plt entries, not just 8191.
1482
c9c27aad
DJ
14832003-05-30 Daniel Jacobowitz <drow@mvista.com>
1484
1485 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
1486 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
1487
36af4a4e
JJ
14882003-05-30 Ulrich Drepper <drepper@redhat.com>
1489 Jakub Jelinek <jakub@redhat.com>
1490
1491 * elflink.h (elf_link_add_object_symbols): Use !info->executable
1492 instead of info->shared where appropriate.
1493 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
1494 * elflink.c (_bfd_elf_create_got_section): Likewise.
1495 (_bfd_elf_link_create_dynamic_sections): Likewise.
1496 (_bfd_elf_link_assign_sym_version): Likewise.
1497 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
1498 and DT_DEBUG dynamic tag even for position independent executables.
1499 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
1500 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
1501 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
1502 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
1503 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
1504 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
1505 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
1506 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
1507 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
1508
f8843e87
AM
15092003-05-30 Kris Warkentin <kewarken@qnx.com>
1510
1511 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
1512 signalled thread.
1513 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
1514
29e1a6e4
NC
15152003-05-29 Nick Clifton <nickc@redhat.com>
1516
1517 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
1518 Tidy up formatting.
1519 * Makefile.am: Add dependency on safe-ctype.h.
1520 * Makefile.in: Regenerate.
1521
4b555070
TS
15222003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1523
1524 * elfxx-mips.c: Don't force symbols local unconditionally.
1525
0236e03e
L
15262003-05-28 Alan Modra <amodra@bigpond.net.au>
1527
1528 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
1529 undefined_symbol call.
1530
9e4aeb93
RS
15312003-05-27 Richard Sandiford <rsandifo@redhat.com>
1532
1533 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
1534 (mips_elf_link_hash_table): Likewise.
1535
d0c728db
TS
15362003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1537
1538 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1539 R_MIPS_GNU_REL16_S2 support.
1540 (bfd_elf64_bfd_reloc_type_lookup): Use it.
1541 (mips_elf64_rtype_to_howto): Use it.
1542 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
1543 R_MIPS_GNU_REL16_S2 support.
1544 (bfd_elf32_bfd_reloc_type_lookup): Use it.
1545 (mips_elf_n32_rtype_to_howto): Use it.
1546
759ebd76
DA
15472003-05-21 Stuart F. Downing <sdowning@fame.com>
1548
1549 * som.h: Define PA_2_0 before including a.out.h
1550
143d77c5
EC
15512003-05-07 Eric Christopher <echristo@redhat.com>
1552 Alexandre Oliva <aoliva@redhat.com>
1553
1554 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
1555 pic tests, change to warning.
1556 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
1557
cea3d58d
NC
15582003-05-21 Marcus Comstedt <marcus@mc.pp.se>
1559
1560 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
1561 well as shle-...-netbsdelf. Remove duplicate entry.
1562
385a4c14
NC
15632003-05-21 Nick Clifton <nickc@redhat.com>
1564
60e42408
NC
1565 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
1566 for X_STORMY16_REL_12 reloc.
1567
385a4c14 1568 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 1569 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
1570 (bfd_elf_get_runpath_list): Likewise.
1571
129b8c20
RM
15722003-05-19 Roland McGrath <roland@redhat.com>
1573
1574 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
1575 * bfd-in.h: Declare it.
1576 * bfd-in2.h: Regenerated.
1577 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
1578 * elf-bfd.h (struct elf_backend_data): New function pointer member
1579 elf_backend_bfd_from_remote_memory.
1580 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
1581 Declare them.
1582 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
1583 (elfNN_bed): Add that to the initializer.
1584
15852003-05-15 Roland McGrath <roland@redhat.com>
1586
1587 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
1588
22d5e339
L
15892003-05-20 Jakub Jelinek <jakub@redhat.com>
1590
1591 * elflink.h (elf_link_output_extsym): Only issue error about !=
1592 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
1593
15942003-05-20 H.J. Lu <hongjiu.lu@intel.com>
1595
1596 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
1597 when removing the old definition for symbols with non-default
1598 visibility.
1599
b645cb17
JE
16002003-05-18 Jason Eckhardt <jle@rice.edu>
1601
1602 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
1603
d2ff124f
AS
16042003-05-17 Andreas Schwab <schwab@suse.de>
1605
1606 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
1607 elf_section_data during processing of pc-relative and absolute
1608 relocations.
1609 (elf_m68k_relocate_section): Use the cached reloc section instead
1610 of computing it again. Fix handling of visibility. Don't modify
1611 addend when copying over a relocation into the output.
1612
9c7a29a3
AM
16132003-05-17 Alan Modra <amodra@bigpond.net.au>
1614
1615 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1616 to trim plt entries. Move undefweak non-default visibility test..
1617 (allocate_dynrelocs): ..from here.
1618 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
1619 dynamic_sections_created here. Update comment. Move undefweak
1620 non-default visibility test..
1621 (allocate_dynrelocs): ..from here. Fix comment.
1622 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
1623 to trim plt entries. Move undefweak non-default visibility test..
1624 (allocate_dynrelocs): ..from here. Fix comment.
1625 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
1626 STV_DEFAULT rather than comparing with zero.
1627 * elflink.c (_bfd_elf_merge_symbol): Likewise.
1628 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
1629
9bcf4de0
TS
16302003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1631
1632 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
1633 pointers.
1634 (_bfd_set_gp_value): Likewise.
1635
5d1db417
MS
16362003-05-16 Michael Snyder <msnyder@redhat.com>
1637 From Bernd Schmidt <bernds@redhat.com>
1638 * archures.c (bfd_mach_h8300sx): New.
1639 * bfd-in2.h: Regenerate.
1640 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
1641 (h8300sx_info_struct): New.
1642 (h8300s_info_struct): Link to it.
1643 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
1644 (elf32_h8_final_write_processing): Likewise.
1645 (elf32_h8_relax_section): Likewise.
1646
80c7c40a
NC
16472003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
1648
1649 * config.bfd: Accept i[3-7]86 variants.
1650 * configure.host: Likewise.
1651 * configure.in: Likewise.
1652 * configure: Regenerate.
1653
c1be741f
L
16542003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1655
1656 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
1657 symbol.
1658
a15d9d3a
L
16592003-05-15 H.J. Lu <hongjiu.lu@intel.com>
1660
1661 * elflink.h (elf_link_check_versioned_symbol): Also allow
1662 the base version.
1663
09695f56
AM
16642003-05-15 Alan Modra <amodra@bigpond.net.au>
1665 H.J. Lu <hongjiu.lu@intel.com>
1666
1667 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
1668 (elf_i386_relocate_section): Likewise.
1669 * elf32-ppc.c (allocate_dynrelocs): Likewise.
1670 (ppc_elf_relocate_section): Likewise.
1671 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1672 (ppc64_elf_relocate_section): Likewise.
1673
40f62fa0
TS
16742003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
1675
1676 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
1677
47247ced
SC
16782003-05-13 Stephane Carrez <stcarrez@nerim.fr>
1679
1680 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
1681 processor capability, allow merge of HC12 and HCS12 in some cases.
1682 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
1683 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
1684 (bfd_m68hc12_arch): Link it.
1685 (scan_mach): New function.
1686
32dfa85d
AH
16872003-05-13 Andrew Haley <aph@redhat.com>
1688
1689 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
1690
586119b3
AM
16912003-05-13 Alan Modra <amodra@bigpond.net.au>
1692 H.J. Lu <hongjiu.lu@intel.com>
1693
1694 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
1695 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
1696 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
1697 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
1698 (ppc_elf_relocate_section): Likewise.
1699 * elf64-ppc.c (allocate_dynrelocs): Likewise.
1700 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
1701 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
1702 relocs need no other types.
1703 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
1704 dynreloc check.
1705 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
1706 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
1707 .got relocs.
1708
04e534c3
KK
17092003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1710
1711 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
1712 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 1713 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
1714 visibility, a) don't allocate plt entries, b) don't allocate
1715 .got relocs, c) discard dyn rel space
adadcc0c
AM
1716 (sh_elf_relocate_section): d) don't generate .got relocs, e)
1717 don't generate dynamic relocs.
04e534c3
KK
1718 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
1719 for weakdefs when symbol already adjusted.
1720
0afb2dc0
NC
17212003-05-12 Nick Clifton <nickc@redhat.com>
1722
1723 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
1724 overflow detection for R_XSTORMY16_16 reloc.
1725
9d29900b
NC
17262003-05-12 Paul Clarke <paulc@senet.com.au>
1727
1728 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
1729
a48c6a54
JE
17302003-05-11 Jason Eckhardt <jle@rice.edu>
1731
1732 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
1733 adjust upper bits.
1734 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
1735 proper place.
1736 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
1737 proper place.
1738
44f745a6
AS
17392003-05-11 Andreas Schwab <schwab@suse.de>
1740
1741 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
1742 complicated tests for unresolvable relocs with a simple direct
1743 scheme using "unresolved_reloc" var. Report some detail on
1744 bfd_reloc_outofrange and similar errors.
1745
4ec72bde
MS
17462003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1747
1748 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
1749 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
1750 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
1751 * elf64-s390.c: Likewise.
1752
64285810
MS
17532003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1754
1755 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
1756 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
1757 ELF_LINK_NON_GOT_REF from weakdef.
1758 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
1759 already been adjusted before treating it specially.
1760 * el64-s390.c: Likwise.
1761
82058a73
MS
17622003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
1763
1764 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
1765 non-default visibility, a) don't make them dynamic, b) discard
1766 space for dynamic relocs.
1767 (elf_s390_relocate_section): Initialize the GOT entries and skip
1768 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
1769 symbols with non-default visibility.
1770 * elf64-s390.c: Likewise.
1771
60d8b524
AM
17722003-05-09 Alan Modra <amodra@bigpond.net.au>
1773
1774 * cpu-arm.c (arm_check_note): Warning fix.
1775 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
1776 to keep relocs if edited.
1777 (iq2000_elf_print_private_bfd_data): Return TRUE.
1778 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
1779 ELF64_R_SYM.
1780 (elfNN_ia64_relax_ldxmov): Warning fix.
1781 * xtensa-isa.c (xtensa_add_isa): Warning fix.
1782 * xtensa-modules.c (get_num_opcodes): Warning fix.
1783
e57b5356
AM
17842003-05-09 Andrey Petrov <petrov@netbsd.org>
1785
1786 * elf.c (elf_fake_sections): Use correct cast for sh_name.
1787
45d6a902
AM
17882003-05-09 Alan Modra <amodra@bigpond.net.au>
1789
1790 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
1791 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
1792 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
1793 (bfd_elf_record_link_assignment): Move from elflink.h.
1794 (_bfd_elf_merge_symbol): Likewise.
1795 (_bfd_elf_add_default_symbol): Likewise.
1796 (_bfd_elf_export_symbol): Likewise.
1797 (_bfd_elf_link_find_version_dependencies): Likewise.
1798 (_bfd_elf_link_assign_sym_version): Likewise.
1799 (_bfd_elf_link_read_relocs): Likewise.
1800 (_bfd_elf_link_size_reloc_section): Likewise.
1801 (_bfd_elf_fix_symbol_flags): Likewise.
1802 (_bfd_elf_adjust_dynamic_symbol): Likewise.
1803 (_bfd_elf_link_sec_merge_syms): Likewise.
1804 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
1805 and bed->s->sizeof_rela.
1806 (_bfd_elf_link_output_relocs): Likewise.
1807 * elf-bfd.h (struct elf_size_info): Rename file_align to
1808 log_file_align.
1809 (struct elf_info_failed): Move from elflink.h.
1810 (struct elf_assign_sym_version_info): Likewise.
1811 (struct elf_find_verdep_info): Likewise.
1812 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
1813 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
1814 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
1815 _bfd_elf_link_assign_sym_version,
1816 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
1817 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
1818 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
1819 _bfd_elf_link_sec_merge_syms): Declare.
1820 (bfd_elf32_link_create_dynamic_sections): Don't declare.
1821 (_bfd_elf32_link_read_relocs): Likewise.
1822 (bfd_elf64_link_create_dynamic_sections): Likewise.
1823 (_bfd_elf64_link_read_relocs): Likewise.
1824 * elflink.h: Move lots o' stuff elsewhere.
1825 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
1826 (bfd_elf64_record_link_assignment): Likewise.
1827 (bfd_elf_record_link_assignment): Declare.
1828 * bfd-in2.h: Regenerate.
1829 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
1830 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
1831 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
1832 (assign_file_positions_for_segments): Likewise.
1833 (assign_file_positions_except_relocs): Likewise.
1834 (swap_out_syms, elfcore_write_note): Likewise.
1835 * elf-m10200.c: Adjust for changed function names.
1836 * elf-m10300.c: Likewise.
1837 * elf32-arm.h: Likewise.
1838 * elf32-h8300.c: Likewise.
1839 * elf32-hppa.c: Likewise.
1840 * elf32-ip2k.c: Likewise.
1841 * elf32-m32r.c: Likewise.
1842 * elf32-m68hc11.c: Likewise.
1843 * elf32-m68hc1x.c: Likewise.
1844 * elf32-m68k.c: Likewise.
1845 * elf32-mips.c: Likewise.
1846 * elf32-ppc.c: Likewise.
1847 * elf32-sh.c: Likewise.
1848 * elf32-v850.c: Likewise.
1849 * elf32-xtensa.c: Likewise.
1850 * elf64-alpha.c: Likewise.
1851 * elf64-hppa.c: Likewise.
1852 * elf64-mmix.c: Likewise.
1853 * elf64-ppc.c: Likewise.
1854 * elf64-sh64.c: Likewise.
1855 * elfxx-ia64.c: Likewise.
1856 * elfxx-mips.c: Likewise.
1857 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
1858 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
1859 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
1860 * elf64-mips.c (mips_elf64_size_info): Likewise.
1861 * elf64-s390.c (s390_elf64_size_info): Likewise.
1862 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
1863
bf1e742e
L
18642003-05-08 H.J. Lu <hongjiu.lu@intel.com>
1865
1866 * elflink.h (elf_add_default_symbol): After skipping the
1867 unversioned symbol, go to non-default one.
1868
6a32c710
L
18692003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1870
1871 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
1872 want_plt field.
1873 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
1874 for symbols with non-default visibility.
1875
71552942
L
18762003-05-07 H.J. Lu <hongjiu.lu@intel.com>
1877
1878 * elflink.h (elf_link_check_versioned_symbol): Also handle the
1879 case that a DSO references a hidden symbol which may be
1880 satisfied by a versioned symbol in another DSO.
1881 (elf_link_output_extsym): Check versioned definition for hidden
1882 symbol referenced by a DSO.
1883
208c2cd6
NC
18842003-05-07 Nick Clifton <nickc@redhat.com>
1885
1886 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
1887 R_XSTORMY16_16 reloc to ignore overflows.
1888
aa701218
AO
18892003-05-06 Alexandre Oliva <aoliva@redhat.com>
1890
1891 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
1892 error message for mixing different-endian files. Check for ABI
1893 compatibility of input files with the selected emulation.
1894
4e795f50
AM
18952003-05-05 Alan Modra <amodra@bigpond.net.au>
1896
1897 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
1898 non-default visibility, a) don't make them dynamic, b) discard
1899 space for dynamic relocs.
1900 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
1901
1902 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
1903 non-default visibility, a) don't allocate plt entries, b) don't
1904 allocate .got relocs, c) discard dyn rel space,
1905 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
1906 don't generate dynamic relocs.
1907 * elf64-ppc.c (allocate_dynrelocs): As above.
1908 (ppc64_elf_relocate_section): As above.
1909
4bc6e03a
AJ
19102003-05-05 Andreas Jaeger <aj@suse.de>
1911
1912 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
1913 relocation entries for weak undefined symbols with non-default
1914 visibility.
1915 (elf64_x86_64_relocate_section): Initialize the GOT entries and
1916 skip R_386_32/R_386_PC32 for weak undefined symbols with
1917 non-default visibility.
1918
ef5aade5
L
19192003-05-04 H.J. Lu <hjl@gnu.org>
1920
1921 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
1922 relocation entries for weak undefined symbols with non-default
1923 visibility.
1924 (elf_i386_relocate_section): Initialize the GOT entries and
1925 skip R_386_32/R_386_PC32 for weak undefined symbols with
1926 non-default visibility.
129b8c20 1927
ef5aade5
L
1928 * elfxx-ia64.c (allocate_fptr): Don't allocate function
1929 descriptors for weak undefined symbols with non-default
1930 visibility.
1931 (allocate_dynrel_entries): Don't allocate relocation entries
1932 for symbols resolved to 0.
1933 (set_got_entry): Don't install dynamic relocation for weak
1934 undefined symbols with non-default visibility.
1935 (set_pltoff_entry): Likewise.
1936
1937 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
1938 with non-default visibility.
1939 (elf_link_output_extsym): Don't make weak undefined symbols
1940 with non-default visibility dynamic.
1941
c424e0e9
L
19422003-05-04 H.J. Lu <hjl@gnu.org>
1943
1944 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
1945
d31e3dfe
L
19462003-05-04 H.J. Lu <hjl@gnu.org>
1947
1948 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
1949 symbol dynamic. Check indirection when removing the old
1950 definition for symbols with non-default visibility.
1951 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
1952
4d2e1ff0
NC
19532003-05-02 Nick Clifton <nickc@redhat.com>
1954
1955 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
1956 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
1957 unsigned overflow.
1958
d40d037c
AJ
19592003-05-02 Andreas Jaeger <aj@suse.de>
1960
1961 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
1962 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1963 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
1964 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
1965 ELF_LINK_NON_GOT_REF from weakdef.
1966
c5d1701e
NC
19672003-05-02 Charles Lepple <clepple@ghz.cc>
1968 Nick Clifton <nickc@redhat.com>
1969
1970 * acinclude.m4: Fix name of --enable-install-libbfd switch.
1971 * aclocal.m4: Regenerate.
1972 * configure: Regenerate.
1973 * Makefile.in: Regenerate.
1974
81848ca0
AM
19752003-05-01 Alan Modra <amodra@bigpond.net.au>
1976
1977 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
1978 weakdef sym has already been adjusted before treating it specially.
1979 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
1980 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
1981 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
1982 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 1983
c7996ad6
L
19842003-04-28 H.J. Lu <hjl@gnu.org>
1985
1986 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
1987 the relax finalize pass.
1988
1989 * section.c (struct sec): Add need_finalize_relax and remove
1990 flag11.
1991 (STD_SECTION): Update struct sec initializer.
1992 * bfd-in2.h: Regenerated.
1993
f006af20
L
19942003-04-28 H.J. Lu <hjl@gnu.org>
1995
1996 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
1997 to copy any information related to dynamic linking when we flip
1998 the indirection.
1999
1b1fe8fe
L
20002003-04-27 H.J. Lu <hjl@gnu.org>
2001
2002 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
2003 (ELF_LINK_DYNAMIC_WEAK): New.
2004
2005 * elflink.h (elf_merge_symbol): Add one argument to indicate if
2006 a symbol should be skipped. Ignore definitions in dynamic
2007 objects for symbols with non-default visibility.
2008 (elf_add_default_symbol): Adjusted.
2009 (elf_link_add_object_symbols): Check if a symbol should be
2010 skipped. Don't merge the visibility field with the one from
2011 a dynamic object.
2012 (elf_link_check_versioned_symbol): Use undef_bfd.
2013 (elf_link_output_extsym): Warn if a forced local symbol is
2014 referenced from dynamic objects. Make non-weak undefined symbol
2015 with non-default visibility a fatal error.
2016
052a450c
DJ
20172003-04-27 Daniel Jacobowitz <drow@mvista.com>
2018
2019 * configure.in: Bump version on HEAD to 2.14.90.
2020 * configure: Regenerated.
2021
d204f4c0
SC
20222003-04-26 Stephane Carrez <stcarrez@nerim.fr>
2023
2024 PR savannah/3331:
2025 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
2026 when we couldn't relax something.
2027
3c0a515d
L
20282003-04-25 Alan Modra <amodra@bigpond.net.au>
2029
2030 * elflink.h (elf_merge_symbol): When we find a regular definition
2031 for an indirect symbol, flip the indirection so that the old
2032 direct symbol now points to the new definition.
2033
d145330d
RM
20342003-04-24 Roland McGrath <roland@redhat.com>
2035
2036 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
2037
fc0bffd6
AM
20382003-04-24 Alan Modra <amodra@bigpond.net.au>
2039
2040 * elf32-ppc.c: Formatting and comment fixes.
2041 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
2042 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
2043
20442003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
2045
2046 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
2047 * bfd-in2.h: Rebuilt.
2048 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 2049 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
2050 & H8300SNMAGIC.
2051 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
2052 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
2053 (h8300sn_info_struct, h8300hn_info_struct): New.
2054 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
2055 (elf32_h8_final_write_processing): Likewise.
2056
267fb3c1
KK
20572003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2058
2059 * elf32-sh.c (tpoff): New.
2060 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
2061 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 2062 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 2063 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 2064 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
2065 (dtpoff_base): Fix wrong indentation.
2066 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
2067 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
2068 R_SH_TLS_TPOFF32 relocations.
2069
ef230218
JR
20702003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
2071
2072 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
2073 * cpu-sh.c: Likewise.
2074 * elf32-sh.c: Likewise.
2075 * reloc.c (bfd_reloc_code_real): Likewise.
2076 * elf32-sh64-com.c: Change comment to refer to SuperH.
2077 * elf32-sh64.c: Likewise.
2078 * elf64-sh64.c: Likewise.
2079 * bfd-in2.h (enum bfd_architecture): Regenerate.
2080
8c29f035
AM
20812003-04-23 Alan Modra <amodra@bigpond.net.au>
2082
2083 From Julien LEMOINE <speedblue@debian.org>
2084 * elf32-i386.c (elf_i386_info_to_howto): Delete.
2085 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
2086
26597c86
NC
20872003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
2088
2089 * archures.c: Replace references to Mitsubishi M32R with references
2090 to Renesas M32R.
2091 * relocs.c: Likewise.
2092 * bfd-in2.h: Regenerate.
2093
cc13e3ef
RH
20942003-04-21 Richard Henderson <rth@redhat.com>
2095
2096 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
2097 executable when a symbol is defined both regular and dynamic.
2098
f5a6f915
SC
20992003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2100
2101 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
2102 (elf32-m68hc1x.lo): Update dependencies
2103 * configure.in: Add elf32-m68hc1x.lo.
2104 * configure: Rebuild.
2105 * Makefile.in: Rebuild.
2106
3a65329d
SC
21072003-04-21 Stephane Carrez <stcarrez@nerim.fr>
2108
2109 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2110 (m68hc11_elf_hash_table_create): New function.
2111 (elf32_m68hc11_link_hash_table_free): New function.
2112 (stub_hash_newfunc): New function.
2113 (m68hc11_add_stub): New function.
2114 (elf32_m68hc11_add_symbol_hook): New function.
2115 (elf32_m68hc11_setup_section_lists): New function.
2116 (elf32_m68hc11_next_input_section): New function.
2117 (elf32_m68hc11_size_stubs): New function.
2118 (elf32_m68hc11_build_stubs): New function.
2119 (m68hc11_get_relocation_value): New function.
2120 (elf32_m68hc11_relocate_section): Call the above to redirect
2121 some relocations to the trampoline code.
2122 (m68hc11_elf_export_one_stub): New function.
2123 (m68hc11_elf_set_symbol): New function.
2124 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
2125 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
2126 is not yet initialized.
2127
2128 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
2129 (elf32_m68hc11_stub_hash_entry): New struct.
2130 (m68hc11_page_info): Add trampoline handler address.
2131 (m68hc11_elf_link_hash_table): Add stubs generation members.
2132 (elf32_m68hc11_add_symbol_hook): Declare.
2133 (elf32_m68hc11_setup_section_lists): Declare.
2134 (elf32_m68hc11_size_stubs): Declare.
2135 (elf32_m68hc11_build_stubs): Declare.
8c29f035 2136
3a65329d
SC
2137 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
2138 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
2139 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
2140 (_bfd_m68hc11_elf_set_private_flags): Ditto.
2141 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
2142 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
2143 (bfd_elf32_bfd_link_hash_table_create): Define.
2144 (elf_backend_add_symbol_hook): Define.
2145 (m68hc11_elf_bfd_link_hash_table_create): New function.
2146 (m68hc11_elf_build_one_stub): New function.
2147 (m68hc11_elf_size_one_stub): New function.
2148 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
2149 (bfd_elf32_bfd_link_hash_table_create): Define.
2150
2151 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
2152 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
2153 (m68hc12_phys_addr): Ditto.
2154 (m68hc12_phys_page): Ditto.
2155 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
2156 (elf32_m68hc11_gc_mark_hook): Likewise.
2157 (elf32_m68hc11_gc_sweep_hook): Likewise.
2158 (elf32_m68hc11_check_relocs): Likewise.
2159 (elf32_m68hc11_relocate_section): Likewise.
2160 (_bfd_m68hc12_elf_set_private_flags): Likewise.
2161 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
2162 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
2163 (m68hc12_elf_build_one_stub): New function.
2164 (m68hc12_elf_size_one_stub): New function.
2165 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
2166 (elf_backend_add_symbol_hook): Define.
2167 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
2168
4081944f
NC
21692003-04-18 Nick Clifton <nickc@redhat.com>
2170
2171 * format.c (bfd_check_format_matches): Only check associated
2172 vector if the matching_vector has been created.
2173
060dc71d
AO
21742003-04-15 Alexandre Oliva <aoliva@redhat.com>
2175
2176 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
2177 2003-04-09's change.
2178
a3476bef
NC
21792003-04-15 Brian Ford <ford@vss.fsi.com>
2180
2181 * peicode.h (coff_swap_scnhdr_in): If a section holds
2182 uninitialized data and is from an object file or from an
2183 executable image that has not initialized the s_size field, or if
2184 the physical size is padded, use the virtual size (stored in
2185 s_paddr) instead.
2186
ca4fa240
NC
21872003-04-15 H.J. Lu <hjl@gnu.org>
2188
2189 * elflink.h (elf_link_add_object_symbols): Properly report
2190 filename for alignment reduction.
2191
c2dcd04e
NC
21922003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
2193
2194 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
2195 * reloc.c: Likewise.
2196 * coff-h8300.c: Likewise.
2197 * coff-h8500.c: Likewise.
2198 * coff-sh.c: Likewise.
2199 * cpu-h8300.c: Likewise.
2200 * cpu-sh.c: Likewise.
2201 * elf32-h8300.c: Likewise.
2202 * elf32-sh.c: Likewise.
2203 * elf32-sh64-com.c: Likewise.
2204 * elf32-sh64.c: Likewise.
2205 * elf64-sh64.c: Likewise.
2206 * bfd-in2.h: Regenerate.
2207
f7661995
NC
22082003-04-14 H.J. Lu <hjl@gnu.org>
2209
2210 * elflink.h (elf_link_add_object_symbols): Maintain maximum
2211 alignment for common symbols. Warn reducing alignment for
2212 common symbols. Report old filename when symbol size changes.
2213
93a2b7ae
AO
22142003-04-12 Alexandre Oliva <aoliva@redhat.com>
2215
2216 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
2217 occurrences of the same test changed in the previous patch.
2218 Optimize.
2219
0176c794
AO
22202003-04-11 Alexandre Oliva <aoliva@redhat.com>
2221
2222 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
2223 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
2224 GOT_DISP/addend only if the symbol got a global GOT entry.
2225
0fdc1bf1
AO
22262003-04-10 Alexandre Oliva <aoliva@redhat.com>
2227
2228 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
2229 GOT_PAGE/GOT_OFST referencing overridable symbol to
2230 GOT_DISP/addend.
2231 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
2232 global symbol as GOT_DISP.
2233
9b8c98a4
BW
22342003-04-10 Bob Wilson <bob.wilson@acm.org>
2235
2236 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
2237 next relocation on an undefined symbol.
2238
ec1659c8
RH
22392003-04-09 Richard Henderson <rth@redhat.com>
2240
2241 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
2242 Ignore relocations against r_symndx == 0.
2243
7dfb07f7
L
22442003-04-09 H.J. Lu <hjl@gnu.org>
2245
2246 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
2247 FALSE for undefined symbols.
2248 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2249
a3805e4e
AO
22502003-04-09 Alexandre Oliva <aoliva@redhat.com>
2251
2252 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
2253 and IRIX-specific shift-to-64-bit 4-byte lengths before following
2254 addr_size.
2255
69931e60
AO
22562003-04-08 Alexandre Oliva <aoliva@redhat.com>
2257
2258 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
2259 pointer size from ABI, not arch_bits_per_address.
2260
59a8c196
KB
22612003-04-07 Kevin Buettner <kevinb@redhat.com>
2262
2263 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
2264 constants for n32 ABI.
2265
8e16317c
NC
22662003-04-06 Andrew Cagney <cagney@redhat.com>
2267
2268 * simple.c (bfd_simple_get_relocated_section_contents): Disable
2269 free that leads to GDB vs BFD memory corruption.
2270
196486be
SC
22712003-04-04 Stephane Carrez <stcarrez@nerim.fr>
2272
2273 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
2274 symbols that mark the end of the section.
2275 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
2276 converting to a relative branch so that the offset is computed after
2277 the relaxation; also relocate a jsr into a bsr if possible but don't
2278 relax them if they are to a far symbol as we need to call the
2279 trampoline code.
2280 (elf_m68hc11_howto_table): Set pcrel_offset to true.
2281
be33c5dd
SS
22822003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2283
2284 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
2285 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
2286 * bfd-in2.h: Regenerate
2287 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
2288 * cpu-tic4x.c: Ditto
2289
ff0c9faf
NC
22902003-04-03 Nick Clifton <nickc@redhat.com>
2291
2292 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
2293 differently for object files and executables.
2294 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
2295 for object files or for executables who have not already
2296 initialised the field.
2297 * libpei.h (bfd_pe_executable_p): New macro. Return true if
2298 the PE format bfd is an executable.
2299
2b98e6c0
AM
23002003-04-03 Alan Modra <amodra@bigpond.net.au>
2301
2302 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
2303 here as it's too early to reliably determine locality.
2304 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 2305 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 2306
92403579
BW
23072003-04-02 Bob Wilson <bob.wilson@acm.org>
2308
2309 * xtensa-modules.c: Remove comment indicating that this is a
2310 generated file.
2311
c45a316a
AM
23122003-04-02 Alan Modra <amodra@bigpond.net.au>
2313
2314 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
2315
e0001a05
NC
23162003-04-01 Bob Wilson <bob.wilson@acm.org>
2317
8c29f035
AM
2318 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
2319 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
2320 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
2321 xtensa-modules.lo.
2322 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
2323 xtensa-modules.c.
2324 (cpu-xtensa.lo): New target.
2325 (elf32-xtensa.lo): Likewise.
2326 (xtensa-isa.lo): Likewise.
2327 (xtensa-modules.lo): Likewise.
2328 * Makefile.in: Regenerate.
2329 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
2330 (bfd_archures_list): Add bfd_xtensa_arch.
2331 * config.bfd: Handle xtensa-*-*.
2332 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
2333 * configure: Regenerate.
2334 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
2335 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
2336 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
2337 (bfd_elf32_xtensa_le_vec): Likewise.
2338 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
2339 * cpu-xtensa.c: New file.
2340 * elf32-xtensa.c: Likewise.
2341 * xtensa-isa.c: Likewise.
2342 * xtensa-modules.c: Likewise.
2343 * libbfd.h: Regenerate.
2344 * bfd-in2.h: Likewise.
e0001a05 2345
5a6c6817
NC
23462003-04-01 Nick Clifton <nickc@redhat.com>
2347
2348 * archures.c (bfd_mach_arm_unknown): Define.
2349 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
2350 bfd_arm_get_mach_from_notes): Prototype.
2351 * bfd-in2.h: Regenerate.
2352 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
2353 bfd_arm_merge_machines.
2354 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
2355 * coffcode.h (coff_set_arch_mach_hook): Call
2356 bfd_arm_get_mach_from_notes.
2357 * coffgen.c (coff_real_object_p): Revert previous delta.
2358 * cpu_arm.c (arm_check_note): New function. Examine a note in a
2359 .note section.
2360 (bfd_arm_merge_machines): New function: Handle the merging of ARM
2361 binaries compiled for different architectures..
2362 (bfd_arm_update_notes): New function: Update an ARM note section.
2363 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
2364 number from an ARM note section.
2365 * elf32-arm.h (elf32_arm_object_p): Use
2366 bfd_arm_get_mach_from_notes.
2367 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
2368 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 2369
0cc1cf99
BE
23702003-04-01 Ben Elliston <bje@wasabisystems.com>
2371
2372 * dwarf2.c (read_attribute_value): Correct typo in comment.
2373
af3ef9fe
NC
23742003-04-01 Nick Clifton <nickc@redhat.com>
2375
2376 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
2377 instead of concat().
2378 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
2379 (add_line_info): Make a copy of the filename when storing it into
2380 the info structure.
af3ef9fe 2381
6e84a906
DJ
23822003-03-31 Andreas Schwab <schwab@suse.de>
2383 Daniel Jacobowitz <drow@mvista.com>
2384
2385 * simple.c (bfd_simple_get_relocated_section_contents): Add
2386 parameter symbol_table. Optionally use it instead of the symbol
2387 table from the bfd. Save and restore output offsets and output
2388 sections around bfd_get_relocated_section_contents. Fix a memory
2389 leak.
2390 (simple_save_output_info, simple_restore_output_info): New
2391 functions.
2392 * bfd-in2.h: Regenerate.
2393 * dwarf2.c (read_abbrevs): Use
2394 bfd_simple_get_relocated_section_contents instead of
2395 bfd_get_section_contents.
2396 (decode_line_info): Likewise.
2397 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
2398 find_rela_addend.
2399 (find_rela_addend): Remove.
2400 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
2401 debugging sections.
2402 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
2403 not bfd_zalloc.
2404
5ed6aba4
NC
24052003-03-31 David Heine <dlheine@suif.stanford.edu>
2406
2407 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
2408 bfd_alloc.
2409 * dwarf2.c (concat_filename): Always allocate space for the
2410 returned filename.
2411 (decode_line_info): Free the allocated filename returned by
2412 concat_filename.
2413 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
2414 * elf.c (copy_private_bfd_data): Likewise.
2415 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
2416 * elflink.h (elf_link_sort_relocs): Fix memory leak.
2417 * format.c (bfd_check_format_matches): Likewise.
2418 * linker.c (bfd_generic_final_link): Likewise.
2419 * opncls.c (find_separate_debug_info): Likewise.
2420 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 2421
5941afc1
L
24222003-03-28 H.J. Lu <hjl@gnu.org>
2423
2424 * elflink.h (elf_link_add_object_symbols): Correctly combine
2425 visibilities.
2426
9d73f260
JJ
24272003-03-27 Jakub Jelinek <jakub@redhat.com>
2428
2429 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
2430 to -1 before recomputing got offsets.
2431
a5ad465a
AS
24322003-03-26 Andreas Schwab <schwab@suse.de>
2433
2434 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2435 (elf_m68k_relocate_section): Use it to correctly handle symbols
2436 forced to be local.
2437 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
2438 entries for symbols that are forced to be local.
2439
d0647110
AO
24402003-03-25 Alexandre Oliva <aoliva@redhat.com>
2441
2442 * elfxx-mips.c (_bfd_mips_relax_section): New function.
2443 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
2444 * elfn32-mips.c, elf64-mips.c: Use it.
2445
e16bb312
NC
24462003-03-25 Stan Cox <scox@redhat.com>
2447 Nick Clifton <nickc@redhat.com>
8c29f035 2448
9b5ecbd0 2449 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
2450
2451 * archures.c: Add bfd_mach_arm_iWMMXt.
2452 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
2453 * bfd-in2.h: Regenerate.
2454 * libbfd.h: Regenerate.
2455 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
2456 object files to be linked with XScale ones.
2457 (coff_arm_final_link_postscript): Update note section.
2458 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
2459 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
2460 after identifying a coff binary.
2461 * cpu-arm.c (processors): Add iWMMXt.
2462 (arch_inf): Likewise.
2463 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 2464 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
2465 be linked with XScale ones.
2466 (elf32_arm_section_flags): New function: Set flags on note section.
2467 (elf32_arm_final_write_processing): Handle note section.
2468
25f14c34
DD
24692003-03-21 DJ Delorie <dj@redhat.com>
2470
2471 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
2472 _bfd_elf_rela_local_sym.
2473
04b3329b
L
24742003-03-20 H.J. Lu <hjl@gnu.org>
2475
2476 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
2477 non-ELF outputs.
2478
c25cfdf8
NC
24792003-03-20 Nick Clifton <nickc@redhat.com>
2480
2481 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
2482 $idata5 in case bfd_coff_final_link is not called.
2483
3e1d7f19
JJ
24842003-03-19 Jakub Jelinek <jakub@redhat.com>
2485
2486 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
2487 field.
2488 (canon_reloc_count): Define.
2489 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
2490 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
2491 reloc_count.
2492 (sparc64_elf_canonicalize_reloc): New routine.
2493 (bfd_elf64_canonicalize_reloc): Define.
2494
3fa1d917
JJ
24952003-03-18 Jakub Jelinek <jakub@redhat.com>
2496
2497 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
2498 againt mergeable sections. Take r_addend into account when caching
2499 trampolines.
2500
f86b235a
RH
25012003-03-18 Richard Henderson <rth@redhat.com>
2502
8c29f035
AM
2503 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
2504 local symbols that have no dyninfo.
f86b235a 2505
49ae03bf
NC
25062003-03-14 Gene Smith <gene.smith@siemens.com>
2507
2508 * ieee.c (ieee_write_expression): Handle the case where symbol is
2509 NULL.
2510 General formatting improvements.
2511
6a457e5c
NC
25122003-03-13 Nick Clifton <nickc@redhat.com>
2513
2514 * configure.in (LINGUAS): Add zh_CN.
2515 * configure: Regenerate.
2516 * po/zh_CN.po: New file.
2517
93516ec3
NC
25182003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
2519
2520 * aout-cris.c (BYTES_IN_WORD): Don't define.
2521 aout-encap.c: Likewise.
2522 aout-ns32k.c: Likewise.
2523 aout-tic30.c: Likewise.
2524 hp300bsd.c: Likewise.
2525 i386aout.c: Likewise.
2526 i386dynix.c: Likewise.
2527 i386linux.c: Likewise.
2528 i386lynx.c: Likewise.
2529 i386mach3.c: Likewise.
2530 m68k4knetbsd.c: Likewise.
2531 m68klinux.c: Likewise.
2532 m68klynx.c: Likewise.
2533 m68knetbsd.c: Likewise.
2534 m88kmach3.c: Likewise.
2535 mipsbsd.c: Likewise.
2536 newsos3.c: Likewise.
2537 sparclinux.c: Likewise.
2538 sparclynx.c: Likewise.
2539 sparcnetbsd.c: Likewise.
2540 vaxbsd.c: Likewise. Fix comment formatting.
2541
fee24f1c
AO
25422003-03-12 Alexandre Oliva <aoliva@redhat.com>
2543
0b25d3e6
AO
2544 * Reverted 2003-03-02's patch.
2545
fee24f1c
AO
2546 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
2547 overridable.
2548 * elf64-mips.c (mips_elf64_canonicalize_reloc,
2549 mips_elf64_get_dynamic_reloc_upper_bound,
2550 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
2551 (bfd_elf64_get_canonicalize_reloc,
2552 bfd_elf64_get_dynamic_reloc_upper_bound,
2553 bfd_elf64_canonicalize_dynamic_reloc): Define.
2554 (mips_elf64_slurp_reloc_table): Support dynamic.
2555 (mips_elf64_slurp_one_reloc_table): Adjust.
2556
64fb1839
NC
25572003-03-12 Nick Clifton <nickc@redhat.com>
2558
2559 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
2560 'index' to 'offset' in test for zero value.
2561
908488f1
AO
25622003-03-11 Alexandre Oliva <aoliva@redhat.com>
2563
2564 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
2565 dynamic relocations pointing to local or section symbols, use the
2566 NULL symbol instead. Document the choice to not emit an
2567 additional R_MIPS_64 relocation.
2568
e515b051
AM
25692003-03-11 Alan Modra <amodra@bigpond.net.au>
2570
2571 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
2572 zero index dynamic tls relocs generated for the GOT. Tidy code.
2573 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
2574 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2575
a23b6845
AM
25762003-03-07 Alan Modra <amodra@bigpond.net.au>
2577
87d243f1
AM
2578 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
2579 a tls_get_addr call.
2580
a23b6845
AM
2581 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2582 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
2583 ELF_LINK_NON_GOT_REF from weakdef.
2584 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
2585 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
2586 ELF_LINK_NON_GOT_REF from weakdef.
2587 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
2588 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
2589 ELF_LINK_NON_GOT_REF from weakdef.
2590
2d36fe5f
AH
25912003-03-06 Jakub Jelinek <jakub@redhat.com>
2592 Andrew Haley <aph@redhat.com>
2593
2594 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
2595 output is relocateable.
2596
34f304a7
NC
25972003-03-06 Steven Konopa <skonopa@kgo.csc.com>
2598
2599 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
2600 R_COMMENT.
2601
7b609f53
AM
26022003-03-06 Alan Modra <amodra@bigpond.net.au>
2603
2604 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
2605 error messages.
2606 (ELIMINATE_COPY_RELOCS): Define to zero.
2607 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
2608 TLSLD relocs. Report reloc types on a number of errors. Optimize
2609 LOCAL24PC check for non-local syms. Don't capitalize error messages.
2610 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
2611 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
2612 calculating TLSLD relocs. Report reloc types on a number of errors.
2613 Don't capitalize error messages.
2614
6a0fb186
L
26152003-03-03 H.J. Lu <hjl@gnu.org>
2616
2617 * elfxx-ia64.c (USE_BRL): Removed.
2618 (oor_ip): Removed.
2619
34f304a7 26202003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
2621
2622 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
2623 relocation (no special function), and make it non-partial_inplace.
2624 (sh_elf_relax_section): When creating a bsr, use a consistent value
2625 no matter if the symbol is extern or not; set addend to -4.
2626 Don't swap load / non-load instructions for SH4.
2627 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
2628 rather than if the symbol is external to determine if adjusting the
2629 offset makes sense. Adjust the addend too if appropriate.
2630 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
2631 relocation.
2632
a9d68a1e
NC
26332003-03-03 Nick Clifton <nickc@redhat.com>
2634
2635 * po/da.po: Installed latest translation.
2636
7c2be35c
TS
26372003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2638
2639 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
2640 R_MIPS_PC16 to rightshift 2.
2641 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
2642 (bfd_elf32_bfd_reloc_type_lookup): Support
2643 BFD_RELOC_MIPSEMB_16_PCREL_S2.
2644 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
2645 R_MIPS_PC16 to rightshift 2.
2646 (mips_elf64_howto_table_rela): Likewise.
2647 (mips_reloc_map): Map to rightshifted BFD reloc.
2648 * elfn32-mips.c: The same as in elf64-mips.c.
2649 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
2650 (mips_elf_calculate_relocation): Handle rightshifted addends for
2651 R_MIPS_PC16.
2652 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
2653 MIPS Embedded PIC. Remove superfluous empty COMMENT.
2654 * libbfd.h: Regenerate.
2655 * bfd-in2.h: Regenerate.
2656
484a4f9c
RH
26572003-02-28 Richard Henderson <rth@redhat.com>
2658
2659 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
2660 for ltoff22x relaxation.
2661
2ce40c65
AM
26622003-03-01 Alan Modra <amodra@bigpond.net.au>
2663
2664 * bfd-in.h (_bfd): Don't define.
2665 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
2666 * syms.c: Likewise.
2667 * bfd-in2.h: Regenerate.
2668
2c4c2bc0
RH
26692003-02-27 Richard Henderson <rth@redhat.com>
2670
2671 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
2672 (elfNN_ia64_check_relocs): Set it.
2673 (allocate_global_data_got): Check it.
2674 (allocate_local_got): Likewise.
2675 (allocate_dynrel_entries): Likewise.
2676 (elfNN_ia64_relax_ldxmov): New.
2677 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
2678 (elfNN_ia64_choose_gp): Split out from ...
2679 (elfNN_ia64_final_link): ... here.
8c29f035 2680
c2852e88
AC
26812003-02-27 Andrew Cagney <cagney@redhat.com>
2682
2683 * bfd.c (struct bfd): Rename "struct _bfd".
2684 * bfd-in.h: Update copyright.
2685 (struct bfd): Rename "struct _bfd".
2686 (_bfd): Define for backward compatibility.
2687 * bfd-in2.h: Regenerate.
2688
3f87cb70
AM
26892003-02-25 Alan Modra <amodra@bigpond.net.au>
2690
3f9a32bd
AM
2691 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
2692 and rel_hdr2 when initially counting input relocs rather than after
2693 creating output reloc sections.
4fabe71e
AM
2694 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
2695 sizes.
3f9a32bd 2696
3f87cb70
AM
2697 * Makefile.am: Run "make dep-am".
2698 * Makefile.in: Regenerate.
2699
07c6e936
NC
27002003-02-24 Kris Warkentin <kewarken@qnx.com>
2701
2702 * elf.c (elfcore_read_notes): Add check for QNX style core file.
2703 (elfcore_grog_nto_note): New function.
2704 (elfcore_grog_nto_gregs): New function.
2705 (elfcore_grog_nto_status): New function.
2706
aad5d350
AM
27072003-02-24 Alan Modra <amodra@bigpond.net.au>
2708
2709 * elflink.c (_bfd_elf_create_got_section): Check existing .got
2710 section flags before concluding that we've already been called.
2711 Don't use register keyword.
2712 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
2713 (_bfd_elf_create_linker_section): Formatting.
2714
2ab1486e
NC
27152003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
2716
2717 * coff-h8300.c: Fix typo: intial -> initial.
2718 * coff-ppc.c: Likewise.
2719
70bccea4
AM
27202003-02-20 Alan Modra <amodra@bigpond.net.au>
2721
2722 * elf32-ppc.c: Formatting.
2723 (allocate_dynrelocs): LD and GD relocs against the same sym need
2724 separate GOT entries.
2725 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
2726 entries per symbol.
2727
ee05f2fe
AM
27282003-02-19 Alan Modra <amodra@bigpond.net.au>
2729
26e41594
AM
2730 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
2731 removal. Localize vars. Remove unnecessary dynobj test.
2732 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
2733 of INFO.
2734 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2735 and optimize.
2736 (elf_i386_relocate_section): Likewise.
2737 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
2738 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2739 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2740 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2741 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2742 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
2743 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
2744 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
2745 Formatting.
2746
f4656909
AM
2747 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
2748 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
2749 test.
2750 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
2751 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2752 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2753 and optimize. Use ELIMINATE_COPY_RELOCS.
2754 (ppc64_elf_relocate_section): Likewise.
2755
ee05f2fe
AM
2756 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
2757 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
2758 (ELIMINATE_COPY_RELOCS): Define.
2759 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
2760 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2761 (MUST_BE_DYN_RELOC): Define.
2762 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
2763 and optimize. Trim dyn_relocs.
2764 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
2765 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
2766 track of pc_rel dyn relocs.
2767 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
2768 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
2769 allocate_dynrelocs. Don't recalculate "sec".
2770
7619e7c7
AM
27712003-02-18 Alan Modra <amodra@bigpond.net.au>
2772
d881513a
AM
2773 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
2774 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
2775 on invalid LD relocs.
2776 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
2777 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
2778 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
2779
7619e7c7
AM
2780 * elf32-ppc.h: New file.
2781 * elf32-ppc.c: Include elf32-ppc.h.
2782 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
2783 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
2784 Add "tls_mask" field.
2785 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
2786 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
2787 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
2788 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
2789 Make use of htab shortcuts throughout file.
2790 (ppc_elf_link_hash_newfunc): Init tls_mask field.
2791 (ppc_elf_link_hash_table_create): Init new fields.
2792 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
2793 (ppc_elf_howto_raw): Add tls relocs.
2794 (ppc_elf_reloc_type_lookup): Handle them.
2795 (ppc_elf_unhandled_reloc): New function.
2796 (ppc_elf_create_got): Stash got section pointer in hash table,
2797 return status. Make .rela.got too.
2798 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
2799 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
2800 NON_GOT_REF set. Don't allocate space in .plt here..
2801 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
2802 not allocating plt entries unnecessarily. Allocate got entries here.
2803 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
2804 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
2805 "info" during allocate_dynrelocs hash traversal. Use htab section
2806 shortcuts rather than searching for named sections. Get rid of
2807 "plt" and "strip" booleans.
2808 (update_local_sym_info, bad_shared_reloc): New functions.
2809 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
2810 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
2811 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
2812 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
2813 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
2814 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
2815 relocs that might use a plt entry. Set NON_GOT_REF too.
2816 Enumerate all do-nothing relocs.
2817 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
2818 tls relocs and all plt relocs.
2819 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
2820 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
2821 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
2822 shortcuts.
2823 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
2824 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
2825 entries and got relocs here. Warn on non-zero got reloc addend.
2826 Split out branch taken/not taken reloc code into a separate switch
2827 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
2828 Split out HA reloc adjustments to separate switch statement. Don't
2829 warn on reloc overflow if we've already warned about undefined.
2830 Don't rebuild sym name when reporting errors. Report all possible
2831 errors from _bfd_final_link_relocate.
2832 (bfd_elf32_bfd_final_link): Don't define.
2833
cd27b276
AM
28342003-02-18 Alan Modra <amodra@bigpond.net.au>
2835
2836 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
2837 rebuild sym name when reporting errors.
2838
ae9a127f
NC
28392003-02-17 Nick Clifton <nickc@redhat.com>
2840
3f9a32bd 2841 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
2842 allow_shlib_undefined for shared libraries.
2843 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
2844 of allow_shlib_undefined.
2845 * elf32-cris.c (cris_elf_relocate_section): Likewise.
2846 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
2847 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
2848 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
2849 * elf32-s390.c (elf_s390_relocate_section): Likewise.
2850 * elf32-sh.c (sh_elf_relocate_section): Likewise.
2851 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
2852 * elf32-vax.c (elf_vax_relocate_section): Likewise.
2853 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
2854 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
2855 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
2856 * elf64-s390.c (elf_s390_relocate_section): Likewise.
2857 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
2858 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
2859 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
2860 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
2861
b5f852ea
NC
28622003-02-17 Nick Clifton <nickc@redhat.com>
2863
2864 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
2865 address field to use in the comparison.
3f9a32bd 2866 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 2867
3193e234
NC
28682003-02-14 Bob Wilson <bob.wilson@acm.org>
2869
2870 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
2871 backends when checking if the generic ELF target should be used.
2872
21efdc8d
NC
2873 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
2874 outside of functions, treat values as absolute addresses.
2875
ed781d5d
NC
2876 * bfd.c: Change embedded documentation to use consistent indentation
2877 and to split up long lines. Change informal style of description
2878 for functions lacking real documentation.
2879 * coffcode.h: Break up long lines in embedded documentation.
2880 * format.c: Likewise.
2881 * targets.c: Likewise.
2882 * libcoff.h: Regenerate.
2883 * bfd-in2.h: Regenerate.
2884
58ac9f71
AM
28852003-02-14 Alan Modra <amodra@bigpond.net.au>
2886
2887 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
2888 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
2889 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
2890 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
2891 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
2892 (group_sections): Don't share a stub section if stubs are for a large
2893 section. Adjust comment.
2894 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
2895 !stubs_always_before_branch.
2896 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
2897 treat undefined and undefweak specially when processing dyn relocs.
2898
9147e853
JJ
28992003-02-13 Jakub Jelinek <jakub@redhat.com>
2900
2901 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
2902
427bfd90
NC
29032003-02-13 Nick Clifton <nickc@redhat.com>
2904
2905 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
2906 in computation of offset to insert into BL instruction.
2907
42b5d0ea
NC
29082003-02-11 Uwe Stieber <uwe@wwws.de>
2909
2910 * config.bfd: Add support for kaOS as cross build target system.
2911
a48ebf4d
AM
29122003-02-11 Alan Modra <amodra@bigpond.net.au>
2913
2914 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
2915 .__tls_get_addr too.
2916 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
2917
c95b8a7a
KK
29182003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
2919
2920 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
2921 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
2922 (sh_elf_link_hash_newfunc): Remove the initialization of
2923 tls_tpoff32 field.
2924 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
2925 for which tls_tpoff32 flag is set.
2926 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
2927 of the symbol includes the entry matched with the input_section
2928 and having tls_tpoff32 flag on. When linking statically, set
2929 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
2930 is defined in this executable.
2931 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
2932
a779acda
JJ
29332003-02-10 Jakub Jelinek <jakub@redhat.com>
2934
2935 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
2936 even if there is just non-empty .rela.plt.
2937
fde78edd
NC
29382003-02-10 Nick Clifton <nickc@redhat.com>
2939
2940 * archures.c (bfd_mach_arm_ep9312): Define.
2941 * bfd-in2.h: Regenerate.
2942 * cpu-arm.c (processors[]): Add ep9312.
2943 (bfd_arm_arch): Add ep9312.
2944 * elf32-arm.h (elf32_arm_merge_private_data): Update error
2945 messages and add test for Maverick floating point support.
2946 (elf32_arm_print_private_bfd_data): Handle
2947 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
2948 (elf32_arm_object_p): New function.
2949 (elf_backend_object_p): Define.
fde78edd 2950
e7b938ca
AM
29512003-02-10 Alan Modra <amodra@bigpond.net.au>
2952
2953 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
2954 variables, structure fields or function params to tls_mask or
2955 similar to better reflect usage.
2956 (struct got_entry): Comment.
9b5ecbd0 2957 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
2958 (get_tls_mask): Rename from get_tls_type.
2959
951fd09b
AM
29602003-02-09 Alan Modra <amodra@bigpond.net.au>
2961
2962 * elf64-ppc.c (TLS_GD_LD): Don't define..
2963 (TLS_GD): ..define this instead and update all uses.
2964 (TLS_TPRELGD): Define.
2965 (ppc64_elf_link_hash_table_create): Tweak initialization of
2966 init_refcount and init_offset.
2967 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
2968 Mark second slot of GD or LD toc entries.
2969 (get_tls_type): Return an int. Distinguish toc GD and LD entries
2970 from other tls types.
2971 (ppc64_elf_tls_setup): New function, split out from..
2972 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
2973 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
2974 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
2975 return value to properly decide whether toc GD and LD entries can
2976 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
2977 to determine GD or LD rather than looking at TLS_LD flag. Don't
2978 attempt to adjust got entry tls_type here..
2979 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
2980 look for possible merges.
2981 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
2982 optimization.
2983 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
2984 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
2985 Make use of return value from get_tls_type to properly detect GD and
2986 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
2987 handle tls_get_addr removal when looking at REL24 relocs, do it when
2988 looking at the previous reloc. Check reloc after DTPMOD64 to determine
2989 GD or LD.
2990 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
2991
acc990f2
AM
29922003-02-08 Alan Modra <amodra@bigpond.net.au>
2993
00b28bb0
AM
2994 * elf32-hppa.c (group_sections): Don't share a stub section if
2995 stubs are for a large section.
2996
acc990f2
AM
2997 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
2998 stubs if !stubs_always_before_branch.
2999
589e6347
NC
30002003-02-07 Nick Clifton <nickc@redhat.com>
3001
3002 * elf.c (swap_out_syms): Generate an error message if an
3003 equivalent output section cannot be found for a symbol.
3004
c328dc3f
JJ
30052003-02-07 Jakub Jelinek <jakub@redhat.com>
3006
3007 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
3008 local_got_entries is NULL.
3009
84f97cb6
AS
30102003-02-06 Andreas Schwab <schwab@suse.de>
3011
3012 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
3013 (read_value): Add parameter is_signed, use signed extraction if
3014 the value is signed.
3015 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
3016 encoding to read_value.
3017
6349e628
AM
30182003-02-06 Alan Modra <amodra@bigpond.net.au>
3019
3020 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
3021 plt info when called to transfer weak sym info.
3022
411e1bfb
AM
30232003-02-05 Alan Modra <amodra@bigpond.net.au>
3024
3025 * reloc.c: Add PPC and PPC64 TLS relocs.
3026 * libbfd.h: Regenerate.
3027 * bfd-in2.h: Regenerate.
3028 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
3029 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
3030 against a 32 bit field.
3031 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
3032 (_ppc64_elf_section_data): Add t_symndx and comments.
3033 (ppc64_elf_section_data): Use elf_section_data macro.
3034 (ppc64_elf_new_section_hook): American spelling.
3035 (struct got_entry, struct plt_entry): New.
3036 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
3037 (struct ppc_stub_hash_entry): Add "addend" field.
3038 (struct ppc_link_hash_entry): Add "tls_type".
3039 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
3040 TLS_EXPLICIT): Define.
3041 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
3042 (link_hash_newfunc): Init new fields.
58ac9f71 3043 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
3044 init_offset to NULL.
3045 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
3046 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
3047 there.
3048 (update_local_sym_info, update_plt_info): New functions.
3049 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
3050 handling to use got.glist rather than got.refcount. Likewise for PLT.
3051 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
3052 (func_desc_adjust): Adjust for new PLT list.
3053 (ppc64_elf_adjust_dynamic_symbol): Likewise.
3054 (get_sym_h, get_tls_type): New functions.
3055 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
3056 (ppc64_elf_tls_optimize): New function.
3057 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
3058 TLS relocs.
3059 (ppc64_elf_size_dynamic_sections): Likewise.
3060 (ppc_type_of_stub): Adjust for new PLT list.
3061 (ppc_build_one_stub): Likewise.
3062 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
3063 calls specially.
3064 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
3065 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
3066 init GOT entries that have a reloc. Generate GOT relocs here..
3067 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
3068 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
3069
0cca5f05
AS
30702003-02-04 Andreas Schwab <schwab@suse.de>
3071
3072 * elf32-m68k.c (elf_m68k_hash_entry): Define.
3073 (elf_m68k_link_hash_traverse): Remove.
3074 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
3075 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
3076 reduce casting.
3077 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
3078 casting.
3079 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
3080 instead of elf_m68k_link_hash_traverse.
3081 (elf_m68k_discard_copies): Change first parameter to pointer to
3082 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
3083 elf_m68k_link_hash_entry is needed.
3084
5cab59f6
AM
30852003-02-04 Alan Modra <amodra@bigpond.net.au>
3086
3087 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
3088 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
3089 "got" union, and declare as gotplt_union. Use gotplt_uinion for
3090 "plt" field.
3091 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
3092 Add "init_offset" field.
3093 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
3094 (elf_local_got_ents): Declare.
3095 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
3096 and "plt".
3097 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
3098 (_bfd_elf_link_hash_table_init): Set "init_offset".
3099 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
3100 from init_offset.
3101 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
3102
3103 * elf.c (bfd_elf_local_sym_name): Split out from..
3104 (group_signature): ..here.
3105 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
3106
68bfbfcc
AM
31072003-02-04 Alan Modra <amodra@bigpond.net.au>
3108
3109 * elf-bfd.h (enum elf_link_info_type): Remove.
3110 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
3111 to struct sec. Remove linkonce_p field.
3112 (elf_linkonce_p): Delete.
3113 (elf_discarded_section): Update for sec_info_type change.
3114 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
3115 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
3116 (ELF_INFO_TYPE_NONE): Define.
3117 (ELF_INFO_TYPE_STABS): Define.
3118 (ELF_INFO_TYPE_MERGE): Define.
3119 (ELF_INFO_TYPE_EH_FRAME): Define.
3120 (ELF_INFO_TYPE_JUST_SYMS): Define.
3121 (STD_SECTION): Update struct sec initializer.
3122 * ecoff.c (bfd_debug_section): Likewise.
3123 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
3124 * elflink.h: Likewise.
3125 * elf-eh-frame.c: Likewise.
3126 * elf64-alpha.c: Likewise.
3127 * elfxx-ia64.c: Likewise.
3128 * elfxx-mips.c: Likewise.
3129 * bfd-in2.h: Regenerate.
3130
3131 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
3132 referring to used_by_bfd.
3133 * elf64-sparc.c (sec_do_relax): Likewise.
3134 * elf64-mmix.c (mmix_elf_section_data): Likewise.
3135 * elfxx-mips.c (mips_elf_section_data): Likewise.
3136 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
3137 (ieee_get_section_contents): Likewise.
3138 (ieee_new_section_hook): Formatting.
3139 (ieee_canonicalize_reloc): Remove commented out code.
3140 * mmo.c (mmo_section_data): Define. Use throughout file.
3141 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
3142
31f7ba04
NC
31432003-01-31 Graydon Hoare <graydon@redhat.com>
3144
3145 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
3146 * Makefile.in: Regenerate.
3147 * opncls.c (calc_crc32, get_debug_link_info,
3148 seperate_debug_file_exists, find_seperate_debug_file): New
3149 internal functions.
3150 (bfd_follow_gnu_debuglink): New function. Follow the pointer
3151 contained inside a .gnu_debuglink section.
3152 * bfd-in2.h: Regenerate.
3153
38985a1c
AO
31542003-01-29 Alexandre Oliva <aoliva@redhat.com>
3155
3156 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
3157 entry->abfd when it's NULL.
3158
4bb9a95f
AO
31592003-01-27 Alexandre Oliva <aoliva@redhat.com>
3160
3161 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
3162 _bfd_elf_section_offset returning -2 the same way as -1.
3163
f4416af6
AO
3164 * elfxx-mips.c (mips_elf_multi_got): New function.
3165 (struct mips_got_entry): Make symndx and gotidx signed. Moved
3166 addend into union along with address and link hash entry.
3167 (struct mips_got_info): Added bfd2got and next.
3168 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
3169 (mips_elf_got_section, mips_elf_create_got_section): Use
3170 SEC_EXCLUDE bit to tell whether we really need the got
3171 section. Take boolean arguments to disregard an excluded
3172 section, or to create it as excluded. Adjust all callers.
3173 Use mips_elf_got_section all over.
3174 (mips_elf_local_got_index, mips_elf_got_page,
3175 mips_elf_got16_entry): Take input bfd as argument, and pass it
3176 on to mips_elf_create_local_got_entry.
3177 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
3178 Take input bfd as argument, and manage entries in the
3179 appropriate GOT.
3180 (mips_elf_got_offset_from_index): Take input bfd as argument,
3181 and use it to adjust the GP offset of the bfd.
3182 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
3183 unreferenced GOT entries of global symbols to the end.
3184 (mips_elf_record_global_got_symbol): Take input bfd as
3185 argument. Add entries to the master GOT hash table.
3186 (struct mips_elf_bfd2got_hash): New.
3187 (struct mips_elf_got_per_bfd_arg): New.
3188 (struct mips_elf_set_global_got_offset_arg): New.
3189 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
3190 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
3191 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
3192 mips_elf_merge_gots, mips_elf_set_global_got_offset,
3193 mips_elf_resolve_final_got_entry,
3194 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
3195 mips_elf_got_for_ibfd): New functions.
3196 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
3197 (MIPS_ELF_GOT_MAX_SIZE): New macro.
3198 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
3199 (mips_elf_got_entry_hash): Take new fields into account. Use
3200 mips_elf_hash_bfd_vma.
3201 (mips_elf_got_entry_eq): Take new fields into account.
3202 (mips_elf_create_got_section): Initialize new fields.
3203 (mips_elf_calculate_relocation): Pass input_bfd to functions
3204 that now take it. Adjust gp for the input_bfd.
3205 (mips_elf_allocate_dynamic_relocation,
3206 mips_elf_create_dynamic_relocation,
3207 _bfd_mips_elf_create_dynamic_sections): Use...
3208 (mips_elf_rel_dyn_section): New function. Borrow code from...
3209 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
3210 now take it. Create the got section if needed, even if
3211 excluded, before recording a global got symbol. Move some
3212 code to...
3213 (mips_elf_record_local_got_symbol): New fn.
3214 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
3215 Compute multi-got global entries offsets. Move GOT code to...
3216 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
3217 if the GOT is too big.
3218 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
3219 undefweak symbol to zero. Generate dynamic relocations for
3220 non-primary GOT entries for global symbols.
3221 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
3222 case. Generate dynamic relocations for local got entries.
3223 Sort dynamic relocations on N64 too, using...
3224 (sort_dynamic_relocs_64): New fns.
3225 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
3226 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
3227
52b69c9e
AO
32282003-01-27 Alexandre Oliva <aoliva@redhat.com>
3229
3230 * bfd.c (struct _bfd): Added id field.
3231 * opncls.c (_bfd_id_counter): New static variable.
3232 (_bfd_new_bfd): Use it.
3233 * bfd-in2.h: Rebuilt.
3234
71e5db1c
AM
32352003-01-25 Alan Modra <amodra@bigpond.net.au>
3236
3237 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
3238
b9734f35
JJ
32392003-01-25 Jakub Jelinek <jakub@redhat.com>
3240
3241 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
3242 (elf32_sparc_rev32_howto): New variable.
3243 (sparc_reloc_map): Add TLS relocs.
3244 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
3245 Handle REV32.
3246 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
3247 New functions.
3248 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
3249 struct elf32_sparc_link_hash_table):
3250 New structures.
3251 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
3252 elf32_sparc_hash_table): Define.
3253 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
3254 create_got_section, elf32_sparc_create_dynamic_sections,
3255 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
3256 functions.
3257 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
3258 reference counting.
3259 (elf32_sparc_gc_sweep_hook): Likewise.
3260 (elf32_sparc_adjust_dynamic_symbol): Likewise.
3261 (elf32_sparc_size_dynamic_sections): Likewise.
3262 (elf32_sparc_relocate_section): Likewise.
3263 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
3264 New functions.
3265 (elf32_sparc_object_p): Allocate backend private object data.
3266 (bfd_elf32_bfd_link_hash_table_create,
3267 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
3268 elf_backend_can_refcount): Define.
3269 (elf_backend_create_dynamic_sections): Define to
3270 elf32_sparc_create_dynamic_sections.
3271 * reloc.c: Add SPARC TLS relocs.
3272 * bfd-in2.h, libbfd.h: Rebuilt.
3273 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
3274 (sparc_reloc_map): Likewise.
3275
69fc87f1
MS
32762003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
3277
3278 * bfd-in2.h: Regenerate.
3279 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
3280 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
3281 (elf_howto_table): Add TLS relocs.
3282 (elf_s390_reloc_type_lookup): Likewise.
3283 (elf_s390_link_hash_entry): Add tls_type.
3284 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
3285 New macros.
3286 (elf_s390_link_hash_table): Add tls_ldm_got.
3287 (link_hash_newfunc): Initialize tls_type.
3288 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
3289 (elf_s390_copy_indirect_symbol): Copy tls_type information.
3290 (elf_s390_check_relocs): Support TLS relocs.
3291 (elf_s390_gc_sweep_hook): Likewise.
3292 (allocate_dynrelocs): Likewise.
3293 (elf_s390_size_dynamic_sections): Likewise.
3294 (elf_s390_relocate_section): Likewise.
3295 (elf_s390_finish_dynamic_symbol): Likewise.
3296 (bfd_elf32_mkobject): Define for TLS.
3297 * elf64-s390.c: Same changes as for elf32-s390.c.
3298 * libbfd.h: Regenerate.
3299 * reloc.c: Add s390 TLS relocations.
3300
c5d1701e 33012003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
3302
3303 * aclocal.m4: Fix name of --enable-install-libbfd switch.
3304
5177500f
NC
33052003-01-23 Nick Clifton <nickc@redhat.com>
3306
3307 * Add sh2e support:
5177500f 3308 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
3309 * archures.c (bfd_mach_sh2e): Added.
3310 * bfd-in2.h: Rebuilt.
3311 * cpu-sh.c (arch_info_struct): Added SH2e.
3312 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 3313
f0abc2a1
AM
33142003-01-23 Alan Modra <amodra@bigpond.net.au>
3315
3316 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
3317 dynindx to an int. Rearrange for better packing.
3318 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
3319 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
3320 * elf32-sh64.h: New. Split out from include/elf/sh.h.
3321 (struct _sh64_elf_section_data): New struct.
3322 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
3323 * elf32-sh64-com.c: Include elf32-sh64.h.
3324 * elf32-sh64.c: Likewise.
3325 (sh64_elf_new_section_hook): New function.
3326 (bfd_elf32_new_section_hook): Define.
3327 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
3328 (sh64_bfd_elf_copy_private_section_data): Likewise.
3329 (sh64_elf_final_write_processing): Likewise.
3330 * elf32-sparc.c (struct elf32_sparc_section_data): New.
3331 (elf32_sparc_new_section_hook): New function.
3332 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3333 (sec_do_relax): Define.
3334 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
3335 (elf32_sparc_relocate_section): Likewise.
3336 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
3337 * elf64-mmix.c (struct _mmix_elf_section_data): New.
3338 (mmix_elf_section_data): Define. Use throughout file.
3339 (mmix_elf_new_section_hook): New function.
3340 (bfd_elf64_new_section_hook): Define.
3341 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
3342 (ppc64_elf_section_data): Define. Use throughout.
3343 (ppc64_elf_new_section_hook): New function.
3344 (bfd_elf64_new_section_hook): Define.
3345 * elf64-sparc.c (struct sparc64_elf_section_data): New.
3346 (sparc64_elf_new_section_hook): New function.
3347 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
3348 (sec_do_relax): Define.
3349 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
3350 (sparc64_elf_relocate_section): Likewise.
3351 (bfd_elf64_new_section_hook): Define.
3352 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
3353 * elfxx-mips.c (struct _mips_elf_section_data): New.
3354 (mips_elf_section_data): Define. Use throughout.
3355 (_bfd_mips_elf_new_section_hook): New function.
3356 (mips_elf_create_got_section): Don't alloc used_by_bfd.
3357 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
3358 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
3359 * Makefile.am: Run "make dep-am".
3360 * Makefile.in: Regenerate.
3361
cc03ec80
RH
33622003-01-21 Richard Henderson <rth@redhat.com>
3363
3364 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
3365 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
3366 (elf64_alpha_adjust_dynamic_symbol): Set them.
3367 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
3368 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
3369 symbol index when relaxing LDM to TPREL.
3370 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
3371 relocs, even if the target isn't locally defined.
3372 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
3373 (elf64_alpha_relocate_section): Likewise. Force TP-relative
3374 relocs vs symndx 0 to the tp base.
3375
da896d3f
NC
33762003-01-21 Fabio Alemagna <falemagn@aros.org>
3377
3378 * config.bfd: Handle i[3456]86-*-aros*.
3379
7fce784e
AS
33802003-01-21 Andreas Schwab <schwab@suse.de>
3381
3382 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
3383 (struct ppc_elf_link_hash_entry): Define.
3384 (ppc_elf_hash_entry): New function.
3385 (struct ppc_elf_link_hash_table): Define.
3386 (ppc_elf_hash_table): New function.
3387 (ppc_elf_link_hash_newfunc): New function.
3388 (ppc_elf_link_hash_table_create): New function.
3389 (ppc_elf_copy_indirect_symbol): New function.
3390 (allocate_dynrelocs): New function.
3391 (readonly_dynrelocs): New function.
3392 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
3393 relocs and determine DT_TEXTREL.
3394 (ppc_elf_check_relocs): Don't do that here, just count the
3395 dynamic relocs.
3396 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
3397 removed section.
3398 (bfd_elf32_bfd_link_hash_table_create): Define.
3399 (elf_backend_copy_indirect_symbol): Define.
3400
1bbc9cec
RH
34012003-01-21 Richard Henderson <rth@redhat.com>
3402
3403 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
3404 TPREL also get a reloc if shared. Remove SREL support.
3405 (elf64_alpha_emit_dynrel): New.
acc990f2 3406 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
3407 and GOTTPREL relocs to local symbols against the tp base.
3408 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
3409
3410 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
3411 use count before clobbering r_type.
3412 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
3413 ordering would mean dataflow inspection is necessary.
3414
0da35f8b
SS
34152003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
3416
3417 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 3418
571fe01f
NC
34192003-01-20 Fabio Alemagna <falemagn@aros.org>
3420
3421 * elf32-sh.c: Treat elfNN_bed like other macros defined in
3422 elfxx-target.h and #undef it before #define'ing it.
3423 * elf32-i386.c: Likewise.
acc990f2
AM
3424 * elf32-sh64.c: Likewise.
3425 * elf64-alpha.c: Likewise.
3426 * elf64-sh64.c: Likewise.
571fe01f 3427
5236c819
MS
34282003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
3429
3430 * bfd-in2.h: Regenerate.
3431 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
3432 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
3433 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
3434 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
3435 R_390_PLTOFF32 and R_390_PLTOFF64.
3436 (elf_s390_reloc_type_lookup): Likewise.
3437 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
3438 of GOTPLT references to a function.
3439 (link_hash_newfunc): Initialize gotplt_refcount.
3440 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
3441 and creation of the got section out of the main switch. Add support
3442 for the gotoff, gotplt and pltoff relocations.
3443 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
3444 and pltoff.
3445 (elf_s390_adjust_gotplt): New function.
3446 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
3447 plt entries.
3448 (allocate_dynrelocs): Add comment.
3449 (elf_s390_relocate_section): Change r_type to unsigned. Add support
3450 for gotoff, gotplt and pltoff relocations.
3451 * elf64-s390.c: Same changes as for elf32-s390.c.
3452 * libbfd.h: Regenerate.
3453 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
3454 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
3455 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
3456 and BFD_RELOC_390_PLTOFF64.
3457
a823975a
JJ
34582003-01-18 Jakub Jelinek <jakub@redhat.com>
3459
3460 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
3461 R_IA64_TPREL64[LM]SB against non-global symbol properly.
3462
b3dfd7fe
JJ
34632003-01-16 Jakub Jelinek <jakub@redhat.com>
3464
3465 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
3466 self_dtpmod_done and self_dtpmod_offset.
3467 (allocate_global_data_got): Only use one got entry for all
3468 dtpmod relocs against local symbols.
3469 (allocate_dynrel_entries): Only need .rela.got entry for
3470 dtpmod against global symbol.
3471 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
3472 Reserve space in .rela.got for the local dtpmod entry.
3473 (set_got_entry): Initialize the common local dtpmod .got entry.
3474 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
3475 and R_IA_64_DTPREL64MSB.
3476
04c9666a
AM
34772003-01-16 Alan Modra <amodra@bigpond.net.au>
3478
3479 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
3480 (R_PPC_*): Rename all occurrences to R_PPC64_*.
3481 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
3482 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
3483 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
3484 relative relocs, not with absolute ones.
3485 * Makefile.am: Run "make dep-am".
3486 * Makefile.in: Regenerate.
3487 * po/SRC-POTFILES.in: Regenerate.
3488
c87f1ff7
AS
34892003-01-15 Andreas Schwab <schwab@suse.de>
3490
3491 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
3492 relocation against a non-allocated readonly section.
3493
86bbe32f
AM
34942003-01-10 Alan Modra <amodra@bigpond.net.au>
3495
3496 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
3497 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
3498
32d95f29
KD
34992002-01-08 Klee Dienes <kdienes@apple.com>
3500
3501 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
3502 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
3503 * Makefile.in: Regenerate.
acc990f2 3504
ab7d0aa0
AO
35052003-01-08 Alexandre Oliva <aoliva@redhat.com>
3506
3507 * elfn32-mips.c (prev_reloc_section): New.
3508 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
3509 (SET_RELOC_ADDEND): Parenthesize macro argument.
3510
95d0f04a
DA
35112003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
3512
3513 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
3514 adjust addil instructions if the symbol has no section.
3515
5c9e189c
DD
35162003-01-07 DJ Delorie <dj@redhat.com>
3517
3518 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
3519 partial_inplace.
3520
3e829b4a
AS
35212003-01-07 Andreas Schwab <schwab@suse.de>
3522
3523 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
3524 PC relative relocations.
3525 (elf_m68k_discard_copies): Set it here instead.
3526
a75473eb
SC
35272002-01-02 Ben Elliston <bje@redhat.com>
3528 Jeff Johnston <jjohnstn@redhat.com>
3529
3530 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
3531 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
3532 (BFD32_BACKENDS): Add elf32-iq2000.lo.
3533 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
3534 (cpu-iq2000.lo): New target.
3535 * Makefile.in: Regenerate.
3536 * config.bfd: Handle iq2000-*-elf.
3537 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
3538 (bfd_archures_list): Add bfd_iq2000_arch.
3539 * configure.in: Handle bfd_elf32_iq2000_vec.
3540 * configure: Regenerate.
acc990f2 3541 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
3542 and BFD_RELOC_IQ2000_UHI16.
3543 * targets.c (bfd_elf32_iq2000_vec): Declare.
3544 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
3545 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
3546 * cpu-iq2000.c: New file.
3547 * elf32-iq2000.c: Likewise.
3548 * libbfd.h: Regenerate.
3549 * bfd-in2.h: Likewise.
3550
64543e1a
RS
35512003-01-02 Richard Sandiford <rsandifo@redhat.com>
3552
3553 * elfxx-mips.c: Include libiberty.h.
3554 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
3555 (mips_set_isa_flags): New function, split out from...
3556 (_bfd_mips_elf_final_write_processing): ...here. Only call
3557 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
3558 (mips_mach_extensions): New array.
3559 (mips_32bit_flags_p): New function.
3560 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
3561 Use mips_32bit_flags_p to check if one binary is 32-bit and the
3562 other is 64-bit. When adopting IBFD's architecture, adopt the
3563 bfd_mach as well as the flags.
3564
4852a44e
NC
35652003-01-02 Nick Kelsey <nickk@ubicom.com>
3566
3567 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
3568 fix internal errors, fix bad code generation, fix incorrect stabs
3569 information, and improve ability to eliminate redundant page
3570 instructions. Added code to ip2k_final_link_relocate to self-verify
3571 the linker relaxation. Fix formatting problems.
3572
af7ee8bf
CD
35732002-12-30 Chris Demetriou <cgd@broadcom.com>
3574
3575 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
3576 * archures.c (bfd_mach_mipsisa32r2): New define.
3577 * bfd-in2.h: Regenerate.
3578 * cpu-mips.c (I_mipsisa32r2): New enum value.
3579 (arch_info_struct): Add entry for I_mipsisa32r2.
3580 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
3581 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
3582 (_bfd_mips_elf_final_write_processing): Add
3583 bfd_mach_mipsisa32r2 case.
3584 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
3585 binaries marked as using MIPS32 Release 2.
3586
2469cfa2
NC
35872002-12-30 Dmitry Diky <diwil@mail.ru>
3588
3589 * Makefile.am: Add msp430 target.
3590 * configure.in: Likewise.
3591 * Makefile.in: Regenerate.
3592 * configure: Regenerate.
3593 * archures.c: Add msp430 architecture vector.
3594 * config.bfd: Likewise.
3595 * reloc.c: Add msp430 relocs.
3596 * targets.c: Add msp320 target.
3597 * cpu-msp430.c: New file: msp430 cpu detection.
3598 * elf32-msp430.c: New file: msp430 reloc processing.
3599 * bfd-in2.h: Regenerate.
3600 * libbfd.h: Regenerate.
3601
eecdbe52
JJ
36022002-12-28 Jakub Jelinek <jakub@redhat.com>
3603
3604 * elf.c (elf_sort_sections): Don't reorder .tbss.
3605 (assign_file_positions_for_segments): Only adjust off/voff
3606 for increased alignment in PT_LOAD or PT_NOTE segment,
3607 but adjust p_filesz for .tbss too. in PT_LOAD consider
3608 .tbss to have zero memory size.
3609 (copy_private_bfd_data) [SECTION_SIZE]: Define.
3610 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
3611 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
3612 into PT_TLS segment. Never put SHF_TLS sections in
3613 segments other than PT_TLS or PT_LOAD.
3614
3615 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
3616 sh_entsize.
3617
213e90f4
DD
36182002-12-23 DJ Delorie <dj@redhat.com>
3619
3620 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
3621
75828352
AM
36222002-12-23 Alan Modra <amodra@bigpond.net.au>
3623
3624 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
3625
312b768e
NC
36262002-12-23 Nick Clifton <nickc@redhat.com>
3627
3628 * archures.c (bfd_arch_get_compatible): Add third parameter
3629 'accept_unknowns'. Only accept unknown format BFDs if
3630 accept_unknowns is true, or if the format is "binary".
acc990f2 3631 * bfd-in2.h: Regenerate.
312b768e 3632
63222ec9
NC
36332002-12-21 Nick Clifton <nickc@redhat.com>
3634
3635 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
3636 that subtracted 8 from pc relative relocations.
3637
19852a2a
KH
36382002-12-20 Kazu Hirata <kazu@cs.umass.edu>
3639
3640 * coff-h8300.c: Fix comment typos.
3641 * coffcode.h: Likewise.
3642 * cpu-cris.c: Likewise.
3643 * elf32-vax.c: Likewise.
3644 * genlink.h: Likewise.
3645 * linker.c: Likewise.
3646 * som.c: Likewise.
3647 * tekhex.c: Likewise.
3648 * vms-misc.c: Likewise.
3649
5fd63999
DD
36502002-12-20 DJ Delorie <dj@redhat.com>
3651
3652 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
3653 * libbfd.h: Regenerate.
3654 * bfd-in2.h: Regenerate.
3655 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
3656 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 3657
4ee79850
KH
36582002-12-19 Kazu Hirata <kazu@cs.umass.edu>
3659
3660 * doc/bfdint.texi: Fix typos.
3661
66e25bab
AM
36622002-12-20 Paul Eggert <eggert@twinsun.com>
3663
3664 Port to POSIX 1003.1-2001.
3665 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
3666 * configure.in (build-warnings): Likewise.
3667 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
3668 * aclocal.m4: Regenerate.
3669 * config.in: Regenerate.
3670 * configure: Regenerate.
3671
7dc77aaa
AM
36722002-12-19 Alan Modra <amodra@bigpond.net.au>
3673
0171ee92
AM
3674 * coff-h8300.c: Include libiberty.h.
3675 (h8300_reloc16_extra_cases): Check the hash table creator before
3676 referencing h8300 specific fields. Stash the hash table pointer
3677 in a local var. Comment typo fixes.
3678 (h8300_bfd_link_add_symbols): Likewise.
3679
1049f94e 3680 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
3681 dst_mask comments.
3682 * bfd-in2.h: Regenerate.
3683
47388f4c
AM
36842002-12-18 Alan Modra <amodra@bigpond.net.au>
3685
3686 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
3687 code a little. Comment on dynamic relocs against section symbols.
3688
1b3e3744
AM
36892002-12-17 Roger Sayle <roger@eyesopen.com>
3690
3691 * configure.host (ia64-*-hpux*): Support 64 bit targets using
3692 the HP compiler's "long long".
3693
46f2b541
DD
36942002-12-16 Andrew MacLeod <amacleod@redhat.com>
3695
3696 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
3697 and R_XSTORMY16_HI16) howto entries.
3698 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 3699 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
3700 determine the start of the second reloc table.
3701
af738ea7
NC
37022002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
3703
3704 * ecofflink.c: Fix the reading of the debugging information
3705 of Tru64/Alpha binaries that are produced by recent Compaq
3706 compilers.
3707 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
3708 table.
3709 (lookup_line): Because of the strange information sometimes
3710 generated by Compaq's recent compilers, change how the FDR
3711 table is searched so that PDRs (procedure descriptors) are
3712 correctly found. Note that this change is really more of a hack;
3713 however, I have included extensive documentation as to why
3714 this is the best solution short of an extensive rewrite or
3715 another hack.
3716 (fdrtab_lookup): Add comments to explain the algorithm.
3717
5354b572
AO
37182002-12-12 Alexandre Oliva <aoliva@redhat.com>
3719
3720 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
3721 initializers to match struct declaration.
3722
ab3acfbe
AM
37232002-12-12 Alan Modra <amodra@bigpond.net.au>
3724
3725 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
3726 * elf.c (get_program_header_size): Likewise.
3727 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
3728 (m32r_elf_generic_reloc): Likewise.
3729 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
3730 * elflink.h (elf_bfd_discard_info): Likewise.
3731
6348e046
AM
37322002-12-12 Alan Modra <amodra@bigpond.net.au>
3733
3734 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
3735 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
3736 DT_RELSZ adjustment, not output section. Avoid writing tags when
3737 unchanged. Don't assume linker script is sane, adjust DT_REL too.
3738 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
3739 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
3740 DT_RELASZ adjustment, not output section. Avoid writing tags when
3741 unchanged. Adjust DT_RELA.
3742 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
3743 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
3744
2e7a68a8
AO
37452002-12-12 Alexandre Oliva <aoliva@redhat.com>
3746
3747 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
3748 addend by 4.
3749
b15e6682
AO
37502002-12-12 Alexandre Oliva <aoliva@redhat.com>
3751
3752 * elfxx-mips.c (struct mips_got_entry): New.
3753 (struct mips_got_info): Added got_entries field.
3754 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
3755 (mips_elf_local_got_index, mips_elf_got_page,
3756 mips_elf_got16_entry): Re-implement in terms of new...
3757 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
3758 Change return type.
3759 (mips_elf_highest): Warning clean-up.
3760 (mips_elf_create_got_section): Initialize got_entries.
3761 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
3762 local got size.
3763 (_bfd_mips_elf_size_dynamic_sections): Do not account for
3764 GOT_PAGE entries, since we now reuse GOT16 entries.
3765
e6af3a53
NC
37662002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
3767
3768 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
3769 read-only section that lies after .text and before .data to be
3770 written into the output file and included in a_text.
3771 (translate_to_native_sym_flags): If an otherwise unrepresentable
3772 section was merged with .text, convert its symbols to N_TEXT
3773 symbols.
3774 * libaout.h (aout_section_merge_with_text_p): New macro.
3775
cf3d882d
AM
37762002-12-08 Alan Modra <amodra@bigpond.net.au>
3777
3778 * bfd-in.h: Comment typo fix. Formatting.
3779 * bfd-in2.h: Regenerate.
3780 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
3781 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
3782 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
3783
2f9bd3f6
RH
37842002-12-05 Richard Henderson <rth@redhat.com>
3785
3786 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
3787 Only send PCREL21B though the plt. Fix installed reloc type.
3788 (elfNN_ia64_relocate_section): Give error for dynamic reloc
3789 against PCREL22 or PCREL64I; clean up error messages for
3790 branch relocs.
3791
d0112f73
KB
37922002-12-04 Kevin Buettner <kevinb@redhat.com>
3793
3794 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
3795 New functions.
3796 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
3797
c10d9d8f
JW
37982002-12-04 David Mosberger <davidm@hpl.hp.com>
3799
3800 * cpu-ia64-opc.c: Add operand constant "ar.csd".
3801
d48770d4
L
38022002-12-04 H.J. Lu <hjl@gnu.org>
3803
3804 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
3805 BFD address when constructing local name.
3806
b6152c34
AS
38072002-12-04 Andreas Schwab <schwab@suse.de>
3808
3809 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
3810 member.
3811 (elf_m68k_link_hash_table_create): Initialize it.
3812 (elf_m68k_check_relocs): Handle symbols that are forced to be
3813 local due to visibility changes.
3814 (elf_m68k_adjust_dynamic_symbol): Likewise.
3815 (elf_m68k_size_dynamic_sections): Likewise.
3816 (elf_m68k_discard_copies): Likewise.
3817 (elf_m68k_relocate_section): Likewise.
3818
73374ef1
AM
38192002-12-04 Alan Modra <amodra@bigpond.net.au>
3820
3821 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
3822
c5c1944d
AM
38232002-12-04 Alan Modra <amodra@bigpond.net.au>
3824
3825 * srec.c (srec_write_symbols): Restore '$' prefix to address
3826 accidentally removed in 2002-04-04 change.
3827 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
3828
e1a9cb8e
NC
38292002-12-03 Nick Clifton <nickc@redhat.com>
3830
3831 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
3832 (apuinfo_list_add): New function: Add a value to the list.
3833 (apuinfo_list_length): New function: Return the number of
3834 values on the list.
3835 (apuinfo_list_element): New function: Return a value on the
3836 list.
3837 (apuinfo_list_finish): New function: Free the resources used
3838 by the list.
3839 (ppc_elf_begin_write_processing): New function. Scan the
3840 input bfds for apuinfo sections.
3841 (ppc_elf_write_section): New function: Delay the creation of
3842 the contents of an apuinfo section in an output bfd.
3843 (ppc_elf_final_write_processing): New function. Create the
3844 contents of an apuinfo section in an output bfd.
3845 (elf_backend_begin_write_processing): Define.
3846 (elf_backend_final_write_processing): Define.
3847 (elf_backend_write_section): Define.
e1a9cb8e 3848
a823923b
RH
38492002-12-03 Richard Henderson <rth@redhat.com>
3850
3851 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
3852
30491647
SC
38532002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3854
3855 Fix PR savannah/1417:
3856 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
3857 branch if it goes to the start of the deleted region.
3858
bc7c6a90
SC
38592002-12-01 Stephane Carrez <stcarrez@nerim.fr>
3860
3861 * bfd-in2.h (bfd_mach_m6812): Rebuild.
3862 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
3863 bfd_mach_m6812s): Declare.
3864
3865 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
3866 (_bfd_m68hc12_elf_set_private_flags): Call it.
3867 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
3868 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
3869 report microcontroller incompatibilities (HC12 vs HCS12).
3870 (elf_backend_object_p): Update.
3871
b34976b6
AM
38722002-11-30 Alan Modra <amodra@bigpond.net.au>
3873
3874 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
3875 (enum bfd_boolean, boolean): Delete.
3876 (bfd_boolean): Typedef to an int.
3877 (FALSE, TRUE): Define.
3878 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
3879 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
3880 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
3881 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
3882 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
3883 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
3884 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
3885 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
3886 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
3887 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
3888 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
3889 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
3890 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
3891 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
3892 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
3893 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
3894 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
3895 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
3896 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
3897 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
3898 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
3899 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
3900 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
3901 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
3902 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
3903 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3904 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3905 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3906 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
3907 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
3908 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3909 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
3910 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
3911 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
3912 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
3913 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
3914 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
3915 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
3916 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
3917 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
3918 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
3919 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
3920 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
3921 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
3922 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
3923 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
3924 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
3925 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 3926 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
3927 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
3928 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
3929 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
3930 of bfd_boolean vars with TRUE/FALSE. Formatting.
3931 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
3932
947216bf
AM
39332002-11-28 Alan Modra <amodra@bigpond.net.au>
3934
3935 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
3936 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
3937 with Elf_Internal_Rela.
3938 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
3939 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
3940 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
3941 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
3942 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
3943 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
3944 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
3945 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
3946 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3947 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
3948 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
3949 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
3950 throughout instead.
3951 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
3952 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
3953 Remove INLINE keyword.
3954 (elf_swap_reloc_in): Likewise. Also clear r_addend.
3955 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
3956 as a bfd_byte *.
3957 (elf_write_relocs): Consolidate REL and RELA code.
3958 (elf_slurp_reloc_table_from_section): Simplify REL code.
3959 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
3960 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
3961 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
3962 RELA code.
3963 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
3964 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
3965 (elf_link_output_relocs): Likewise.
3966 (elf_reloc_link_order): Likewise.
3967 (elf_finish_pointer_linker_section): Likewise.
3968 (struct elf_link_sort_rela): Remove union.
3969 (elf_link_sort_cmp1): Update to suit.
3970 (elf_link_sort_cmp2): Here too.
3971 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
3972 over-allocation for int_rels_per_ext_rel != 1 case.
3973 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
3974 * elf32-i386.c: Likewise.
3975 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
3976 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
3977 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
3978 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
3979 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
3980 elf64-sparc.c, elf64-x86-64.c: Likewise.
3981 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
3982 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
3983 bfd_elf32_swap_reloc_in.
3984
3985 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
3986 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
3987 (mips_elf64_swap_reloc_in): Zero r_addend.
3988 (mips_elf64_be_swap_reloc_in): Likewise.
3989 (mips_elf64_slurp_one_reloc_table): Simplify.
3990
3991 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
3992 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
3993 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
3994
1448fa32
KK
39952002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3996
3997 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 3998 unresolved debugging relocs in dynamic applications.
1448fa32
KK
3999 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
4000
73722af0
AM
40012002-11-26 Alan Modra <amodra@bigpond.net.au>
4002
4003 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
4004 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
4005 on a relocatable link. Comment typos.
4006 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
4007 in the order they are declared. Clear elf_hash_value too.
4008 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
4009 eh_info and tls_segment.
4010 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
4011 sorted when discarding relocs by turning them into R_*_NONE.
4012
4013 * libbfd.c (warn_deprecated): Comment spelling.
4014 * po/SRC-POTFILES.in: Regenerate.
4015
7c25b72c
RH
40162002-11-21 Richard Henderson <rth@redhat.com>
4017
4018 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
4019 arch's st_other bits when merging visibilities.
4020 (elf_link_output_extsym): Tidy clearing of visibility field.
4021
dc12c51f
AM
40222002-11-21 Alan Modra <amodra@bigpond.net.au>
4023
4024 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
4025 (SWAP_OUT_RELOC_OFFSET): Define.
4026
963f13ec
AO
40272002-11-20 Alexandre Oliva <aoliva@redhat.com>
4028
4029 * elf.c (_bfd_elf_link_hash_table_init): Make sure
4030 can_refcount is properly extended to the type of
4031 init_refcount.
4032
ee6423ed
AO
40332002-11-19 Alexandre Oliva <aoliva@redhat.com>
4034
4ffba85c
AO
4035 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
4036 (_bfd_mips_elf_relocate_section): Use it.
4037
ee6423ed
AO
4038 * elfxx-mips.c (MNAME): New macro.
4039 (_bfd_mips_elf_check_relocs): Use it.
4040 (_bfd_mips_elf_discard_info): Likewise.
4041 (_bfd_mips_elf_final_link): Likewise.
4042
cdcf6e38
AM
40432002-11-19 Alan Modra <amodra@bigpond.net.au>
4044
4045 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
4046 rel_hdr.sh_size too.
4047
93509525
KD
40482002-11-18 Klee Dienes <kdienes@apple.com>
4049
4050 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
4051 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
4052 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
4053 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
4054 Add dependencies for bfdwin.c, bfdio.c.
4055 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
4056 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
4057 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
4058 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
4059 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
4060 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
4061 bfd_get_size (moved from libbfd.c and bfd.c).
4062 * bfdwin.c New file. Contains _bfd_window_internal,
4063 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
4064 libbfd.c and bfd.c).
4065 * po/SRC-POTFILES.in: Regenerate.
4066 * po/bfd.pot: Regenerate.
4067 * libbfd.h: Regenerate.
4068 * bfd-in2.h: Regenerate.
4069 * aclocal.m4: Regenerate.
4070 * Makefile.in: Regenerate.
4071 * configure: Regenerate.
4072
3ae41454
AM
40732002-11-18 Klee Dienes <kdienes@apple.com>
4074
4075 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
4076
e514ac71
NC
40772002-11-15 Kazu Hirata <kazu@cs.umass.edu>
4078
4079 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
4080 jsr after a short jump.
4081 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
4082
eddc4f81
KD
40832002-11-15 Klee Dienes <kdienes@apple.com>
4084
4085 * pef.c (bfd_pef_convert_architecture): Move declaration of
4086 ARCH_POWERPC and ARCH_M68K to the start of the function.
4087
51908eee
SS
40882002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
4089
4090 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
4091
3416d2e7
HPN
40922002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
4093
4094 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
4095 For bpo_gregs_section->contents, allocate _raw_size, not
4096 _cooked_size.
4097
b1c58715
AM
40982002-11-13 Klee Dienes <kdienes@apple.com>
4099
4100 * config.bfd: Add entries for powerpc-*-darwin and cousins.
4101
077ca68b
L
41022002-11-13 H.J. Lu <hjl@gnu.org>
4103
4104 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
4105
e84d6fca
AM
41062002-11-13 Klee Dienes <kdienes@apple.com>
4107 Alan Modra <amodra@bigpond.net.au>
4108
4109 * bfd.c (struct bfd_preserve): New.
4110 (bfd_preserve_save): New function.
4111 (bfd_preserve_restore): Ditto.
4112 (bfd_preserve_finish): Ditto.
4113 * bfd-in2.h: Regenerate.
4114 * mach-o.c: Formatting.
4115 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
4116 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
4117 (bfd_mach_o_core_p): Ditto.
4118 (bfd_mach_o_scan): Pass in mdata.
4119 * mach-o.h (bfd_mach_o_scan): Update prototype.
4120 * pef.c: Formatting.
4121 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
4122 (bfd_pef_xlib_object_p): Ditto.
4123 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
4124 * pef.h (bfd_pef_scan): Update prototype.
4125 * xsym.c: Formatting, K&R fixes.
4126 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
4127 (bfd_sym_scan): New function split out from bfd_sym_object_p.
4128 * xsym.h (bfd_sym_scan): Declare.
4129 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 4130 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
4131 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
4132
cd24c222
NC
41332002-11-12 Nick Clifton <nickc@redhat.com>
4134
4135 * po/da.po: Updated Danish translation.
4136
99eb2ac8
AM
41372002-11-12 Alan Modra <amodra@bigpond.net.au>
4138
d6fe2dc1
AM
4139 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
4140 relocatable link too.
4141 (elf_link_input_bfd): When emitting relocs, adjust offsets for
4142 eh_frame and stab sections. Zap deleted relocs.
4143 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
4144 (elf_bfd_discard_info): Run for relocatable link too.
4145 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
4146 Handle ld -r case.
4147 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
4148 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
4149
126495ed
AM
4150 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
4151 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
4152 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
4153 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
4154 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
4155 (struct elf_link_hash_table): Add eh_info.
4156 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
4157 (_bfd_elf_discard_section_eh_frame): Update prototype.
4158 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
4159 (_bfd_elf_write_section_eh_frame): Likewise.
4160 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
4161 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
4162 param. Get "hdr_info" from link hash table.
4163 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
4164 header section from link hash table. Save header section to elf_tdata.
4165 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
4166 header section from link hash table. Don't alloc hdr_info. Clear
4167 hdr_sec instead of setting "strip".
4168 (_bfd_elf_eh_frame_section_offset): Formatting.
4169 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
4170 Get header section from link hash table.
4171 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
4172 Get header section from link hash table.
4173 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
4174 (get_program_header_size): Likewise.
4175 (_bfd_elf_section_offset): Formatting.
4176 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
4177 section pointer in link hash table.
4178 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
4179 and _bfd_elf_write_section_eh_frame calls. Update comment about
4180 eh_frame entries.
4181 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
4182 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
4183
4184 * po/SRC-POTFILES.in: Regenerate.
4185
99eb2ac8
AM
4186 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
4187 relocs for discarded FDEs. Remove dead code.
4188 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
4189 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
4190 Tidy conditions under which stabs are edited. Formatting.
4191 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
4192 from discarded relocs.
4193 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
4194 section adjustments after testing magic values.
4195
7c319a27
AM
41962002-11-12 Thomas Moestl <tmm@FreeBSD.org>
4197
4198 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
4199 references to large plt symbols.
4200
a95a4550
AM
42012002-11-12 Klee Dienes <kdienes@apple.com>
4202
4203 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
4204 looking for an unused section name.
4205
bc7eab72
KH
42062002-11-11 Kazu Hirata <kazu@cs.umass.edu>
4207
4208 * coff-h8300.c: Fix formatting.
4209 * elf32-h8300.c: Likewise.
4210 * reloc16.c: Likewise.
4211
52585bb8
AM
42122002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
4213
4214 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
4215 section when dynamic section unused; _bfd_strip_section_from_output
4216 instead.
4217
9f632188
AM
42182002-11-08 Alan Modra <amodra@bigpond.net.au>
4219
207b304b
AM
4220 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
4221 and sym_vec.
3b029f65 4222
9f632188
AM
4223 * dwarf2.c: Revert last change.
4224
ec4530b5
NC
42252002-11-07 Michal Ludvig <mludvig@suse.cz>
4226
9b5ecbd0 4227 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
4228 _bfd_dwarf2_find_nearest_line): Use
4229 bfd_simple_get_relocated_section_contents() instead of
4230 bfd_get_section_contents().
4231 * reloc.c (bfd_perform_relocation): Add sanity check.
4232 * simple.c (simple_get_relocated_section_contents): If the section
4233 does not have any relocs associated with it, just return the
4234 unadjusted contents.
4235
205cfeb0
HPN
42362002-11-07 Hans-Peter Nilsson <hp@axis.com>
4237
4238 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
4239 case R_CRIS_32_GOT>: Correct test for filling in constant .got
4240 contents, enabling for a non-DSO, for symbols defined in the
4241 program with --export-dynamic.
4242
87e226ce
AM
42432002-11-07 Alan Modra <amodra@bigpond.net.au>
4244
4245 * elf64-ppc.c: Comment typo fixes.
4246 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
4247
235c4794
NC
42482002-11-07 Nick Clifton <nickc@redhat.com>
4249
4250 * po/da.po: Updated Danish translation.
4251
49179469
AO
42522002-11-06 Alexandre Oliva <aoliva@redhat.com>
4253
4254 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
4255 exactly three internal relocs per external reloc. Set reloc_count
4256 to the external reloc count.
4257
246178f2
NC
42582002-11-06 Klee Dienes <kdienes@apple.com>
4259
3ae41454 4260 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
4261 Fix comment formatting.
4262
3af9a47b
NC
42632002-11-06 Klee Dienes <kdienes@apple.com>
4264
3ae41454 4265 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
4266 xsym.lo.
4267 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
4268 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
4269 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
4270 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
4271 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
4272 sym.
3ae41454 4273 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
4274 * Makefile.in: Regenerate.
4275 * doc/Makefile.in: Regenerate.
3ae41454 4276 * bfd-in2.h: Regenerate.
3af9a47b
NC
4277 * xsym.c: New file. Contains support for the Apple/Metrowerks
4278 xSYM debugging format.
4279 * xsym.h: New file.
4280 * pef.c: New file. Contains support for the Apple Code Fragment
4281 Manager Preferred Executable Format
4282 * pef.h: New file.
4283 * pef-traceback.h: New file. Contains support for parsing PowerPC
4284 traceback tables as used by PEF executables (and perhaps other
4285 systems as well).
3ae41454 4286 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
4287 format.
4288 * mach-o.h: New file.
4289 * mach-o-target.c: New file. Declares the mach-o targets
4290 themselves. Included three times by mach-o.c; each time with a
4291 different set of macros set.
3ae41454 4292
b6821651 42932002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
4294
4295 * Makefile.am: Remove entries for elf32-qnx.[ch].
4296 * Makefile.in: Regenerate.
4297 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
4298 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
4299 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4300 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
4301 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
4302 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
4303 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
4304 * configure: Regenerate.
4305 * elf32-qnx.c: Remove.
4306 * elf32-qnx.h: Remove.
4307 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
4308 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
4309 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
4310 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
4311 * elf32-i386.c: Remove QNX extended bfd support.
4312 * elf32-ppc.c: Remove QNX extended bfd support.
4313 * elf32-sh.c: Remove QNX extended bfd support.
4314 * elfarm-nabi.c: Remove QNX extended bfd support.
4315 * targets.c: Remove qnx vectors.
4316 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
4317 (elf_backend_is_contained_by_filepos): Remove.
4318 (elf_backend_copy_private_bfd_data_p): Remove.
4319 * po/SRC-POTFILES.in: Regenerate.
4320
b6821651
AM
43212002-11-06 David O'Brien <obrien@FreeBSD.org>
4322 Alan Modra <amodra@bigpond.net.au>
4323
4324 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
4325 dynamic relocs against section symbols for the output section vma.
4326
43272002-11-05 Alan Modra <amodra@bigpond.net.au>
4328
4329 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
4330 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
4331
08f74004
AM
43322002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4333 Alan Modra <amodra@bigpond.net.au>
4334
4335 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
4336 vectors in target_selvecs.
4337 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
4338 in target_selvecs.
4339 (sh-*-netbsdelf*): Likewise.
4340 * configure.in (assocvecs): New variable. Handle assocvecs like
4341 selvecs.
4342 * configure: Regenerate.
4343 * format.c (bfd_check_format_matches): Store bfd_target pointers
4344 in matching_vector instead of target names. Select first target
4345 from bfd_associated_vector that matches a list of ambiguous targets.
4346 * targets.c (_bfd_associated_vector): New array.
4347 (bfd_associated_vector): New variable.
4348 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
4349 * libbfd-in.h (bfd_associated_vector): Declare.
4350 * libbfd.h: Regenerate.
4351
89117aab
AM
43522002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
4353
4354 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
4355 non-NULL before dereferencing.
4356
5e9aae3e
KK
43572002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4358
4359 * vms.c (vms_object_p): Restore the start address when returning
4360 NULL.
4361
c97e73dd
AM
43622002-11-04 Alan Modra <amodra@bigpond.net.au>
4363 Hans-Peter Nilsson <hp@axis.com>
4364
4365 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
4366 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
4367 Set up a larger symshndxbuf, and write it out. Free it on
4368 exit rather than freeing symbuf twice. Correct section index
4369 on output section symbol loop.
4370 (elf_link_output_sym): Accumulate symbol extension section
4371 indices, reallocating symshndxbuf rather than writing it out.
4372 (elf_link_flush_output_syms): Don't flush symshndxbuf.
4373 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
4374 Use bfd_zalloc to clear i_shdrp[0] too.
4375
3463048e
SC
43762002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
4377
4378 * elf32-sh64-com.c (sh64_address_in_cranges): Use
4379 _raw_size of cranges section if _cooked_size not yet set.
4380
63a23799
HPN
43812002-11-03 Hans-Peter Nilsson <hp@axis.com>
4382
4383 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
4384 for bfd_elf32_swap_symbol_out.
4385
e68cc12e
DB
43862002-10-31 David O'Brien <obrien@FreeBSD.org>
4387
4388 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
4389 signed and unsigned in comparison.
4390
db4b6d01
DJ
43912002-10-30 Daniel Jacobowitz <drow@mvista.com>
4392
4393 * coffcode.h: Remove extraneous '\'.
4394
840f0243
L
43952002-10-28 H.J. Lu <hjl@gnu.org>
4396
4397 * Makefile.am (targets.lo): Depend on Makefile instead of
4398 config.status.
4399 (archures.lo): Likewise.
4400 * Makefile.in: Regenerated.
4401
05a7e2db
JT
44022002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
4403
4404 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
4405 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
4406 targ_selvecs.
4407
a0087177
JW
44082002-10-25 Jim Wilson <wilson@redhat.com>
4409
4410 * elf64-sh64.c (sh_elf64_relocate_section): Call
4411 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
4412 of SHF_MERGE section.
4413
8718ac9c
HPN
44142002-10-25 Hans-Peter Nilsson <hp@axis.com>
4415
4416 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
4417
d45913a0
DA
44182002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
4419
4420 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
4421 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
4422 unsigned int.
4423 (NAME(aout,final_link)): Cast enum used in assignment.
4424 (aout_link_write_symbols): Cast enums in comparisons, int values to
4425 boolean, enums in assignments to int.
4426 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
4427 (aout_link_input_section_ext): Likewise. Cast enums used in
4428 comparisons with unsigned ints.
d45913a0
DA
4429 (aout_link_reloc_link_order): Cast enum to int in assignment.
4430 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
4431 calls to char *.
4432 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
4433 assignment.
4434 * bfd-in2.h (bfd_set_section_vma): Likewise.
4435 * bfd.c (bfd_record_phdr): Cast enums in assignments.
4436 * binary.c (bfd_alloc): Cast enum to long.
4437 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
4438 * dwarf2.c (read_abbrevs): Add casts to enum types.
4439 (read_attribute_value): Likewise.
4440 (arange_add): Cast result of bfd_zalloc call.
4441 (comp_unit_contains_address): Return true and false.
4442 (comp_unit_find_nearest_line): Cast return to boolean.
4443 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
4444 * gen-aout.c: define macro '_' if not defined.
4445 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
4446 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
4447 (bfd_write_bigendian_4byte_int): Cast return to boolean.
4448 (bfd_seek): Cast bfd_realloc to bfd_byte *.
4449 (bfd_generic_is_local_label_name): Cast return to boolean.
4450 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
4451 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
4452 struct bfd_hash_entry *.
4453 (_bfd_generic_link_hash_newfunc): likewise.
4454 (_bfd_generic_final_link): Cast enum to unsigned int.
4455 * merge.c (sec_merge_emit): Cast return to boolean.
4456 (merge_strings): Add casts to const unsigned char *.
4457 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
4458 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
4459 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
4460 to struct bfd_hash_entry *.
d45913a0
DA
4461 (bfd_set_section_content): Add cast to PTR in comparison.
4462 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
4463 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
4464 simple_dummy_unattached_reloc,
4465 bfd_simple_get_relocated_section_contents): Add K&R declarations and
4466 function definitions.
4467 * srec.c (S3Forced): Initialize to false.
4468 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
4469 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
4470 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
4471 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
4472 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
4473 comparisons.
4474
475c2a7e
JJ
44752002-10-23 Jakub Jelinek <jakub@redhat.com>
4476
4477 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
4478 relocs into shared lib non-allocated reloc sections.
4479
e82ce529
AM
44802002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4481
4482 * dwarf2.c (add_line_info): Ensure that the line_info_table is
4483 sorted even when given an out-of-order line sequence.
4484 (lookup_address_in_line_info_table): When an exact VMA match is
4485 not found, return line information with the closest VMA.
4486
f2482cb2
NC
44872002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
4488
4489 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
4490 HPUX 11.00 patch PHSS_26559.
4491
c1fd6598
AO
44922002-10-22 Alexandre Oliva <aoliva@redhat.com>
4493
4494 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
4495 the options section into a separate section unless IRIX 6
4496 compatibility is enabled.
4497
033fd5f9
AO
44982002-10-22 Alexandre Oliva <aoliva@redhat.com>
4499
4500 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
4501 into arrays.
4502 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
4503 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
4504 into account.
4505 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
4506 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
4507
ef485c01
AM
45082002-10-21 Graeme Peterson <gp@qnx.com>
4509
4510 * targets.c (_bfd_target_vector): Add missing qnx vectors.
4511
b50afec9
AM
45122002-10-21 Alan Modra <amodra@bigpond.net.au>
4513
4514 * targets.c (bfd_target_list): Don't return the default target twice.
4515
5fe39cae
AM
45162002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
4517
4518 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
4519 perror with bfd_perror.
4520
5d603aa9
L
45212002-10-19 H.J. Lu <hjl@gnu.org>
4522
4523 * elflink.h (elf_link_add_object_symbols): Correctly handle
4524 DT_RPATH and DT_RUNPATH.
4525
e377ab71
MK
45262002-10-19 Mark Kettenis <kettenis@gnu.org>
4527
4528 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
4529
0d09fec6
DC
45302002-10-17 Denis Chertykov <denisc@overta.ru>
4531
4532 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
4533 for ip2k port.
4534
acf8aed4
AM
45352002-10-17 Alan Modra <amodra@bigpond.net.au>
4536
4537 * elfxx-target.h (USE_REL): Don't define as 1.
4538 * elf32-arm.h (USE_REL): Provide a default define of 0.
4539 Use #if rather than #ifdef when testing USE_REL.
4540 * elf32-m32r.c: Likewise.
4541
4542 * elf32-arc.c (USE_REL): Define as 1.
4543 * elf32-d10v.c (USE_REL): Likewise.
4544 * elf32-m32r.c (USE_REL): Likewise.
4545 * elf32-m68hc11.c (USE_REL): Likewise.
4546 * elf32-m68hc12.c (USE_REL): Likewise.
4547 * elf32-or32.c (USE_REL): Likewise.
4548 * elfarm-nabi.c (USE_REL): Likewise.
4549
f52d1d64
JJ
45502002-10-16 Jakub Jelinek <jakub@redhat.com>
4551
4552 * config.bfd (s390-*-linux*): Add targ64_selvecs.
4553 (s390x-*-linux*): Add targ_selvecs.
4554
2bc3c89a
AM
45552002-10-16 Alan Modra <amodra@bigpond.net.au>
4556
4557 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 4558 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
4559 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
4560 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
4561 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
4562 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
4563 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
4564 (SOURCE_HFILES): Add elf32-qnx.h.
4565 (BUILD_HFILES): Add bfdver.h.
4566 Run "make dep-am".
4567 * Makefile.in: Regenerate.
4568 * configure.in Update bfd vector dependencies.
4569 * configure: Regenerate.
4570 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
4571 * elf32-i386qnx.c: Likewise.
4572 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
4573 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
4574 * elf32-sh-lin.c: Likewise.
4575 * elf32-shqnx.c: Likewise.
4576 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
4577 * elf32-sh64-nbsd.c: Likewise.
4578 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
4579 * elf64-sh64-nbsd.c: Likewise.
4580 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
4581 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
4582 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
4583 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
4584 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
4585 (elf_backend_is_contained_by_filepos): Likewise.
4586 (elf_backend_copy_private_bfd_data_p): Likewise.
4587 Globalize and move functions to..
4588 * elf32-qnx.c: ..here. New file.
4589 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
4590 emit target vectors when INCLUDE_SHMEDIA.
4591 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
4592 end of file.
4593 * elf64-sh64.c: Remove ELF_ARCH test.
4594 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
4595 * po/BLD-POTFILES.in: Regenerate.
4596 * po/SRC-POTFILES.in: Regenerate.
4597
90c9df85
AM
45982002-10-16 Alan Modra <amodra@bigpond.net.au>
4599
366f2964
AM
4600 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
4601 loaded with --just-symbols.
4602
90c9df85
AM
4603 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
4604 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4605 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4606 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
4607
2238051f
RH
46082002-10-15 Richard Henderson <rth@redhat.com>
4609
4610 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
4611 (BFD64_BACKENDS_CFILES): Likewise.
4612 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
4613 * elf64-alpha-fbsd.c: Remove file, move code ...
4614 * elf64-alpha.c: ... here.
4615 * Makefile.in, configure: Rebuild.
4616
64e04ecd
RH
46172002-10-14 Richard Henderson <rth@redhat.com>
4618
4619 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
4620 VALUE, not ADDEND.
4621
396a6083
SC
46222002-10-14 Stephen Clarke <stephen.clarke@superh.com>
4623
4624 * elf32-sh.c (elf_sh_link_hash_entry): Replace
4625 datalabel_got_offset with union of datalabel_got
4626 offset and refcount.
4627 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
4628 (allocate_dynrelocs): Delete unnecessary code for
4629 STT_DATALABEL type. Create entry in got for
4630 datalabel version of symbol if datalabel_got.refcount > 0.
4631 (sh_elf_relocate_section): Use datalabel_got union.
4632 (sh_elf_gc_sweep_hook): Pull common code to initialize
4633 h and eh out of switch statement. Declare seen_stt_datalabel.
4634 Initialize it. Decrement datalabel_got.refcount for
4635 got relocs when seen_stt_datalabel is true.
4636 Decrement local_got_refcounts entry for datalabel got relocs
4637 of local symbols.
4638 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
4639 (sh_elf_check_relocs): Declare seen_stt_datalabel.
4640 Initialize it. When seen_stt_datalabel is true, increment
4641 datalabel_got refcount rather than got.refcount.
4642 (sh_elf_finish_dynamic_symbol): Create relocs to
4643 initialize got entry for datalabel version of symbol.
4644
6a0735ef
AM
46452002-10-14 Alan Modra <amodra@bigpond.net.au>
4646
4647 * Makefile.am: Run "make dep-am".
4648 (BFD_H_FILES): Remove version.h.
4649 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
4650 * version.h: ..to here.
4651 * configure.in (bfd_version_date): Remove.
4652 (AC_OUTPUT): Make bfdver.h from version.h.
4653 * bfd.c: #include "bfdver.h".
4654 * vms-hdr.c: Likewise.
4655 * Makefile.in: Regenerate.
4656 * bfd-in2.h: Regenerate.
4657 * configure: Regenerate.
4658 * po/SRC-POTFILES.in: Regenerate.
4659
686e4055
AM
46602002-10-14 Alan Modra <amodra@bigpond.net.au>
4661
4662 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
4663 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
4664 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
4665 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
4666 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
4667 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
4668 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
4669 bfd_mach_ip2022, bfd_mach_ip2022ext,
4670 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
4671 * bfd-in2.h: Regenerate.
4672
019dca2b
KK
46732002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4674
4675 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
4676 endian vector to targ_selvecs.
4677
bce03d3d
AO
46782002-10-13 Alexandre Oliva <aoliva@redhat.com>
4679
4680 * elfxx-mips.c (mips_elf_calculate_relocation): Take
4681 save_addend argument. Don't apply the 32-bit mask to a
4682 GPREL32 value if it's to be used in another relocation. Don't
4683 use forced-check computation of local_p to decide whether to
4684 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
4685 of the addend of a non-in-place GPREL16 relocation.
4686 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
4687 mips_elf_calculate_relocation().
4688
9b691193
SC
46892002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4690
4691 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
4692 with symbols in other sections if we relaxed something; the sections
4693 output offsets must be re-computed before.
4694
1f4c5b47
SC
46952002-10-12 Stephane Carrez <stcarrez@nerim.fr>
4696
4697 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
4698 handling to use Elf_Internal_Sym.
4699 (m68hc11_elf_relax_delete_bytes): Likewise.
4700
5dc97655
KK
47012002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
4702
4703 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
4704 sh_elf_object_p, dtpoff_base): New functions.
4705 (sh_elf_howto_table): Add TLS relocs.
4706 (sh_reloc_map): Likewise.
4707 (sh_elf_info_to_howto): Support TLS relocs.
4708 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
4709 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
4710 New macros.
4711 (sh_elf_obj_tdata): New.
4712 (elf_sh_link_hash_table): Add tls_ldm_got.
4713 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
4714 (allocate_dynrelocs): Support TLS relocs.
4715 (sh_elf_size_dynamic_sections): Likewise.
4716 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
4717 .rela.got section when found already. Return false after printing
4718 error about unresolvable relocation.
4719 (sh_elf_gc_sweep_hook): Support TLS relocs.
4720 (sh_elf_check_relocs): Likewise.
4721 (sh_elf_finish_dynamic_symbol): Likewise.
4722 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
4723 * reloc.c: Add SH TLS relocs.
4724 * bfd-in2.h, libbfd.h: Regenerate.
4725
6a0735ef
AM
47262002-10-11 Daniel Jacobowitz <drow@mvista.com>
4727
4728 * Makefile.in: Regenerated.
4729
af39267e
DJ
47302002-10-11 Daniel Jacobowitz <drow@mvista.com>
4731
4732 * Makefile.am: Run dep-am.
6a0735ef 4733 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
4734 (BFD32_LIBS): Add simple.lo.
4735 (BFD32_LIBS_CFILES): Add simple.c.
4736 * Makefile.in: Regenerated.
4737 * bfd-in2.h: Regenerated.
4738 * simple.c: New file.
4739
0be617ce
AM
47402002-10-11 Alan Modra <amodra@bigpond.net.au>
4741
14a793b2
AM
4742 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
4743 (record_thumb_to_arm_glue): Likewise.
4744 * ecoff.c (ecoff_link_add_externals): Likewise.
4745 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
4746 (record_thumb_to_arm_glue): Likewise.
4747 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
4748 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
4749 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
4750 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
4751 * elf64-ppc.c (func_desc_adjust): Likewise.
4752 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
4753 (sh64_elf64_create_dynamic_sections): Likewise.
4754 * elflink.c (_bfd_elf_create_got_section): Likewise.
4755 (_bfd_elf_create_dynamic_sections): Likewise.
4756 (_bfd_elf_create_linker_section): Likewise.
4757 * elflink.h (elf_add_default_symbol): Likewise.
4758 (elf_link_create_dynamic_sections): Likewise.
4759 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
4760 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
4761 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
4762 (_bfd_mips_elf_add_symbol_hook): Likewise.
4763 (_bfd_mips_elf_create_dynamic_sections): Likewise.
4764 * linker.c (generic_link_add_symbol_list): Likewise.
4765 * xcofflink.c (xcoff_link_add_symbols): Likewise.
4766
4767 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
4768
0be617ce 4769 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 4770 completely removed. Correct local sym adjustment.
0be617ce 4771
0a4ef3f4
SC
47722002-10-10 Stephen Clarke <stephen.clarke@superh.com>
4773
4774 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
4775 Correct mistake in calculation of address of .got.
4776 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
4777 elf_sh64_pic_plt_entry_le): Likewise.
4778
efacd36e
SC
47792002-10-09 Richard Shann <richard.shann@superh.com>
4780 Stephen Clarke <stephen.clarke@superh.com>
4781
4782 * Makefile.am: Add entries for elf32-sh64-lin.c and
4783 elf64-sh64-lin.c. Regenerate.
4784 * Makefile.in: Regenerate.
9b5ecbd0 4785 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
4786 to use sh64 vectors rather than sh vectors.
4787 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
4788 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4789 * configure: Regenerate.
4790 * elf32-sh64-lin.c: New file.
4791 * elf64-sh64-lin.c: New file.
4792 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
4793 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
4794
299bf759
L
47952002-10-08 H.J. Lu <hjl@gnu.org>
4796
4797 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
4798 IE->LE transition for R_386_TLS_IE.
4799
51020317
AM
48002002-10-08 Alan Modra <amodra@bigpond.net.au>
4801
4802 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
4803
a8fcf378
NC
48042002-10-07 Mark Elbrecht <snowball3@softhome.net>
4805
51020317
AM
4806 * cofflink.c (mark_relocs): Don't mark relocations in excluded
4807 sections.
a8fcf378 4808
a16d5acb
AM
48092002-10-07 Alan Modra <amodra@bigpond.net.au>
4810
a6b511bd
AM
4811 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
4812 code.
4813
a16d5acb
AM
4814 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
4815
7c4a37eb
AM
48162002-10-06 Alan Modra <amodra@bigpond.net.au>
4817
4818 * opncls.c: Formatting.
4819 (_bfd_new_bfd): Use a smaller section hash table.
4820
7c4ca42d
AO
48212002-10-05 Alexandre Oliva <aoliva@redhat.com>
4822
4823 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
4824 of the other two relocations packed with a REL32 to NONE.
4825
4989d792
SC
48262002-10-02 Stephen Clarke <stephen.clarke@superh.com>
4827
4828 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
4829 (sh_elf_link_hash_newfunc): Initialize it.
4830 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
4831 to got.refcount for symbols that are forced local or when
4832 we have direct got refs.
4833 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
4834 to correctly adjust got.refcount and plt.refcount.
4835 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
4836 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 4837
7c445aa3
JJ
48382002-10-01 Jakub Jelinek <jakub@redhat.com>
4839
4840 * elf32-i386.c (elf_i386_relocate_section): Fix
4841 movl foo@indntpoff, %eax IE->LE transition.
4842
abcf1d52
JJ
48432002-10-01 Jakub Jelinek <jakub@redhat.com>
4844
4845 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
4846 sequence and its transitions.
4847
a45bb67d
JJ
48482002-10-01 Jakub Jelinek <jakub@redhat.com>
4849
4850 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
4851 to st_value + addend in non-code sections.
4852 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
4853 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
4854
00707a0e 48552002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
4856 Ken Raeburn <raeburn@cygnus.com>
4857 Aldy Hernandez <aldyh@redhat.com>
4858 Eric Christopher <echristo@redhat.com>
4859 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
4860
4861 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
4862 (bfd_mach_mips5500): New.
4863 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
4864 (arch_info_struct): Add corresponding entries here.
4865 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
4866 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
4867 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
4868 bfd_mach_mips5400 and bfd_mach_mips5500.
4869 (_bfd_mips_elf_mach_extends_p): New function.
4870 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
4871 the EF_MIPS_MACH flags.
4872 * bfd-in2.h: Regenerate.
4873
624f0b25
JT
48742002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
4875
4876 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
4877 .got sections.
4878
b89fe0ee
AM
48792002-09-28 Alan Modra <amodra@bigpond.net.au>
4880
4881 * elf.c (map_sections_to_segments): Correct test for start of
4882 writable section in the same page as end of read-only section.
4883
b29635ba
JT
48842002-09-27 Matt Thomas <matt@3am-software.com>
4885
4886 * elf32-vax.c (elf_vax_check_relocs): Remove unused
4887 local_got_refcounts usage. Remove allocation of got slot.
4888 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
4889 Remove de-allocation of got slot.
4890 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
4891 traversal for elf_vax_instantiate_got_entries. Allow empty .got
4892 sections to be GC'ed.
4893 (elf_vax_instantiate_got_entries): New function.
4894 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
4895 tests that are now handled by elf_vax_instantiate_got_entries.
4896 Assert GOT entry falls within .got section size. Remove redundant
4897 comparisions. Fix comments.
4898
bffbf940
JJ
48992002-09-27 Jakub Jelinek <jakub@redhat.com>
4900
4901 * reloc.c: Add x86-64 TLS relocs.
4902 * bfd-in2.h, libbfd.h: Rebuilt.
4903 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
4904 relocs. Add TLS relocs.
4905 (x86_64_reloc_map): Add TLS relocs.
4906 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
4907 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
4908 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
4909 (elf64_x86_64_hash_entry): Define.
4910 (struct elf64_x86_64_obj_tdata): New.
4911 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
4912 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
4913 (link_hash_newfunc): Initialize tls_type.
4914 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
4915 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
4916 (elf64_x86_64_mkobject): New.
4917 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
4918 (elf64_x86_64_tls_transition): New.
4919 (elf64_x86_64_check_relocs): Add r_type variable and use it.
4920 Handle TLS relocs.
4921 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
4922 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
4923 (elf64_x86_64_size_dynamic_sections): Likewise.
4924 (dtpoff_base, tpoff): New.
4925 (elf64_x86_64_relocate_section): Handle TLS relocs.
4926 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
4927 entries.
4928 (bfd_elf64_mkobject): Define.
4929
4930 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
4931 DF_STATIC_TLS if shared.
4932
14366460
TS
49332002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4934
4935 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
4936 empty relocation sections.
4937
9f951329
AM
49382002-09-26 Alan Modra <amodra@bigpond.net.au>
4939
4940 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
4941 (ppc64_elf_build_stubs): Build them here instead.
4942
6b3ac709
JJ
49432002-09-24 Jakub Jelinek <jakub@redhat.com>
4944
4945 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
4946 addend into r_addend, not *r_offset.
4947 (elf32_sparc_finish_dynamic_symbol): Likewise.
4948 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
4949 R_SPARC_RELATIVE's r_offset.
4950
e2f6d277
NC
49512002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
4952
4953 * dwarf2.c (decode_line_info): Update to correctly decode
4954 the (non-standard DWARF2) out-of-order address sequences
4955 generated by the Intel C++ 6.0 compiler for ia64-Linux.
4956
f3961b2b
DD
49572002-09-23 Mark Elbrecht <snowball3@softhome.net>
4958
4959 * config.bfd: For DJGPP targets, match with any cpu and any machine.
4960
ad34bc37
AM
49612002-09-23 Alan Modra <amodra@bigpond.net.au>
4962
4963 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
4964 for discarded FDEs. Remove redundant assignment.
4965 * elflink.h (elf_bfd_discard_info): Save edited relocs.
4966
82988bff
L
49672002-09-22 H.J. Lu <hjl@gnu.org>
4968
4969 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
4970 the relocation count between different .reloc sections.
4971
5ad8645c
AM
49722002-09-21 Alan Modra <amodra@bigpond.net.au>
4973
5f819128
AM
4974 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
4975 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
4976 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
4977 R_PPC_EMB_RELSDA.
4978
5ad8645c
AM
4979 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
4980 unsigned. Move "symcount" assignment out of loop.
4981 * Makefile.am: Run "make dep-am".
4982 * Makefile.in: Regenerate.
4983 * configure: Regenerate.
4984 * po/SRC-POTFILES.in: Regnerate.
4985
75936555
NC
49862002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
4987
4988 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
4989 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
4990 (e.g. IRIX64).
4991
2243deae
L
49922002-09-19 Jakub Jelinek <jakub@redhat.com>
4993
4994 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
4995 even if generating R_PPC_RELATIVE reloc.
4996 (ppc_elf_relocate_section): Make sure relocation is performed
4997 if skip == -2. Clear memory at r_offset when creating dynamic
4998 relocation.
4999
37e55690
JJ
50002002-09-19 Jakub Jelinek <jakub@redhat.com>
5001
5002 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
5003 BFD_RELOC_386_TLS_GOTIE): Add.
5004 * bfd-in2.h, libbfd.h: Rebuilt.
5005 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
5006 and R_386_TLS_GOTIE.
5007 (elf_i386_reloc_type_lookup): Handle it.
5008 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
5009 char instead of enum, change GOT_* into defines.
5010 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
5011 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5012 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
5013 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
5014 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
5015 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5016 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5017 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5018 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
5019 tls_type is GOT_TLS_IE_BOTH.
5020 (elf_i386_size_dynamic_sections): Likewise.
5021 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
5022 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
5023 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
5024 all 4 GOT_TLS_* TLS types.
5025
8e67855b
NC
50262002-09-19 Nick Clifton <nickc@redhat.com>
5027
5028 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
5029 follow indirect links.
5030
1c59ba3f
NC
50312002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
5032
5033 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
5034 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
5035 on 64 bit machines.
5036 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
5037 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
5038 ECOFF information: 'ioptMax' refers to the actual *size*
5039 of the optimization symtab, not the number of entries.
1c59ba3f 5040
9d7404b7
NC
50412002-09-19 Daniel Jacobowitz <drow@mvista.com>
5042
5043 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
5044 ELF_LINK_HASH_NEEDS_PLT logic.
5045
05a487dc
DJ
50462002-09-18 Daniel Jacobowitz <drow@mvista.com>
5047
5048 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5049 correct relocation count.
5050
1f70368c
DJ
50512002-09-17 Daniel Jacobowitz <drow@mvista.com>
5052
5053 * bfd-in.h (bfd_get_dynamic_symcount): Define.
5054 * bfd.c (struct _bfd): Add dynsymcount.
5055 * bfd-in2.h: Regenerated.
5056 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
5057 abfd->dynsymcount.
5058 * elfcode.h (elf_slurp_reloc_table_from_section): Check
5059 for overflow.
5060
51020317 50612002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
5062
5063 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
5064 (mips_elf64_final_gp): Don't make up gp value.
5065 * elfn32-mips.c (mips_elf_final_gp): Likewise.
5066 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
5067 .MIPS.options/.options section.
5068
290062cc
DB
50692002-09-17 David O'Brien <obrien@FreeBSD.org>
5070
5071 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
5072 It is benign for FreeBSD < 4.1. Minor reformatting.
5073 * elf64-alpha-fbsd.c: Likewise.
5074
c5c1f40c
JJ
50752002-09-17 Jakub Jelinek <jakub@redhat.com>
5076
ca1eb0ba
JJ
5077 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
5078 addend.
c5c1f40c 5079
562ace6b
AM
50802002-09-17 Alan Modra <amodra@bigpond.net.au>
5081
5082 * elf64-alpha.c (alpha_elf_size_info): Make static.
5083
5af6ead6
AM
50842002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
5085
5086 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
5087 * cpu-tic4x.c: Ditto.
5088
cb9512fc
TS
50892002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5090
5091 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
5092 duplicate define.
5093
4ada7262
DB
50942002-09-16 Bruno Haible <bruno@clisp.org>
5095
5096 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
5097 by a target variant implementation.
5098 * elf64-alpha.c: Likewise.
5099 * elf32-i386-fbsd.c: New file.
5100 * elf64-alpha-fbsd.c: New file.
5101 * targets.c: Support bfd_elf32_i386_freebsd_vec and
5102 bfd_elf64_alpha_freebsd_vec.
5103 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
5104 bfd_elf64_alpha_freebsd_vec.
5105 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
5106 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
5107 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
5108 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
5109 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
5110 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
5111 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
5112
6a30718d
JJ
51132002-09-12 Jakub Jelinek <jakub@redhat.com>
5114
5115 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
5116 NULL.
5117 (elf_i386_relocate_section): Return false after printing error about
5118 unresolvable relocation.
5119
6cf9e9fe
NC
51202002-09-12 Nick Clifton <nickc@redhat.com>
5121
5122 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
5123 R_ARM_THM_PC11.
5124
10f469bf
DJ
51252002-09-11 Jeffrey Law <law@redhat.com>
5126
5127 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
5128
dc43ada5
NC
51292002-09-11 Andrew Haley <aph@cambridge.redhat.com>
5130
5131 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
5132 line_ptr before deciding we've found a symbol.
5133
e09f4395
NC
51342002-09-11 Nick Clifton <nickc@redhat.com>
5135
5136 * po/da.po: New Danish translation file.
5137 * configure.in (LINGUAS): Add 'da'.
5138 * configure: Regenerate.
5139
b3018b5f
NC
51402002-09-10 Michael Snyder <msnyder@redhat.com>
5141
5142 * irix-core.c (do_sections, do_sections64): New functions.
51020317 5143 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
5144 do_sections64, depending on corefile (32-bit or 64-bit).
5145
2f21f25e
RH
51462002-09-09 Richard Henderson <rth@redhat.com>
5147
5148 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
5149 and PCREL21F like PCREL21B.
5150
28b94e7c
KB
51512002-09-04 Kevin Buettner <kevinb@redhat.com>
5152
51020317
AM
5153 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
5154 vector.
28b94e7c 5155
5cec6941
NC
51562002-09-02 Nick Clifton <nickc@redhat.com>
5157
5158 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
5159 names instead of cryptically overloaded bfd_reloc error
5160 codes.
5161 (v850_elf_relocate_section): Likewise.
5162 (v850_elf_relax_section): Replace caching of external symbols
5163 with caching of internal symbols obtained from calling
5164 bfd_elf_get_elf_syms().
51020317 5165 Fixup problems with freeing cached allocated memory blocks.
5cec6941 5166
3b77b1d5
AM
51672002-09-02 Alan Modra <amodra@bigpond.net.au>
5168
638524b5
AM
5169 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
5170 (bfd_pj_arch): Use bfd_default_scan.
5171 * cpu-v850.c (scan): Remove.
5172 (N): Use bfd_default_scan.
5173 * cpu-z8k.c (scan_mach): Remove.
5174 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
5175 first. Use bfd_default_scan.
5176
250d94fd
AM
5177 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
5178 bfd_mach constants.
5179 (ecoff_get_magic): Likewise.
5180 * elf32-v850.c (v850_elf_object_p): Likewise.
5181 (v850_elf_final_write_processing): Likewise.
5182 * mipsbsd.c (MY(set_arch_mach)): Likewise.
5183 (MY(write_object_contents)): Likewise.
5184 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
5185 * coffcode.h (coff_write_object_contents): Likewise.
5186 (coff_set_arch_mach_hook): Add comment describing machine == 0.
5187 Remove unnecessary "machine" assignments.
5188 (coff_write_relocs): Test for the absolute section sym by testing
5189 section and flags.
5190
3b77b1d5
AM
5191 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
5192 and bfd_mach_i386_i386_intel_syntax.
250d94fd 5193 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 5194
e5b45b83
DA
51952002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
5196
5197 * bfd-in.h (align_power): Cast constants to bfd_vma type.
5198 * bfd-in2.h (align_power): Likewise.
5199
37f45cf8
AM
52002002-08-30 Alan Modra <amodra@bigpond.net.au>
5201
5202 * Makefile.am: Run "make dep-am".
5203 * Makefile.in: Regenerate.
5204
5205 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
5206 * cpu-powerpc.c (powerpc_compatible): Likewise.
5207 * cpu-rs6000.c (rs6000_compatible): Likewise.
5208
86aba9db
NC
52092002-08-28 Catherine Moore <clm@redhat.com>
5210
9b5ecbd0 5211 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
5212 (v850-elf-reloc): Don't resolve pc relative relocs.
5213 (v850_elf_ignore_reloc): New routine.
5214 (v850_elf_final_link_relocate): Handle new relocs.
5215 (v850_elf_relax_delete_bytes ): New routine.
5216 (v850_elf_relax_section): New routine.
5217 (bfd_elf32_bfd_relax_section): Define.
5218 (HOWTO): New entries for new relocs.
5219 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
5220 (BFD_RELOC_V850_LONGJUMP): New reloc.
5221 (BFD_RELOC_V850_ALIGN): New reloc.
5222 * archures.c: Remove redundant v850ea architecture.
5223 * cpu-v850.c: Remove redundant v850ea support.
5224 * libbfd.h: Regenerate.
5225 * bfd-in2.h: Regenerated.
5226
026df7c5
NC
52272002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
5228
5229 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
5230 * configure.in: Add tic4x_coff vector files.
5231 * configure: Regenerate.
5232 * Makefile.am: Add tic4x target.
5233 * Makefile.in: Regenerate.
5234
52352002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
5236
5237 * archures.c: Add the BFD arch type tic4x.
5238 * bfd-in.h: Add BFD_IN_MEMORY flag.
5239 * coff-tic4x.c: New file.
5240 * coffswap.h (coff_swap_sym_out): Add preadjuster.
5241 * cpu-tic4x.c: New file.
5242 * targets.c: Added tic4x- in list of xvecs.
5243 * ticoff.h: New file.
5244 * bfd-in2.h: Regenerate.
5245
88f7bcd5
NC
52462002-08-27 Adam Nemet <anemet@lnxw.com>
5247
5248 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
5249 bit of DT_INIT and DT_FINI for Thumb functions.
5250
c8e48751
AM
52512002-08-26 Alan Modra <amodra@bigpond.net.au>
5252
5253 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
5254
2846975a
AM
52552002-08-26 Alan Modra <amodra@bigpond.net.au>
5256
5257 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
5258
067653c5
AM
52592002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5260
5261 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
5262 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
5263 Likewise.
5264 (struct elf_sh_pcrel_relocs_copied): Removed.
5265 (struct elf_sh_dyn_relocs): New.
5266 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
5267 field with dyn_relocs.
5268 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
5269 sections and sym_sec.
5270 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
5271 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
5272 (sh_elf_create_dynamic_sections): Use create_got_section instead
5273 of _bfd_elf_create_got_section.
5274 (sh_elf_check_relocs): Likewise.
5275 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
5276 sections.
5277 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
5278 sh_elf_relocate_section, sh_elf_check_relocs,
5279 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
5280 Likewise.
5281 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
5282 dynamic relocations and avoiding the copy relocation when we
5283 didn't find any dynamic relocations in the section which has
5284 contents or is read-only.
5285 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
5286 (sh_elf_size_dynamic_sections): Don't reset the size of
5287 .rela.got section even if dynamic_sections_created flag is off.
5288 Don't use sh_elf_discard_copies. Scan all input bfd and use
5289 allocate_dynrelocs. Call readonly_dynrelocs to determine
5290 whether we need DT_TEXTREL.
5291 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
5292 whether the symbol was never referred to.
5293 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
5294 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
5295 (sh_elf_check_relocs): Call create_got_section if the short-cut
5296 to .got is null. Increment reference counters only instead of
5297 allocating space on dynamic sections here. Don't conditionalize
5298 uninitialized got.offset value when marking the symbol as a
5299 global offset table entry. Keep relocations for symbols satisfied
5300 by a dynamic library to avoid copy relocations for the symbol.
5301 Set dynobj field of an elf hash table if needed.
5302 (sh_elf_finish_dynamic_sections): Handle null section pointer
5303 correctly.
5304 (elf_backend_copy_indirect_symbol): Defined.
5305 (elf_backend_can_refcount): Defined.
5306
7e326afc
NC
53072002-08-23 Nick Clifton <nickc@redhat.com>
5308
5309 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
5310 previous change. Add comment explaining why.
5311
c8614e8e
AM
53122002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5313
5314 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
5315 contents of .got.plt[2] to tr0, not address of .got.plt.
5316 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
5317 patching absolute plt entry. For shmedia plt entry, set bottom bit
5318 of branch to plt0 as this is a branch to an shmedia instruction.
5319 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
5320 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
5321 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
5322 branch to plt0.
5323 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
5324 patching absolute plt entry. For shmedia plt entry, branch to
5325 plt0 is now ptrel, so use relative offset. Set bottom bit of
5326 branch target as it is a branch to an shmedia instruction.
5327
3b587c71
AM
53282002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
5329 Richard Shann <richard.shann@superh.com>
5330
5331 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
5332 value if .init is an SHmedia function. Similarly for DT_FINI.
5333 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 5334
957dcaa8
AM
53352002-08-23 Stephen Clarke <stephen.clarke@superh.com>
5336
3b587c71 5337 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 5338 dynamic section.
3b587c71 5339 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 5340
a4263c47
NC
53412002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5342
5343 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 5344 byte read when reading the return address register column.
a4263c47 5345
db4ed121
NC
53462002-08-22 Nick Clifton <nickc@redhat.com>
5347
5348 * config.bfd: Add powepc64-*-*bsd* target.
5349
ed71e111
NC
53502002-08-22 Graeme Peterson <gp@qnx.com>
5351
5352 * Makefile.am: Add entries for elf32-shqnx.c
5353 * Makefile.in: Regenerate.
5354 * config.bfd: Add support sh-*-nto* target.
5355 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
5356 * configure: Regenerate.
5357 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
5358 * elf32-sh.c: Do not include elf32-target.h if
5359 ELF32_SH_C_INCLUDED is defined.
5360 * elf32-shqnx.c: New file: Support for QNX.
5361 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
5362
0ab72ee2
NC
53632002-08-22 Nick Clifton <nickc@redhat.com>
5364
75c83283
NC
5365 * po/tr.po: Updated Turkish translation.
5366
0ab72ee2
NC
5367 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
5368 symbols are not read.
5369
56780f18
AM
53702002-08-22 Alan Modra <amodra@bigpond.net.au>
5371
5372 * elf32-m68hc11.c: Formatting fixes.
5373 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5374 * elf32-m68hc12.c: Formatting fixes.
5375 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
5376
b48fa14c
AM
53772002-08-22 Alan Modra <amodra@bigpond.net.au>
5378
a7c71b0c
AM
5379 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
5380 SEC_DATA.
5381 (pmac_xcoff_vec): Likewise.
5382 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5383 (aix5coff64_vec): Likewise.
5384
56780f18
AM
53852002-08-22 Alan Modra <amodra@bigpond.net.au>
5386
b48fa14c
AM
5387 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
5388 param to elf_backend_copy_indirect_symbol.
5389 (_bfd_elf_link_hash_copy_indirect): Likewise.
5390 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
5391 calls to copy_indirect_symbol.
5392 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
5393 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
5394 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5395 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
5396 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
5397 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
5398 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
5399 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5400 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
5401 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
5402 test refcounts for "used" values.
5403
8c2ab17d
AM
54042002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
5405
5406 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
5407 argument declaration.
5408
d62b1198 54092002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
5410
5411 * archures.c (bfd_mach_ppc_e500): Added.
5412 * bfd-in2.h: Rebuilt.
d62b1198
EZ
5413 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
5414
9f88ba09
AM
54152002-08-19 Alan Modra <amodra@bigpond.net.au>
5416
5417 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
5418
df622259
AC
54192002-08-17 Andrew Cagney <ac131313@redhat.com>
5420
5421 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 5422 `bfd_byte'.
df622259 5423
44c410de
SC
54242002-08-17 Stan Cox <scox@redhat.com>
5425
5426 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
5427 IRIX 6 segment layout for NEWABI.
5428
4972a8e9
SC
54292002-08-16 Stephen Clarke <stephen.clarke@superh.com>
5430
1049f94e 5431 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 5432 symbols when looking for section referred to by a relocation.
1049f94e 5433 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 5434
c5cd6d62
AM
54352002-08-15 Alan Modra <amodra@bigpond.net.au>
5436
5437 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
5438
0741c7be
HPN
54392002-08-15 Hans-Peter Nilsson <hp@axis.com>
5440
5441 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
5442 missing check for whether the symbol is referenced by DSO before
5443 unexporting it as an unneeded dynamic symbol.
5444
e8d5d179
L
54452002-08-14 H.J. Lu <hjl@gnu.org>
5446
5447 * libbfd.h: Regenerate.
5448
e9229007
L
54492002-08-14 H.J. Lu <hjl@gnu.org>
5450
5451 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
5452
1fd03b5a
SC
54532002-08-14 Stephane Carrez <stcarrez@nerim.fr>
5454
5455 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
5456 instructions.
5457 (m68hc11_direct_relax): New to define table of relaxable instructions.
5458 (find_relaxable_insn): New, find a relaxable insn.
5459 (compare_reloc): New to compare two relocs.
5460 (m68hc11_elf_relax_section): New, relax text sections.
5461 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
5462 (elf32_m68hc11_check_relocs): New function for GC support.
5463 (elf32_m68hc11_relocate_section): New function for GC support.
5464 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
5465 (elf_backend_check_relocs): Likewise.
5466 (elf_backend_relocate_section): Likewise.
5467
c828c771
L
54682002-08-13 H.J. Lu <hjl@gnu.org>
5469
5470 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
5471 definitions in shared objects when checking symbol with
5472 undefined version.
5473
9b701e44
SC
54742002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5475
5476 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
5477 (elf32_m68hc11_gc_sweep_hook): Likewise.
5478 (elf_backend_gc_mark_hook): Define for GC section support.
5479 (elf_backend_gc_sweep_hook): Likewise.
5480 (elf_backend_can_gc_sections): Likewise.
5481
5482 * elf32-m68hc12.c: Likewise.
5483
96405e3c
SC
54842002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5485
5486 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
5487 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
5488 (_bfd_m68hc11_elf_set_private_flags): New function.
5489 Use them to set/check/print ELF flags specific to 68HC11.
5490
5491 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
5492 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
5493 (_bfd_m68hc12_elf_set_private_flags): New function.
5494 Use them to set/check/print ELF flags specific to 68HC12.
5495
dae78fb0
SC
54962002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5497
5498 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
5499 fix masks for PC-rel relocs.
5500 (m68hc11_elf_ignore_reloc): New function.
5501
5502 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
5503 68HC12 banked addressing relocs.
5504 (m68hc12_phys_addr): New to compute physical address of banked memory.
5505 (m68hc12_phys_page): Likewise for page.
5506 (m68hc12_addr_is_banked): New to see if address is in banked area.
5507 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
5508
3dbfec86
SC
55092002-08-13 Stephane Carrez <stcarrez@nerim.fr>
5510
5511 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
5512 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
5513 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
5514 * bfd-in2.h: Regenerate.
5515
871da94f
L
55162002-08-12 H.J. Lu <hjl@gnu.org>
5517
5518 * elflink.h (elf_add_default_symbol): Preserve section across
5519 elf_merge_symbol.
5520
59bc061d
NC
55212002-08-09 Graeme Peterson <gp@qnx.com>
5522
51020317 5523 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
5524 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
5525 * Makefile.in: Regenerate.
5526 * config.bfd: Add support for powerpc{le}-*-nto targets.
5527 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
5528 * configure: Regenerate.
5529 * elf32-i386qnx.c: Moved backend functions into a QNX specific
5530 common file "elf32-qnx.h", and now include that file.
5531 * elf32-qnx.h: New file: QNX specific common elf backend.
5532 * elf32-ppc.c: Do not include elf32-target.h if
5533 ELF32_PPC_C_INCLUDED is defined.
5534 * elf32-ppcqnx.c: New file: Support for QNX.
5535 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
5536 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
5537
2b692c59
NC
55382002-08-09 Nick Clifton <nickc@redhat.com>
5539
5540 * po/sv.po: Updated Swedish translation.
5541
d0c7ff07
TS
55422002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5543
5544 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
5545 g->global_gotsym is NULL.
5546
d8bbe778
L
55472002-08-08 H.J. Lu <hjl@gnu.org>
5548
c5cd6d62 5549 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
5550 overrides an indirect versioned symbol.
5551
c366c25e
JJ
55522002-08-08 Jakub Jelinek <jakub@redhat.com>
5553
5554 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
5555 for R_386_TLS_TPOFF32 relocs against symndx 0.
5556
31941635
L
55572002-08-07 H.J. Lu <hjl@gnu.org>
5558
5559 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
5560 with undefined version if needed.
5561 (elf_link_assign_sym_version): Match a default symbol with a
5562 version without definition. No need to hide the default
5563 definition separately.
5564
0f3bd64f
AM
55652002-08-08 Alan Modra <amodra@bigpond.net.au>
5566
7330fb86
AM
5567 * elflink.h (elf_link_output_extsym): Don't output symbols from
5568 SEC_EXCLUDE sections.
5569
0f3bd64f
AM
5570 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
5571
a4aa0fb7
AM
55722002-08-07 Alan Modra <amodra@bigpond.net.au>
5573
5574 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
5575 entries.
5576
34ea4a36
TS
55772002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5578
5579 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
5580 mismatch.
5581
141ff970
TS
55822002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5583
5584 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
5585
28458e7e
TS
55862002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5587
5588 * elf32-mips.c (mips_reloc_map): Fix typo.
5589
0121a3da
AM
55902002-08-06 Alan Modra <amodra@bigpond.net.au>
5591
5592 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
5593
d006db6c
AM
55942002-08-06 Alan Modra <amodra@bigpond.net.au>
5595
5596 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
5597
8ea80f08
AM
55982002-08-06 Alan Modra <amodra@bigpond.net.au>
5599
2a52da53
AM
5600 * libxcoff.h: Use PARAMS on function declarations.
5601 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
5602 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
5603
8ea80f08
AM
5604 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
5605 addend.
5606 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
5607
cf9ab45b
AM
56082002-08-06 Alan Modra <amodra@bigpond.net.au>
5609
5610 * coff-rs6000.c: Formatting fixes.
5611 (xcoff_calculate_relocation): Use PARAMS in declaration.
5612 (xcoff_complain_overflow): Likewise.
5613 (xcoff_ppc_relocate_section): Use old-style function pointer call.
5614 (bfd_xcoff_backend_data): Remove useless comments.
5615 (rs6000coff_vec): Likewise.
5616 (bfd_pmac_xcoff_backend_data): Likewise.
5617 (pmac_xcoff_vec): Likewise.
8ea80f08 5618
cf9ab45b
AM
5619 * coff64-rs6000.c: Formatting fixes.
5620 (xcoff64_calculate_relocation): Use PARAMS in declaration.
5621 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
5622 (bfd_xcoff_backend_data): Remove useless comments.
5623 (rs6000coff64_vec): Likewise.
5624 (bfd_xcoff_aix5_backend_data): Likewise.
5625 (aix5coff64_vec): Likewise.
5626
48bfecdd
AM
56272002-08-06 Alan Modra <amodra@bigpond.net.au>
5628
a78eab4e
AM
5629 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
5630 mask entries. Use complain_overflow_dont for R_REF.
5631 (xcoff_reloc_type_ba): Revert last change.
5632 (xcoff_reloc_type_br): Likewise.
5633 (xcoff_reloc_type_crel): Likewise.
5634 (xcoff_ppc_relocate_section): Likewise.
5635 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
5636 (xcoff64_ppc_relocate_section): Likewise.
5637 (xcoff64_howto_table): Revert some of last change to mask entries.
5638 Use complain_overflow_dont for R_REF.
5639
48bfecdd
AM
5640 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
5641 relocs with bitsize == 16 have size = 1.
5642 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
5643 (xcoff_reloc_type_br): Likewise.
5644 (xcoff_reloc_type_crel): Likewise.
5645 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5646 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
5647 dst_mask adjustment.
5648 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
5649 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
5650 bitsize == 16 have size = 1.
5651
fd13ed0c
DC
56522002-08-01 Denis Chertykov <denisc@overta.ru>
5653
5654 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
5655 (struct misc): New field isymbuf. All free_* fields removed.
5656 (symbol_value): Pass in internal syms. No need to swap syms in.
5657 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
5658 possibly cached info.
5659 (tidyup_after_error): Removed.
5660 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
5661 misc. Use new field.
5662 (adjust_all_relocations): Use internal syms. No need to swap syms
5663 in and out.
5664 (add_page_insn): Don't use removed fields of struct misc.
5665
24a1ba0f
NC
56662002-08-01 Nick Clifton <nickc@redhat.com>
5667
5668 * elf32-arm.h: Revert previous delta.
5669
a6903459
NC
56702002-08-01 Nick Clifton <nickc@redhat.com>
5671
5672 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
5673 * configure: Regenerate.
5674
39a2a3eb
L
56752002-07-31 H.J. Lu <hjl@gnu.org>
5676
5677 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
5678 selected.
5679
a0dfa6a8
L
56802002-07-31 H.J. Lu <hjl@gnu.org>
5681
5682 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
5683 is selected.
5684
cd67d266
JJ
56852002-07-31 Jakub Jelinek <jakub@redhat.com>
5686
5687 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
5688 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
5689
4eb6b71c
NC
56902002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5691
5692 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
5693 There is no 8 byte relocation type for this architecture.
5694 (do_ns32k_reloc): Use bfd_vma instead of native types.
5695 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
5696 returns void.
5697 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
5698 rely on generic code to do that.
5699 * aout-ns32k.c (howto_table): Add appropriate overflow detection
5700 to all table entries.
5701 (_bfd_ns32k_relocate_contents): put_data returns void.
5702 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
5703 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
5704 return void.
5705
f7c33884
NC
57062002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
5707
5708 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
5709 archive object is target dependant.
5710
8f64befb
NC
57112002-07-31 Adam Nemet <anemet@lnxw.com>
5712
5713 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
5714 (THUMB_PLT_ENTRY_SIZE): New macro.
5715 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
5716 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
5717 ARM_PLT_ENTRY_SIZE.
5718 (elf32_arm_plt_entry): Likewise.
5719 (elf_backend_plt_header_size): Likewise.
5720 (elf32_thumb_plt0_entry): New global.
5721 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
5722 into .plt.thumb.
5723 (elf32_thumb_plt_entry): New global.
5724 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
5725 Thumb entries. Set the bottom bit of the corresponding GOT entry
5726 for a Thumb PLT entry.
5727 (struct elf32_arm_plt_entry_info): New structure.
5728 (struct elf32_arm_link_hash_entry, plt_info): New member of this
5729 type.
5730 (elf32_arm_link_hash_newfunc): Initialize new member.
5731 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
5732 relocations against the PLT.
5733 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
5734 first_rel_type if this is the first time we encounter the symbol.
5735 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
5736 Determine if relocation needs a PLT entry. Set first_rel_type if
5737 this is the first time we encounter the symbol
5738 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
5739 functions as well.
5740 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
5741 (elf32_arm_create_dynamic_sections): New function. Create the
5742 .plt.thumb section.
5743 (elf_backend_create_dynamic_sections): Call it.
5744
47badb7b
NC
57452002-07-31 Nick Clifton <nickc@redhat.com>
5746
5747 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
5748 'alternative' in order to avoid shadowing global symbol of the
5749 same name.
5750 * bfd-in2.h: Regenerate.
5751 * libbfd.h: Regenerate.
5752 * libcoff.h: Regenerate.
5753
8a397dad
TS
57542002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5755
5756 * Makefile.am: Add n32 ABI support.
5757 * Makefile.in: Regenerate.
5758 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
5759 bit vectors for mips*-*-linux targets as optional.
5760 * configure.in: Add n32 ABI vectors.
5761 * configure: Regenerate.
5762 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
5763 * elfn32-mips.c: New file, n32 ABI support.
5764 * targets.c: Add n32 ABI vectors.
5765
7e392df6 57662002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 5767
7e392df6
NC
5768 * elfarmqnx-nabi.c: New file: Support for QNX.
5769 * config.bfd: Add support for arm-*-nto target.
5770 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
5771 * configure: Regenerate.
5772 * Makefile.am: Add entries for elfarmqnx-nabi.c.
5773 * Makefile.in: Regenerate.
5774 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
5775 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
5776 * elfarm-nabi.c: Do not include elf32-arm.h if
5777 ELFARM_NABI_C_INCLUDED is defined.
5778 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 5779
7e392df6 57802002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 5781
83e1617e
NC
5782 * po/sv.po: Updated Swedish translation.
5783
704afa60
JJ
57842002-07-30 Jakub Jelinek <jakub@redhat.com>
5785
5786 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
5787
487e54f2
AM
57882002-07-30 Alan Modra <amodra@bigpond.net.au>
5789
5790 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
5791 * archive.c (bfd_generic_archive_p): Likewise.
5792 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
5793 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
5794 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
5795 (xcoff64_archive_p): Likewise.
5796 (xcoff64_openr_next_archived_file): Likewise.
5797 (xcoff64_archive_p): Clean up tdata properly on error.
5798 * coffgen.c (coff_real_object_p): Likewise.
5799 (coff_object_p): Release filehdr and opthdr.
5800 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
5801 * ieee.c (ieee_archive_p): Likewise.
5802 * ihex.c (ihex_object_p): Likewise.
5803 (ihex_mkobject): Always allocate tdata.
5804 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
5805 * srec.c (srec_mkobject): Always allocate tdata.
5806 (srec_object_p): Clean up tdata properly on error.
5807 (symbolsrec_object_p): Likewise.
5808 * versados.c (versados_object_p): Likewise.
5809 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
5810 and bfd_realloc instead of realloc.
5811 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
5812 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
5813 place of bfd_malloc, simplifying error freeing. Free hash table too.
5814 (vms_object_p): Clean up tdata on error.
5815 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
5816 (vms_close_and_cleanup): Adjust for bfd_alloc use.
5817
9d46020e
AM
58182002-07-30 Alan Modra <amodra@bigpond.net.au>
5819
5820 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
5821
fb39dac1
RS
58222002-07-26 Chris Demetriou <cgd@broadcom.com>
5823
5824 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
5825 flags into resulting BFD.
5826
7a624474
AM
58272002-07-26 Alan Modra <amodra@bigpond.net.au>
5828
5829 From John Reiser <jreiser@BitWagon.com>
5830 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
5831 tls_ldm_got.refcount.
5832
a4382ec6
TS
58332002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5834
5835 * elf64-mips.c: Update TODO comment.
5836 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
5837 mips_elf64_gprel16_reloca): Remove prototypes.
5838 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
5839 (UNUSED_RELOC): Replace by EMPTY_RELOC.
5840 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
5841 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
5842 R_MIPS_HIGHEST.
5843 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
5844 R_MIPS_GOT16. Remove wrong comments.
5845 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
5846 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
5847 from elf32-mips.c.
5848 (mips_elf64_hi16_reloc): Fix formatting.
5849 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
5850 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
5851 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
5852 (mips_elf64_gprel16_reloc): Make static. Add check for
5853 partial_inplace.
5854 (mips_elf64_gprel16_reloca): Remove.
5855 (mips_elf64_literal_reloc): New function.
5856 (mips_elf64_gprel32_reloc): Fix formatting.
5857 (mips_elf64_shift6_reloc): Fix comment. Make static.
5858 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
5859 elf32-mips.c.
5860 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
5861 elf32-mips.c
5862 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
5863 specific relocations.
5864 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
5865 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
5866 (ELF_MAXPAGESIZE): Add comment.
5867
219576a4
NC
58682002-07-25 Nick Clifton <nickc@redhat.com>
5869
5870 * po/sv.po: Updated Swedish translation.
5871 * po/es.po: Updated Spanish translation.
5872 * po/fr.po: Updated French translation.
5873
8c58d23b
AM
58742002-07-25 Alan Modra <amodra@bigpond.net.au>
5875
5876 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
5877 as elf_link_record_local_dynamic_symbol.
5878 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
5879 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
5880 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
5881 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
5882 attempt is made to record a symbol in a discarded section, and
5883 return `2' in that case.
5884
ff3063f5
NC
58852002-07-24 Nick Clifton <nickc@redhat.com>
5886
5887 * po/sv.po: Updated Swedish translation.
5888 * po/es.po: Updated Spanish translation.
5889
f0fe0e16
AM
58902002-07-23 Alan Modra <amodra@bigpond.net.au>
5891
c1fb5f8a
AM
5892 * po/SRC-POTFILES.in: Regenerate.
5893
f0fe0e16
AM
5894 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
5895 immediately. Remove code handling relocatable linking.
5896 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
5897 * elf32-cris.c (cris_elf_relocate_section): Likewise.
5898 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 5899 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
5900 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
5901 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
5902 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5903 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
5904 * elf32-v850.c (v850_elf_relocate_section): Likewise.
5905 * elf32-vax.c (elf_vax_relocate_section): Likewise.
5906 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
5907 * elf32-avr.c (elf_backend_rela_normal): Define.
5908 * elf32-cris.c: Likewise.
5909 * elf32-fr30.c: Likewise.
de2d743e 5910 * elf32-frv.c: Likewise.
f0fe0e16
AM
5911 * elf32-h8300.c: Likewise.
5912 * elf32-hppa.c: Likewise.
5913 * elf32-ip2k.c: Likewise.
5914 * elf32-sparc.c: Likewise.
5915 * elf32-v850.c: Likewise.
5916 * elf32-vax.c: Likewise.
5917 * elf64-hppa.c: Likewise.
5918 * elf64-sparc.c: Likewise.
5919 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 5920 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
5921 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
5922 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
5923 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
5924 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
5925 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
5926 * elf-m10200.c (USE_RELA): Don't define.
5927 * elf-m10300.c: Likewise.
de2d743e 5928 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
5929 * elf32-i370.c: Likewise.
5930 * elf32-ip2k.c: Likewise.
5931 * elf32-m68k.c: Likewise.
5932 * elf32-mcore.c: Likewise.
5933 * elf32-ppc.c: Likewise.
5934 * elf32-s390.c: Likewise.
5935 * elf32-vax.c: Likewise.
5936 * elf64-ppc.c: Likewise.
5937 * elf64-s390.c: Likewise.
5938 * elf64-x86-64.c: Likewise.
5939 * elfxx-ia64.c: Likewise.
5940 * elf32-avr.c (USE_REL): Don't undef.
5941 * elf32-ip2k.c: Likewise.
5942
5e8d7549
NC
59432002-07-23 Nick Clifton <nickc@redhat.com>
5944
5945 * elf-bfd.h (struct elf_backend_data): Add new bitfield
5946 'want_p_paddr_set_to_zero'.
5947 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
5948 to false;
5949 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
5950 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
5951
9e12c7db
NC
59522002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
5953
5954 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
5955 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
5956 show the Copyright string.
5957 Minor formatting tidy ups.
5958
0461a601
NC
59592002-07-23 Nick Clifton <nickc@redhat.com>
5960
ff3063f5
NC
5961 * po/fr.po: Updated French translation.
5962 * po/sv.po: Updated Swedish translation.
0461a601 5963
fad2542d
AM
59642002-07-23 Alan Modra <amodra@bigpond.net.au>
5965
5966 * elflink.h (elf_link_input_bfd): Don't change internal symbols
5967 when outputting relocs.
5968
c0647bfc
JT
59692002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
5970
5971 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
5972 DT_PLTGOT into the dynamic section if there is a PLT.
5973
d01414a5
TS
59742002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
5975
5976 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
5977 elf32-mips.c.
5978 (_bfd_mips_elf_write_section): Likewise.
5979 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
5980 (_bfd_mips_elf_write_section): Likewise.
5981 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
5982 (elf32_mips_write_section): Likewise.
5983 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
5984 (_bfd_mips_elf_write_section): Likewise.
5985
40c97fc6
AM
59862002-07-19 Alan Modra <amodra@bigpond.net.au>
5987
5988 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
5989 PT_IA_64_UNWIND segments for a given section.
5990
58378160
L
59912002-07-17 H.J. Lu <hjl@gnu.org>
5992
5993 * Makefile.am: Fix a typo.
5994 * Makefile.in: Regenerate.
5995
cf88bb9f
NC
59962002-07-15 Denis Chertykov <denisc@overta.ru>
5997 Frank Ch. Eigler <fche@redhat.com>
5998 Ben Elliston <bje@redhat.com>
5999 Alan Lehotsky <alehotsky@cygnus.com>
6000 John Healy <jhealy@redhat.com>
6001 Graham Stott <grahams@redhat.com>
6002 Jeff Johnston <jjohnstn@redhat.com>
6003
6004 * Makefile.am: Add support for ip2k.
6005 * Makefile.in: Regenerate.
6006 * doc/Makefile.in: Regenerate.
6007 * archures.c: Add support for ip2k.
6008 * config.bfd: Add support for ip2k.
6009 * configure.in: Add support for ip2k.
6010 * configure: Regenerate.
6011 * reloc.c: Add support for ip2k.
6012 * targets.c: Add support for ip2k.
6013 * bfd-in2.h: Regenerate.
6014 * libbfd.h: Regenerate.
6015 * cpu-ip2k.c: New file.
6016 * elf32-ip2k.c: New file.
6017
0dafd5f6
RE
60182002-07-17 Ian Rickards <irickard@arm.com>
6019
40c97fc6 6020 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
6021 just return the filename.
6022
36b08f12
AM
60232002-07-16 Moritz Jodeit <moritz@jodeit.org>
6024
6025 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
6026
58821868
AM
60272002-07-16 Alan Modra <amodra@bigpond.net.au>
6028
6029 * elflink.h: Formatting fixes, tidy prototypes.
6030 (elf_link_assign_sym_version): Move common code out of loop.
6031
c89583f8
AM
60322002-07-16 Alan Modra <amodra@bigpond.net.au>
6033
6034 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
6035 reloc section size is zero. Correct reloc output location.
6036
ba94744e
AM
60372002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6038
6039 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
6040 the final type for the e_fsel selector when generating PA2.0W code.
6041 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
6042 relocations.
6043
96a94295
L
60442002-07-14 H.J. Lu <hjl@gnu.org>
6045
6046 * elflink.h (elf_link_assign_sym_version): Hide the default
6047 definition if there is a hidden versioned definition.
6048
6849c52f
HPN
60492002-07-12 Hans-Peter Nilsson <hp@axis.com>
6050
6051 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
6052 dynamic reference test in assertion when initializing GOT with
6053 static contents. Just assert that there are either no dynamic
6054 sections, the symbol is defined in the regular objects or that the
6055 symbol is undef weak. Tweak comment.
6056 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
6057 only if the symbol isn't defined in the program and isn't undef
6058 weak.
6059 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
6060 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
6061 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
6062 (elf_cris_discard_excess_program_dynamics): Don't consider
6063 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
6064
239e1f3a
AM
60652002-07-11 Alan Modra <amodra@bigpond.net.au>
6066
6067 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
6068 unresolved debugging relocs in dynamic applications.
6069 * elf32-s390.c (elf_s390_relocate_section): Likewise.
6070 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
6071 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
6072 * elf64-s390.c (elf_s390_relocate_section): Likewise.
6073 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6074 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
6075
2f6d9989
AM
60762002-07-10 Alan Modra <amodra@bigpond.net.au>
6077
f5e87a1d
AM
6078 * elf64-ppc.c (ONES): Define.
6079 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
6080 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
6081 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
6082
2f6d9989
AM
6083 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
6084 (ppc64_elf_set_private_flags): Delete.
6085 (ppc64_elf_section_from_shdr): Delete.
6086 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
6087 (ppc64_elf_fake_sections): Delete.
6088 (bfd_elf64_bfd_set_private_flags): Don't define.
6089 (bfd_elf64_get_symbol_info): Likewise.
6090 (elf_backend_section_from_shdr): Likewise.
6091 (elf_backend_fake_sections): Likewise.
6092
0594c12d
AM
60932002-07-10 Marco Walther <Marco.Walther@sun.com>
6094
6095 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
6096 when not already set.
6097 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
6098 (elf_backend_fake_sections): Define.
6099
699cb9b8
AM
61002002-07-10 Alan Modra <amodra@bigpond.net.au>
6101
6102 * merge.c (_bfd_merge_section): Remove redundant output_section check.
6103 Formatting.
6104 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
6105
0a4787a0
HPN
61062002-07-09 Hans-Peter Nilsson <hp@axis.com>
6107
6108 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
6109 NULL sym_hashes to just before use.
6110 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
6111 symbol with non-default visibility.
6112 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
6113 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
6114 Ditto.
6115 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
6116 symbol with non-default visibility.
6117 (cris_elf_check_relocs): At tests for local symbol before
6118 increasing h->plt.refcount, also check for non-default
6119 visibility. Ditto when checking for local symbol to eliminate
6120 pc-relative runtime relocs.
6121
aecc8f8a
AM
61222002-07-08 Alan Modra <amodra@bigpond.net.au>
6123
6124 * elf.c: Formatting.
6125 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
6126 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
6127 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
6128 segments.
6129
e9168c1e
MM
61302002-07-07 Mark Mitchell <mark@codesourcery.com>
6131 Alan Modra <amodra@bigpond.net.au>
6132
6133 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
6134 account the impact of relocation count overflow when computing
6135 section offsets.
6136 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
6137 or not to apply the PE COFF reloc overflow handling. Fix a
6138 fencepost error in deciding whether or not to use that technique.
6139
6cdc0ccc
AM
61402002-07-07 Alan Modra <amodra@bigpond.net.au>
6141
6142 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
6143 change type of locsyms.
6144 (bfd_elf_get_elf_syms): Declare.
6145 * elf.c (bfd_elf_get_elf_syms): New function.
6146 (group_signature): Use bfd_elf_get_elf_syms.
6147 (bfd_section_from_r_symndx): Likewise.
6148 * elfcode.h (elf_slurp_symbol_table): Likewise.
6149 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6150 (elf_link_add_object_symbols): Likewise. Reorganise to increase
6151 locality of various data structures. Properly free internal relocs.
6152 (elf_bfd_final_link): Properly free internal relocs.
6153 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
6154 (elf_link_input_bfd): Likewise.
6155 (elf_gc_mark): Likewise. Properly free internal relocs.
6156 (elf_gc_sweep): Properly free internal relocs.
6157 (elf_reloc_symbol_deleted_p): No need to swap syms in.
6158 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
6159 internal relocs.
6160 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
6161 Properly free possibly cached info.
6162 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
6163 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
6164 symbol swapping code.
6165 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
6166 Properly free possibly cached info.
6167 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
6168 (mn10300_elf_relax_delete_bytes): Likewise.
6169 (mn10300_elf_symbol_address_p): Likewise.
6170 (mn10300_elf_get_relocated_section_contents): Likewise.
6171 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
6172 (elf32_h8_relax_delete_bytes): Likewise.
6173 (elf32_h8_symbol_address_p): Likewise.
6174 (elf32_h8_get_relocated_section_contents): Likewise.
6175 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
6176 (m32r_elf_relax_delete_bytes): Likewise.
6177 (m32r_elf_get_relocated_section_contents): Likewise.
6178 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
6179 elf_section_data to determine whether cached.
6180 (sh_elf_relax_section): As above for elf-m10200.c.
6181 (sh_elf_relax_delete_bytes): Likewise.
6182 (sh_elf_get_relocated_section_contents): Likewise.
6183 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
6184 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
6185 reading of local syms.
6186 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6187 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
6188 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
6189 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
6190 relocs.
6191 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
6192 free internal relocs and section contents. Don't read symbols.
6193 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
6194 (elf32_hppa_size_stubs): Don't free local syms.
6195 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
6196 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
6197 possibly cached info.
6198 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6199 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
6200 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
6201 all_local_syms.
6202 (get_local_syms): Delete function.
6203 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
6204 on exit.
6205 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
6206
b3212001
JW
62072002-07-05 Jim Wilson <wilson@redhat.com>
6208
6209 * syms.c (decode_section_type): New.
6210 (bfd_decode_symclass): Call decode_section_type.
6211
894bb1ee
JJ
62122002-07-04 Jakub Jelinek <jakub@redhat.com>
6213
6214 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
6215 section content start.
6216 Reported by Michael Schumacher <mike@hightec-rt.com>.
6217
bc0ba537
AM
62182002-07-04 Alan Modra <amodra@bigpond.net.au>
6219
9b5ecbd0 6220 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
6221 link order code. Don't actually remove the output section here;
6222 Just set a flag for the linker to do so.
6223 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
6224 sections when setting up output section dynsyms.
6225
797fc050
AM
62262002-07-04 Alan Modra <amodra@bigpond.net.au>
6227
6228 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
6229 fudge.
6230 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
6231 libs here instead.
6232
99881371
MS
62332002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
6234
6235 * elf64-s390.c (create_got_section): Set .got section alignment to
6236 8 bytes.
6237 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
6238
47d9a591
AM
62392002-07-02 Alan Modra <amodra@bigpond.net.au>
6240
6241 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
6242
179d3252
JT
62432002-07-01 Matt Thomas <matt@3am-software.com>
6244
6245 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
6246 to EF_VAX_*.
6247
4a14403c
TS
62482002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6249
6250 * elfxx-mips.c (ABI_64_P): Fix comment.
6251 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
6252 new section names for N64 ABI.
6253 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
6254 (mips_elf_calculate_relocation): Code formatting.
6255 (mips_elf_create_dynamic_relocation): Likewise.
6256 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
6257 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
6258 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
6259 in any NewABI.
6260 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
6261 for NewABI.
6262 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
6263 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
6264 here, too.
6265
607c0e09
AS
62662002-07-01 Andreas Schwab <schwab@suse.de>
6267
6268 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
6269 R_X86_64_64 to R_X86_64_RELATIVE.
6270
ba26fd96
AM
62712002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
6272
6273 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
6274 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
6275 Run "make dep-am".
6276 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
6277 host_aout_vec.
6278 * configure.in (vaxbsd_vec): Add.
6279 * targets.c (vaxbsd_vec): Add.
6280 * Makefile.in: Rebuild.
6281 * configure: Rebuild.
6282 * po/SRC-POTFILES.in: Rebuild.
6283
1e2f5b6e
AM
62842002-07-01 Alan Modra <amodra@bigpond.net.au>
6285
6286 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
6287 examining to gc_mark_hook, rather than the bfd.
6288 (elf_gc_sections): Adjust.
6289 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
6290 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
6291 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
6292 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
6293 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
6294 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
6295 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
6296 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
6297 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
6298 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
6299 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
6300 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
6301 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
6302 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
6303 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
6304 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
6305 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
6306 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
6307 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
6308 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
6309 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
6310 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
6311 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
6312 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6313 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
6314 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
6315 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
6316 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
6317 redundant local sym tests.
6318 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
6319 (link_hash_newfunc): Init is_entry.
6320 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
6321 (ppc64_elf_link_hash_table_create): Init all_local_syms.
6322 (create_linkage_sections): Use bfd_make_section_anyway rather than
6323 bfd_make_section.
6324 (ppc64_elf_mark_entry_syms): New function.
6325 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
6326 up opd entry to function section map.
6327 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
6328 relocs that reference the opd section.
6329 (edit_opd): New function.
6330 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
6331 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
6332 (get_local_syms): Do so here. Exit if we already have local syms.
6333 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
6334 read local syms on non-ELF input.
6335 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
6336 than duplicating it's function here. Adjust free of internal
6337 relocs to suit.
6338 (ppc64_elf_relocate_section): Adjust local syms in opd section.
6339 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
6340 * elf32-hppa.c (elf32_hppa_size_stubs): Call
6341 _bfd_elf32_link_read_relocs rather than duplicating it's function
6342 here. Adjust free of internal relocs to suit.
6343
1b71fb54
AJ
63442002-07-01 Andreas Jaeger <aj@suse.de>
6345
6346 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
6347 are not allowed in shared libs code, enforce -fPIC.
6348
8d28f606
HPN
63492002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
6350
6351 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
6352 trailing zero-sequences when there's previous left-over data.
6353
5ac81c74
JL
63542002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
6355
6356 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
6357 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
6358 and opd_rel_sec in order for starting rela section. Check _raw_size.
6359 (elf_backend_reloc_type_class): Define.
6360
91a4d569
AM
63612002-06-27 Kevin Buettner <kevinb@redhat.com>
6362
6363 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
6364 DWARF2 formats.
6365
feee612b
AM
63662002-06-27 Alan Modra <amodra@bigpond.net.au>
6367
6368 * cpu-powerpc.c: Comment on ordering of arch_info.
6369 * elf32-ppc.c (ppc_elf_object_p): New function.
6370 (elf_backend_object_p): Define.
6371 * elf64-ppc.c (ppc64_elf_object_p): New function.
6372 (elf_backend_object_p): Define.
6373
a4e6cefc
JT
63742002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
6375
6376 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
6377 * configure: Regenerate.
6378
dae2dd0d
NC
63792002-06-25 Jason Eckhardt <jle@rice.edu>
6380
6381 * dwarf2.c (decode_line_info): Check unit->addr_size
6382 to read in the proper number of prologue bytes.
6383
680f9d5c
NC
63842002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
6385
6386 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
6387 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
6388 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
6389 been enabled.
dae2dd0d 6390
680f9d5c
NC
6391 * targets.c (_bfd_target_vector[]): Only include
6392 aix5coff64_vec if 64-bit bfd support has been enabled.
6393
d4c88bbb
AM
63942002-06-25 Alan Modra <amodra@bigpond.net.au>
6395
6396 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
6397 * elf32-hppa.c (hppa_add_stub): Likewise.
6398 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
6399 * elflink.h (elf_add_default_symbol): Fix comment typo.
6400 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
6401 (elf_link_add_object_symbols): Likewise.
6402 (elf_link_assign_sym_version): Likewise.
6403 * hash.c (bfd_hash_lookup): Likewise.
6404 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
6405 * section.c (bfd_get_unique_section_name): Likewise.
6406 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
6407 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
6408 (assign_section_numbers): Likewise.
6409 (_bfd_elfcore_make_pseudosection): Likewise.
6410 (elfcore_grok_lwpstatus): Likewise.
6411 (elfcore_grok_win32pstatus): Likewise.
6412 (elfcore_write_note): Constify input params. Use PTR instead of
6413 void *. Include terminating NUL in namesz. Correct padding.
6414 Support NULL "name" param. Use memcpy instead of strcpy.
6415 (elfcore_write_prpsinfo): Constify input params.
6416 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
6417 (elfcore_write_lwpstatus): Likewise.
6418 (elfcore_write_pstatus): Likewise.
6419 (elfcore_write_prfpreg): Likewise.
6420 (elfcore_write_prxfpreg): Likewise.
6421 * elf-bfd.h (elfcore_write_note): Update declaration.
6422 (elfcore_write_prpsinfo): Likewise.
6423 (elfcore_write_prstatus): Likewise.
6424 (elfcore_write_pstatus): Likewise.
6425 (elfcore_write_prfpreg): Likewise.
6426 (elfcore_write_prxfpreg): Likewise.
6427 (elfcore_write_lwpstatus): Likewise.
6428
b0ac09d2
NC
64292002-06-25 Jason Eckhardt <jle@rice.edu>
6430
6431 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
6432 symbols of type stProc and stStaticProc.
6433
64342002-06-25 Nick Clifton <nickc@redhat.com>
6435
6436 * ecoff.c: VArious formatting fixes.
6437
021d6096
AM
64382002-06-25 Alan Modra <amodra@bigpond.net.au>
6439
6440 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
6441
82e51918
AM
64422002-06-25 Alan Modra <amodra@bigpond.net.au>
6443
6444 * aout-adobe.c: Don't compare against "true" or "false.
6445 * aout-target.h: Likewise.
6446 * aoutx.h: Likewise.
6447 * archive.c: Likewise.
6448 * bout.c: Likewise.
6449 * cache.c: Likewise.
6450 * coff-a29k.c: Likewise.
6451 * coff-alpha.c: Likewise.
6452 * coff-i386.c: Likewise.
6453 * coff-mips.c: Likewise.
6454 * coff-or32.c: Likewise.
6455 * coff64-rs6000.c: Likewise.
6456 * coffcode.h: Likewise.
6457 * coffgen.c: Likewise.
6458 * cpu-ns32k.c: Likewise.
6459 * ecoff.c: Likewise.
6460 * ecofflink.c: Likewise.
6461 * elf.c: Likewise.
6462 * elf32-arm.h: Likewise.
6463 * elf32-cris.c: Likewise.
6464 * elf32-d30v.c: Likewise.
6465 * elf32-i386.c: Likewise.
6466 * elf32-mcore.c: Likewise.
6467 * elf32-ppc.c: Likewise.
6468 * elf32-sh.c: Likewise.
6469 * elf32-sh64.c: Likewise.
6470 * elf32-v850.c: Likewise.
6471 * elf64-alpha.c: Likewise.
6472 * elf64-sh64.c: Likewise.
6473 * elfcode.h: Likewise.
6474 * elfcore.h: Likewise.
6475 * elflink.h: Likewise.
6476 * elfxx-mips.c: Likewise.
6477 * i386os9k.c: Likewise.
6478 * ieee.c: Likewise.
6479 * libbfd.c: Likewise.
6480 * linker.c: Likewise.
6481 * mmo.c: Likewise.
6482 * nlm32-alpha.c: Likewise.
6483 * nlm32-i386.c: Likewise.
6484 * nlm32-ppc.c: Likewise.
6485 * nlm32-sparc.c: Likewise.
6486 * nlmcode.h: Likewise.
6487 * oasys.c: Likewise.
6488 * pdp11.c: Likewise.
6489 * peicode.h: Likewise.
6490 * reloc.c: Likewise.
6491 * som.c: Likewise.
6492 * srec.c: Likewise.
6493 * tekhex.c: Likewise.
6494 * vms.c: Likewise.
6495 * xcofflink.c: Likewise.
6496 * elf64-sparc.c: Edit comment to not use "== false".
6497
6498 * aoutf1.h: Don't use "? true : false".
6499 * ecoff.c: Likewise.
6500 * format.c: Likewise.
6501 * ieee.c: Likewise.
6502 * linker.c: Likewise.
6503 * mmo.c: Likewise.
6504 * oasys.c: Likewise.
6505
48fc70a2
AM
65062002-06-23 H.J. Lu <hjl@gnu.org>
6507
6508 * elflink.h (elf_link_add_archive_symbols): For the default
6509 version, check references with only one `@' first.
6510
47b7c2db
AM
65112002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
6512
6513 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
6514 function.
9b5ecbd0 6515 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
6516 symbol table.
6517 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
6518 (elf64_hppa_size_dynamic_sections): Revise to use
6519 elf64_hppa_mark_milli_and_exported_functions.
6520 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
6521 symbols out of dynamic symbol table.
6522
f5d44ba0
AM
65232002-06-23 Alan Modra <amodra@bigpond.net.au>
6524
bb3fff1e
AM
6525 * Makefile.in: Regenerate.
6526 * libbfd.h: Regenerate.
6527 * bfd-in2.h: Regenerate.
6528 * configure: Regenerate.
6529 * po/SRC-POTFILES.in: Regenerate.
6530
f5d44ba0
AM
6531 * elflink.h: Comment typo fixes.
6532
65332002-06-23 H.J. Lu <hjl@gnu.org>
6534
6535 * elf-bfd.h (elf_link_loaded_list): New structure.
6536 (elf_link_hash_table): Add "loaded".
6537 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
6538 * elflink.h (elf_link_check_versioned_symbol): New function.
6539 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
6540
cc36acdf
NC
65412002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
6542
6543 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 6544 support an ELF style hash table, return true, indicating that
cc36acdf
NC
6545 nothing needed to be done, rather than false, indicating that the
6546 section's size could not be computed.
6547
4e5ba5b7
DB
65482002-06-18 Dave Brolley <brolley@redhat.com>
6549
6550 From Catherine Moore, Michael Meissner, Dave Brolley:
6551 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
6552 * targets.c: Support bfd_elf32_frv_vec.
6553 * reloc.c: Add FRV relocs.
6554 * configure.in: Add support for bfd-elf32-frv-vec.
6555 * config.bfd (targ_cpu): Add support for frv-*-elf.
6556 * archures.c: Add frv arch and machines.
6557 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
6558 (ALL_MACHINES_CFILES): Add cpu-frv.c.
6559 (BFD32_BACKENDS): Add elf32-frv.lo.
6560 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
6561 (cpu-frv.lo): New target.
6562 (elf32-frv.lo): New target.
6563 * cpu-frv.c: New file.
6564 * elf32-frv.c: New file.
6565
7ece0d85
JJ
65662002-06-18 Jakub Jelinek <jakub@redhat.com>
6567
6568 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
6569 e_shnum == 0.
6570 Only read the first section header if e_shoff is non-zero.
6571 Don't consider e_shstrndx if there are no sections.
6572
57fb03ac
TR
65732002-06-17 Tom Rix <trix@redhat.com>
6574
6575 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 6576 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
6577 complain_overflow_bitfield.
6578
341ca622
AM
65792002-06-17 Alan Modra <amodra@bigpond.net.au>
6580
767e34d1
AM
6581 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
6582 (bfd_fdopenr): Likewise.
6583 (bfd_openstreamr): Likewise.
6584 (bfd_openw): Likewise.
6585
341ca622
AM
6586 * targets.c: Sort target vecs.
6587 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
6588 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
6589 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
6590 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
6591 * configure.in: Sort target vecs. Add m88kmach3_vec.
6592 * configure: Regenerate.
6593
dfbbae4c
HPN
65942002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
6595
6596 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
6597 bpo_reloc_no to break sort order ties, not address of items.
6598
d663e1cd
JL
65992002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
6600
6601 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
6602 Skip excluded sections in determing __gp value.
6603 (elf_hppa_final_link_relocate): Use the symbol's address in
6604 R_PARISC_FPTR64 relocations that don't need an opd entry.
6605 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
6606 (elf64_hppa_finalize_dynreloc): Likewise.
6607 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
6608 (elf64_hppa_finish_dynamic_symbol): Break up assert.
6609
a8295218
NC
66102002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
6611
6612 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
6613 alignment for .bss, .data and .text sections so that sse and sse2
6614 code will work.
6615 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6616
66172002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
6618
6619 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
6620 sh[1234]*-elf*.
6621
3db4b612
JL
66222002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
6623
2cb69dd3
JL
6624 * elflink.h (elf_bfd_final_link): Improve error handling for missing
6625 dynamic sections.
6626
3db4b612
JL
6627 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
6628 for a symbol that has no output section.
6629 (allocate_dynrel_entries): Correct comment.
6630 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
6631 unless we want one.
6632 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
6633 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
6634 with no section. Remove unnecessary parentheses.
6635
f3813499
TR
66362002-06-11 Tom Rix <trix@redhat.com>
6637
6638 * coffcode.h (coff_compute_section_file_positions): Add data
6639 section to AIX loader alignment check.
6640
f5d44ba0 6641 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
6642 alignment to 4 bytes.
6643 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
6644 power accessor macro.
6645 (do_shared_object_padding): Remove invalid assertion.
6646
0ebaf185
RS
66472002-06-10 Richard Sandiford <rsandifo@redhat.com>
6648
6649 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
6650 for removed output sections.
6651
ebe3e2d1
NC
66522002-06-10 Geoffrey Keating <geoffk@redhat.com>
6653
6654 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
6655 htab_alloc.
6656 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
6657
0b14c2aa
L
66582002-06-08 H.J. Lu <hjl@gnu.org>
6659
6660 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
6661 work around a long long bug in gcc 2.96 on mips.
6662
3c2bfad6
JT
66632002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
6664
6665 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
6666 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
6667 Regenerate dependency lists.
6668 * Makefile.in: Regenerate.
6669 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
6670 vax1knetbsd_vec to targ_selvecs.
6671 * configure.in: Add vax1knetbsd_vec.
6672 * configure: Regenerate.
6673 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
6674 * vax1knetbsd.c: New file.
6675 * vaxnetbsd.c: Update copyright years.
6676 (TARGET_PAGE_SIZE): Set to 0x1000.
6677 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
6678
91149be3
JT
66792002-06-08 Matt Thomas <matt@3am-software.com>
6680
6681 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
6682
21e15248
AM
66832002-06-08 Alan Modra <amodra@bigpond.net.au>
6684
6685 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
6686
986b7daa
AM
66872002-06-08 Alan Modra <amodra@bigpond.net.au>
6688
e90b95f6
AM
6689 * Makefile.am: Run "make dep-am".
6690 * Makefile.in: Regenerate.
6691
3f9c735e
AM
6692 * armnetbsd.c: Replace CONST with const.
6693 * corefile.c: Likewise.
6694 * elf32-dlx.c: Likewise.
6695 * elf64-mips.c: Likewise.
6696 * mmo.c: Likewise.
6697 * ns32knetbsd.c: Likewise.
6698
986b7daa
AM
6699 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
6700 table is elf64-sparc.
6701
5a659663
TS
67022002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6703
6704 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
6705 Fix RELA addends to get not shifted in the result. Don't do special
6706 handling of R_MIPS_64 for NewABI.
6707
9bab7074
AM
67082002-06-07 Alan Modra <amodra@bigpond.net.au>
6709
6710 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6711 (NAME(aout,slurp_reloc_table)): Likewise.
6712 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
6713 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
6714 (xcoff_write_archive_contents_big): Likewise.
6715 (xcoff_generate_rtinit): Likewise.
6716 (xcoff_generate_rtinit): Likewise, and check error return.
6717 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6718 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
6719 (coff_get_normalized_symtab): Likewise.
6720 (coff_make_empty_symbol): Likewise.
6721 (bfd_coff_set_symbol_class): Likewise.
6722 * cofflink.c (coff_link_add_symbols): Likewise.
6723 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
6724 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
6725 (bfd_ecoff_write_accumulated_debug): Likewise.
6726 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
6727 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
6728 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
6729 * ieee.c (do_with_relocs): Use bfd_zalloc.
6730 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
6731 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
6732 (NAME(aout,slurp_reloc_table)): Likewise.
6733 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
6734 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
6735 * som.c (som_build_and_write_symbol_table): Likewise.
6736 (som_slurp_string_table): Likewise.
6737 (som_slurp_symbol_table): Likewise.
6738 (som_bfd_ar_write_symbol_stuff): Likewise.
6739 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
6740 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
6741 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
6742 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
6743 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
6744
1126897b
AM
67452002-06-07 Alan Modra <amodra@bigpond.net.au>
6746
6747 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
6748 "group" union.
6749 (elf_group_name): Update.
6750 (elf_group_id): Define.
6751 (bfd_elf_set_group_contents): Declare.
6752 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
6753 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
6754 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
6755 that sym for the signature.
6756 (_bfd_elf_compute_section_file_positions): Don't call
6757 set_group_contents for "ld -r" case.
6758 (swap_out_syms): Use bfd_zalloc.
6759 * elflink.h (elf_link_add_archive_symbols): Likewise.
6760 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
6761 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
6762
3fad3c7c
AM
67632002-06-07 Alan Modra <amodra@bigpond.net.au>
6764
6765 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
6766 relocs in opd for non-shared too.
6767
10f469bf 67682002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
6769
6770 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
6771 relocations.
6772
7217313c
NC
67732002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
6774
6775 * merge.c: Include libiberty.h.
6776 * elf-strtab.c: Include libiberty.h.
6777
6cb22815
AM
67782002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
6779
6780 * peXXigen.c (pe_print_idata): Remove unused variable.
6781
1ed89aa9
NC
67822002-06-06 David Heine <dlheine@tensilica.com>
6783
6784 * elf.c (assign_file_positions_for_segments): Remove unallocated
6785 sections from the section to segment mapping for PT_LOAD segments.
6786 Update comment about empty loadable segments.
6787
644c4c80
RS
67882002-06-06 Richard Sandiford <rsandifo@redhat.com>
6789
6790 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
6791 is within the .stabstr section.
6792
f8ecb12b
AM
67932002-06-06 Alan Modra <amodra@bigpond.net.au>
6794
6795 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
6796 are "const PTR", not "const PTR *".
6797 (bfd_elf32_swap_symbol_in): Likewise.
6798 (bfd_elf64_swap_symbol_in): Likewise.
6799 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
6800 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6801 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6802 (elf_link_add_object_symbols): Likewise.
6803 (elf_link_record_local_dynamic_symbol): Likewise.
6804 (elf_link_input_bfd): Likewise.
6805 (elf_gc_mark): Likewise.
6806 (elf_reloc_symbol_deleted_p): Likewise.
6807 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6808 (mn10200_elf_relax_delete_bytes): Likewise.
6809 (mn10200_elf_symbol_address_p): Likewise.
6810 (mn10200_elf_get_relocated_section_contents): Likewise.
6811 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6812 (mn10300_elf_relax_section): Likewise.
6813 (mn10300_elf_relax_delete_bytes): Likewise.
6814 (mn10300_elf_symbol_address_p): Likewise.
6815 (mn10300_elf_get_relocated_section_contents): Likewise.
6816 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6817 (elf32_h8_relax_delete_bytes): Likewise.
6818 (elf32_h8_symbol_address_p): Likewise.
6819 (elf32_h8_get_relocated_section_contents): Likewise.
6820 * elf32-hppa.c (get_local_syms): Likewise.
6821 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6822 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6823 * elf32-sh.c (sh_elf_relax_section): Likewise.
6824 (sh_elf_relax_delete_bytes): Likewise.
6825 (sh_elf_get_relocated_section_contents): Likewise.
6826 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6827 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6828 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6829 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6830 * elf64-ppc.c (get_local_syms): Likewise.
6831 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6832 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6833
1ed89aa9 68342002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
6835
6836 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
6837
73ff0d56
AM
68382002-06-05 Alan Modra <amodra@bigpond.net.au>
6839
9dce4196
AM
6840 * elf.c (group_signature): Swap in the whole symbol, and handle
6841 extracting section symbol names.
6842 (setup_group): Add comment.
6843 (set_group_contents): When called from objcopy or ld, arrange for
6844 section contents to be written. Write group member output section
6845 indices to allow objcopy to reorganize sections.
6846 (_bfd_elf_copy_private_section_data): Copy group info.
6847
73ff0d56
AM
6848 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
6849 (bfd_elf32_swap_symbol_in): Update prototype.
6850 (bfd_elf64_swap_symbol_in): Likewise.
6851 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
6852 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
6853 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
6854 (elf_link_add_object_symbols): Likewise.
6855 (elf_link_record_local_dynamic_symbol): Likewise.
6856 (elf_link_input_bfd): Likewise.
6857 (elf_gc_mark): Likewise.
6858 (elf_reloc_symbol_deleted_p): Likewise.
6859 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
6860 (mn10200_elf_relax_delete_bytes): Likewise.
6861 (mn10200_elf_symbol_address_p): Likewise.
6862 (mn10200_elf_get_relocated_section_contents): Likewise.
6863 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
6864 (mn10300_elf_relax_section): Likewise.
6865 (mn10300_elf_relax_delete_bytes): Likewise.
6866 (mn10300_elf_symbol_address_p): Likewise.
6867 (mn10300_elf_get_relocated_section_contents): Likewise.
6868 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
6869 (elf32_h8_relax_delete_bytes): Likewise.
6870 (elf32_h8_symbol_address_p): Likewise.
6871 (elf32_h8_get_relocated_section_contents): Likewise.
6872 * elf32-hppa.c (get_local_syms): Likewise.
6873 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
6874 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
6875 * elf32-sh.c (sh_elf_relax_section): Likewise.
6876 (sh_elf_relax_delete_bytes): Likewise.
6877 (sh_elf_get_relocated_section_contents): Likewise.
6878 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
6879 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
6880 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
6881 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
6882 * elf64-ppc.c (get_local_syms): Likewise.
6883 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
6884 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6885 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
6886 * elf64-alpha.c (alpha_elf_size_info): Likewise.
6887 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
6888 * elf64-mips.c (mips_elf64_size_info): Likewise.
6889 * elf64-s390.c (s390_elf64_size_info): Likewise.
6890 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
6891
53bfd6b4
MR
68922002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6893
6894 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
6895 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
6896 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
6897 _bfd_mips_elf_ignore_discarded_relocs.
6898 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
6899
d4df96e6
L
69002002-06-05 H.J. Lu <hjl@gnu.org>
6901
6902 * elfxx-mips.c (mips_elf_calculate_relocation): Call
6903 _bfd_elf_rel_local_sym for STT_SECTION relocations against
6904 the SEC_MERGE section.
6905
e61463e1
AM
69062002-06-05 Alan Modra <amodra@bigpond.net.au>
6907
3cac74d0
AM
6908 * coff-alpha.c: Update copyright date.
6909 * coff-mips.c: Likewise.
6910 * xcoff-target.h: Likewise.
6911
e61463e1
AM
6912 * bfd-in.h: Remove "taken from the source" comment.
6913 * libbfd-in.h: Likewise.
6914 * libcoff-in.h: Likewise.
6915 * bfd-in2.h: Regenerate.
6916 * libbfd.h: Regenerate.
6917 * libcoff.h: Regenerate.
6918
6919 * elf.c (bfd_elf_discard_group): Return true.
6920 * elf-bfd.h (bfd_elf_discard_group): Declare.
6921 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
6922 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
6923 * bfd.c (bfd_discard_group): Define.
6924 * targets.c (struct bfd_target): Add _bfd_discard_group.
6925 (BFD_JUMP_TABLE_LINK): Here too.
6926 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
6927 * aout-adobe.c (aout_32_bfd_discard_group): Define.
6928 * aout-target.h (MY_bfd_discard_group): Define.
6929 * aout-tic30.c (MY_bfd_discard_group): Define.
6930 * binary.c (binary_bfd_discard_group): Define.
6931 * bout.c (b_out_bfd_discard_group): Define.
6932 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
6933 * coffcode.h (coff_bfd_discard_group): Define.
6934 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
6935 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
6936 * i386msdos.c (msdos_bfd_discard_group): Define.
6937 * i386os9k.c (os9k_bfd_discard_group): Define.
6938 * ieee.c (ieee_bfd_discard_group): Define.
6939 * ihex.c (ihex_bfd_discard_group): Define.
6940 * mmo.c (mmo_bfd_discard_group): Define.
6941 * nlm-target.h (nlm_bfd_discard_group): Define.
6942 * oasys.c (oasys_bfd_discard_group): Define.
6943 * ppcboot.c (ppcboot_bfd_discard_group): Define.
6944 * som.c (som_bfd_discard_group): Define.
6945 * srec.c (srec_bfd_discard_group): Define.
6946 * tekhex.c (tekhex_bfd_discard_group): Define.
6947 * versados.c (versados_bfd_discard_group): Define.
6948 * vms.c (vms_bfd_discard_group): Define.
6949 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
6950 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
6951 (aix5coff64_vec): Likewise.
6952 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
6953
9cba27b2
JT
69542002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6955
6956 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
6957 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
6958 (elf32-sh64-com.lo): New dependency list.
6959 * Makefile.in: Regenerate.
6960 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
6961 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
6962 elf32-sh64-com.lo.
6963 * configure: Regenerate.
6964 * elf32-sh64.c (sh64_address_in_cranges)
6965 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
6966 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
6967 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
6968 * elf32-sh64-com.c: ...here. New file.
6969
8d2c33be
AM
69702002-06-04 Alan Modra <amodra@bigpond.net.au>
6971
6972 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
6973 ATTRIBUTE_UNUSED on used params.
6974 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
6975 before calling bfd_section_from_elf_index on local syms.
6976 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
6977
5b0e55b6
JT
69782002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
6979
6980 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
6981 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
6982 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
6983 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
6984 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
6985 * Makefile.in: Regenerate.
6986 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
6987 (sh64-*-netbsd*): New targets.
6988 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
6989 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
6990 * configure: Regenerate.
6991 * elf32-sh64-nbsd.c: New file.
6992 * elf64-sh64-nbsd.c: New file.
6993 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
6994 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
6995 bfd_elf64_sh64lnbsd_vec.
6996
b885599b
AM
69972002-06-04 Alan Modra <amodra@bigpond.net.au>
6998
6999 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
7000 (bfd_section_from_shdr): Likewise. Set section name of group
7001 sections from signature.
7002 (group_signature): Split out from setup_group. Ensure symbol table
7003 is available.
7004 (bfd_elf_discard_group): New function.
7005 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
7006 .gnu.linkonce* sections if they are members of a group.
7007 (set_group_contents): Set GRP_COMDAT flag.
7008 * section.c (bfd_discard_group): New function.
7009 * bfd-in.h (bfd_elf_discard_group): Declare.
7010 * bfd-in2.h: Regenerate.
7011 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
7012 (elf_linkonce_p): Define.
7013
90937f86
AM
70142002-06-04 Alan Modra <amodra@bigpond.net.au>
7015
7016 * elf.c (bfd_section_from_shdr): Make "name" const.
7017 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
7018 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
7019 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
7020 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
7021 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
7022 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
7023 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
7024 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
7025 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
7026 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
7027 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
7028
cf6fb9ce
MR
70292002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7030
7031 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
7032 ABI.
7033
cedb70c5
KH
70342002-06-02 Kazu Hirata <kazu@cs.umass.edu>
7035
7036 * elf32-arc.c: Fix formatting.
7037 * elf32-arm.h: Likewise.
7038 * elf32-cris.c: Likewise.
7039 * elf32-dlx.c: Likewise.
7040 * elf32-hppa.c: Likewise.
7041 * elf32-i386.c: Likewise.
7042 * elf32-i386qnx.c: Likewise.
7043 * elf32-or32.c: Likewise.
7044 * elf32-s390.c: Likewise.
7045 * elf32-sh64.c: Likewise.
7046 * elf32-vax.c: Likewise.
7047 * elf32-xstormy16.c: Likewise.
7048 * elf64-alpha.c: Likewise.
7049 * elf64-mmix.c: Likewise.
7050 * elf64-ppc.c: Likewise.
7051 * elf64-s390.c: Likewise.
7052 * elf64-sh64.c: Likewise.
7053 * elf64-x86-64.c: Likewise.
7054
048d873d
RH
70552002-06-02 Richard Henderson <rth@redhat.com>
7056
7057 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
7058 null when there are no got entries for a symbol.
7059 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
7060 uninitialized variable warning.
7061
4a67a098
RH
70622002-06-01 Richard Henderson <rth@redhat.com>
7063
7064 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
7065 undefined symbols here.
7066 (elf64_alpha_relax_section): Do it here. Also test for not
7067 defined in the current module.
7068 (elf64_alpha_relocate_section_r): Split out of ...
7069 (elf64_alpha_relocate_section): ... here. Don't dereference
7070 NULL when looking up local got entries.
7071
f44f99a5
RH
70722002-06-01 Richard Henderson <rth@redhat.com>
7073
7074 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
7075 symbols from JSR relaxation.
7076 (elf64_alpha_size_plt_section_1): New.
7077 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
7078 (elf64_alpha_size_rela_got_1): ... here.
7079 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
7080 (elf64_alpha_size_rela_got_section): ... here.
7081 (elf64_alpha_size_plt_section): New.
7082 (elf64_alpha_relax_section): Call them.
7083 (elf64_alpha_size_got_sections): Remove output_bfd arg.
7084 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
7085
9e756d64
RH
70862002-06-01 Richard Henderson <rth@redhat.com>
7087
7088 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
7089 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
7090 in shared libraries. Fix DTPRELHI and TPRELHI value.
7091 (INSN_ADDQ, INSN_RDUNIQ): New.
7092 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
7093 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
7094 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
7095 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
7096 Handle GOTDTPREL and GOTTPREL relocations.
7097 (elf64_alpha_relax_gprelhilo): New.
7098 (elf64_alpha_relax_tls_get_addr): New.
7099 (elf64_alpha_relax_find_tls_segment): New.
7100 (elf64_alpha_relax_section): Handle TLS relocations.
7101 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
7102 (elf64_alpha_check_relocs): Set it.
7103
c853d7f6
RH
71042002-06-01 Richard Henderson <rth@redhat.com>
7105
b646261c
RH
7106 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
7107
c853d7f6
RH
7108 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
7109 check; don't suppress dynamic relocs for non-allocated sections.
7110
d7e41a96
RH
7111 * elf64-alpha.c: Remove dead code.
7112
5f333394
AM
71132002-05-31 Alan Modra <amodra@bigpond.net.au>
7114
08e0ee05
AM
7115 * bfd-in2.h: Regenerate.
7116 * libbfd.h: Regenerate.
7117 * po/SRC-POTFILES.in: Regenerate.
7118
5f333394
AM
7119 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
7120 space for bss .plt.
7121
caf47ea6
AM
71222002-05-31 Graeme Peterson <gp@qnx.com>
7123
7124 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
7125 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
7126 Run "make dep-am".
7127 * Makefile.in: Regenerate.
7128 * config.bfd: Add i[3456]86-*-nto-qnx* support.
7129 * configure.in: Add bfd_elf32_i386qnx_vec support.
7130 * configure: Regenerate.
7131 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
7132 is_contained_by_filepos, and copy_private_bfd_data_p.
7133 * elf.c (assign_file_positions_for_segments): Call backend
7134 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
7135 (IS_CONTAINED_BY_FILEPOS): Define.
7136 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
7137 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
7138 Fix non-K&R call to _bfd_error_handler.
7139 (_bfd_elf_copy_private_section_data): Use backend
7140 copy_private_bfd_data_p.
7141 * elf32-i386.c: Don't include elfxx-target.h when
7142 ELF32_I386_C_INCLUDED is defined.
7143 * elf32-i386qnx.c: New QNX elf backend file.
7144 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
7145 elf_backend_is_contained_by_filepos, and
7146 elf_backend_do_copy_private_bfd_data.
7147 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
7148
5bc56484
AM
71492002-05-31 Alan Modra <amodra@bigpond.net.au>
7150
7151 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
7152 Move other similar defines to start of file.
7153
1b164155
TR
71542002-05-30 Tom Rix <trix@redhat.com>
7155
7156 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
7157 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
7158
3765b1be
RH
71592002-05-30 Richard Henderson <rth@redhat.com>
7160
7161 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
7162 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
7163 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
7164 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
7165 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
7166 (struct alpha_elf_obj_tdata): Rename total_got_entries and
7167 n_local_got_entries to total_got_size and local_got_size.
7168 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
7169 (alpha_got_entry_size): New.
7170 (elf64_alpha_relax_with_lituse): Use it.
7171 (elf64_alpha_relax_without_lituse): Likewise.
7172 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
7173 (get_got_entry): New.
7174 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
7175 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
7176 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
7177 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
7178 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
7179 (elf64_alpha_calc_got_offsets): Likewise.
7180 (alpha_dynamic_entries_for_reloc): New.
7181 (elf64_alpha_calc_dynrel_sizes): Use it.
7182 (elf64_alpha_size_dynamic_sections): Likewise.
7183 (elf64_alpha_relocate_section): Handle TLS relocations.
7184 * reloc.c: Add Alpha TLS relocations.
7185 * bfd-in2.h, libbfd.h: Rebuild.
7186
5e226794
NC
71872002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7188
7189 * peXXigen.c (pe_print_idata): Remove double printed
7190 import table lines; add Bound-To comment.
7191
90ace9e9
JT
71922002-05-29 Matt Thomas <matt@3am-software.com>
7193
7194 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
7195 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
7196 (elf32-vax.lo): New rule.
7197 * Makefile.in: Regenerate.
7198 * configure.in (bfd_elf32_vax_vec)
7199 (vaxnetbsd_vec): New vectors.
7200 * configure: Regenerate.
7201 * config.bfd (vax-*-netbsdelf*)
7202 (vax-*-netbsdaout*)
7203 (vax-*-netbsd*): New targets.
7204 * elf32-vax.c: New file.
7205 * reloc.c: Add VAX relocations.
7206 * bfd-in2.h: Regenerate.
7207 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
7208
4a253e81
JT
72092002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
7210
7211 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
7212 and bfd_elf32_bigarm_vec to targ_selvecs.
7213
6e7c73dd
CF
72142002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
7215
7216 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
7217 with auto-imported symbols.
7218
8afb0e02
NC
72192002-05-29 Adam Nemet <anemet@lnxw.com>
7220
7221 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
7222 sections only record bfd.
9bab7074 7223 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 7224 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 7225 * bfd-in2.h: Regenerate.
8afb0e02 7226
a95653f5
NC
72272002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
7228
7229 * syms.c (_bfd_stab_section_find_nearest_line): Move
7230 declaration and initialisation of saw_line and saw_func out of
7231 for loop.
7232
7cdc5bba
AM
72332002-05-29 Alan Modra <amodra@bigpond.net.au>
7234
7235 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
7236 (bfd_elf64_get_symbol_info): Define.
7237 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
7238
4c7aad1c
AM
72392002-05-29 Andrey Volkov <avolkov@transas.com>
7240
7241 * cpu-h8300.c: Make default h8300 machine first in machine list.
7242
d172d4ba
NC
72432002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
7244
7245 * config.bfd: Added DLX configuraton.
7246 * Makefile.am: Added DLX configuraton.
7247 * configure.in: Added DLX configuraton.
7248 * archures.c: Add DLX architecure.
7249 * reloc.c: Add DLX relocs.
7250 * targets.c: Added DLX target vector.
7251 * configure: Regenerate.
7252 * Makefile.in: Regenreate.
7253 * bfd-in2.h: Regenreate.
7254 * elf32-dlx.c: New file: Support DLX target.
7255 * cpu-dlx.c: New file: Support DLX target.
7256
d1329ca3
AM
72572002-05-25 Alan Modra <amodra@bigpond.net.au>
7258
428d0de3
AM
7259 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
7260
d1329ca3
AM
7261 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
7262 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
7263 strings to point inside function code sym string.
7264 (func_desc_adjust): Likewise.
7265 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
7266
3bab7989
ML
72672002-05-24 Michal Ludvig <mludvig@suse.cz>
7268
7269 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
7270 (elf64_x86_64_grok_psinfo): Added.
7271
436e8db0
NC
72722002-05-24 TAMURA Kent <kent@netbsd.org>
7273
7274 * config.bfd: Add a target for i386-netbsdpe.
7275
ea1e4b0d
AM
72762002-05-24 Alan Modra <amodra@bigpond.net.au>
7277
7278 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
7279 and is_func_descriptor.
7280 (func_desc_adjust): Hide function code sym in shared libs unless
7281 there is a matching exported function descriptor sym.
7282
13ae64f3
JJ
72832002-05-23 Jakub Jelinek <jakub@redhat.com>
7284
7285 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
7286 for symbols from SHF_TLS section.
7287 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
7288 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
7289 (map_sections_to_segments): Build PT_TLS segment if necessary.
7290 (assign_file_positions_for_segments): Likewise.
7291 (get_program_header_size): Account for PT_TLS segment.
7292 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
7293 SEC_THREAD_LOCAL sections to STT_TLS.
7294 * reloc.c: Add 386 and IA-64 TLS relocs.
7295 * section.c (SEC_THREAD_LOCAL): Define.
7296 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
7297 Remove.
7298 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
7299 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
7300 unconditionally.
7301 (struct elf_final_link_info): Add first_tls_sec.
7302 (elf_bfd_final_link): Set first_tls_sec.
7303 Compute elf_hash_table (info)->tls_segment.
7304 (elf_link_output_extsym): Handle STT_TLS symbols.
7305 (elf_link_input_bfd): Likewise.
7306 * syms.c (BSF_THREAD_LOCAL): Define.
7307 * bfd-in2.h: Rebuilt.
7308 * libbfd.h: Rebuilt.
7309 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
7310 elf_i386_mkobject, elf_i386_object_p): New functions.
7311 (elf_howto_table): Add TLS relocs.
7312 (elf_i386_reloc_type_lookup): Support TLS relocs.
7313 (elf_i386_info_to_howto_rel): Likewise.
7314 (struct elf_i386_link_hash_entry): Add tls_type.
7315 (struct elf_i386_obj_tdata): New.
7316 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
7317 New macros.
7318 (struct elf_i386_link_hash_table): Add tls_ldm_got.
7319 (link_hash_newfunc): Clear tls_type.
7320 (elf_i386_check_relocs): Support TLS relocs.
7321 (elf_i386_gc_sweep_hook): Likewise.
7322 (allocate_dynrelocs): Likewise.
7323 (elf_i386_size_dynamic_sections): Likewise.
7324 (elf_i386_relocate_section): Likewise.
7325 (elf_i386_finish_dynamic_symbol): Likewise.
7326 (bfd_elf32_mkobject, elf_backend_object_p): Define.
7327 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
7328 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
7329 want_tprel, want_dtpmod, want_dtprel.
7330 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
7331 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
7332 R_IA64_LTOFF_TPREL22.
7333 (elf_code_to_howto_index): Add TLS relocs.
7334 (elfNN_ia64_check_relocs): Support TLS relocs.
7335 (allocate_global_data_got): Account for TLS .got data.
7336 (allocate_dynrel_entries): Account for TLS dynamic relocations.
7337 (elfNN_ia64_install_value): Supprt TLS relocs.
7338 (set_got_entry): Support TLS relocs.
7339 (elfNN_ia64_relocate_section): Likewise.
7340
c62e1cc3
NC
73412002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
7342
7343 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
7344 BLX reloc round the relocation up rather than down.
7345 * coff-arm.c (coff_arm_relocate_section): Likewise.
7346
c5a43a5d
L
73472002-05-21 H.J. Lu (hjl@gnu.org)
7348
7349 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
7350 definition.
7351
afbe61cf
AM
73522002-05-22 Alan Modra <amodra@bigpond.net.au>
7353
7354 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
7355 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
7356
9c07fe7c
AM
73572002-05-22 Alan Modra <amodra@bigpond.net.au>
7358
7359 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
7360 unresolved relocs.
7361 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
7362
21611032
TS
73632002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7364
c5cd6d62 7365 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
7366 non-ELF targets.
7367
41241523
TS
73682002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7369
7370 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
7371 an error value.
7372 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
7373 return with false on error.
7374 (elf_link_input_bfd): Check reloc_emitter return value.
7375
658f2588
JT
73762002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
7377
7378 * config.bfd (armeb-*-netbsdelf*): New target.
7379
c862ae31
AM
73802002-05-20 Alan Modra <amodra@bigpond.net.au>
7381
7382 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
7383 at the plt call stub.
7384
6dd14845
TS
73852002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7386
7387 * cpu-mips.c (mips_compatible): Don't try to check machine
7388 compatibility.
7389
a58d9c34
TR
73902002-05-18 Tom Rix <trix@redhat.com>
7391
9b5ecbd0 7392 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 7393
ef60b7ff
AM
73942002-05-17 Alan Modra <amodra@bigpond.net.au>
7395
7396 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
7397 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
7398 we've already warned about an undefined symbol. Report more
7399 detail on reloc errors.
7400
a703a6ea
AM
74012002-05-17 Alan Modra <amodra@bigpond.net.au>
7402
7403 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
7404 * configure.in: Invoke AM_INSTALL_LIBBFD.
7405 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
7406 (install_libbfd): .. New target.
7407 (uninstall_libbfd): Likewise.
7408 (install-bfdlibLTLIBRARIES): Likewise.
7409 (uninstall-bfdlibLTLIBRARIES): Likewise.
7410 (bfdlibdir): New.
7411 (bfdincludedir): New.
7412 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
7413 * aclocal.m4: Regenerate.
7414 * configure: Regenerate.
7415 * Makefile.in: Regenerate.
7416
2c13d98b
NC
74172002-05-17 Stuart Balfour <sbalfour@cisco.com>
7418
7419 * hash.c (bfd_hash_lookup): Remove computation of len from inside
7420 hash loop.
7421
629936c5
NC
74222002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
7423
7424 * config.bfd: Add targets for sh64-linux (little endian and
7425 big endian).
7426
e4cf60a8
NC
74272002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
7428
7429 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
7430 is located in the same section as the import table. Instead
7431 check, and if necessary load the section containing the thunk.
7432
d1e66cd4
NC
74332002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
7434
7435 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
7436 bfd_bread.
7437 (xcoff64_core_file_matches_executable_p): Replace bfd_read
7438 with bfd_bread.
d1e66cd4 7439
2d653fc7
AM
74402002-05-15 Alan Modra <amodra@bigpond.net.au>
7441
7442 * aix5ppc-core.c: Warning fixes.
7443 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
7444 * aout-target.h (MY_bfd_link_just_syms): Define.
7445 * aout-tic30.c (MY_bfd_link_just_syms): Define.
7446 * bfd.c (bfd_link_just_syms): Define.
7447 * binary.c (binary_bfd_link_just_syms): Define.
7448 * bout.c (b_out_bfd_link_just_syms): Define.
7449 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
7450 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
7451 * coffcode.h (coff_bfd_link_just_syms): Define.
7452 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
7453 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
7454 (_bfd_elf_link_just_syms): Declare.
7455 * elf.c (_bfd_elf_link_just_syms): New function.
7456 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
7457 sections haven't already been discarded by the linker.
7458 * elflink.h (elf_link_add_object_symbols): Likewise for stab
7459 sections and SEC_MERGE sections.
7460 (elf_bfd_discard_info): Similarly here.
7461 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
7462 * i386msdos.c (msdos_bfd_link_just_syms): Define.
7463 * i386os9k.c (os9k_bfd_link_just_syms): Define.
7464 * ieee.c (ieee_bfd_link_just_syms): Define.
7465 * ihex.c (ihex_bfd_link_just_syms): Define.
7466 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
7467 (_bfd_generic_link_just_syms): Declare.
7468 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
7469 * linker.c (_bfd_generic_link_just_syms): New function.
7470 * mmo.c (mmo_bfd_link_just_syms): Define.
7471 * nlm-target.h (nlm_bfd_link_just_syms): Define.
7472 * oasys.c (oasys_bfd_link_just_syms): Define.
7473 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
7474 * som.c (som_bfd_link_just_syms): Define.
7475 * srec.c (srec_bfd_link_just_syms): Define.
7476 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
7477 (BFD_JUMP_TABLE_LINK): And here.
7478 * tekhex.c (tekhex_bfd_link_just_syms): Define.
7479 * versados.c (versados_bfd_link_just_syms): Define.
7480 * vms.c (vms_bfd_link_just_syms): Define.
7481 * libbfd.h: Regenerate.
7482 * bfd-in2.h: Regenerate.
7483
cb7394f2
TS
74842002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7485
7486 * elf32-mips.c: Remove superfluous definitions copied from
7487 elfxx-mips.c.
7488 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
7489 SGIish vectors to check the special case.
7490 (mips_elf_hi16_reloc): Fix comment.
7491 (mips_elf_got16_reloc): Likewise.
7492 (_bfd_mips_elf32_gprel16_reloc): Likewise.
7493 (elf_reloc_map): Code cleanup.
7494 (mips_reloc_map): Add comment.
7495 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
7496 (mips_elf32_rtype_to_howto): Likewise.
7497 (mips_elf32_discard_info): Likewise.
7498 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
7499 lead to IRIX compatibility now.
7500
8dc1a139
TS
75012002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7502
7503 * elfxx-mips.c: Call it IRIX, not Irix in comments.
7504
2051e1b5
JT
75052002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
7506
7507 * config.bfd (shle-*-netbsdelf*): Add target which includes
7508 sh64 support.
7509
83954261
AM
75102002-05-13 David Edelsohn <edelsohn@gnu.org>
7511
7512 * configure.in: Revert 2002-04-07. Instead, auto-configure
7513 HAVE_ST_C_IMPL.
7514 * configure: Regenerate.
7515 * config.in: Regenerate.
7516 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
7517 or AIX_5_CORE.
7518
a9bf1154
NC
75192002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
7520
7521 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
7522 corefiles as well.2
7523 * configure: Regenerate.
7524
3129eb7a
AM
75252002-05-13 Alan Modra <amodra@bigpond.net.au>
7526
7527 * Makefile.am (install-data-local): Install headers to
7528 $(exec_prefix)/include.
7529 * Makefile.in: Regenerate.
7530
a9a32010
DJ
75312002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7532 Daniel Jacobowitz <drow@mvista.com>
7533
7534 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
7535 map BFD_RELOC_RVA.
7536
75372002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
7538
7539 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
7540 hppa*-*-openbsd*): New targets.
7541 * configure.in (alpha*-*-openbsd*): Set COREFILE.
7542 * configure: Regenerate.
7543
f1f0d9ab
TR
75442002-05-10 Tom Rix <trix@redhat.com>
7545
ea1e4b0d 7546 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
7547 xcoff64_ppc_relocate_section.
7548 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
7549 * libxcoff.h: Common xcoff_reloc_type function declaration.
7550
c432ba1a
AM
75512002-05-10 Alan Modra <amodra@bigpond.net.au>
7552
16a10388 7553 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 7554 added in 2002-05-09 commit.
16a10388 7555
c432ba1a
AM
7556 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
7557 don't look for stubs on all undefined syms.
7558
4a335f3d
AM
75592002-05-09 Alan Modra <amodra@bigpond.net.au>
7560
8fc39d5d
AM
7561 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
7562 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
7563 pcrel_offset.
7564
4a335f3d
AM
7565 * elf32-i386.c (elf_howto_table): Comments.
7566 (elf_i386_relocate_section): Handle more relocs for relocatable
7567 linking and against SEC_MERGE sections.
7568
41fcb14e
AM
75692002-05-08 Alan Modra <amodra@bigpond.net.au>
7570
7571 * elf32-ppc.c (ppc_elf_create_got): New function.
7572 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 7573 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
7574 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
7575 _bfd_elf_create_got_section.
7576
b491616a
AM
75772002-05-07 Alan Modra <amodra@bigpond.net.au>
7578
7579 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
7580 * elfxx-target.h (elf_backend_rela_normal): Define.
7581 (elfNN_bed): Init rela_normal.
7582 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
7583 for section symbols here if rela_normal. Simplify abs section test.
7584 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
7585 return immediately. Remove code handling relocatable linking.
7586 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
7587 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7588 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7589 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7590 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
7591 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7592 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7593 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
7594 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7595 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7596 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7597 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7598 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7599 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
7600 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
7601 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7602 * elf-m10200.c (elf_backend_rela_normal): Define.
7603 * elf-m10300.c (elf_backend_rela_normal): Define.
7604 * elf32-fr30.c (elf_backend_rela_normal): Define.
7605 * elf32-i370.c (elf_backend_rela_normal): Define.
7606 * elf32-i860.c (elf_backend_rela_normal): Define.
7607 * elf32-m68k.c (elf_backend_rela_normal): Define.
7608 * elf32-mcore.c (elf_backend_rela_normal): Define.
7609 * elf32-openrisc.c (elf_backend_rela_normal): Define.
7610 * elf32-ppc.c (elf_backend_rela_normal): Define.
7611 * elf32-s390.c (elf_backend_rela_normal): Define.
7612 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
7613 * elf64-ppc.c (elf_backend_rela_normal): Define.
7614 * elf64-s390.c (elf_backend_rela_normal): Define.
7615 * elf64-x86-64.c (elf_backend_rela_normal): Define.
7616 * elfxx-ia64.c (elf_backend_rela_normal): Define.
7617 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
7618 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
7619
df212a7e
NC
76202002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
7621
7622 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
7623 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
7624
3decf53c
AM
76252002-05-06 Alan Modra <amodra@bigpond.net.au>
7626
7627 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
7628 when not relocatable. Fix reloc_emitter call for K&R.
7629
f46c2da6
AM
76302002-05-04 Alan Modra <amodra@bigpond.net.au>
7631
7632 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
7633 reloading local sym addend mistakenly removed in 2002-05-01 change.
7634
7635 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
7636 (read_abbrevs): Change "offset" param to bfd_vma.
7637 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
7638 Change "abbrev_offset" to bfd_vma.
7639 (read_indirect_string): Use correct conversion chars in error
7640 message format string, cast bfd_vma's to unsigned long.
7641 (read_abbrevs): Likewise.
7642 (read_attribute_value): Likewise.
7643 (decode_line_info): Likewise.
7644 (scan_unit_for_functions): Likewise.
7645 (parse_comp_unit): Likewise.
7646
59862849
TR
76472002-05-04 Tom Rix <trix@redhat.com>
7648
7649 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
7650 (coff_swap_reloc_out): Same.
7651 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
7652 (xcoff_swap_reloc_out): Same.
7653 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
7654 case some 16 bit relocs. Add reloc value to output.
7655 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 7656 R_RBR. Improve names.
59862849
TR
7657 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
7658 (bfd_xcoff_backend_data): Update with new reloc swap names.
7659 (bfd_pmac_xcoff_backend_data) : Same.
7660 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
7661 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 7662 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 7663 R_POS. Add reloc value to output.
ea1e4b0d
AM
7664 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
7665 bit R_RBR. Improve names, masks.
59862849
TR
7666 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
7667 (bfd_xcoff_backend_data): Update with new reloc swap names.
7668 (bfd_xcoff_aix5_backend_data) : Same.
7669
b4655ea9
AM
76702002-05-04 Alan Modra <amodra@bigpond.net.au>
7671
7672 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
7673 bfd_count top_index, input_list, all_local_syms.
7674 (elf32_hppa_setup_section_lists): New function, split from
7675 elf32_hppa_size_stubs.
7676 (elf32_hppa_next_input_section): Likewise.
7677 (group_sections): Likewise.
7678 (get_local_syms): Likewise.
7679 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
7680 stubs on undefined syms too.
7681 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 7682 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
7683 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
7684 (elf32_hppa_next_input_section): Declare.
7685
301e3139
AM
76862002-05-04 Bob Byrnes <byrnes@curl.com>
7687
7688 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
7689 _bfd_new_bfd.
7690
7c5fcef7
L
76912002-05-03 H.J. Lu (hjl@gnu.org)
7692
7693 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
7694 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
7695 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
7696 to hide a global symbol.
7697 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 7698 forced_local to true.
7c5fcef7 7699
84de6048
RH
77002002-05-02 Richard Henderson <rth@redhat.com>
7701
7702 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
7703 vs SHN_UNDEF to zero.
7704
805fc799
AM
77052002-05-02 Alan Modra <amodra@bigpond.net.au>
7706
c061c2d8
AM
7707 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
7708 16 bit reloc.
7709 <R_PPC64_SECTOFF_DS>: Likewise.
7710 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7711 SECTOFF reloc.
7712 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
7713 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
7714 SECTOFF reloc.
7715
805fc799
AM
7716 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
7717 (ppc64_elf_ha_reloc): New function.
7718 (ppc64_elf_brtaken_reloc): New function.
7719 (ppc64_elf_sectoff_reloc): New function.
7720 (ppc64_elf_sectoff_ha_reloc): New function.
7721 (ppc64_elf_toc_reloc): New function.
7722 (ppc64_elf_toc_ha_reloc): New function.
7723 (ppc64_elf_toc64_reloc): New function.
7724 (ppc64_elf_unhandled_reloc): New function.
7725 (ppc64_elf_howto_raw): Use the above.
7726 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
7727 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
7728 <R_PPC64_SECTOFF_DS>: Likewise.
7729 (IS_ABSOLUTE_RELOC): Update.
7730 (struct ppc_link_hash_table): Add have_undefweak.
7731 (ppc64_elf_link_hash_table_create): Init.
7732 (func_desc_adjust): Set have_undefweak.
7733 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
7734 add the .sfpr blr when have_undefweak.
7735 (ppc64_elf_setup_section_lists): Check hash table flavour.
7736 (ppc64_elf_next_input_section): Move output_section->owner test to
7737 ppc64elf.em.
7738 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
7739 and relocatable test. Return TOCstart and don't set elf_gp.
7740 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
7741 offset calculation. Add assert on weak sym branch tweaks.
7742 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
7743 (ppc64_elf_toc): Declare.
7744 (ppc64_elf_next_input_section): Update.
ea1e4b0d 7745
818c39a3
AM
77462002-05-01 Alan Modra <amodra@bigpond.net.au>
7747
7748 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
7749 file_name.
7750
721956f4
AM
77512002-05-01 Alan Modra <amodra@bigpond.net.au>
7752
7753 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
7754 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
7755 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
7756 call branches. Correct undefined weak destination.
7757 (ppc64_elf_func_desc_adjust): Always create at least one blr in
7758 .sfpr, and correct case where either only savef* or restf* is
7759 needed.
7760
7761 Long branch stubs, multiple stub sections.
7762 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
7763 (ppc64_elf_next_input_section): Declare.
7764 * elf64-ppc.c: Move linker-only prototypes.
7765 (STUB_SUFFIX): Define.
7766 (enum ppc_stub_type): New.
7767 (struct ppc_stub_hash_entry): New.
7768 (struct ppc_branch_hash_entry): New.
7769 (struct ppc_link_hash_entry): Add stub_cache, oh.
7770 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
7771 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
7772 Rename plt_overflow to stub_error.
7773 (ppc_stub_hash_lookup): Define.
7774 (ppc_branch_hash_lookup): Define.
7775 (stub_hash_newfunc): New function.
7776 (branch_hash_newfunc): New function.
7777 (link_hash_newfunc): Init new fields.
7778 (ppc64_elf_link_hash_table_create): Likewise.
7779 (ppc64_elf_link_hash_table_free): New function.
7780 (ppc_stub_name): New function.
7781 (ppc_get_stub_entry): New function.
7782 (ppc_add_stub): New function.
7783 (create_linkage_sections): Use bfd_make_section_anyway. Create
7784 .branch_lt and .rela.branch_lt sections. Don't create .stub.
7785 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
7786 and set up for plt call stubs. Link func and func desc syms.
7787 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
7788 (func_desc_adjust): Avoid hash lookup when func desc sym available
7789 via shortcut, and set links when processing.
7790 (ppc64_elf_hide_symbol): Likewise.
7791 (allocate_dynrelocs): Don't allocate stub section here.
7792 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
7793 Remove sstub code.
7794 (ppc_type_of_stub): New function.
7795 (build_one_stub): Delete.
7796 (ppc_build_one_stub): New function.
7797 (ppc_size_one_stub): New function.
7798 (ppc64_elf_setup_section_lists): New function.
7799 (ppc64_elf_next_input_section): New function.
7800 (group_sections): New function.
7801 (get_local_syms): New function.
7802 (ppc64_elf_size_stubs): Rewrite.
7803 (ppc64_elf_build_stubs): Rewrite.
7804 (ppc64_elf_relocate_section): Look up stub entry for REL24
7805 relocs. Don't propagate REL14* to dynamic objects. Look for long
7806 branch stubs if REL14* or REL24 relocs won't reach.
7807 (bfd_elf64_bfd_link_hash_table_free): Define.
7808
09c2219b
MM
78092002-04-30 Mark Mitchell <mark@codesourcery.com>
7810
c5cd6d62 7811 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 7812
07b678c0
TR
78132002-04-30 Tom Rix <trix@redhat.com>
7814
7815 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
7816 symbol names into the hash table.
7817
dbe341c6
TR
78182002-04-28 Tom Rix <trix@redhat.com>
7819
7820 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 7821 calulating relocations.
dbe341c6 7822 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
7823 (xcoff_ppc_relocate_section): Use relocation and complain function
7824 tables.
7825 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
7826 (xcoff_complain_overflow_signed_func): Same.
7827 (xcoff_complain_overflow_bitfield_func): Same.
7828 (xcoff_complain_overflow_dont_func): Same.
7829 (xcoff_reloc_type_crel): New recot function.
7830 (xcoff_reloc_type_br): Same.
7831 (xcoff_reloc_type_ba): Same.
7832 (xcoff_reloc_type_toc): Same.
7833 (xcoff_reloc_type_rel): Same.
7834 (xcoff_reloc_type_neg): Same.
7835 (xcoff_reloc_type_pos): Same.
7836 (xcoff_reloc_type_fail): Same.
7837 (xcoff_reloc_type_noop): Same.
7838 * libxcoff.h : Declare common parts for xcoff64.
7839 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 7840 and complain function tables.
dbe341c6 7841
985142a4
AM
78422002-04-28 Alan Modra <amodra@bigpond.net.au>
7843
7844 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
7845 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
7846
eba91044
AM
78472002-04-26 Alan Modra <amodra@bigpond.net.au>
7848
e54fdaa5
AM
7849 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
7850 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
7851
a50c1845
AM
7852 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
7853 same as the output before calling elf_link_input_bfd.
7854
eba91044
AM
7855 * coffcode.h (coff_compute_section_file_positions): Set
7856 section_tail after shuffling section list.
7857
3c25c5f6
NC
78582002-04-24 Christian Groessler <chris@groessler.org>
7859
7860 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
7861 addresses are 23bit with a special layout, not plain 32bit
7862 values. Prevent relocation of immediate values.
7863
40d32fc6
CD
78642002-04-24 Chris G. Demetriou <cgd@broadcom.com>
7865
7866 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
7867 MIPS-16 ASE flags are set, print something to indicate that.
7868
067fa4a6
AM
78692002-04-23 Alan Modra <amodra@bigpond.net.au>
7870
7871 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
7872 under which a plt call stub is used.
7873 (final_link_relocate): Similarly.
7874 (allocate_plt_static): Clear h-plabel except when plt entry is
7875 exclusively used for a plabel.
7876 (allocate_dynrelocs): Use the above to simplify plt sizing.
7877 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
7878 (elf32_hppa_link_hash_table_create): Init.
7879 (BL22_RP): Define.
7880 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
7881 (elf32_hppa_check_relocs): Set has_22bit_branch.
7882
7883 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
7884 (final_link_relocate): Likewise.
7885
af40ce3c
JJ
78862002-04-22 Jakub Jelinek <jakub@redhat.com>
7887
7888 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
7889 search table if some FDE is DW_EH_PE_aligned encoded either.
7890 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
7891
09ae86c2
JJ
78922002-04-22 Richard Smith <richard@ex-parrot.com>
7893 Jakub Jelinek <jakub@redhat.com>
7894
7895 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
7896 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
7897 encoded personality.
7898 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
7899 for CIE/FDE removal.
7900
deeb2cd7
TR
79012002-04-20 Tom Rix <trix@redhat.com>
7902
7903 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
7904
99dc0092
AM
79052002-04-20 Alan Modra <amodra@bigpond.net.au>
7906
aa3d5824
AM
7907 * archures.c (bfd_lookup_arch): Move the list order comment..
7908 (struct bfd_arch_info): ..to where it belongs.
7909 * bfd-in2.h: Regenerate.
7910
99dc0092
AM
7911 * archures.c (bfd_lookup_arch): Add comment on list order.
7912 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
7913 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
7914 is always at head of list.
7915
7831a775
NC
79162002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7917
7918 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
7919 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
7920 definition of these functions for ARM_WINCE builds as they are
7921 not used.
ea1e4b0d 7922 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
7923 for ARM_WINCE builds.
7924
79252002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
7926
ea1e4b0d 7927 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
7928
79292002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
7930
7931 * cpu-sh.c (scan_mach): Delete.
7932 (arch_info_struct): Replace scan_mach with bfd_default_scan.
7933 (bfd_sh_arch): Likewise.
7934
3d8dbe36
NC
79352002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
7936
7937 * ihex.c (ihex_write_object_contents): Fix check for records
7938 crossing 64K boundaries.
7939
4ab82700
AM
79402002-04-16 Alan Modra <amodra@bigpond.net.au>
7941
7942 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
7943 type rather than just assuming entries are ELF.
7944 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
7945 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
7946 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
7947 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
7948 rather than elf_link_hash_entry.
7949
036fe0fe
RH
79502002-04-15 Richard Henderson <rth@redhat.com>
7951
7952 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
7953 n32 binaries.
7954
c4f3d130
NC
79552002-04-15 Michael Snyder <msnyder@redhat.com>
7956
7957 * opncls.c (bfd_close): Write contents if writeable.
7958 Minor formatting tidy-ups.
7959
4ab82700 79602002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
7961
7962 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
7963
0c04d169
MS
79642002-04-12 Michael Snyder <msnyder@redhat.com>
7965
7966 * bfd-in.h (bfd_get_section_lma): New access macro.
7967 Minor white-space fix-up.
7968
89d4966f
AM
79692002-04-12 Alan Modra <amodra@bigpond.net.au>
7970
7971 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
7972 header pad.
7973
8d0da3c2
DD
79742002-04-09 DJ Delorie <dj@redhat.com>
7975
7976 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
7977
05793179
NC
79782002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
7979
7980 * coffcode.h (coff_read_word): New.
7981 (coff_compute_checksum): New.
7982 (coff_apply_checksum): New.
7983 (coff_write_object_contents): Call coff_apply_checksum () to
7984 apply checksum to PE image.
7985
46fe4e66
AM
79862002-04-08 Randolph Chung <tausq@debian.org>
7987
7988 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
7989 (elf32_hppa_final_link): Split out sorting logic to..
7990 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
7991 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
7992
3b5b409c
AC
79932002-04-07 Andrew Cagney <ac131313@redhat.com>
7994
7995 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
7996 pattern.
7997 * configure: Re-generate.
7998
ac7b6ceb
AC
79992002-04-07 Andrew Cagney <ac131313@redhat.com>
8000
8001 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
8002 is greater or equal to 4.3.3.
8003 * configure: Regenerate.
8004 Fix PR gdb/344.
8005
44aa49bb
HPN
80062002-04-05 Hans-Peter Nilsson <hp@axis.com>
8007
8008 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
8009 R_CRIS_32_PCREL>: Fix typo in name.
8010 (cris_elf_check_relocs): Always create .rela.got here when
8011 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
8012 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
8013 assume it's created.
8014
e2d34d7d
DJ
80152002-04-04 Daniel Jacobowitz <drow@mvista.com>
8016
8017 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
8018 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
8019 define.
8020 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
8021 * bfd.c (bfd_link_hash_table_free): Define.
8022 * binary.c (binary_bfd_link_hash_table_free): Define.
8023 * bout.c (b_out_bfd_link_hash_table_free): Define.
8024 * coff-rs6000.c (rs6000coff_vec): Include
8025 _bfd_generic_link_hash_table_free.
8026 (pmac_xcoff_vec): Likewise.
8027 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
8028 (aix5coff64_vec): Likewise.
8029 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
8030 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
8031 (bfd_elf32_bfd_link_hash_table_free): Define.
8032 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
8033 (bfd_elf32_bfd_link_hash_table_free): Define.
8034 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
8035 define.
8036 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
8037 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
8038 * ieee.c (ieee_bfd_link_hash_table_free): Define.
8039 * ihex.c (ihex_bfd_link_hash_table_free): Define.
8040 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
8041 (_bfd_generic_link_hash_table_free): Add prototype.
8042 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
8043 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
8044 * linker.c (_bfd_generic_link_hash_table_free): New function.
8045 * mmo.c (mmo_bfd_link_hash_table_free): Define.
8046 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
8047 * oasys.c (oasys_bfd_link_hash_table_free): Define.
8048 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
8049 * som.c (som_bfd_link_hash_table_free): Define.
8050 * srec.c (srec_bfd_link_hash_table_free): Define.
8051 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
8052 * versados.c (versados_bfd_link_hash_table_free): Define.
8053 * vms.c (vms_bfd_link_hash_table_free): New function.
8054 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
8055
8056 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
8057 instead of bfd_alloc.
8058 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
8059 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
8060 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
8061 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
8062 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
8063 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
8064 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
8065 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
8066 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
8067 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
8068 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
8069 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
8070 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
8071 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
8072 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
8073 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
8074 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
8075 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
8076 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
8077 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
8078 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
8079 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
8080 * m68klinux.c (linux_link_hash_table_create): Likewise.
8081 * sparclinux.c (linux_link_hash_table_create): Likewise.
8082 * sunos.c (sunos_link_hash_table_create): Likewise.
8083 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
8084
8085 * targets.c: Add _bfd_link_hash_table_free to xvec.
8086
8087 * bfd-in2.h: Regenerate.
8088 * libbfd.h: Regenerate.
8089 * libcoff.h: Regenerate.
8090
830629ab
AM
80912002-04-04 Alan Modra <amodra@bigpond.net.au>
8092
8093 * dep-in.sed: Cope with absolute paths.
8094 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
8095 Run "make dep-am".
8096 * Makefile.in: Regenerate.
8097 * coff-arm.c: Fix copyright date.
8098 * cpu-h8300.c: Likewise.
8099 * cpu-i370.c: Likewise.
8100 * cpu-s390.c: Likewise.
8101 * cpu-mips.c: Likewise.
8102 * po/SRC-POTFILES.in: Regenerate.
8103
c6e90b02
TS
81042002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8105
8106 * Makefile.am: Add elfxx-mips.c to the known backends.
8107 (elf32-mips.lo): remove dependency to coff/external.h.
8108 * Makefile.in: Regenerate.
8109 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
8110 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
8111 accordingly.
8112 * configure: Regenerate.
8113 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
8114 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
8115 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
8116 MIPS specific backend functions.
8117 * elf32-mips.c: Moved most code to elfxx-mips.c.
8118 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
8119 static.
8120 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
8121 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
8122 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
8123 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
8124 interface to allow selection of the right REL or RELA howto table.
8125 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
8126 static. Let it refuse n32 objects.
8127 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
8128 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
8129 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
8130 (elf32_mips_ignore_discarded_relocs): Rename from
8131 _bfd_elf32_mips_ignore_discarded_relocs.
8132 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
8133 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
8134 (elf_mips_howto_table_rela): Remove.
8135 * elf64-mips.c: Moved most code to elfxx-mips.c.
8136 (bfd_elf64_bfd_reloc_type_lookup): Make static.
8137 (mips_elf64_rtype_to_howto): New function.
8138 (mips_elf64_object_p): Likewise.
8139 (elf64_mips_irix_compat): Likewise.
8140 * elfxx-mips.c: New file containing common code merged together from
8141 elf32-mips.c and elf64-mips.c.
8142 * elfxx-mips.h: New file containing MIPS specific prototypes from
8143 elf-bfd.h.
8144 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
8145 elf_backend_mips_rtype_to_howto.
8146
d8dce692
AM
81472002-04-04 Alan Modra <amodra@bigpond.net.au>
8148
8149 * srec.c (MAXCHUNK, Chunk): Revise comments.
8150 (srec_write_record): Correct buffer size.
8151 (srec_write_header): Do without intermediate buffer.
8152 (srec_write_section): Validate Chunk.
8153 (srec_write_terminator): Pass NULL instead of dummy buffer.
8154 (srec_write_symbols): Pass file and symbol names directly to
8155 bfd_bwrite so sprintf won't overflow buffer.
8156
b88a866a
JJ
81572002-04-03 Jakub Jelinek <jakub@redhat.com>
8158
8159 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
8160 PC relative relocs against hidden symbols.
8161 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
8162
d7866f04
AM
81632002-04-03 Alan Modra <amodra@bigpond.net.au>
8164
8165 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
8166 LMAs, loop over segments until p_vaddr and p_memsz specify an
8167 extent enclosing the section.
8168
9e81ee67
NC
81692002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
8170
8171 * ihex.c (ihex_write_object_contents): Do not allow records to
8172 cross a 64K boundary - wrap if necessary.
8173
d2b64500
JT
81742002-04-01 Nathan Williams <nathanw@wasabisystems.com>
8175
8176 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
8177 which caused the returned LWP ID to always be 0.
8178
e36f7d53
RH
81792002-04-01 Richard Henderson <rth@redhat.com>
8180
8181 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8182 (elf32_sparc_relocate_section): Use it to figure out when to
8183 initialize .got entries.
8184 * elf64-sparc.c: Similarly.
8185
e92d460e
AM
81862002-03-28 Alan Modra <amodra@bigpond.net.au>
8187
8188 * linker.c (link_action): Ignore duplicate warning syms.
8189 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
8190 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
8191 (elf_adjust_dynamic_symbol): Likewise.
8192 (elf_export_symbol): Likewise.
8193 (elf_link_find_version_dependencies): Likewise.
8194 (elf_link_assign_sym_version): Likewise.
8195 (elf_link_sec_merge_syms): Likewise.
8196 (elf_link_output_extsym): Likewise.
8197 (elf_gc_sweep_symbol): Likewise.
8198 (elf_gc_propagate_vtable_entries_used): Likewise.
8199 (elf_gc_smash_unused_vtentry_relocs): Likewise.
8200 (elf_gc_allocate_got_offsets): Likewise.
8201 (elf_collect_hash_codes): Likewise.
8202 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
8203 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
8204 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
8205 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
8206 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
8207 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
8208 (elf_cris_discard_excess_dso_dynamics): Likewise.
8209 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
8210 (mark_PIC_calls): Likewise.
8211 (allocate_plt_static): Likewise.
8212 (allocate_dynrelocs): Likewise.
8213 (readonly_dynrelocs): Likewise.
8214 * elf32-i386.c (allocate_dynrelocs): Likewise.
8215 (readonly_dynrelocs): Likewise.
8216 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
8217 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
8218 * elf32-mips.c (mips_elf_output_extsym): Likewise.
8219 (mips_elf_sort_hash_table_f): Likewise.
8220 (mips_elf_check_mips16_stubs): Likewise.
8221 * elf32-s390.c (allocate_dynrelocs): Likewise.
8222 (readonly_dynrelocs): Likewise.
8223 * elf32-sh.c (sh_elf_discard_copies): Likewise.
8224 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
8225 (xstormy16_relax_plt_realloc): Likewise.
8226 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
8227 (elf64_alpha_output_extsym): Likewise.
8228 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
8229 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
8230 (mips_elf64_check_mips16_stubs): Likewise.
8231 (mips_elf64_output_extsym): Likewise.
8232 * elf64-ppc.c (func_desc_adjust): Likewise.
8233 (allocate_dynrelocs): Likewise.
8234 (readonly_dynrelocs): Likewise.
8235 * elf64-s390.c (allocate_dynrelocs): Likewise.
8236 (readonly_dynrelocs): Likewise.
8237 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
8238 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
8239 (readonly_dynrelocs): Likewise.
8240 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
8241 * aoutx.h (aout_link_write_other_symbol): Likewise.
8242 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
8243 (_bfd_coff_write_global_sym): Likewise.
8244 * i386linux.c (linux_tally_symbols): Likewise.
8245 * m68klinux.c (linux_tally_symbols): Likewise.
8246 * sparclinux.c (linux_tally_symbols): Likewise.
8247 * pdp11.c (aout_link_write_other_symbol): Likewise.
8248 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
8249 * xcofflink.c (xcoff_build_ldsyms): Likewise.
8250 (xcoff_write_global_symbol): Likewise.
8251
8252 * cofflink.c (_bfd_coff_final_link): Formatting.
8253 * cpu-mips.c (mips_compatible): Make static, prototype.
8254 * elf32-i386.c (elf_i386_check_relocs): Formatting.
8255 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
8256 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
8257 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
8258 (mips_elf64_final_link): Likewise.
8259 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
8260 prototype.
8261
2106126f
NC
82622002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
8263
8264 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
8265 (SWAP_OUT_RELOC_OFFSET): Define.
8266
b99d1833
AM
82672002-03-27 Gregory Steuck <greg@nest.cx>
8268
8269 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
8270 terminating NULL if empty symbol table.
8271 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
8272
ad43ed4c
L
82732002-03-26 H.J. Lu (hjl@gnu.org)
8274
8275 * elflink.h (elf_link_input_bfd): Revert the last change since
8276 the gcc exception handling isn't fixed yet.
8277
3851fca4
L
82782002-03-26 H.J. Lu (hjl@gnu.org)
8279
8280 * elflink.h (elf_link_input_bfd): Complain about relocations
8281 against local symbols in discarded sections.
8282
b91afed7
AM
82832002-03-26 Alan Modra <amodra@bigpond.net.au>
8284
8285 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
8286
dba143ef
AM
82872002-03-23 Alan Modra <amodra@bigpond.net.au>
8288
8289 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
8290 section file offset for !SEC_LOAD sections.
8291
ee29b9fb
RE
82922002-03-21 Richard Earnshaw <rearnsha@arm.com>
8293
830629ab
AM
8294 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
8295 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 8296
54327882
AM
82972002-03-21 Alan Modra <amodra@bigpond.net.au>
8298
8299 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
8300 Whitespace changes.
8301 * archive.c: Update copyright date.
8302 * bfd-in2.h: Regenerate.
8303 * libbfd.h: Regenerate.
8304 * Makefile.am: Run "make dep-am"
8305 * Makefile.in: Regenerate.
8306 * po/SRC-POTFILES.in: Regenerate.
8307
1ee24f27
DJ
83082002-03-20 Daniel Jacobowitz <drow@mvista.com>
8309
8310 * dwarf2.c (struct funcinfo): Move up.
8311 (lookup_address_in_function_table): New argument function_ptr.
8312 Set it.
8313 (lookup_address_in_line_table): New argument function. If function
8314 is non-NULL, use it to handle ``addr'' before the first line note of
8315 the function.
8316 (comp_unit_find_nearest_line): Update and swap calls to
8317 lookup_address_in_function_table and lookup_address_in_line_table.
8318 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
8319 N_SLINE encountered if we see an N_FUN before any N_SLINE.
8320
51b9608c
TR
83212002-03-20 Tom Rix <trix@redhat.com>
8322
ea1e4b0d 8323 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 8324 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 8325 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 8326
789c90aa
TR
83272002-03-19 Tom Rix <trix@redhat.com>
8328
ea1e4b0d 8329 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
8330 dynamic objects in archives.
8331
1da54d81
HPN
83322002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
8333
8334 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
8335 STT_NOTYPE symbols to STT_OBJECT.
8336
7831a775 83372002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
8338
8339 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
8340
eb1e0e80
NC
83412002-03-18 Tom Rix <trix@redhat.com>
8342
8343 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
8344 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
8345 * coff-rs6000 (do_pad) : New function for archive padding.
8346 (do_copy) : New function for object file copying in archives.
8347 (do_shared_object_padding) : New function for padding shared
8348 objects to their text section alignment in archives.
8349 (bfd_xcoff_ar_achive_set_magic) : Stub.
8350 (xcoff_write_armap_big) : Use do_copy and do_pad.
8351 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
8352 do_copy and do_pad.
8353 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 8354 bfd_xcoff_magic_number.
eb1e0e80
NC
8355 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
8356 fop.
8357 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
8358 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
8359 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
8360 * rs6000-core.c : Update copyright date.
ea1e4b0d 8361 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
8362 csectpp.
8363 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
8364 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
8365 (coff_set_flags) : Use bfd_xcoff_magic_number.
8366 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
8367 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
8368 * Makefile.am : Same.
8369 * config.bfd : Same.
8370 * targets.c : Same.
8371 * configure : Regnerate.
8372 * Makefile.in : Same.
8373 * bfd-in2.h : Same.
8374
a1c259a1
NC
83752002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
8376
8377 * po/fr.po: Updated version.
8378
4dae1ae7
AM
83792002-03-18 Alan Modra <amodra@bigpond.net.au>
8380
8381 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
8382 * libbfd.h: Regenerate.
8383 * archive.c (coff_write_armap): Pass on failures from
8384 bfd_write_bigendian_4byte_int.
8385
36b4f6e7
L
83862002-03-14 H.J. Lu <hjl@gnu.org>
8387
8388 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
8389 error to bfd_error_nonrepresentable_section for reinit_array
8390 section in DSO.
8391
a1aefc76
NC
83922002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8393
a181be0a
NC
8394 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
8395 OR it in rather than replacing previously selected flags.
8396
a1aefc76
NC
8397 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
8398 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
8399
c119f9b8
AM
84002002-03-14 Alan Modra <amodra@bigpond.net.au>
8401
8402 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
8403 (N): Use the above.
8404 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
8405 ensure reloc size matches before calling elf_link_input_bfd.
8406 Add an assert to check reloc size when counting output relocs.
8407
c295a511
NC
84082002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
8409
8410 * mmo.c (mmo_get_loc): Return NULL rather than false.
8411
9ce88e60
NC
84122002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
8413
8414 * po/fr.po: Updated version.
8415
4ddafab0
AM
84162002-03-13 Alan Modra <amodra@bigpond.net.au>
8417
b74fa2cd
AM
8418 * archures.c (bfd_default_compatible): Test bits_per_word.
8419 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
8420 bfd_default_compatible.
8421 * cpu-i370.c (i370_compatible): Likewise.
8422 * cpu-sparc.c (sparc_compatible): Likewise.
8423 * cpu-h8300.c (compatible): Test in->arch == out->arch.
8424
40b829d4
AM
8425 * elflink.h: Formatting fixes.
8426 (elf_link_output_extsym): Merge undefined and undef weak cases.
8427
4ddafab0
AM
8428 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
8429 when word size of input matches output word size.
8430
dd53c801
AJ
84312002-03-12 Andreas Jaeger <aj@suse.de>
8432
8433 * cpu-i386.c (i386_compatible): New. Use it instead of
8434 bfd_default_compatible.
8435
aa066ac8
L
84362002-03-07 H.J. Lu (hjl@gnu.org)
8437
8438 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
8439 as the type for bfd_reloc_val.
8440
1bf42538
JL
84412002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
8442
8443 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
8444 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
8445 (elf_hppa_final_link_relocate): Correct relocations for indirect
8446 references to local data through the DLT. Fix .opd creation for
8447 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
8448 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
8449 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
8450 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8451 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
8452 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
8453 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
8454
86eaf01e
JJ
84552002-03-05 Jakub Jelinek <jakub@redhat.com>
8456
8457 * merge.c (_bfd_merge_sections): Don't segfault if there
8458 is nothing to merge due to GC.
8459
c44233aa
AM
84602002-03-05 Alan Modra <amodra@bigpond.net.au>
8461
039cc25f
AM
8462 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
8463 symbols that have been forced local.
8464
c44233aa
AM
8465 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
8466 to output forced local syms for non-shared link.
8467 (elf_link_output_extsym): Tweak condition for calling backend
8468 adjust_dynamic_symbol so that previous behaviour is kept.
8469 Whitespace changes throughout file.
8470
25e27870
L
84712002-03-04 H.J. Lu <hjl@gnu.org>
8472
8473 * elf.c (bfd_section_from_shdr): Handle special sections,
8474 .init_array, .fini_array and .preinit_array.
8475 (elf_fake_sections): Likewise.
8476
8477 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
8478 DT entry only if the section is in output for .init_array,
8479 .fini_array and .preinit_array. Complain about .preinit_array
8480 section in DSO.
8481 (elf_bfd_final_link): Warn zero size for .init_array,
8482 .fini_array and .preinit_array sections.
8483
8484 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
8485 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
8486 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
8487 .preinit_array.
8488
bb2a49f2
AM
84892002-03-04 Alan Modra <amodra@bigpond.net.au>
8490
8491 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
8492 * configure: Regenerate.
8493
38487e5e
TR
84942002-03-02 Tom Rix <trix@redhat.com>
8495
c44233aa
AM
8496 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
8497 symbolic equiv.
38487e5e
TR
8498 * coff-rs6000.c (xcoff_howto_table): Same.
8499
30831527
RH
85002002-03-01 David Mosberger <davidm@hpl.hp.com>
8501
8502 * elflink.h (size_dynamic_sections): If section named
8503 ".preinit_array" exists, create DT_PREINIT_ARRAY and
8504 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
8505 ".init_array" and ".fini_array".
8506 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
8507 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
8508 DT_FINI_ARRAY.
8509
c8e5ddc8
AM
85102002-02-26 Andrew Macleod <amacleod@cygnus.com>
8511
8512 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
8513 dynsyms.
8514
96e0dda4
AM
85152002-02-25 Alan Modra <amodra@bigpond.net.au>
8516
1c5b6bf8
AM
8517 * elf64-hppa.h: Update copyright date.
8518
96e0dda4
AM
8519 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
8520 (ppc64_elf_relocate_section): Don't generate power4 style branch
8521 hints for *_BRTAKEN and *_BRNTAKEN relocs.
8522
0fb19cbc
JJ
85232002-02-22 Jakub Jelinek <jakub@redhat.com>
8524
8525 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
8526 last patch.
8527 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8528
c434dee6
AJ
85292002-02-21 Andreas Jaeger <aj@suse.de>
8530
8531 * elf64-x86-64.c: Major rework that introduces all recent changes
8532 to the x86-64 backend. Get a closer match to elf32-i386.
8533 (struct elf64_x86_64_dyn_relocs): Rename from
8534 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
8535 all users.
8536 (struct elf64_x86_64_link_hash_table): Add short cuts to some
8537 sections.
8538 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
8539 remove casts, initialize new hash members.
8540 (create_got_section): New.
8541 (elf64_x86_64_create_dynamic_sections): New.
8542 (elf64_x86_64_copy_indirect_symbol): New.
8543 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
8544 relocs, .got or .relgot here but do it in allocate_dynrelocs.
8545 Reference count possible .plt and .got entries. Don't test input
8546 section SEC_READONLY here to try to avoid copy relocs, and keep
8547 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
8548 DF_TEXTREL here. Delay setting of variables until needed. Cache
8549 pointer to "sreloc" section in elf_section_data. Tweak condition
8550 under which .got created. Report files with bad relocation
8551 section names.
8552 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
8553 Reference count possible .plt entries. Don't deallocate .got and
8554 .relgot space here.
8555 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
8556 do copy reloc processing for weakdefs. Remove redundant casts and
8557 aborts. Delay setting of vars until needed. Move creation of
8558 dynamic symbols and allocation of .plt and .rela.plt to
8559 allocate_dynrelocs. Replace BFD_ASSERT with abort.
8560 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
8561 (allocate_dynrelocs): New.
8562 (readonly_dynrelocs): New.
8563 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
8564 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
8565 Zero out the dynamic allocated content space.
8566 (elf64_x86_64_discard_copies): Removed.
8567 (elf64_x86_64_relocate_section): Make use of dynamic section
8568 short-cuts. Localise vars, and delay setting. Better error
8569 reporting, replace BFD_ASSERT with abort. Check
8570 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
8571 regular object file and tread the weak definition as the normal
8572 one. Don't discard relocs for undefweak or undefined symbols and
8573 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
8574 relocs.
8575 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
8576 symbols that have been forced local. Use same test to decide if
8577 we can use a relative reloc for got as relocate_section. Expand
8578 SHN_UNDEF comment. Move expressions out of function calls.
8579 Replace BFD_ASSERT with abort.
8580 (bfd_elf64_bfd_final_link): Removed.
8581 (elf_backend_copy_indirect_symbol): Define.
8582
ff3a6ee3
TR
85832002-02-20 Tom Rix <trix@redhat.com>
8584
8585 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
8586 (_bfd_xcoff_reloc_type_lookup): Use it.
8587 * coff64-rs6000.c (xcoff64_howto_table): Same.
8588 (xcoff64_reloc_type_lookup): Same.
c434dee6 8589
a68d41fb
AM
85902002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
8591
9b5ecbd0 8592 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
8593 little endian.
8594
befc3abb
MS
85952002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
8596
8597 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
8598 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
8599 * bfd-in2.h: Regenerate.
8600 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
8601 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
8602 with "s390:64-bit".
8603 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
8604 (elf_s390_reloc_type_lookup): Likewise.
8605 (elf_s390_check_relocs): Likewise.
8606 (elf_s390_gc_sweep_hook): Likewise.
8607 (elf_s390_relocate_section): Likewise.
8608 (elf_s390_object_p): Use renamed architecture define.
8609 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
8610
6eeeec9b
FCE
86112002-02-19 Frank Ch. Eigler <fche@redhat.com>
8612
8613 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
8614
0bb2d96a
JJ
86152002-02-19 Jakub Jelinek <jakub@redhat.com>
8616
8617 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
8618 absptr -> pcrel optimization for shared libs.
8619 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
8620 library cannot be converted to pcrel.
8621 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
8622 relative.
8623 * elf32-i386.c (elf_i386_relocate_section): If
8624 _bfd_elf_section_offset returned -2, skip, but make sure the
8625 relocation is installed.
8626 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
8627 * elf32-cris.c (cris_elf_relocate_section): Likewise.
8628 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
8629 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8630 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8631 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8632 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8633 * elf32-sh.c (sh_elf_relocate_section): Likewise.
8634 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
8635 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8636 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8637 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 8638 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
8639 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8640 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
8641 _bfd_elf_section_offset returning -2 the same way as -1.
8642 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
8643 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
8644 and BFD_ASSERT.
8645 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
8646
69f284c7
TR
86472002-02-18 Tom Rix <trix@redhat.com>
8648
8649 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
8650 (bfd_xcoff_size_dynamic_sections): Same.
8651 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
8652 (bfd_xcoff_size_dynamic_sections): Same.
8653 * coff-rs6000.c (xcoff_generate_rtinit): Same.
8654 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
8655 * libxcoff.h (struct xcoff_backend_data_rec): Same.
8656 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
8657 * bfd-in2.h: Regenerate.
8658
82bd7b59
AM
86592002-02-18 Alan Modra <amodra@bigpond.net.au>
8660
8661 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
8662 (struct ppc_link_hash_table): Add sfpr.
8663 (ppc64_elf_link_hash_table_create): Init it.
8664 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
8665 .glink out to..
8666 (create_linkage_sections): ..here. Make .sfpr too.
8667 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
8668 dynobj early.
8669 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
8670 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
8671 ._restf* functions, and create as needed.
8672 (func_desc_adjust): Only force_local for shared libs.
8673
ef1355e8
NC
86742002-02-18 David O'Brien <obrien@FreeBSD.org>
8675
8676 * configure.in: Bump version number post 2.12 branching.
8677 * configure: Regenerate.
8678
dfa36a69
HPN
86792002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
8680
8681 * mmo.c: Correct and improve comments.
8682 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
8683 zero-pad. Use input to fill up non-empty bfd buffer.
8684 (mmo_flush_chunk): New function.
8685 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
8686 changed. Don't emit location specifier if VMA is same as
8687 *LAST_VMAP after omitting leading zero contents. Call
8688 mmo_flush_chunk before emitting location specifier.
8689 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
8690 with mmo_write_loc_chunk calls.
8691 (mmo_internal_write_section): Call mmo_flush_chunk after
8692 mmo_write_chunk.
8693 (mmo_write_symbols_and_terminator): Move :Main to first position
8694 in symbol array. Add faked one if it does not exist if there are
8695 other symbols. Don't add it if there are no symbols at all. Move
8696 out test for value of :Main from symbol loop. Rename table
8697 fakemain to maintable and variable mainsym to fakemain.
8698
ccf00ab6
RH
86992002-02-15 Richard Henderson <rth@redhat.com>
8700
8701 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
8702 section with no got matches any got. Simplify error generaion.
8703
88eaccc2
AM
87042002-02-15 Alan Modra <amodra@bigpond.net.au>
8705
fd96f80f
AM
8706 Support arbitrary length fill patterns.
8707 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
8708 (_bfd_default_link_order): Remove bfd_fill_link_order code.
8709 Call default_data_link_order.
8710 (default_fill_link_order): Delete.
8711 (default_data_link_order): New function.
8712 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
8713 of bfd_fill_link_order with bfd_data_link_order.
8714 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
8715 * elf64-mips.c (mips_elf64_final_link): Likewise.
8716
88eaccc2
AM
8717 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
8718 Correct value returned in "end" for "0x<non-hex>".
8719
e2fd756b
NC
87202002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
8721
8722 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
8723 (scan): Test against 'mach' field in info structure.
8724
edd29cf9
AM
87252002-02-14 Alan Modra <amodra@bigpond.net.au>
8726
8727 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
8728
1e30956e 87292002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
8730
8731 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
8732 EF_M68000.
8733
bf36db18
NC
87342002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
8735
8736 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
8737 non-zero physical addresses when adjusting the LMAs of new
8738 sections.
bf36db18 8739
189c6563
AM
87402002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
8741
8742 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
8743 from _bfd_elf_hppa_gen_reloc_type.
8744 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
8745 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
8746 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
8747 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
8748
e948afaf
AO
87492002-02-12 Alexandre Oliva <aoliva@redhat.com>
8750
8751 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
8752 loading its contents if there's nothing to do in it.
8753
19397422
AM
87542002-02-12 Alan Modra <amodra@bigpond.net.au>
8755
0ad3a73b
AM
8756 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
8757 64k boundary.
8758
19397422
AM
8759 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
8760 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
8761 (ppc64_elf_finish_dynamic_sections): Set values for them.
8762
51316059
MS
87632002-02-11 Michael Snyder <msnyder@redhat.com>
8764
8765 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
8766 * elf.c (elfcore_grok_pstatus): Add prototype.
8767 (elfcore_grok_lwpstatus): Add prototype.
8768 (elfcore_write_lwpstatus): New function.
8769 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
8770
518313c3
AO
87712002-02-11 Alexandre Oliva <aoliva@redhat.com>
8772
8773 * elf32-sh.c: Added missing prototypes.
8774 * elf32-sh64.c: Likewise.
8775 (sh_elf_align_loads): Mark unused args as such.
8776 * elf64-sh64.c: Added missing prototypes.
8777 (struct elf_sh64_link_hash_entry): Fix typo.
8778 (sh_elf64_relocate_section): Fix info argument passed to
8779 _bfd_elf_section_offset.
8780
2c73f9d8
AM
87812002-02-11 Alan Modra <amodra@bigpond.net.au>
8782
8783 * Makefile.am: "make dep-am".
8784 * Makefile.in: Regenerate.
8785 * aclocal.m4: Regenerate.
8786 * config.in: Regenerate.
8787 * configure: Regenerate.
8788
d426c6b0
DJ
87892002-02-10 Daniel Jacobowitz <drow@mvista.com>
8790
8791 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
8792 variable warnings.
8793 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
8794 comparison warning.
8795 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
8796 cast warnings for the common case.
8797
e58ee0cd
HPN
87982002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
8799
8800 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
8801 vectors.
8802 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
8803 vectors.
8804
7793f4d0
RH
88052002-02-09 Richard Henderson <rth@redhat.com>
8806
8807 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
8808 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
8809 (elf64_alpha_relocate_section): Likewise.
8810 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
8811 * bfd-in2.h, libbfd.h: Rebuild.
8812
7e799044
HPN
88132002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
8814
8815 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
8816 that base-plus-offset reloc accounting is consistent.
8817 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
8818 up to date for undefined symbols.
8819
027d73eb
EC
88202002-02-08 Eric Christopher <echristo@redhat.com>
8821
8822 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
8823
8824 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
8825 sections for the O32 ABI.
8826
517662d4
CD
88272002-02-08 Chris Demetriou <cgd@broadcom.com>
8828
8829 * elf32-arm.h: Fix formatting of _("...").
8830 * elf32-d10v.c: Likewise.
8831 * elf32-m68k.c: Likewise.
8832 * elf32-mips.c: Likewise.
8833
5e37cc46
NC
88342002-02-08 Ivan Guzvinec <ivang@opencores.org>
8835
8836 * coff-or32.c: Fix compile time warning messages.
8837
fbca6ad9
AO
88382002-02-08 Alexandre Oliva <aoliva@redhat.com>
8839
8840 Contribute sh64-elf.
8841 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
8842 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
8843 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
8844 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
8845 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
8846 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
8847 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
8848 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
8849 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
8850 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
8851 New relocs.
8852 * libbfd.h, bfd-in2.h: Rebuilt.
8853 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
8854 (sh_reloc_map): Map them.
8855 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
8856 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
8857 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
8858 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
8859 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
8860 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
8861 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
8862 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
8863 datalabel_got_offset.
8864 (sh_elf_link_hash_newfunc): Initialize it.
8865 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 8866 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
8867 GOT and GOTOFF handling to new SHmedia relocation types. Support
8868 GOT_BIAS.
8869 (sh_elf_check_relocs): Likewise.
8870 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
8871 PLT entries using movi_shori_putval. Support GOT_BIAS.
8872 (sh_elf_finish_dynamic_sections): Likewise.
8873 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
8874 relocation, it's now done by the caller.
8875 (GOT_BIAS): New.
8876 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
8877 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
8878 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
8879 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
8880 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
8881 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
8882 sh64_elf64_hash_table): New.
8883 (sh_elf64_howto_table): Introduce new relocs.
8884 (sh_elf64_info_to_howto): Accept new PIC relocs.
8885 (sh_elf64_relocate_section): Augment the scope of
8886 seen_stt_datalabel. Support new PIC relocs.
8887 (sh_elf64_check_relocs): Support new PIC relocs.
8888 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
8889 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
8890 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
8891 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
8892 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
8893 movi_shori_putval, movi_3shori_putval,
8894 sh64_elf64_create_dynamic_sections,
8895 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
8896 sh64_elf64_size_dynamic_sections,
8897 sh64_elf64_finish_dynamic_symbol,
8898 sh64_elf64_finish_dynamic_sections): New.
8899 (elf_backend_create_dynamic-sections,
8900 bfd_elf64_bfd_link_hash_table_create,
8901 elf_backend_adjust_dynamic_symbol,
8902 elf_backend_size_dynamic_sections,
8903 elf_backend_finish_dynamic_symbol,
8904 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
8905 elf_backend_plt_readonly, elf_backend_want_plt_sym,
8906 elf_backend_got_header_size, elf_backend_plt_header_size):
8907 Define.
8908 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
8909 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
8910 match official numbers and names; moved unmaching ones to the
8911 range 0xf2-0xff.
8912 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 8913 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
8914 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
8915 sections.
9b5ecbd0 8916 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
8917 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
8918 be aligned.
8919 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 8920 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8921 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
8922 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
8923 .cranges section with SEC_SORT_ENTRIES set.
8924 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
8925 incoming sorted .cranges section.
8926 (sh64_bfd_elf_copy_private_section_data): New.
8927 (sh64_elf_final_write_processing): Only sort .cranges and modify
8928 start address if called by linker.
8929 2001-01-08 Ben Elliston <bje@redhat.com>
8930 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 8931 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 8932 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 8933 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8934 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
8935 line. Add comments before all entries.
8936 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
8937 comment.
8938 (sh_elf64_reloc): Correct head comment.
8939 (sh_elf64_relocate_section): Correct spacing.
8940 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
8941 instead call reloc_dangerous callback.
8942 <case R_SH_SHMEDIA_CODE>: New case.
8943 (sh_elf64_gc_mark_hook): Correct spacing.
8944 (sh_elf64_check_relocs): Ditto.
8945 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
8946 New case.
8947 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
8948 functions.
8949 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
8950 clarify describing comment. Add comments before all entries.
8951 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
8952 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 8953 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8954 Sort .cranges section in final link. Prepare to set bit 0 on
8955 entry address.
8956 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
8957 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
8958 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
8959 .cranges section.
8960 (sh64_backend_section_from_shdr): New, to recognize
8961 SHT_SH5_CR_SORTED on incoming .cranges section.
8962 (elf_backend_section_from_shdr): Define.
8963 (sh64_elf_final_write_processing): Sort outgoing .cranges
8964 section. (New, temporarily disabled:) Set bit 0 on entry address
8965 according to ISA type.
8966 (sh64_find_section_for_address): New.
8967 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
8968 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
8969 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
8970 bfd_malloc, not xmalloc.
8971 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
8972 global.
8973 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
8974 temporarily disabled) setting bit 0 on entry address.
8975 (elf_backend_final_write_processing): Define.
9b5ecbd0 8976 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8977 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
8978 be a proper relocation for PTA and PTB rather than a marker.
8979 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
8980 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
8981 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
8982 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
8983 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
8984 Zero src_mask.
8985 * elf64-sh64.c: Ditto.
8986 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
8987 * elf32-sh64.c: Include opcodes/sh64-opc.h
8988 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
8989 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
8990 parameters. No unused parameters. Caller changed.
8991 <case R_SH_PT_16>: New case.
8992 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
8993 * Makefile.in: Regenerate.
9b5ecbd0 8994 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
8995 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
8996 all code sections.
8997 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
8998 (sh64_elf_merge_private_data): Ditto.
8999 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
9000 to access stored section flags.
9001 (sh64_elf_final_write_processing): Return immediately unless
9002 called by linker. Use sh64_elf_section_data (cranges) to get size
9003 of linker-generated cranges entries.
9004 (sh64_elf_copy_private_data): Add missing "return true".
9005 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
9006 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 9007 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9008 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
9009 elf64-sh64.c:sh64_elf_fake_sections.
9010 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 9011 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9012 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
9013 (sh64_elf_final_write_processing): New.
9014 (elf_backend_final_write_processing): Define.
9015 (sh64_elf_fake_sections): Get header flags from tdata field.
9016 (sh64_elf_copy_private_data): Do not call
9017 sh64_elf_copy_private_data_internal, just copy e_flags field.
9018 (sh64_elf_merge_private_data): Do not call
9019 sh64_elf_copy_private_data_internal.
9b5ecbd0 9020 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9021 Remove EF_SH64_ABI64, let ELF size make difference.
9022 Remove SH64-specific BFD section flag.
9023 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
9024 containing SHmedia through elf_section_data (asect)->tdata
9025 non-zero, not using a BFD section flag.
9026 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
9027 (sh64_elf_merge_private_data): Similar.
9028 (elf_backend_section_flags): Don't define.
9029 (sh64_elf_backend_section_flags): Delete.
9030 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
9031 not EF_SH64_ABI64.
9032 (sh_elf64_merge_private_data): Similar.
9033 * section.c (Section flags definitions): Don't define
9034 SEC_SH_ISA_SHMEDIA.
9035 (bfd-in2.h): Regenerate.
9b5ecbd0 9036 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9037 Make DataLabel references work with partial linking.
9038 * elf32-sh64.c: Fix formatting.
9039 (sh64_elf_link_output_symbol_hook): New.
9040 (elf_backend_link_output_symbol_hook): Define to
9041 sh64_elf_link_output_symbol_hook.
9042 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
9043 undefined if partial linking. Adjust sanity check.
9044 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
9045 (elf_backend_link_output_symbol_hook): Define to
9046 sh64_elf64_link_output_symbol_hook.
9047 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
9048 undefined if partial linking. Adjust sanity check.
9b5ecbd0 9049 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9050 Implement semantics for inter-file DataLabel references.
9051 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
9052 (sh64_elf64_add_symbol_hook): New.
9053 (sh_elf64_relocate_section): If passing an indirect symbol with
9054 st_type STT_DATALABEL on the way to a symbol with st_other
9055 STO_SH5_ISA32, do not bitor 1 to the relocation.
9056 (elf_backend_add_symbol_hook): Define to
9057 sh64_elf64_add_symbol_hook.
9058 * elf64-sh32.c: Tweak comments.
9059 (DATALABEL_SUFFIX): Define.
9060 (sh64_elf_add_symbol_hook): New.
9061 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
9062 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
9063 symbol with st_type STT_DATALABEL on the way to a symbol with
9064 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 9065 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9066 Pass through STT_DATALABEL.
9067 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
9068 (elf_backend_get_symbol_type): Define.
9069 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
9070 (elf_backend_get_symbol_type): Define.
9b5ecbd0 9071 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9072 * elf32-sh64.c: Tweak comments.
9073 (sh64_elf_copy_private_data_internal): Add prototype.
9074 (bfd_elf32_bfd_set_private_flags): Define.
9075 (sh64_elf_copy_private_data_internal): Compare machine name, not
9076 textual BFD target name, to check whether to copy section flag
9077 SHF_SH5_ISA32.
9078 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
9079 Tweak section-contents-type-mismatch message.
9080 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
9081 Validize reloc-types.
9082 * elf64-sh64.c: New file.
9083 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
9084 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
9085 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
9086 Regenerate dependencies.
9087 * Makefile.in: Regenerate.
9088 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
9089 bfd_elf64_sh64l_vec.
9090 * configure.in: Handle bfd_elf64_sh64_vec and
9091 bfd_elf64_sh64l_vec.
9092 * configure: Regenerate.
9093 * po/POTFILES.in: Regenerate.
9094 * po/bfd.pot: Regenerate.
9b5ecbd0 9095 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9096 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
9097 anything else but EF_SH64 and EF_SH64_ABI64.
9098 (sh64_elf_merge_private_data): Emit error for anything else but
9099 EF_SH64 and EF_SH64_ABI64.
9100 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
9101 from targ_selvecs.
9102 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
9103 bfd_elf32_sh64l_vec as a temporary measure.
9104 * configure: Regenerate.
9b5ecbd0 9105 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9106 * cpu-sh.c (arch_info_struct): Include sh5 item
9107 unconditionalized.
9108 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
9109 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
9110 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
9111 * elf32-sh64.c: Tweak comments.
9112 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
9113 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
9114 (sh64_elf_copy_private_data_internal): Wrap long line.
9115 (sh64_elf_merge_private_data): Rewrite to allow objects from
9116 SH64 subsets to be linked together.
9117 (INCLUDE_SHMEDIA): Define.
9118 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
9119 Parenthesize plus-expression inside or-expression.
9120 <global symbol>: Ditto.
9121 (sh_elf_set_mach_from_flags): Remove code refusing
9122 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 9123 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9124 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
9125 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
9126 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
9127 (sh_elf_relocate_section) <local symbol>: Or 1 in
9128 calculation of relocation if sym->st_other & STO_SH5_ISA32.
9129 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
9130 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
9131 relocation.
9b5ecbd0 9132 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
9133 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
9134 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
9135 Regenerate dependencies.
9136 * Makefile.in: Regenerate.
9137 * archures.c: Add bfd_mach_sh5.
9138 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
9139 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
9140 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
9141 * configure: Regenerate.
9142 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
9143 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
9144 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
9145 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
9146 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
9147 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
9148 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
9149 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
9150 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
9151 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
9152 in item for SH5.
9153 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
9154 for SHmedia relocs.
9155 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
9156 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
9157 shmedia_prepare_reloc, goto final_link_relocate if it returns
9158 non-zero, else fail as before.
9159 (sh_elf_set_mach_from_flags): Provide function only if not defined
9160 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
9161 (sh_elf_set_private_flags): Provide function only if not defined
9162 as a macro.
9163 (sh_elf_copy_private_data): Similar.
9164 (sh_elf_merge_private_data): Similar.
9165 * section.c (SEC_SH_ISA_SHMEDIA): New.
9166 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
9167 * elf32-sh64.c: New file.
9168 * libbfd.h: Regenerate.
9169 * bfd-in2.h: Regenerate.
9170 * po/POTFILES.in: Regenerate.
9171 * po/bfd.pot: Regenerate.
9172 * bfd-in2.h: Regenerate.
9173 * libbfd.h: Regenerate.
9174
e108f470
DJ
91752002-02-07 Daniel Jacobowitz <drow@mvista.com>
9176
9177 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
9178 been included, not drag it in.
9179 * bfd-in2.h: Regenerate.
9180
259d18a3
L
91812002-02-06 H.J. Lu (hjl@gnu.org)
9182
9183 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
9184 the mach and ISA fields if necessary.
9185
f13b834e
NC
91862002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
9187
9188 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
9189 ARM architecture when an F_ARM_5 flag is detected, since we cannot
9190 be sure exactly which architecture this represents.
9191
82f6addb
NC
91922002-02-05 Nick Clifton <nickc@redhat.com>
9193
9194 * po/tr.po: Updated translation.
9195
899f54f5
AM
91962002-02-05 Alan Modra <amodra@bigpond.net.au>
9197
9198 From Jimi X <jimix@watson.ibm.com>
9199 * archures (bfd_mach_ppc64): Define.
9200 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
9201 (bfd_powerpc_arch): Define.
9202 * bfd-in2.h: Regenerate.
9203 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
9204 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
9205 (bfd_powerpc_archs): Add default powerpc64 arch.
9206
248866a8
AM
92072002-02-05 Alan Modra <amodra@bigpond.net.au>
9208
9209 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
9210 against section syms in readonly sections. Don't do the global
9211 sym check if we find one.
9212 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
9213 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 9214 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
9215 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
9216 (elf_s390_grok_prstatus): Add missing prototype.
9217
4fa5c2a8
HPN
92182002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
9219
9220 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
9221 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
9222 Call bfd_get_section_by_name only once. Initialize
9223 bpodata->n_bpo_relocs_this_section.
9224 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
9225 referring to DSOs.
9226 (bpo_reloc_request_sort_fn): Don't use difference of values as
9227 return-value.
9228
537c972e
DB
92292002-02-02 David O'Brien <obrien@FreeBSD>
9230
9231 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
9232 version 4.5 and later the same as 5-CURRENT.
9233 * configure: Re-generate.
9234
006336b8
JT
92352002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
9236
9237 * config.bfd (hppa*-*-netbsd*): New target.
9238
6c571f00
PT
92392002-01-31 Philipp Thomas <pthomas@suse.de>
9240
19397422
AM
9241 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
9242 to front of message. Unify messages with elf32-arm.h. Use
9243 commas where neccessary.
9244 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
9245 ERROR in messages. Unify messages with coff-arm.c. Correct
9246 VFP/FPA error message.
9247 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
9248 APCS-32 for translation.
6c571f00 9249
930b4cb2
HPN
92502002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
9251
9252 Perform on-demand global register allocation from
9253 R_MMIX_BASE_PLUS_OFFSET relocs.
9254 * elf64-mmix.c (struct bpo_reloc_section_info, struct
9255 bpo_reloc_request, struct bpo_greg_section_info): New.
9256 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
9257 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
9258 _bfd_mmix_check_all_relocs,
9259 _bfd_mmix_prepare_linker_allocated_gregs,
9260 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
9261 (elf_mmix_howto_table): Correct src_mask for most relocs.
9262 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
9263 case.
9264 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
9265 case. Fix typo in comment. New label do_mmix_reloc.
9266 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
9267 store first object file with a base-plus-offset reloc. Call
9268 mmix_elf_check_common_relocs for the part common with mmo.
9269 (mmix_elf_final_link): Write out linker-allocated register
9270 contents section.
9271 (elf_backend_gc_sweep_hook): Define.
9272 (bfd_elf64_bfd_relax_section): Define.
9273
9274 * mmo.c: Don't include <ctype.h>
9275 (mmo_init): Correct init-once logic.
9276
3e36d993
TR
92772002-02-01 Tom Rix <trix@redhat.com>
9278
9279 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
9280
ba323545
AM
92812002-02-01 Alan Modra <amodra@bigpond.net.au>
9282
9283 * Makefile.am: Run "make dep-am"
9284 * Makefile.in: Regenerate.
9285
012884d6
DB
92862002-01-31 David O'Brien <obrien@FreeBSD>
9287
9288 * configure.in: Recognize the differences in core files from FreeBSD
9289 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
9290 5-CURRENT.
9291 * configure: Regenerate.
9292
3b16e843
NC
92932002-01-31 Ivan Guzvinec <ivang@opencores.org>
9294
9295 * coff-or32.c: New file.
9296 * cpu-or32.c: New file.
9297 * elf32-or32.c: New file.
9298 * archures.c: Add support for or32.
9299 * targets.c: Add support for or32.
9300 * bfd-in2.h: Regenerate.
7dc0ab31 9301 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
9302 coff_write_object_contents): Add support for or32.
9303 * config.bfd: Add target.
9304 * configure.in: Add support for or32.
9305 * configure: Regenerate.
9306 * Makefile.am: Add support for or32.
9307 * Makefile.in: Regenerate.
3b16e843
NC
9308 * po/SRC-POTFILES.in: Add or32 files.
9309 * po/bfd.pot: Regenerate.
7dc0ab31 9310
caf8ca8e
NC
93112002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
9312 Don Lindsay <lindsayd@cisco.com>
9313
9314 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
9315 false' with a return of a bfd_reloc_ error code.
9316
e5dfef09
HPN
93172002-01-31 Hans-Peter Nilsson <hp@axis.com>
9318
9319 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
9320 unexport unreferenced symbols when --export-dynamic. Call
9321 _bfd_elf_strtab_delref when unexporting.
9322
4e4770d0
DJ
93232002-01-30 Daniel Jacobowitz <drow@mvista.com>
9324
9325 * bfd-in.h: Include <stdbool.h> if it is available.
9326 * bfd-in2.h: Regenerated.
9327
e1fa50e7
AM
93282002-01-31 Alan Modra <amodra@bigpond.net.au>
9329
9330 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
9331 not go via the plt.
9332
b5f79c76
NC
93332002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9334
b5f79c76
NC
9335 * archures.c: Tidy up formatting of embedded comments.
9336 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 9337 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
9338 * reloc.c: Tidy up formatting of ordinary & embedded comments.
9339 * section.c: Tidy up formatting of embedded comments.
9340 * syms.c: Tidy up formatting of embedded comments.
9341 * targets.c: Tidy up formatting of embedded comments.
9342
9343 * bfd-in2.h: Regenerate.
9344
ca09e32b
NC
93452002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
9346
9347 * vms-tir.c (cmd_name): New function.
9348 (tir_cmd_name): New function.
9349 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
9350 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
9351 Fix formatting.
7dc0ab31 9352
ca09e32b
NC
9353 * peXXigen.c (pe_print_idata): Rearrange message to aid in
9354 translation.
9b5ecbd0 9355 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
9356
9357 * libbfd.c (warn_deprecated): Rearrange error message to aid in
9358 translation.
9359
9360 * ihex.c (ihex_write_object_contents): Fix spelling typo.
9361
9362 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
9363
9364 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
9365 message to aid in translation.
9366
9367 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
9368 to aid in translation.
9369
9370 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
9371
7dc0ab31 93722002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
9373
9374 * coff-arm.c, elf32-elf.h: Unify messages.
9375
05f64ac6
NC
93762002-01-30 Nick Clifton <nickc@redhat.com>
9377
9378 * po/sv.po: Updated translation.
9379
f5a3e38a
NC
93802002-01-30 Philipp Thomas <pthomas@suse.de>
9381
9382 * dwarf2.c (read_abbrev): Use full section name in error message.
9383 (decode_line_info): Likewise.
661a3fd4
NC
9384
9385 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
9386 message.
9387
d926e03d
AM
93882002-01-30 Alan Modra <amodra@bigpond.net.au>
9389
9390 * elf64-ppc.c (func_desc_adjust): Only provide missing function
9391 descriptor symbols for undefined function code syms. Clear
9392 ELF_LINK_NON_ELF so that they can stay weak.
9393
030d18fb 93942002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 9395 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
9396
9397 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
9398 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
9399 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
9400 generation.
9401 * bfd-in2.h: Regenerate.
9402
fcc76bea
CD
94032002-01-29 Chris Demetriou <cgd@broadcom.com>
9404
9405 * elf32-mips.c: Add additional comments about HI16 relocation
9406 processing.
9407 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
9408 pc-relative relocations. (Reverts change made on 2001-10-31.)
9409 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
9410 for pc-relative relocations.
9411 (mips_elf_calculate_relocation): Add a comment about a kludge
9412 in the R_MIPS_GNU_REL_HI16 handling.
9413 (_bfd_mips_elf_relocate_section): Implement that kludge;
9414 adjust pc-relative HI16 relocation for difference in HI16 and
9415 LO16 addresses, since it can't easily be done in
9416 mips_elf_calculate_relocation.
9417
f9cd9119
MS
94182002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
9419
9420 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
9421 relocations with PC32 relocations for undefined or weak symbols.
9422 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
9423 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
9424
702248bb
JT
94252002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
9426
9427 * elfcore.h (elf_core_file_p): Improve comment for last change.
9428
4867be41
DJ
94292002-01-27 Daniel Jacobowitz <drow@mvista.com>
9430
9431 * configure: Regenerated.
9432
a94cef6a
JT
94332002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
9434
9435 * elfcore.h (elf_core_file_p): Set the machine architecture
9436 before processing the program headers.
9437
7562a296
HPN
94382002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
9439
966abd70
HPN
9440 * configure.in <64-bit configuration>: If using gcc, check and
9441 emit error for egcs-1.1.2.
9442 * configure: Regenerate.
9443
e8eab623
NC
94442002-01-26 Egor Duda <deo@logos-m.ru>
9445
9446 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
9447 as possible to avoid stack corruption.
9448
73896efb
RH
94492002-01-26 Richard Henderson <rth@redhat.com>
9450
9451 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
9452 for non-allocated sections.
9453
94542002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
9455
9456 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
9457 prstat.pr_reg even if it is a struct.
9458
73896efb 94592002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 9460
c5cd6d62 9461 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 9462
3d66c4f7
NC
94632002-01-25 Philipp Thomas <pthomas@suse.de>
9464
9465 * coffgen.c (coff_print_symbol): Don't mark info message
9466 for translation.
9467
9460ecda
NC
94682002-01-25 Nick Clifton <nickc@redhat.com>
9469
9470 * po/fr.po: Updated translation.
9471 * po/es.po: Updated translation.
9472
cc9ff76a
AM
94732002-01-25 Philipp Thomas <pthomas@suse.de>
9474
9475 * coff-alpha.c (alpha_relocate_section): Unify warning message
9476 for GP relative relocations without GP defined.
9477 * coff-mips.c (mips_relocate_section): Likewise.
9478
c68836a9
AM
94792002-01-25 Alan Modra <amodra@bigpond.net.au>
9480
9481 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
9482 unsigned overflow when new_offset < old_offset.
9483
e8eab623 94842002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
9485
9486 * bfd.c (_bfd_abort): Fix typo.
9487
8ba89f17
RH
94882002-01-23 Richard Henderson <rth@redhat.com>
9489
9490 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
9491 plt entries for undefweak symbols.
9492
c6953948
NC
94932002-01-23 Steve Ellcey <sje@cup.hp.com>
9494
c5cd6d62 9495 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
9496 (bfd_elf64_ia64_hpux_big_vec): Ditto.
9497 (bfd_elf32_h8300_vec): Ditto.
9498
41bd81ab
AM
94992002-01-23 Alan Modra <amodra@bigpond.net.au>
9500
9501 * elf64-ppc.c: Remove stale part of ABI comment.
9502 (NO_OPD_RELOCS): Define.
9503 (ppc64_elf_check_relocs): Use it.
9504 (ppc64_elf_relocate_section): Here too.
9505 (build_one_stub): Don't point function syms at the stub. Instead,
9506 hijack plt.offset.
9507 (ppc64_elf_relocate_section): Check whether REL24 relocs should
9508 really go to the stub. Make all dynamic relocs in opd against
9509 locals.
9510 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
9511 plt.offset.
9512
f304919d
RH
95132002-01-22 Richard Henderson <rth@redhat.com>
9514
9515 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
9516
c0ef99a7
AM
95172002-01-22 Alan Modra <amodra@bigpond.net.au>
9518
60ee0d4a
AM
9519 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
9520 TOC_BASE_OFF adjustment.
9521
c0ef99a7
AM
9522 * Makefile.am: Run "make dep-am".
9523 * Makefile.in: Regenerate.
9524 * po/SRC-POTFILES.in: Regenerate.
9525
64328b46
AM
95262002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
9527
9528 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
9529 host defines.
9530
59953665 95312002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
9532
9533 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
9534 Check for and emit error if sgot is NULL at this point.
9535
9596feea
JT
95362002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
9537
9538 * config.bfd (ia64*-*-netbsd*): New target.
9539
7b45c6e1
AM
95402002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
9541
9542 * som.c (som_write_space_strings): Comment typo fix.
9543
e5094212
AM
95442002-01-21 Alan Modra <amodra@bigpond.net.au>
9545
e86ce104
AM
9546 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
9547 is_func_descriptor fields.
9548 (link_hash_newfunc): Init them.
9549 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
9550 dot are candidates for plt entries. When processing .opd relocs,
9551 set function descriptor strings to point inside function code
9552 string, and set new ppc_link_hash_entry fields.
9553 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
9554 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
9555 function descriptors. It's now done in..
9556 (func_desc_adjust): New.
9557 (ppc64_elf_func_desc_adjust): New.
9558 (define elf_backend_always_size_sections): Define.
9559 (ppc64_elf_hide_symbol): New.
9560 (define elf_backend_hide_symbol): Define.
9561 (allocate_dynrelocs): Remove code looking up function descriptors
9562 as that has been done earlier.
9563 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
9564 table.
9565 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
9566 up function descriptor.
9567 (build_one_stub): Look up the function code sym. Check for
9568 invalid plt offsets.
9569 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
9570 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
9571
e5094212
AM
9572 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
9573 boolean param.
9574 (_bfd_elf_link_hash_hide_symbol): Likewise.
9575 * elflink.h (elf_link_add_object_symbols): Adjust call to
9576 elf_backend_hide_symbol.
9577 (elf_fix_symbol_flags): Likewise.
9578 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
9579 than bfd_alloc.
9580 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
9581 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
9582 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
9583 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
9584 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
9585 and adjust to suit.
9586 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
9587 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
9588 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
9589
40b8271b
AM
95902002-01-18 Alan Modra <amodra@bigpond.net.au>
9591
9592 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
9593 dynamic function descriptor symbol, not the associated function
9594 symbol.
9595
55baa95b
EC
95962002-01-17 Eric Christopher <echristo@redhat.com>
9597
9598 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
9599
328577ad
NC
96002002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
9601
9602 * po/bfd.pot: Regenerate.
9603 * po/fr.po: Regenerate.
9604
af746e92
AM
96052002-01-17 Alan Modra <amodra@bigpond.net.au>
9606
9607 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
9608 Remove "Elf_Internal_Shdr *" param.
9609 (_bfd_mips_elf_section_from_bfd_section): Ditto.
9610 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
9611 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
9612 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
9613 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
9614 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
9615 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
9616 function to override special sections. Remove hdr arg from
9617 backend call, and don't loop.
9618
175e9962
EC
96192002-01-16 Eric Christopher <echristo@redhat.com>
9620
9621 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
9622 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
9623 relocations requiring gp0 and gp.
9624
96a846ea
RE
96252002-01-16 Richard Earnshaw <rearnsha@arm.com>
9626
175e9962 9627 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
9628 EF_ARM_VFP_FLOAT.
9629 (elf32_arm_print_private_bfd_data): Likewise.
9630
af3ae48d
NC
96312002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
9632
9633 * po/tr.po: Import new version.
9634
10ed1bba
AM
96352002-01-16 Alan Modra <amodra@bigpond.net.au>
9636
9637 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
9638 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
9639 (ORI_R0_R0_0): Correct.
9640
5d1634d7
AM
96412002-01-16 Alan Modra <amodra@bigpond.net.au>
9642
9643 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
9644 when plt_not_loaded.
9645 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
9646 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
9647 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
9648 (ppc64_elf_glink_code): Delete.
9649 (PPC64_ELF_GLINK_SIZE): Delete.
9650 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
9651 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
9652 ORI_R0_R0_0): Define.
9653 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
9654 (struct ppc_link_hash_table): Add sstub and plt_overflow.
9655 (ppc64_elf_link_hash_table_create): Init them.
9656 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
9657 Don't copy to shared lib.
9658 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
9659 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
9660 (allocate_dynrelocs <plt>): Don't change function sym here. Make
9661 room for .stub and .glink code.
9662 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
9663 DT_PPC64_GLINK.
9664 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
9665 bfd_elf64_bfd_final_link.
9666 (bfd_elf64_bfd_final_link): Don't define.
9667 (ppc64_elf_size_stubs): New.
9668 (build_plt_stub): New.
9669 (build_one_stub): New.
9670 (ppc64_elf_build_stubs): New.
9671 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
9672 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
9673 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
9674 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
9675 case output sections not separate. Adjust DT_RELASZ to not
9676 include plt relocs. Set reserved got entry. Set got and plt
9677 entry size.
9678 (elf_backend_got_header_size): Set to 8.
9679 * elf64-ppc.h: New file.
9680
c601ffdb
AM
96812002-01-16 Alan Modra <amodra@bigpond.net.au>
9682
9683 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
9684 sections, use bfd_section_list_remove.
9685 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
9686 * elflink.h (elf_link_add_object_symbols): When removing all
9687 sections, use bfd_section_list_clear.
9688
8fb4cb7f
NC
96892002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9690
9691 * po/sv.po: New file: Swedish translation.
9692 * configure.in (ALL_LINGUAS): Add sv.
9693 * configure: Regenerate.
9694
d3c456e9
JJ
96952002-01-15 Jakub Jelinek <jakub@redhat.com>
9696
9697 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
9698 * elf.c (merge_sections_remove_hook): New function.
9699 (_bfd_elf_merge_sections): Pass it as 3rd argument to
9700 _bfd_merge_sections.
9701 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
9702 * libbfd.h: Rebuilt.
9703 * merge.c (_bfd_merge_sections): Add remove_hook argument.
9704 Call remove_hook if a SEC_EXCLUDE section is encountered.
9705
1f7fd478
NC
97062002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
9707
9708 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
9709 (xstormy16_reloc_map): Initialise new field with correct howto
9710 table.
9711 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
9712 howto entry.
9713
b87011e9
MS
97142002-01-10 Michael Snyder <msnyder@redhat.com>
9715
9716 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
9717 (elfcore_write_pstatus): Use long instead of pid_t;
9718 * elf-bfd.h: Change prototypes to use long instead of pid_t;
9719
175e9962 97202002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
9721
9722 * elf.c: Update copyright years.
9723 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
9724 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
9725
7c76fa91
MS
97262002-01-08 Michael Snyder <msnyder@redhat.com>
9727
9728 Add capability to write corefile note sections, for gdb.
9729 * elf.c (elfcore_write_note): New function.
9730 (elfcore_write_prpsinfo): New function.
9731 (elfcore_write_prstatus): New function.
9732 (elfcore_write_pstatus): New function.
9733 (elfcore_write_prfpreg): New function.
9734 (elfcore_write_prxfpreg): New function.
97996af6 9735 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 9736
e1fddb6b
AO
97372002-01-08 Alexandre Oliva <aoliva@redhat.com>
9738
9739 * elf.c (elf_fake_sections): Propagate errors from
9740 elf_backend_fake_section.
9741
8d05742f
JT
97422002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
9743
9744 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
9745 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
9746 (elf32-sh-nbsd.lo): New rule.
9747 * Makefile.in: Regenerate.
9748 * config.bfd (sh*le-*-netbsdelf*): New target.
9749 (sh*-*-netbsdelf*): New target.
9750 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
9751 (bfd_elf32_shnbsd_vec): New vector.
9752 (bfd_elf32_shlnbsd_vec): New vector.
9753 * configure: Regenerate.
9754 * elf32-sh-nbsd.c: New file.
9755 * targets.c: Update copyright years.
175e9962 9756 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
9757 bfd_elf32_shnbsd_vec.
9758
1dba4cb4
AH
97592002-01-07 Aldy Hernandez <aldyh@redhat.com>
9760
9761 * coff-rs6000.c (READ20): Use bfd_scan_vma.
9762
47b22aef
GK
97632002-01-07 Geoffrey Keating <geoffk@redhat.com>
9764
9765 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
9766 of a symbol in a section that will be deleted.
9767
be2d1673
NC
97682002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
9769
9770 * po/es.po: New file: Spanish translation.
9771 * configure.in (ALL_LINGUAS): Add es.
9772 * configure: Regenerate.
9773
d9cf1b54
AM
97742002-01-06 Steve Ellcey <sje@cup.hp.com>
9775
9776 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
9777 argument so we can handle HP-UX specially.
9778 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
9779 (elfNN_hpux_backend_section_from_bfd_section): New for support
9780 of SHN_IA_64_ANSI_COMMON.
9781 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
9782 (is_unwind_section_name): Add special HP-UX support.
9783 (elfNN_ia64_section_from_shdr): Add support for more sections.
9784 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
9785 add support for more sections.
9786 (elfNN_ia64_additional_program_headers): Modify
9787 is_unwind_section_name call.
9788 (elfNN_ia64_modify_segment_map): Remove assumption that there is
9789 only one unwind section in segment.
9790
3f3c5c34
AM
97912002-01-06 Alan Modra <amodra@bigpond.net.au>
9792
9793 * syms.c (_bfd_generic_make_empty_symbol): New function.
9794 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
9795 _bfd_generic_make_empty_symbol.
9796 * libbfd.h: Regenerate.
9797 * bfd-in2.h: Regenerate.
9798 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
9799 (hppabsd_core_get_symtab_upper_bound): Don't define.
9800 (hppabsd_core_get_symtab): Likewise.
9801 (hppabsd_core_print_symbol): Likewise.
9802 (hppabsd_core_get_symbol_info): Likewise.
9803 (hppabsd_core_bfd_is_local_label_name): Likewise.
9804 (hppabsd_core_get_lineno): Likewise.
9805 (hppabsd_core_find_nearest_line): Likewise.
9806 (hppabsd_core_bfd_make_debug_symbol): Likewise.
9807 (hppabsd_core_read_minisymbols): Likewise.
9808 (hppabsd_core_minisymbol_to_symbol): Likewise.
9809 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
9810 Formatting fixes.
9811 * hpux-core.c: Similarly.
9812 * irix-core.c: Similarly.
9813 * osf-core.c: Similarly.
9814 * sco5-core.c: Similarly.
9815 * binary.c (binary_make_empty_symbol): Remove function, define as
9816 _bfd_generic_make_empty_symbol.
9817 * ihex.c (ihex_make_empty_symbol): Likewise.
9818 * mmo.c (mmo_make_empty_symbol): Likewise.
9819 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
9820 * srec.c (srec_make_empty_symbol): Likewise.
9821 * versados.c (versados_make_empty_symbol): Likewise.
9822 * vms.c (_bfd_vms_make_empty_symbol): Remove.
9823 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
9824 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
9825 rather than _bfd_vms_make_empty_symbol.
9826 * vms-misc.c (new_symbol): Likewise.
9827
3f0a7f7f
AM
98282002-01-05 Alan Modra <amodra@bigpond.net.au>
9829
9e7b37b3
AM
9830 * section.c (bfd_section_init): Remove unnecessary initialisations.
9831 (bfd_section_list_clear): New function.
9832 (bfd_section_list_remove, bfd_section_list_insert): New macros.
9833 (_bfd_strip_section_from_output): Use them.
9834 * coffcode.h (coff_set_alignment_hook): Likewise.
9835 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
9836 * elf64-mips.c (mips_elf64_final_link): Likewise.
9837 * elf64-mmix.c (mmix_elf_final_link): Likewise.
9838 * sunos.c (sunos_add_dynamic_symbols): Likewise.
9839 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
9840 * bfd-in2.h: Regenerate.
9841
9842 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
9843 rather than doing our own section handling. Clean up after errors
9844 with bfd_release and bfd_section_list_clear. Handle unexpected
9845 flags.
9846 * aoutf1.h (sunos4_core_file_p): Likewise.
9847 * aix386-core.c (aix386_core_file_p): Likewise.
9848 * cisco-core.c (cisco_core_file_validate): Likewise.
9849 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
9850 * trad-core.c (trad_unix_core_file_p): Likewise.
9851
9b5ecbd0 9852 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
9853 with bfd_release and bfd_section_list_clear.
9854 * hpux-core.c (hpux_core_core_file_p): Likewise.
9855 * irix-core.c (irix_core_core_file_p): Likewise.
9856 * lynx-core.c (lynx_core_file_p): Likewise.
9857 * osf-core.c (osf_core_core_file_p): Likewise.
9858 * rs6000-core.c (rs6000coff_core_p): Likewise.
9859 * sco5-core.c (sco5_core_file_p): Likewise.
9860
3f0a7f7f
AM
9861 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
9862 sign extension adjustments without conditionals.
9863
a3aa38ee
JJ
98642002-01-04 Jakub Jelinek <jakub@redhat.com>
9865
9866 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
9867 CIE at .eh_frame start is removed due to no FDEs referencing it.
9868
8a8b2d4b
AJ
98692002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
9870
9871 * config.bfd (x86_64-*-netbsd*): New target.
9872 * configure.in (x86_64-*-netbsd*): Set COREFILE
9873 to netbsd-core.lo.
9874 * configure: Regenerated.
9875
04b5af89
TR
98762002-01-03 Tom Rix <trix@redhat.com>
9877
9878 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
9879 for recent bfd_make_section_anyway change.
9880
51c5503b
NC
98812002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
9882
9883 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
9884 R_ARM_THM_PC11 reloc.
9885
07f7c046
NC
98862002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9887
9888 * configure.in (LINGUAS): Add ja.
9889 * configure: Regenerate.
9890 * po/ja.po: Import from translation project's web site.
9891
5eefb65f
NC
98922002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
9893
9894 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
9895 messages to ease translation into other languages.
9896
39e90f10 9897For older changes see ChangeLog-0001
56882138
AM
9898\f
9899Local Variables:
9900mode: change-log
9901left-margin: 8
9902fill-column: 74
9903version-control: never
9904End:
This page took 0.598393 seconds and 4 git commands to generate.