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