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