Oops, accidental commit, reverting.
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
caec41ff
DJ
12003-11-14 Daniel Jacobowitz <drow@mvista.com>
2
3 * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
4 GOT entries.
5
b5727d75
MS
62003-11-13 Martin Schwidefsky <schwidefsky@de.ibm.com>
7
8 * elf32-s390.c (elf_s390_relocate_section): Only convert R_390_32
2eaa0d4f 9 to R_390_RELATIVE. Convert the other relocations against local
b5727d75
MS
10 symbols to relocations against the start of the section.
11 * elf64-s390.c (elf_s390_relocate_section): Only convert R_390_64
2eaa0d4f 12 to R_390_RELATIVE. Convert the other relocations against local
b5727d75
MS
13 symbols to relocations against the start of the section.
14
893c4fe2
NC
152003-11-11 Nick Clifton <nickc@redhat.com>
16
17 * elf-m10300.c (bfd_mn10300_elf_size_dynamic_sections): Use
18 info->executable not info->shared to decide if a .interp section
19 should be present.
20 * elf32-arm.h (elf32_arm_size_dynamic_sections): Likewise.
21 * elf32-cris.c (elf_cris_size_dynamic_sections): Likewise.
22 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
23 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
24 * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
25 * elf32-vax.c (elf_vax_size_dynamic_sections): Likewise.
26 * elf32-xtensa.c (elf_xtensa_size_dynamic_sections): Likewise.
27 * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
28 * elfxx-mips.c (_bfd_mips_size_dynamic_sections): Likewise.
29 * elflink.h (size_dynamic_sections): Likewise.
30
ca6dee30
NC
312003-11-10 Jonathan Wilson <jonwil@tpgi.com.au>
32
33 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Swap out tls pointer.
34 (_bfd_XXi_final_link_postscript): Look for __tks_used symbol. If
35 found initialise the tls data directory entry.
36
9abc968f
AM
372003-11-07 Alan Modra <amodra@bigpond.net.au>
38
39 * elf32-ppc.c (ppc_elf_install_value): Delete.
40 (shared_stub_entry, stub_entry): Make them arrays of ints.
41 Remove initial branch.
42 (ppc_elf_relax_section): Write one branch around all trampolines
43 instead. Correct bogus R_PPC_PLTREL24 handling. Correct
44 branch range check. Only use shared_stub_entry when shared.
45 Test that branches can reach stubs. Write trampolines out at
46 end so that just one realloc is used. Handle little-endian
47 mode. Move relevant code from ppc_elf_install_value to here.
48 (ppc_elf_relocate_section): Move code handling RELAX32 from
49 ppc_elf_install_value to here.
50
f31a141e
AM
512003-11-06 Alan Modra <amodra@bigpond.net.au>
52
53 * elf32-ppc.c (ppc_elf_howto_raw); Add entry for R_PPC_RELAX32PC.
54 (ppc_elf_install_value): Handle R_PPC_RELAX32PC. Merge duplicate
55 cases.
56 (shared_stub_entry): Correct opcode.
57 (ppc_elf_relax_section): Generate R_PPC_RELAX32PC relocs.
58 (ppc_elf_relocate_section): Handle them.
59
8517fae7
AM
602003-11-05 Alan Modra <amodra@bigpond.net.au>
61
62 * elf.c (_bfd_elf_rela_local_sym): Accept asection **, and return
63 updated section in case of merged section.
64 * elf-bfd.h (_bfd_elf_rela_local_sym): Update declaration.
65 * elf-hppa.h (elf_hppa_relocate_section): Adjust call.
66 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
67 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
68 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
69 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
70 * elf32-cris.c (cris_elf_relocate_section): Likewise.
71 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
72 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
73 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
74 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
75 * elf32-i370.c (i370_elf_relocate_section): Likewise.
76 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
77 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
78 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
79 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
80 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
81 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
82 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
83 * elf32-s390.c (elf_s390_relocate_section): Likewise.
84 * elf32-sh.c (sh_elf_relocate_section): Likewise.
85 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
86 * elf32-v850.c (v850_elf_relocate_section) Likewise.
87 * elf32-vax.c (elf_vax_relocate_section): Likewise.
88 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
89 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
90 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
91 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
92 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
93 * elf64-s390.c (elf_s390_relocate_section): Likewise.
94 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
95 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
96 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
97 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
98
99 * elf32-cris.c (cris_elf_relocate_section): Don't recalculate symbol
100 section for reloc output.
101 * elf32-i370.c (i370_elf_relocate_section): Likewise.
102 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
103 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
104 * elf32-vax.c (elf_vax_relocate_section): Likewise.
105 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
106 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
107
108 * elf32-ppc.c (ppc_elf_relocate_section): Don't recalculate everything
109 for R_PPC_RELAX32 reloc. Don't bother checking ppc_elf_install_value
110 return value.
f31a141e 111 * elf64-ppc.c (ppc64_elf_relocate_section <R_PPC64_TOC>): Sanity check
8517fae7
AM
112 sec->id.
113
d3ec2be8
AM
1142003-11-05 Alan Modra <amodra@bigpond.net.au>
115
a2b0fe9d
AM
116 * elf32-d10v.c (extract_rel_addend, insert_rel_addend): New functions.
117 (elf32_d10v_relocate_section): Use them to handle -r reloc
118 adjustments, and in place of _bfd_elf_rela_local_sym.
119
d3ec2be8
AM
120 * cpu-iq2000.c (arch_info_struct): Warning fix.
121
4fc8051d
AM
1222003-11-05 Alan Modra <amodra@bigpond.net.au>
123
124 * elf32-hppa.c (ELIMINATE_COPY_RELOCS): Define.
125 (elf32_hppa_copy_indirect_symbol): Don't copy NON_GOT_REF on
126 weakdefs.
127 (elf32_hppa_check_relocs): Use ELIMINATE_COPY_RELOCS.
128 (elf32_hppa_adjust_dynamic_symbol): Likewise. Copy weakdef
129 NON_GOT_REF.
130 (allocate_dynrelocs): Use ELIMINATE_COPY_RELOCS and
131 SYMBOL_CALLS_LOCAL. Discard relocs for undef weak syms with
132 non-default visibility.
133 (elf32_hppa_relocate_section): Use ELIMINATE_COPY_RELOCS and
134 SYMBOL_CALLS_LOCAL.
135
0f867abe
AM
1362003-11-04 Alan Modra <amodra@bigpond.net.au>
137
eac93a98
AM
138 * aout-target.h, aoutf1.h, bfdio.c, bfdwin.c: Update copyright date.
139 * coff-apollo.c, coff-sparc.c, coff-w65.c, coff-we32k.c: Ditto.
140 * coff-z8k.c, coffgen.c, cpu-frv.c, cpu-h8500.c, cpu-hppa.c: Ditto.
141 * cpu-ia64-opc.c, cpu-m10300.c, cpu-mips.c, cpu-msp430.c: Ditto.
142 * cpu-rs6000.c, cpu-z8k.c, efi-app-ia32.c, elf32-am33lin.c: Ditto.
143 * gen-aout.c, hash.c, hp300hpux.c, init.c, mach-o.c: Ditto.
144 * nlm-target.h, nlm.c, som.h, stabs.c, sysdep.h, xsym.h: Ditto.
145
140fae3f
AM
146 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Fix
147 "dereferencing type-punned pointer" warnings.
148
0f867abe
AM
149 * aout-adobe.c (aout_adobe_set_section_contents): Constify location.
150 * aoutx.h (NAME(aout,set_section_contents)): Ditto.
151 * bfd-in2.h: Regenerate.
152 * binary.c (binary_set_section_contents): Ditto.
153 * bout.c (b_out_set_section_contents): Ditto.
154 * coff-tic54x.c (tic54x_set_section_contents): Ditto.
155 * coffcode.h (coff_set_section_contents): Ditto.
156 * ecoff.c (_bfd_ecoff_set_section_contents): Ditto.
157 * elf-bfd.h (_bfd_elf_set_section_contents): Ditto.
158 * elf.c (_bfd_elf_set_section_contents): Ditto.
159 * elfxx-mips.c (_bfd_mips_elf_set_section_contents): Ditto.
160 * elfxx-mips.h (_bfd_mips_elf_set_section_contents): Ditto.
161 * i386msdos.c (msdos_set_section_contents): Ditto.
162 * ieee.c (ieee_set_section_contents): Ditto.
163 * ihex.c (ihex_set_section_contents): Ditto.
164 * libaout.h (NAME(aout,set_section_contents)): Ditto.
165 * libbfd-in.h (_bfd_nowrite_set_section_contents): Ditto.
166 (_bfd_generic_set_section_contents): Ditto.
167 * libbfd.h: Regenerate.
168 * libbfd.c (_bfd_generic_set_section_contents): Ditto.
169 * libecoff.h (_bfd_ecoff_set_section_contents): Ditto.
170 * libnlm.h (nlmNAME(set_section_contents)): Ditto.
171 (struct nlm_backend_data <nlm_mangle_relocs>): Ditto.
172 * mmo.c (mmo_set_section_contents): Ditto.
173 * nlm32-alpha.c (nlm_alpha_mangle_relocs): Ditto.
174 * nlm32-i386.c (nlm_i386_mangle_relocs): Ditto.
175 * nlm32-ppc.c (nlm_powerpc_mangle_relocs): Ditto.
176 * nlm32-sparc.c (nlm_sparc_mangle_relocs): Ditto.
177 * nlmcode.h (nlm_set_section_contents): Ditto.
178 * oasys.c (oasys_set_section_contents): Ditto.
179 * pdp11.c (NAME(aout,set_section_contents)): Ditto.
180 * ppcboot.c (ppcboot_set_section_contents): Ditto.
181 * srec.c (srec_set_section_contents): Ditto.
182 * targets.c (BFD_JUMP_TABLE_WRITE <_bfd_set_section_contents>): Ditto.
183 * tekhex.c (tekhex_set_section_contents): Ditto.
184 (move_section_contents): Ditto.
185 * versados.c (versados_set_section_contents): Ditto.
186 * vms-misc.c (_bfd_save_vms_section): Ditto.
187 * vms.c (vms_set_section_contents): Ditto.
188 * vms.h (_bfd_save_vms_section): Ditto.
189
63bc6f6c
AM
1902003-11-04 Alan Modra <amodra@bigpond.net.au>
191
192 * elf64-ppc.c (ppc_size_one_stub): Size relbrlt. Accept info arg
193 rather than htab.
194 (ppc64_elf_size_stubs): Adjust ppc_size_one_stub traversal. Zero
195 relbrlt size.
196 (ppc64_elf_build_stubs): Allocate space for relbrlt.
197
e1918d23
AM
1982003-11-04 Alan Modra <amodra@bigpond.net.au>
199
200 * bfd-in.h (_bfd_elf_tls_setup): Declare.
201 * bfd-in2.h: Regenerate.
202 * elf-bfd.h (struct elf_link_tls_segment): Delete.
203 (struct elf_link_hash_table): Add tls_sec and tls_size.
204 * elf.c (_bfd_elf_link_hash_table_init): Init tls_sec and tls_size.
205 * elflink.c (_bfd_elf_tls_setup): New function.
206 * elflink.h (struct elf_final_link_info): Remove first_tls_sec.
207 (elf_bfd_final_link): Don't set first_tls_sec here. Update code
208 saving tls segment info, round segment size up.
209 (elf_link_output_extsym): Adjust code using tls segment info.
210 (elf_link_input_bfd): Likewise.
211 * elf32-i386.c (dtpoff_base, tpoff): Likewise.
212 * elf32-s390.c (dtpoff_base, tpoff): Likewise.
213 * elf32-sh.c (dtpoff_base, tpoff): Likewise.
214 * elf32-sparc.c (dtpoff_base, tpoff): Likewise.
215 * elf64-s390.c (dtpoff_base, tpoff): Likewise.
216 * elf64-x86-64.c (dtpoff_base, tpoff): Likewise.
217 * elfxx-ia64.c (elfNN_ia64_tprel_base): Likewise.
218 (elfNN_ia64_dtprel_base): Likewise.
219 * elf64-alpha.c (alpha_get_dtprel_base): Likewise.
220 (alpha_get_tprel_base): Likewise.
221 (struct alpha_relax_info): Remove tls_segment.
222 (elf64_alpha_relax_got_load): Adjust invocation of
223 alpha_get_dtprel_base and alpha_get_tprel_base.
224 (elf64_alpha_relax_tls_get_addr): Likewise.
225 (elf64_alpha_relax_section): Likewise.
226 (elf64_alpha_relocate_section): Likewise.
227 (elf64_alpha_relax_find_tls_segment): Delete.
228 * elf32-ppc.c (struct ppc_elf_link_hash_table): Remove tls_sec.
229 (ppc_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
230 (ppc_elf_relocate_section): Adjust to use elf.tls_sec.
231 * elf32-ppc.h (ppc_elf_tls_setup): Update.
232 * elf64-ppc.c (struct ppc_link_hash_table): Remove tls_sec.
233 (ppc64_elf_tls_setup): Call _bfd_elf_tls_setup. Return section.
234 (ppc64_elf_tls_optimize): Adjust to use elf.tls_sec.
235 (ppc64_elf_relocate_section): Likewise.
236 * elf64-ppc.h (ppc64_elf_tls_setup): Update.
237
6f2f2c9d
DJ
2382003-11-03 Daniel Jacobowitz <drow@mvista.com>
239
240 * elf-bfd.h (struct elf_backend_data): Remove plt_header_size.
241 * elf-m10300.c (elf_backend_plt_header_size): Don't define.
242 * elf32-arm.h (elf_backend_plt_header_size): Don't define.
243 * elf32-cris.c (elf_backend_plt_header_size): Don't define.
244 * elf32-i386.c (elf_backend_plt_header_size): Don't define.
245 * elf32-mips.c (elf_backend_plt_header_size): Don't define.
246 * elf32-ppc.c (elf_backend_plt_header_size): Don't define.
247 * elf32-s390.c (elf_backend_plt_header_size): Don't define.
248 * elf32-sh.c (elf_backend_plt_header_size): Don't define.
249 * elf32-sparc.c (elf_backend_plt_header_size): Don't define.
250 * elf64-alpha.c (elf_backend_plt_header_size): Don't define.
251 * elf64-hppa.c (elf_backend_plt_header_size): Don't define.
252 * elf64-mips.c (elf_backend_plt_header_size): Don't define.
253 * elf64-ppc.c (elf_backend_plt_header_size): Don't define.
254 * elf64-s390.c (elf_backend_plt_header_size): Don't define.
255 * elf64-sh64.c (elf_backend_plt_header_size): Don't define.
256 * elf64-sparc.c (elf_backend_plt_header_size): Don't define.
257 * elf64-x86-64.c (elf_backend_plt_header_size): Don't define.
258 * elfn32-mips.c (elf_backend_plt_header_size): Don't define.
259 * elfxx-ia64.c (elf_backend_plt_header_size): Don't define.
260 * elfxx-target.h (elf_backend_plt_header_size): Don't define
261 or include in target initializer.
262
85302095
AC
2632003-11-03 Andrew Cagney <cagney@redhat.com>
264
265 * section.c (bfd_set_section_contents): Make the "location" buffer
266 constant.
267 * bfd-in2.h: Re-generate.
140fae3f 268
fc0a2244
AC
2692003-10-30 Andrew Cagney <cagney@redhat.com>
270
271 * syms.c: Replace "struct symbol_cache_entry" with "struct
272 bfd_symbol".
273 * vms.h, targets.c, section.c, reloc.c, peicode.h: Ditto.
274 * mipsbsd.c, elf.c, linker.c, elf-bfd.h, ecoff.c: Ditto.
275 * cpu-z8k.c, cpu-ns32k.c, cpu-h8500.c, bfd.c, bfd-in.h: Ditto.
276 * bfd-in2.h: Re-generate.
277
0aa92b58
JJ
2782003-10-30 Jakub Jelinek <jakub@redhat.com>
279
280 * elfxx-ia64.c: Include objalloc.h, hashtab.h.
281 (struct elfNN_ia64_local_hash_entry): Remove root. Add id and r_sym
282 fields.
283 (struct elfNN_ia64_local_hash_table): Remove.
284 (struct elfNN_ia64_link_hash_table): Change loc_hash_table's type
285 to htab_t. Add loc_hash_memory field.
286 (elfNN_ia64_local_hash_table_init, elfNN_ia64_new_loc_hash_entry):
287 Removed.
288 (elfNN_ia64_local_htab_hash, elfNN_ia64_local_htab_eq): New
289 functions.
290 (elfNN_ia64_hash_table_create): Use hashtab.h hashtable for
291 loc_hash_table. Initialize loc_hash_memory.
292 (elfNN_ia64_hash_table_free): New function.
293 (elfNN_ia64_local_hash_lookup): Remove.
294 (elfNN_ia64_local_dyn_sym_thunk): Change into htab_traverse
295 callback.
296 (elfNN_ia64_dyn_sym_traverse): Use htab_traverse.
297 (get_local_sym_hash): Use hashtab.h hashtable for loc_hash_table.
298 (bfd_elfNN_bfd_link_hash_table_free): Define.
299
68b6ddd0
AM
3002003-10-30 Alan Modra <amodra@bigpond.net.au>
301
302 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Modify versioned
303 symbol string in place.
304
3f8b3ef3
NC
3052003-10-30 Jim Blandy <jimb@redhat.com>
306
307 * cpu-rs6000.c (rs6000_compatible): Check the correct arch_info
308 object's mach field: all PowerPC machines are supersets of the
309 original rs6000, but not later rs6000 machines.
310
482e2e37
AM
3112003-10-30 Alan Modra <amodra@bigpond.net.au>
312
313 * dwarf2.c (struct attribute): Delete "unsnd", "snd" and "addr".
314 Add "val" and "sval" fields.
315 (DW_STRING, DW_UNSND, DW_BLOCK, DW_SND, DW_ADDR): Delete.
316 (read_attribute_value): Expand and adjust DW_* occurrences.
317 (scan_unit_for_functions, parse_comp_unit): Likewise.
318
257e20bc
NC
3192003-10-30 Phil Edwards <phil@codesourcery.com>
320
321 * config.bfd (arm-*-vxworks): Remove separate stanza; merge with
322 other common ELF triples.
323 (i[3-7]86-*-vxworks): Change to ELF format.
324 (mips*-*-windiss): New triple, add to common MIPS/ELF stanza.
325 (sh-*-vxworks): New stanza.
326
ddb2b442
AM
3272003-10-30 Lars Knoll <lars@trolltech.com>
328 Michael Matz <matz@suse.de>
329 Jakub Jelinek <jakub@redhat.com>
330 Alan Modra <amodra@bigpond.net.au>
331
332 * merge.c (struct sec_merge_sec_info): Update comment.
333 (struct sec_merge_hash_entry): Remove entsize.
334 (sec_merge_hash_lookup): Only adjust alignment when creating.
335 (sec_merge_emit): Remove register keyword.
336 (cmplengthentry, last4_eq, last_eq): Delete.
337 (strrevcmp, strrevcmp_align, is_suffix): New.
338 (merge_strings): Use them to implement fast suffix merging.
339 * elf-strtab.c (struct elf_strtab_hash_entry): Update comments.
340 Make "len" signed.
341 (_bfd_elf_strtab_add): Lose on >2G strings.
342 (_bfd_elf_strtab_emit): Don't emit strings with len < 0.
343 (cmplengthentry, last4_eq): Delete.
344 (strrevcmp, is_suffix): New.
345 (_bfd_elf_strtab_finalize): Rework to implement fast suffix merging.
346
5e681ec4
PB
3472003-10-29 Daniel Jacobowitz <drow@mvista.com>
348
140fae3f
AM
349 * elf32-arm.h (elf32_arm_final_link_relocate): Move check for
350 SEC_ALLOC.
5e681ec4
PB
351
3522003-10-29 Philip Blundell <philb@gnu.org>
353
354 * elf32-arm.h (elf32_arm_plt0_entry, elf32_arm_plt_entry): New
355 code sequence.
356 (PLT_HEADER_SIZE): New.
357 (struct elf32_arm_pcrel_relocs_copied): Rename to ...
358 (struct elf32_arm_relocs_copied): ... this. Count both
359 pcrel and non-pcrel relocs. All uses updated.
360 (struct elf32_arm_link_hash_table): Add pointers to dynamic linker
361 sections and symbol/section mapping cache.
362 (create_got_section): New.
363 (elf32_arm_create_dynamic_sections): New.
364 (elf_backend_create_dynamic_sections): Use it.
365 (elf32_arm_final_link_relocate): Support garbage collection of relocs.
366 (elf32_arm_check_relocs): Likewise.
367 (elf32_arm_adjust_dynamic_symbol): Likewise.
368 (elf32_arm_copy_indirect_symbol): New.
140fae3f 369 (elf32_arm_link_hash_table_create): Initialise new fields.
5e681ec4
PB
370 (elf32_arm_gc_sweep_hook): Implement.
371 (elf32_arm_discard_copies): Delete.
372 (elf32_arm_finish_dynamic_symbol): Use new PLT code.
373 (elf32_arm_finish_dynamic_sections): Likewise.
374 (elf_backend_can_refcount): Define.
375 (elf_backend_copy_indirect_symbol): Likewise.
376 (elf_backend_plt_header_size): Set to PLT_HEADER_SIZE.
377
62f3bb11
AM
3782003-10-29 Alan Modra <amodra@bigpond.net.au>
379
d37c89e5
AM
380 * elf64-ppc.c (elf_backend_grok_prstatus): Define.
381 (elf_backend_grok_psinfo): Define.
382 (ppc64_elf_grok_prstatus, ppc64_elf_grok_psinfo): New functions.
383
62f3bb11
AM
384 * elf.c (_bfd_elfcore_make_pseudosection): Allow multiple
385 sections with the same name.
386 (elfcore_grok_lwpstatus): Likewise.
387 (elfcore_grok_win32pstatus): Likewise.
388 (elfcore_grok_note): Likewise.
389 (elfcore_grok_nto_status): Likewise.
390 (elfcore_grok_nto_gregs): Likewise.
391
35a0f415
DJ
3922003-10-27 Daniel Jacobowitz <drow@mvista.com>
393
394 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Never skip dynamic
395 objects.
396
e3d54347
RS
3972003-10-14 Richard Sandiford <rsandifo@redhat.com>
398
399 * elfxx-mips.c (mips_elf_create_got_section): Initialize global_gotno.
400
5e35cbc2
L
4012003-10-24 H.J. Lu <hongjiu.lu@intel.com>
402
403 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Look up
404 hash table for real symbols.
405
9c3ed942
MS
4062003-10-23 Michael Snyder <msnyder@redhat.com>
407
408 * section.c (asection): Fix typo in comment.
409
0d4792f7
AM
4102003-10-23 Alan Modra <amodra@bigpond.net.au>
411
412 * elf64-ppc.c (get_tls_mask): Add toc_symndx param, save toc
413 reloc symbol index to it. Don't allow gd syms in shared libs
414 to be optimized.
415 (ppc64_elf_tls_optimize): Adjust get_tls_mask call.
416 (ppc64_elf_size_stubs): Likewise.
417 (ppc64_elf_relocate_section): Check that tls relocs are only used
418 with tls syms, and similarly for non-tls. Correct symbol used
419 when optimizing toc tls code.
420
c9ac8978
NC
4212003-10-22 Nick Clifton <nickc@redhat.com>
422
423 * peicode.h (coff_swap_scnhdr_in): Only remove padding when
424 processing an executable.
425
108ba305
JJ
4262003-10-22 Jakub Jelinek <jakub@redhat.com>
427
428 * elflink.c (_bfd_elf_export_symbol): Adjust for globals and locals
429 field changes.
430 (_bfd_elf_link_assign_sym_version): Likewise.
431 * elflink.h (size_dynamic_sections): Likewise.
432
af9ba621
CV
4332003-10-21 Alexandre Oliva <aoliva@redhat.com>,
434 Michael Snyder <msnyder@redhat.com>
435
436 * archures.c (bfd_mach_sh4a, bfd_mach_sh4al_dsp, bfd_mach_sh4_nofpu,
437 bfd_mach_sh4a_nofpu): New machine types.
438 * bfd-in2.h: Rebuilt.
439 * cpu-sh.c (compatible): Remove unused function.
440 (SH4A_NEXT, SH4AL_DSP_NEXT, SH4_NOFPU_NEXT, SH4A_NOFPU_NEXT): New.
441 (arch_info_struct): Add sh4a, sh4al_dsp, sh4-nofpu and sh4a-nofpu.
442 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle them.
443
5a21e886
NC
4442003-10-21 Wouter van Heyst <wouter@vidicode.nl>
445
446 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct text
447 describing mismatched formats involving the Maverick FP type.
448
b749473b
NC
4492003-10-21 Anil Paranjpe <anilp1@KPITCummins.com>
450
451 * binary.c (binary_object_p): Pass machine flag along with
452 architecture.
453
3e602632
NC
4542003-10-21 Thorsten Brehm <brehm@gmx.net>
455
456 * archures.c (bfd_default_scan): Add support for mcf528x.
457 * ieee.c (ieee_write_processor): Likewise.
458
4592003-10-21 Peter Barada <pbarada@mail.wm.sps.mot.com>
62f3bb11 460 Bernardo Innocenti <bernie@develer.com>
3e602632
NC
461
462 * archures.c: Add MCF528x (MCFv4) support.
463 * bfd/cpu-m68k.c (arch_info_struct): Likewise.
464 * bfd-in2.h: Regenerate.
465
198beae2
AC
4662003-10-20 Andrew Cagney <cagney@redhat.com>
467
468 * targets.c: Replace "struct sec" with "struct bfd_section"
469 * syms.c, sparclynx.c, section.c, opncls.c: Ditto.
470 * libcoff-in.h, libbfd-in.h, elfxx-target.h: Ditto.
471 * elf.c, coffgen.c, bfd.c, bfd-in.h, aoutf1.h: Ditto.
472 * aout-tic30.c, aout-target.h:
473 * bfd-in2.h, libcoff.h, libbfd.h: Regenerate.
62f3bb11 474
4e2147ff
HPN
4752003-10-18 Hans-Peter Nilsson <hp@bitrange.com>
476
f60ebe14
HPN
477 Support linker relaxation of new R_MMIX_PUSHJ_STUBBABLE relocs.
478 * elf64-mmix.c (MAX_PUSHJ_STUB_SIZE): New macro.
479 (struct _mmix_elf_section_data): New member pjs.
480 (mmix_set_relaxable_size, mmix_elf_get_section_contents): New
481 functions.
482 (elf_mmix_howto_table): New entry for R_MMIX_PUSHJ_STUBBABLE.
483 (mmix_reloc_map): Ditto.
484 (mmix_elf_relocate_section): Handle R_MMIX_PUSHJ_STUBBABLE.
485 (mmix_final_link_relocate, mmix_elf_check_common_relocs): Ditto.
486 (mmix_elf_perform_relocation): Ditto. Don't mark parameter addr
487 unused.
488 (mmix_elf_check_relocs): Move early return to after
489 mmix_elf_check_common_relocs call.
490 (mmix_elf_symbol_processing): Fix cut-and-pasto in head comment.
491 (_bfd_mmix_before_linker_allocation): Rename from
492 _bfd_mmix_prepare_linker_allocated_gregs. All referers changed.
493 Arrange to set the initial relaxable size of sections.
494 (_bfd_mmix_after_linker_allocation): Rename from
495 _bfd_mmix_finalize_linker_allocated_gregs.
496 (mmix_elf_relax_section): Relax a R_MMIX_PUSHJ_STUBBABLE reloc.
497 (bfd_elf64_get_section_contents): Define.
498 * reloc.c: Add ENUMX for BFD_RELOC_MMIX_PUSHJ_STUBBABLE.
499 * libbfd.h, bfd-in2.h: Regenerate.
500
4e2147ff
HPN
501 * reloc.c (bfd_generic_relax_section): Default-set
502 section->_cooked_size here.
503 (bfd_generic_get_relocated_section_contents): Don't set it here.
504 Explain why.
505
4b71bec0
DA
5062003-10-17 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
507
508 * elf32-hppa.c (elf32_hppa_relocate_section): Skip relocation if
509 output section has been discarded.
510
d4e2de6b 5112003-10-17 Shrinivas Atre <shrinivasa@KPITCummins.com>
62f3bb11 512
d4e2de6b
NC
513 * coff-h8300.c (funcvec_hash_newfunc): Handle normal mode.
514 (h8300_reloc16_extra_cases): Likewise.
515 (h8300_bfd_link_add_symbols): Likewise.
516
5172003-10-17 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
518
519 * cpu-h8300.c (h8300sxn_info_struct): Correct address size.
520 (h8300sn_info_struct): Likewise.
521 (h8300hn_info_struct): Likewise.
522
98a96df7
CF
5232003-10-16 Pavel Roskin <proski@gnu.org>
524
525 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Don't calculate image size
526 for sections which lack size info.
527
2cefff79
DS
5282003-10-17 Danny Smith <dannysmith@users.sourceforge.net>
529
530 * configure.host: Add __USE_MINGW_FSEEK to HDEFINES for
531 mingw32.
532
3e0e1ef1
L
5332003-10-16 H.J. Lu <hongjiu.lu@intel.com>
534
535 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also warn
536 undefined patterns with '*'.
537
9da84788
L
5382003-10-16 H.J. Lu <hongjiu.lu@intel.com>
539
540 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't
541 use the last CIE from a different section.
542 (_bfd_elf_write_section_eh_frame): Don't pad beyond the raw
543 size of the output section.
544
ac393995
RM
5452003-10-07 Roland McGrath <roland@redhat.com>
546
547 * elf.c (_bfd_elf_make_section_from_phdr): Set alignment_power of
548 new section from p_align header field.
549
7aaa0689
L
5502003-10-16 H.J. Lu <hongjiu.lu@intel.com>
551
552 * elf32-xtensa.c (xtensa_read_table_entries): The external size
553 of entry is 8 bytes.
554
6cee3f79
AC
5552003-10-15 Andrew Cagney <cagney@redhat.com>
556
557 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Replace NAME##_get_symtab
558 with NAME##_canonicalize_symtab.
559 * libcoff-in.h (coff_canonicalize_symtab): Update.
560 * xsym.h (bfd_sym_canonicalize_symtab): Update.
561 * elf-bfd.h (_bfd_elf_canonicalize_symtab): Update.
562 * coffgen.c (coff_canonicalize_symtab): Update.
563 * libbfd-in.h (_bfd_nosymbols_canonicalize_symtab): Update.
564 * libnlm.h (nlmNAME(canonicalize_symtab)): Update.
565 * ieee.c (ieee_vec): Update comment.
566 * libecoff.h (_bfd_ecoff_canonicalize_symtab): Update.
567 * mmo.c (mmo_canonicalize_symtab): Update.
568 * nlm-target.h (nlm_canonicalize_symtab): Update.
569 * nlmcode.h (nlm_canonicalize_symtab): Update.
570 * i386msdos.c (msdos_canonicalize_symtab): Update.
571 * hp300hpux.c (MY (canonicalize_symtab)): Update.
572 * oasys.c (oasys_canonicalize_symtab): Update.
573 * som.c (som_canonicalize_symtab): Update.
574 * pef.c (bfd_pef_canonicalize_symtab): Update.
575 * nlmcode.h (nlm_canonicalize_symtab): Update.
576 * xsym.c (bfd_sym_canonicalize_symtab): Update.
577 * vms.c (vms_canonicalize_symtab): Update.
578 * versados.c (versados_canonicalize_symtab): Update.
579 * mach-o.c (bfd_mach_o_canonicalize_symtab): Update.
580 * ieee.c (ieee_canonicalize_symtab): Update.
581 * pdp11.c (NAME(aout,canonicalize_symtab)): Update.
582 * reloc.c: Update comment.
583 * libaout.h (NAME(aout,canonicalize_symtab)): Update.
584 * coff64-rs6000.c (aix5coff64_vec): Update.
585 * coff64-rs6000.c (bfd_xcoff_aix5_backend_data): Update.
586 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update.
587 * aoutx.h (NAME(aout,canonicalize_symtab)): Update.
588 * elfxx-target.h (bfd_elfNN_canonicalize_symtab): Update.
589 * hp300hpux.c (MY_canonicalize_symtab): Update.
590 * ecoff.c (_bfd_ecoff_canonicalize_symtab): Update.
591 * aout-tic30.c (MY_canonicalize_symtab): Update.
592 * aout-target.h (MY_canonicalize_symtab): Update.
593 * ppcboot.c (ppcboot_canonicalize_symtab): Update.
594 * elf.c (_bfd_elf_canonicalize_symtab): Update.
595 * elfcode.h (elf_canonicalize_symtab): Update.
596 * ihex.c (ihex_canonicalize_symtab): Update.
597 * tekhex.c (tekhex_canonicalize_symtab): Update.
598 * binary.c (binary_canonicalize_symtab): Update.
599 * srec.c (srec_canonicalize_symtab): Update.
600
6288878d
KH
6012003-10-15 Kazu Hirata <kazu@cs.umass.edu>
602
603 * elf32-h8300.c (elf_reloc_map): Fix a comment typo.
604
46e993b9
KK
6052003-10-15 Kaz Kojima <kkojima@rr.iij4u.or.jp>
606
607 * elf32-sh.c (sh_elf_relocate_section): Handle R_SH_IMM_*_PCREL
608 relocations.
609 (sh_elf_check_relocs): Likewise.
610
611 * elf32-sh64.c (elf_backend_merge_symbol_attribute): Define.
612 (sh64_elf_merge_symbol_attribute): New.
613 * elf64-sh64.c (elf_backend_merge_symbol_attribute): Define.
614 (sh64_elf64_merge_symbol_attribute): New.
615
9bf7216d
KK
6162003-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
617
618 * elf-bfd.h (struct elf_backend_data): New function pointer member
619 elf_backend_merge_symbol_attribute.
620 * elflink.h (elf_link_add_object_symbols): Adjust call to
621 elf_backend_merge_symbol_attribute if the backend defined it.
62f3bb11
AM
622 * elfxx-target.h (elf_backend_merge_symbol_attribute): New macro.
623 (elfNN_bed): Add that to the initializer.
9bf7216d 624
b614a702
BW
6252003-10-14 Bob Wilson <bob.wilson@acm.org>
626
627 * elf32-xtensa.c (get_is_linkonce_section): Delete.
628 (xtensa_is_property_section, xtensa_is_littable_section): Use
629 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Do not recognize
630 linkonce sections containing ".xt.insn" and ".xt.lit" substrings.
631 (xtensa_get_property_section_name): Check section name instead of
632 calling get_is_linkonce_section. Remove unused bfd parameter. Use
633 XTENSA_INSN_SEC_NAME and XTENSA_LIT_SEC_NAME macros. Never generate
634 linkonce section names by appending ".xt.insn" or ".xt.lit".
635 (xtensa_read_table_entries): Remove bfd argument in call to
636 xtensa_get_property_section_name. Free section name when done.
637 (elf_xtensa_combine_prop_entries): Free leaking table.
638
98a8deaf
RS
6392003-10-13 Richard Sandiford <rsandifo@redht.com>
640
641 * elfxx-mips.c (_bfd_mips_elf_size_dynamic_sections): Don't add
642 DT_MIPS_LIBLIST or DT_MIPS_CONFLICT entries.
643 (_bfd_mips_elf_finish_dynamic_symbol): Don't handle them. Don't
644 handle DT_MIPS_MSYM. Set DT_RELSZ based on the number of relocations
645 that were needed.
646 (_bfd_mips_elf_modify_segment_map): Fix placement of PT_MIPS_OPTIONS.
647 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_UCODE.
648
3f7deb8a
L
6492003-10-13 H.J. Lu <hongjiu.lu@intel.com>
650
651 * bfd-in.h (bfd_elf32_ia64_after_parse): New prototype.
652 (bfd_elf64_ia64_after_parse): Likewise.
653 * bfd-in2.h: Regenerated.
654
655 * elfxx-ia64.c (oor_ip): New.
656 (oor_branch_size): Likewise.
657 (bfd_elfNN_ia64_after_parse): Likewise.
658 (elfNN_ia64_relax_section): Use oor_ip if oor_branch_size
659 equals sizeof (oor_ip).
660
0c72ffe0
KK
6612003-10-12 Kaz Kojima <kkojima@rr.iij4u.or.jp>
662
663 * elf64-sh64.c (sh_elf64_relocate_section): Tidy up for the
664 renumbering of some relocation numbers.
665
8d6ad26e
AM
6662003-10-11 Alan Modra <amodra@bigpond.net.au>
667
668 * coff-sh.c: Move definition of MAP and guard more code with
669 COFF_IMAGE_WITH_PE.
a7f49d81
AM
670
671 * section.c (bfd_get_section_size_before_reloc): Ignore reloc_done.
16b79bec 672 * bfd-in2.h: Regenerate.
a7f49d81 673
ede6aaf3
L
6742003-10-10 H.J. Lu <hongjiu.lu@intel.com>
675
676 * Makefile.am: Run "make dep-am".
677 * Makefile.in: Regenerate.
678 * doc/Makefile.in: Likewise.
679
a3aa4448
L
6802003-10-09 H.J. Lu <hongjiu.lu@intel.com>
681
682 * cofflink.c: Include "safe-ctype.h".
683 (coff_link_add_symbols): Use ISDIGIT instead of isdigit.
684
9c8ee639
DB
6852003-10-08 Dave Brolley <brolley@redhat.com>
686 On behalf of Michael Snyder <msnyder@redhat.com>
687
688 * archures.c: Add FRV fr550 machine.
689 * cpu-frv.c: Ditto.
690 * elf32-frv.c: Ditto.
691 * bfd-in2.h: Regenerate.
692
6a691779
TS
6932003-10-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
694
695 * elfxx-mips.c (STUB_MOVE,STUB_LI16): Fix stub code
696 for non-SGI N64 ABI. Improve code consitency.
697
b15b52ef
AO
6982003-10-07 Alexandre Oliva <aoliva@redhat.com>
699
700 * elf32-frv.c (elf32_frv_howto_table): Set R_FRV_LABEL16's
701 rightshift to 2.
702
cd339148
NS
7032003-10-07 Nathan Sidwell <nathan@codesourcery.com>
704
29ca8dc5
NS
705 * libbfd-in.h (_bfd_link_section_stabs): Add string offset
706 parameter.
707 * cofflink.c (coff_link_add_symbols): Deal with split stab
708 sections.
709 * elflink.h (elf_link_add_object_symbols): Deal with split stab
710 sections.
711 * stabs.c (_bfd_link_section_stabs): Add string offset parameter.
712 * libbfd.h: Regenerated.
713
cd339148
NS
714 * coffcode.h (coff_set_alignment_hook): With PE_COFF reloc
715 overflow, set reloc start position to after the count
716 reloc. Subtract one from num relocs. Give error on 0xffff relocs
717 and no overflow.
718 * cofflink.c (_bfd_coff_final_link): Deal with PE_COFF reloc
719 overflow.
720 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Do overflow if >=
721 0xffff.
722
10cf14ea
L
7232003-10-06 H.J. Lu <hongjiu.lu@intel.com>
724
725 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Pad the
726 last CIE/FDE if needed.
727
afa105f8
NC
7282003-10-06 Nick Clifton <nickc@redhat.com>
729
730 * targets.c (_bfd_target_vector): Include bfd_elf64_sparc_vec if
731 BFD64 is enabled.
732
85cf2a8a
NC
7332003-10-06 Matt Thomas <matt@3am-software.com>
734
8d6ad26e 735 * config.bfd: Move the hppa*-*-netbsd* case to the hppa*-*-linux* case.
85cf2a8a 736
4615568e
NC
7372003-10-06 Robert Millan <robertmh@gnu.org>
738
739 * configure.in: Match GNU/KNetBSD with new knetbsd*-gnu triplet.
740 * config.bfd: Likewise.
741 * configure: Regenerate.
742
8b7cf393
CG
7432003-10-04 Christian Groessler <chris@groessler.org>
744
745 * coff-z8k.c (extra_case): Fix displacement length check for R_JR
746 and R_CALLR.
747
0a6a3ebe
SC
7482003-10-04 Stephane Carrez <stcarrez@nerim.fr>
749
750 * elf32-m68hc1x.c: Update to ISO C90; replace PTR with void*.
751 * elf32-m68hc11.c: Likewise.
752 * elf32-m68hc12.c: Likewise.
753 * elf32-m68hc1x.h: Likewise.
754
17e58af0
SC
7552003-10-04 Stephane Carrez <stcarrez@nerim.fr>
756
757 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Fix merge
758 of flags between HC12 and HCS12.
759
27c630ba
NC
7602003-10-04 Bryce McKinlay <bryce@mckinlay.net.nz>
761
762 * merge.c (_bfd_merge_sections): Set SEC_EXCLUDE flag on sections
763 which become empty after merging.
764
1fc0d173
JJ
7652003-09-30 Jakub Jelinek <jakub@redhat.com>
766
767 * elfxx-ia64.c (ia64_howto_table): Fix size of R_IA64_TPREL64[LM]SB,
768 R_IA64_DTPREL{32,64}[LM]SB and R_IA64_DTPMOD64[LM]SB.
769
5f74bc13
CD
7702003-09-30 Chris Demetriou <cgd@broadcom.com>
771
772 * archures.c (bfd_mach_mipsisa64r2): New define.
773 * bfd-in2.h: Regenerate.
774 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mipsisa64r2.
775 * cpu-mips.c (I_mipsisa64r2): New enum value.
776 (arch_info_struct): Add entry for I_mipsisa64r2.
777 * elfxx-mips.c (_bfd_elf_mips_mach)
778 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_64R2.
779 (mips_set_isa_flags): Add bfd_mach_mipsisa64r2 case.
780 (mips_mach_extensions): Add entry for bfd_mach_mipsisa64r2.
781
b59dd4a5
L
7822003-09-29 H.J. Lu <hongjiu.lu@intel.com>
783
784 * elfxx-ia64.c (elfNN_hpux_backend_symbol_processing): New.
785 Handle SHN_IA_64_ANSI_COMMON.
786 (elf_backend_section_from_bfd_section): Defined.
787
243ef1e0
L
7882003-09-26 H.J. Lu <hongjiu.lu@intel.com>
789
790 * elflink.c (elf_link_read_relocs_from_section): Add an argument
791 of a pointer to section. Check bad symbol index.
792 (_bfd_elf_link_read_relocs): Modify calls to
793 elf_link_read_relocs_from_section.
794
d38eb334
DD
7952003-09-23 DJ Delorie <dj@redhat.com>
796
797 * elf32-sh.c (sh_elf_howto_table): R_SH_SWITCH8,
798 R_SH_GNU_VTINHERIT, R_SH_GNU_VTENTRY,
799 R_SH_LOOP_START,R_SH_LOOP_END moved to "reserved" spaces,
800 R_SH_DIR16, R_SH_DIR8, R_SH_DIR8UL, R_SH_DIR8UW, R_SH_DIR8U,
801 R_SH_DIR8SW, R_SH_DIR8S, R_SH_DIR4UL, R_SH_DIR4UW, R_SH_DIR4U,
802 R_SH_PSHA, R_SH_PSHL added.
803 (sh_reloc_map): Add R_SH_DIR16 and R_SH_DIR8.
804 (sh_elf_relocate_section): Support new relocs.
805
f0578e28
BW
8062003-09-23 Bob Wilson <bob.wilson@acm.org>
807
808 * elf32-xtensa.c (elf_xtensa_relocate_section): Fix typo that clobbered
809 dynamic relocation offsets.
810
62f3bb11 8112003-09-23 Alan Modra <amodra@bigpond.net.au>
010b84c1
AM
812
813 * simple.c (bfd_simple_get_relocated_section_contents): Free the
814 hash table using _bfd_generic_link_hash_table_free.
815
62f3bb11 8162003-09-23 Alan Modra <amodra@bigpond.net.au>
7dcb9820
AM
817
818 * elf-bfd.h (struct bfd_elf_special_section): Remove "suffix". Change
819 type of prefix_length and suffix_length to int. Rename "attributes"
820 to "attr". Comment.
821 (_bfd_elf_get_sec_type_attr): Update prototype.
822 * elf.c (get_special_section): Rewrite.
823 (_bfd_elf_get_sec_type_attr): Return struct rather than passing in
824 attr and type pointers.
825 (_bfd_elf_new_section_hook): Adjust for above.
826 (special_sections): Merge suffix with prefix. Set
827 prefix_length for all entries. Set suffix_length appropriately.
828 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
829 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
830 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
831 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
832 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
833 * elf32-v850.c (v850_elf_special_sections): Likewise.
834 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
835 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
836 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
837 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
838 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
839 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
840 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
841 * elf32-ppc.c (ppc_elf_special_sections): Likewise. Fix .plt flags.
842
61bcf373
DJ
8432003-09-21 Daniel Jacobowitz <drow@mvista.com>
844
845 * elf64-alpha.c (elf64_alpha_create_got_section): Initialize
846 ->got if the section already exists.
847
8bfd78b3
NS
8482003-09-19 Nathan Sidwell <nathan@codesourcery.com>
849
850 * dwarf2.c (decode_line_info): Cope with an initially empty
851 filename table.
852
6726e1ea
L
8532003-09-18 H.J. Lu <hongjiu.lu@intel.com>
854
855 * acinclude.m4: Include ../config/accross.m4.
856 * aclocal.m4: Regenerated.
857
858 * configure.host (HOST_64BIT_TYPE): Remove if it is set to long
859 or long long.
860 (HOST_U_64BIT_TYPE): Remove if it is set to unsigned long long.
861 (host64): Remove if HOST_64BIT_TYPE is set to long.
862
863 * configure.in (HOST_64BIT_TYPE): Set according to the size of
864 long and long long.
865 (HOST_U_64BIT_TYPE): Likewise.
866 (host64): Likewise.
867 * configure: Regenerated.
868
5de3bf90
AM
8692003-09-19 Alan Modra <amodra@bigpond.net.au>
870
871 * elf.c (elfcore_write_note): Don't use sizeof(Elf_External_note)
872 since some ABIs round up the size of the struct.
873
9e4d8df3
L
8742003-09-18 H.J. Lu <hongjiu.lu@intel.com>
875
876 * elflink.c (_bfd_elf_merge_symbol): Allow type change if
877 the old symbol is undefined and the new symbol is defined.
878
228ce064
AS
8792003-09-18 Andreas Schwab <schwab@suse.de>
880
881 * simple.c (bfd_simple_get_relocated_section_contents): Use
882 _bfd_generic_link_hash_table_create instead of
883 bfd_link_hash_table_create.
884
fdbdabdd
L
8852003-09-10 H.J. Lu <hongjiu.lu@intel.com>
886
887 * elfxx-ia64.c (elfNN_ia64_special_sections): Mark all sections
888 started with ".sbss" or "".sdata" as SHF_IA_64_SHORT.
889
a252afa4
DA
8902003-09-10 John David Anglin <dave.anglin@nrc-cnrc.nrc.ca>
891 Randolph Chung <randolph@tausq.org>
892
893 * elf32-hppa.c (struct elf32_hppa_link_hash_entry,
894 hppa_link_hash_newfunc, hppa_build_one_stub,
895 elf32_hppa_adjust_dynamic_symbol, mark_PIC_calls, allocate_plt_static,
896 allocate_dynrelocs, elf32_hppa_size_dynamic_sections,
897 elf32_hppa_finish_dynamic_symbol): Remove pic_call field and all code
898 for generating import stubs for calls to statically linked PIC
899 functions.
900 (hppa_type_of_stub): Don't generate an import stub for calls to
901 statically linked pic functions. Generate import stubs for calls
902 in a shared object, to functions not in a regular file, and to
903 defined weak functions. Add new argument INFO.
904 (hppa_build_one_stub): Don't undef ADDIL_DP.
905 (elf32_hppa_check_relocs): Don't set SEC_HAS_GOT_REF flag.
906 (elf32_hppa_size_stubs): Pass info to hppa_type_of_stub.
907 (final_link_relocate): Change all DLTIND relocs to DPREL relocs in a
908 non-shared link. Convert instructions that use the the linkage table
909 pointer, or a facsimile thereof, to use the global data pointer when
910 the reloc has been changed.
911
42acdc7c
JB
9122003-09-08 Joel Brobecker <brobecker@gnat.com>
913
914 * archures.c: Add new machine names for hppa.
915 * bfd-in2.h: Regenerate.
916 * cpu-hppa.c: Use the new machine names.
917
2a0e29b4
SC
9182003-09-06 Stephane Carrez <stcarrez@nerim.fr>
919
920 * elf32-m68hc1x.h (struct m68hc11_elf_link_hash_table): Remove
921 all_local_syms member.
922 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Use bfd_elf_get_elf_syms
923 to get the local symbols.
924
3f533aa9
SC
9252003-09-06 Stephane Carrez <stcarrez@nerim.fr>
926
927 * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
928 (elf_backend_special_sections): Define.a
929
930 PR savannah/4950:
931 * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
932 section is read-only.
933
8ad30312
NC
9342003-09-04 Nick Clifton <nickc@redhat.com>
935
936 * archures.c (bfd_mach_v850e1): Define.
937 * bfd-in2.h: Regenerate.
938 * cpu-v850.h (scan): Accept bfd_mach_v850e1.
939 (arch_info_struct): Include an entry for bfd_mach_v850e1.
940 * elf32-v850.c (v850_elf_object_p): Accept E_V850E1_ARCH flag.
941 (v850_elf_final_write_processing): Accept bfd_mach_v850e1.
942 (v850_elf_print_private_bfd_data): Interpret E_V850E1_ARCH flag.
943 (v850_elf_merge_private_bfd_data): Allow v850e1 binaries to be
944 linked with v850e binaries. Mark the output as v850e.
5de3bf90 945
3922a8c1
NC
9462003-09-03 Nick Clifton <nickc@redhat.com>
947
5de3bf90 948 * cofflink.c (_bfd_coff_link_input_bfd): Do not skip section
3922a8c1
NC
949 symbols that are used in relocs.
950
13dfd2d0
NC
9512003-08-30 Robert Millan <robertmh@gnu.org>
952
953 * configure.in: Match GNU/KFreeBSD with new kfreebsd*-gnu triplet.
954 * config.bfd: Likewise.
955 * configure: Regenerate.
956
1c0881dd
CG
9572003-08-31 Christian Groessler <chris@groessler.org>
958
959 * elf32-i860.c (i860_howto_pc26_reloc): Finish relocation here
960 instead of returning bfd_reloc_continue.
961
ac0e732e
AJ
9622003-08-31 Andreas Jaeger <aj@suse.de>
963
964 * merge.c: Update to ISO C90.
965
ec317fb1
ILT
9662003-08-27 Ian Lance Taylor <ian@airs.com>
967
49c97a80
ILT
968 * configure.in: Check for strtoull.
969 * bfd.c (bfd_scan_vma): Use strtoull when available.
970 * configure, config.in: Regenerate.
971
ec317fb1
ILT
972 * configure.in: Define and substitute BFD_HOST_LONG_LONG.
973 * bfd-in.h: Define BFD_HOST_LONG_LONG. Test it rather than
974 __GNUC__ when deciding whether to use long long for
975 BFD_HOST_64_BIT.
976 * configure, Makefile.in, doc/Makefile.in, bfd-in2.h: Regenerate.
977
d539b3aa
CG
9782003-08-27 Christian Groessler <chris@groessler.org>
979
980 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
981 i860_howto_splitn_reloc, i860_howto_highadj_reloc): New
982 functions.
983 (elf32_i860_howto_table): Insert the new functions as
984 'special_function's in the proper reloc type entries.
985
73052b5e
RS
9862003-08-27 Richard Sandiford <rsandifo@redhat.com>
987
988 * elf32-frv.c (elf32_frv_relocate_section): Use
989 _bfd_elf_rela_local_sym.
990
2c848f79
MS
9912003-08-26 Michael Snyder <msnyder@redhat.com>
992
993 * cpu-frv.c: Remove unused enum.
994
980491e6
MR
9952003-08-25 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
996
997 * reloc.c: Fix documentation for MIPS ELF relocations.
998 libbfd.h: Regenerate.
999 bfd-in2.h: Regenerate.
1000
6d1227b8
JE
10012003-08-24 Jason Eckhardt <jle@rice.edu>
1002
5de3bf90 1003 * coff-i860.c (CALC_ADDEND): Define to be a no-op.
6d1227b8 1004
f680ea79
JE
10052003-08-24 Jason Eckhardt <jle@rice.edu>
1006
1007 * elf32-i860.c (elf32_i860_relocate_pc16): Subtract 4 and
1008 shift by 2 before storing the relocated value.
1009
c28b1c28
JE
10102003-08-23 Jason Eckhardt <jle@rice.edu>
1011
5de3bf90 1012 * coff-i860.c (coff_i860_reloc_nyi): New function.
c28b1c28
JE
1013 (howto_table): Add entries for relocations PAIR, HIGHADJ, HIGH,
1014 LOWn, SPLITn, and BRADDR.
1015 (RTYPE2HOWTO): Check that the r_type is within the howto_table
1016 before trying to access the entry.
1017 (coff_i860_rtype_to_howto): Likewise.
1018 (coff_i860_reloc_type_lookup): New function.
1019 (i860_reloc_processing): New function.
1020 (coff_bfd_reloc_type_lookup): Define macro.
1021 (RELOC_PROCESSING): Define macro.
1022 Minor formatting adjustments.
1023
40a0491a
AM
10242003-08-23 Alan Modra <amodra@bigpond.net.au>
1025
1026 * elflink.h (elf_link_add_object_symbols): Don't crash on NULL owner.
1027
69bbc4c0
L
10282003-08-22 H.J. Lu <hongjiu.lu@intel.com>
1029
1030 * elfxx-ia64.c (elfNN_ia64_create_dynamic_sections): Align the
1031 .got section at 8 bytes.
1032
8b956130
NC
10332003-08-21 Nick Clifton <nickc@redhat.com>
1034
85db1db4 1035 * cofflink.c: Update to ISO C90 and tidy up formatting.
8b956130 1036
6c21aa76
NC
10372003-08-21 Randolph Chung <tausq@debian.org>
1038
1039 * elf32-hppa.c (elf32_hppa_object_p): For elf32-hppa-linux, objects
1040 can have OSABI=Linux or OSABI=SysV. Check for both.
1041 * elf64-hppa.c (elf64_hppa_object_p): Likewise.
1042
3673a93e
NC
10432003-08-21 Nick Clifton <nickc@redhat.com>
1044
1045 * po/sv.po: Updated Swedish translation.
1046
427b80f4
RS
10472003-08-20 Richard Sandiford <rsandifo@redhat.com>
1048
1049 * elf64-mips.c (elf_backend_copy_indirect_symbol): Define.
1050
560e09e9
NC
10512003-08-20 Nick Clifton <nickc@redhat.com>
1052
1053 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): New macro used to
1054 replace some duplicated code in most elfxx-xxxx.c files. This
1055 version uses the new fields in bfd_link_info.
1056
40a0491a
AM
1057 * elf-m10300.c (mn10300_elf_relocate_section): Use new macro.
1058 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
1059 * elf32-cris.c (cris_elf_relocate_section): Likewise.
560e09e9
NC
1060 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
1061 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1062 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
1063 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
1064 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
1065 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1066 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1067 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1068 * elf32-vax.c (elf_vax_relocate_section): Likewise.
1069 * elf32-xtensa.c (elf_xtensa_relocate_section): Likewise.
1070 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1071 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1072 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1073 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1074 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1075 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
40a0491a
AM
1076
1077 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols,
560e09e9
NC
1078 elf_hppa_remark_useless_dynamic_symbols,
1079 elf_hppa_relocate_section): Use the new fields in
1080 bfd_link_info structure.
1081 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1082 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
1083 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
1084 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
1085 * elfxx-ia64.c (elfNN_ia64_check_relocs): Likewise.
1086 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
1087
1088 * elflink.h (elf_link_output_extsym): Fix test for reporting
40a0491a
AM
1089 undefined symbols in shared libraries. Remove redundant test
1090 of shlib_undefined when reporting references to forced local
1091 symbols.
560e09e9 1092
4091ea4e
L
10932003-08-18 Andreas Schwab <schwab@suse.de>
1094
1095 * libpei.h (bfd_pe_executable_p): Also recognize efi-app
1096 executables.
1097
b0cdc7bc
HPN
10982003-08-17 Hans-Peter Nilsson <hp@bitrange.com>
1099
1100 * simple.c (bfd_simple_get_relocated_section_contents): Move
1101 reloc_done hack to before first bfd_section_size call. Change all
1102 returns to use new wrapper macro RETURN, restoring sec->reloc_done.
1103
c1993d04
AM
11042003-08-16 Alan Modra <amodra@bigpond.net.au>
1105
1106 * elf64-ppc.c: Don't include elf/ppc.h.
1107
792b4a53
RS
11082003-08-14 Richard Sandiford <rsandifo@redhat.com>
1109
1110 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Fix PT_DYNAMIC
1111 code to work with 64-bit bfds.
1112
fdc09da8
AM
11132003-08-14 Alan Modra <amodra@bigpond.net.au>
1114
1115 * dep-in.sed: Remove libintl.h.
1116 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Unset LC_COLLATE.
1117 (POTFILES.in): Remove target.
1118 * Makefile.in: Regenerate.
1119
ee87f2da
AM
11202003-08-12 Alan Modra <amodra@bigpond.net.au>
1121
1122 * elf64-ppc.c (ppc64_elf_next_input_section): Update comment.
1123 (ppc64_elf_relocate_section): For zero sym R_PPC64_TOC relocs,
1124 use the function sym from the previous reloc.
1125
15f40dfc
JJ
11262003-08-11 Jakub Jelinek <jakub@redhat.com>
1127
1128 * elf32-i386.c (elf_i386_relocate_section): Make undefined symbols
1129 fatal if -pie.
1130 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1131 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1132 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1133 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1134 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1135 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1136 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1137 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
1138 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1139 (ppc_elf_relocate_section) <case R_PPC_RELAX32>: Issue fatal error
1140 on undefined symbols if -pie.
1141 * elf32-sh.c (sh_elf_relocate_section): Likewise.
1142
6ab189d5
AM
11432003-08-11 Alan Modra <amodra@bigpond.net.au>
1144
1145 * elf64-ppc.c (ppc64_elf_relocate_section): Add special case for crt1.o
1146 branch to __libc_start_main.
1147
3b260895
NC
11482003-08-08 Dmitry Diky <diwil@mail.ru>
1149
6ab189d5
AM
1150 * archures.c: Add xW42 and xE42 parts. Sort MPU list according to
1151 gcc order.
3b260895
NC
1152 * cpu-msp430.c: Likewise.
1153 * elf32-msp430.c: Likewise.
1154 * bfd-in2.h: Regenerate.
1155
c39a58e6
AM
11562003-08-07 Alan Modra <amodra@bigpond.net.au>
1157
9c5bfbb7
AM
1158 * elfxx-target.h: Remove PTR cast.
1159 * targets.c (bfd_target): Make backend_data const void *.
1160 * elf-bfd.h: Constify all occurrences of struct elf_backend_data.
1161 * elf-m10300.c: Likewise.
1162 * elf.c: Likewise.
1163 * elf32-hppa.c: Likewise.
1164 * elf32-i386.c: Likewise.
1165 * elf32-m68hc1x.c: Likewise.
1166 * elf32-ppc.c: Likewise.
1167 * elf32-s390.c: Likewise.
1168 * elf32-sh.c: Likewise.
1169 * elf32-sh64.c: Likewise.
1170 * elf32-sparc.c: Likewise.
1171 * elf32-xtensa.c: Likewise.
1172 * elf64-mips.c: Likewise.
1173 * elf64-ppc.c: Likewise.
1174 * elf64-s390.c: Likewise.
1175 * elf64-sh64.c: Likewise.
1176 * elf64-sparc.c: Likewise.
1177 * elf64-x86-64.c: Likewise.
1178 * elfcode.h: Likewise.
1179 * elfcore.h: Likewise.
1180 * elflink.c: Likewise.
1181 * elflink.h: Likewise.
1182 * elfxx-ia64.c: Likewise.
1183 * elfxx-mips.c: Likewise.
1184 * elfxx-mips.h: Likewise.
1185 * elf.c (prep_headers): Remove useless check for null backend_data.
1186 * bfd-in2.h: Regenerate.
1187
c39a58e6
AM
1188 * elf-bfd.h: Remove PARAMS macro. Replace PTR with void *.
1189 (NAME): Use ## rather than CONCAT4 macro.
1190 * elfcode.h: Remove one remaining PARAMS macro.
1191 * elf-eh-frame.c: Convert to C90, remove unneeded casts and prototypes.
1192 * elf-strtab.c: Likewise.
1193 * elf-hppa.h: Likewise.
1194 * elf32-hppa.h: Likewise.
1195 * elf32-hppa.c: Likewise.
1196 (elf32_hppa_add_symbol_hook): Delete.
1197 (elf_backend_add_symbol_hook): Don't define.
1198 * libhppa.h: Convert to C90. Replace INLINE with inline.
1199
97b639ba
AM
12002003-08-06 Alan Modra <amodra@bigpond.net.au>
1201
1202 * elf64-ppc.c (ppc_stub_name): Tweak names for better readability.
1203 (ppc64_elf_adjust_dynamic_symbol): Allow copy relocs against
1204 function descriptors, but warn.
1205 (ppc_build_one_stub): Remove a couple of vars. Move code creating
1206 stub syms so that we can avoid a stub sym if we already have a
1207 plt sym. Do not redefine an existing symbol.
1208 (ppc64_elf_build_stubs): When --emit-stub-syms, print a symbol for
1209 glink.
1210
9e7d479d
NC
12112003-08-06 Nick Clifton <nickc@redhat.com>
1212
1213 * po/fr.po: Updated French translation.
1214
77f3d027
AM
12152003-08-06 Alan Modra <amodra@bigpond.net.au>
1216
1217 * elflink.c (_bfd_elf_create_dynamic_sections): Mark .dynbss with
1218 SEC_LINKER_CREATED.
1219
50d6c878
DJ
12202003-08-05 Daniel Jacobowitz <drow@mvista.com>
1221
1222 * elf32-arm.h (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
1223 (elf32_arm_final_link_relocate, elf32_arm_relocate_section): Use it.
1224
14abcef9
NC
12252003-08-03 Jeff Muizelaar <muizelaar@rogers.com>
1226
4a21a492 1227 * coffcode.h (coff_slurp_line_table): Return with a warning
14abcef9
NC
1228 message if the line number table could not be read.
1229
8c675694
NC
12302003-08-04 Nick Clifton <nickc@redhat.com>
1231
1232 * elflink.h (elf_link_add_object_symbols): Prepend "warning: "
1233 to messages produced for .gnu.warning.SYMBOL sections.
1234
268b6b39
AM
12352003-08-04 Alan Modra <amodra@bigpond.net.au>
1236
1237 * elfcode.h: Convert to C90, remove unneeded casts and prototypes.
1238 * elfcore.h: Likewise.
1239 * elflink.c: Likewise.
1240 * elflink.h: Likewise.
1241 * elf.c (sym_is_global): Remove INLINE.
1242 (align_file_position): Replace INLINE with inline.
1243 * elfcode.h (elf_swap_dyn_in, elf_swap_dyn_out): Remove INLINE.
1244 (elf_file_p): Replace INLINE with inline.
1245
866f48b7
KK
12462003-08-02 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1247
1248 * elf32-sh.c (sh_elf_check_relocs): Don't set DF_TEXTREL here.
1249
8651fcf9
L
12502003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1251
1252 * elfxx-ia64.c (get_got): Align the .got section at 8 bytes.
1253
37cd2629
L
12542003-08-01 H.J. Lu <hongjiu.lu@intel.com>
1255
1256 * elfxx-ia64.c (elfNN_ia64_finish_dynamic_symbol): Use
1257 ElfNN_External_Rela instead of Elf64_External_Rela.
1258
91fb2a9d
NC
12592003-08-01 Nick Clifton <nickc@redhat.com>
1260
1261 * config.bfd: Add code to catch obsolete configurations and warn
1262 about them unless --enable-obsolete is used. Use this to mark
1263 vax-vms port as obsolete.
1264
e656e369
AM
12652003-07-30 Alan Modra <amodra@bigpond.net.au>
1266
1267 * elf32-ppc.c (ppc_elf_install_value): Tidy.
1268 (ppc_elf_relax_section): Remove dead code. Remove unnecessary casts.
1269 Formatting.
1270 * elfxx-target.h: Remove PARAMS macro. Formatting.
1271
50bc7936
AM
12722003-07-30 Alan Modra <amodra@bigpond.net.au>
1273
1274 * elf.c (bfd_section_from_r_symndx): Test for SHN_UNDEF.
1275 * elf64-ppc.c (get_fdh): New function, split out from
1276 ppc64_elf_edit_opd.
1277 (ppc64_elf_check_relocs): Use get_fdh.
1278 (func_desc_adjust): Likewise. Tidy.
1279 (ppc64_elf_edit_opd): Tighten reloc checks. Free local_syms on error
1280 exit. Use get_fdh. Account for superfluous dynamic relocs.
1281 (ppc64_elf_relocate_section): Warning fix.
1282
a62d170c
JE
12832003-07-30 Jason Eckhardt <jle@rice.edu>
1284
1285 * coff-i860.c: Convert to ISO C90. Remove superflous prototypes.
1286
7734b6e9
JE
12872003-07-30 Jason Eckhardt <jle@rice.edu>
1288
1289 * elf32-i860.c: Convert to ISO C90. Remove superflous prototypes.
1290
37f4508b
AM
12912003-07-30 Randolph Chung <tausq@debian.org>
1292
1293 * elf-hppa.h (elf_hppa_relocate_section): Look up dyn_h for undefweak.
1294 * elf64-hppa.c (elf64_hppa_finalize_dlt): Check h->root.type.
1295
217aa764
AM
12962003-07-30 Alan Modra <amodra@bigpond.net.au>
1297
1298 * elf.c: Convert to C90, remove unnecessary prototypes and casts.
1299 Replace PTR with void *. Formatting.
1300 (_bfd_elf_assign_file_position_for_section): Remove INLINE.
1301 (make_mapping): Likewise.
1302
494dac0c
AM
13032003-07-29 Alan Modra <amodra@bigpond.net.au>
1304
1305 * elf64-ppc.c (func_desc_adjust): Give linker created function
1306 descriptor symbols a size and type.
1307 (ppc64_elf_relocate_section): Correct lq insn test.
1308
deaaf2f3
EC
13092003-07-28 Eric Christopher <echristo@redhat.com>
1310
1311 * elf32-ppc.c (R_PPC_RELAX32): New relocation.
1312 (ppc_elf_install_value): New function.
1313 (ppc_elf_sort_rela): Remove.
1314 (ppc_elf_relax_section): Rewrite. Remove old relaxation
1315 and replace with out of range branch stubs.
1316 (ppc_elf_relocate_section): Handle R_PPC_RELAX32.
1317
709e685d
AO
13182003-07-29 Alexandre Oliva <aoliva@redhat.com>
1319
1320 * elf-m10300.c (mn10300_elf_relax_section): Take symbol hash table
1321 from input_bfd.
1322
36c506c5
AM
13232003-07-28 Alan Modra <amodra@bigpond.net.au>
1324
1325 * elf.c (special_sections): Set attributes for .got and .plt.
1326
5d35169e
AM
13272003-07-27 Alan Modra <amodra@bigpond.net.au>
1328
1329 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Ensure no copy relocs
1330 on function descriptors.
1331 (ELIMINATE_COPY_RELOCS): Expand comment.
1332 (ppc64_elf_special_sections): Move. Don't include non-ppc64 sections.
1333 Do include ".toc1".
1334
3cddba1e
L
13352003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1336
1337 * elf.c (_bfd_elf_new_section_hook): Set the default section
1338 type to SHT_NULL.
1339 (elf_fake_sections): Set the section type based on asect->flags
1340 if it is SHT_NULL. Don't abort on processor specific section
1341 types.
1342
d622ef4b
L
13432003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1344
1345 * bfd-in2.h: Regenerated.
1346
2f89ff8d
L
13472003-07-25 H.J. Lu <hongjiu.lu@intel.com>
1348
1349 * elf-bfd.h (bfd_elf_special_section): New.
1350 (elf_backend_data): Add special_sections, a pointer to
1351 bfd_elf_special_section.
1352 (elf_section_type). New.
1353 (elf_section_flags): New.
1354 (_bfd_elf_get_sec_type_attr): New.
1355
1356 * elf.c (_bfd_elf_make_section_from_shdr): Always use the
1357 real section type/flags.
1358 (special_sections): New.
1359 (get_special_section): New.
1360 (_bfd_elf_get_sec_type_attr): New.
1361 (_bfd_elf_new_section_hook): Check special_section to set
1362 elf_section_type and elf_section_flags.
1363 (elf_fake_sections): Don't use section name to set ELF section
1364 data.
1365
1366 * elf32-m32r.c (m32r_elf_special_sections): New.
1367 (elf_backend_special_sections): Defined.
1368
1369 * elf32-m68hc11.c (elf32_m68hc11_special_sections): New.
1370 (elf_backend_special_sections): Defined.
1371
1372 * elf32-mcore.c (mcore_elf_special_sections): New.
1373 (elf_backend_special_sections): Defined.
1374
1375 * elf32-ppc.c (ppc_elf_special_sections): New.
1376 (elf_backend_special_sections): Defined.
1377
1378 * elf32-sh64.c (sh64_elf_special_sections): New.
1379 (elf_backend_special_sections): Defined.
1380
1381 * elf32-v850.c (v850_elf_special_sections): New.
1382 (elf_backend_special_sections): Defined.
1383
1384 * elf32-xtensa.c (elf_xtensa_special_sections): New.
1385 (elf_backend_special_sections): Defined.
1386
1387 * elf64-alpha.c (elf64_alpha_special_sections): New.
1388 (elf_backend_special_sections): Defined.
1389
1390 * elf64-hppa.c (elf64_hppa_special_sections): New.
1391 (elf_backend_special_sections): Defined.
1392
1393 * elf64-ppc.c (ppc64_elf_special_sections): New.
1394 (elf_backend_special_sections): Defined.
1395
1396 * elf64-sh64.c (sh64_elf64_special_sections): New.
1397 (elf_backend_special_sections): Defined.
1398
1399 * elfxx-ia64.c (elfNN_ia64_special_sections): New.
1400 (elf_backend_special_sections): Defined.
1401
1402 * elfxx-mips.c (_bfd_mips_elf_special_sections): New.
1403
1404 * elfxx-mips.h (_bfd_mips_elf_special_sections): New.
1405 (elf_backend_special_sections): Defined.
1406
1407 * elfxx-target.h (elf_backend_special_sections): New. Default
1408 to NULL.
1409 (elfNN_bed): Initialize special_sections.
1410
1411 * section.c (bfd_abs_section): Remove const.
1412 (bfd_und_section): Likewise.
1413 (bfd_com_section): Likewise.
1414 (bfd_ind_section): Likewise.
1415
20650579
NC
14162003-07-24 Nick Clifton <nickc@redhat.com>
1417
1418 * coff-arm.c (EXTRA_S_FLAGS): Include SEC_CODE so that code
1419 sections are assigned the LOAD attribute.
1420
deaaf2f3 14212003-07-25 Kaz Kojima <kkojima@rr.iij4u.or.jp>
09fd220b
KK
1422
1423 * elf32-sh.c: Convert to C90. Replace PTR with void *.
1424 * elf32-sh64-com.c: Likewise.
1425 * elf32-sh64.c: Likewise.
1426 * elf32-sh64.h: Likewise.
1427 * elf64-sh64.c: Likewise.
1428
3d85aebe
KK
14292003-07-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1430
1431 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
1432 (allocate_dynrelocs): Likewise.
1433 (sh_elf_relocate_section): Likewise. Use SYMBOL_REFERENCES_LOCAL.
1434 (sh_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
1435
834d807b
NC
14362003-07-24 Nick Clifton <nickc@redhat.com>
1437
1438 * po/fr.po: Updated French translation.
1439
571b5725
BW
14402003-07-23 Bob Wilson <bob.wilson@acm.org>
1441
1442 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Make inline and move
1443 near the beginning of the file. Swap order of arguments. Call
1444 _bfd_elf_dynamic_symbol_p with "ignore_protected" set to 0.
1445 (elf_xtensa_fix_refcounts): Adjust xtensa_elf_dynamic_symbol_p call.
1446 (elf_xtensa_relocate_section): Likewise.
1447 (shrink_dynamic_reloc_sections): Likewise.
1448
b536dc1e
BW
14492003-07-23 Bob Wilson <bob.wilson@acm.org>
1450
1451 * elf32-xtensa.c (plt_reloc_count): Fix typo in comment.
1452 (elf_xtensa_size_dynamic_sections): Use elf_discarded_section.
1453 (elf_xtensa_combine_prop_entries): Avoid returning non-zero without
1454 first printing an error message.
1455 (elf_xtensa_finish_dynamic_sections): Likewise.
1456 (elf_xtensa_discard_info_for_section): Adjust size of .got.loc when
1457 discarding literal table entries.
1458 (elf_xtensa_merge_private_bfd_data): Remove newline from error message.
1459 (elf_xtensa_do_asm_simplify): Likewise.
1460
7f888330
SC
14612003-07-23 Stephane Carrez <stcarrez@nerim.fr>
1462
1463 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Avoid crash when
1464 we have a local symbol in common section.
1465
ecc27c31
L
14662003-07-22 H.J. Lu <hongjiu.lu@intel.com>
1467
1468 * elflink.c (_bfd_elf_dynamic_symbol_p): Don't return TRUE for
1469 weak symbols.
1470
f9f3cf65
NC
14712003-07-22 Nick Clifton <nickc@redhat.com>
1472
1473 * coffcode.h (coff_slurp_symbol_table): Add C_TCSYM and C_ECOML to
1474 expected RS6000 storage classes.
1475
bb32e54f
L
14762003-07-21 H.J. Lu <hongjiu.lu@intel.com>
1477
1478 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Mark
1479 output_bfd unused to silence gcc.
1480
796f2a93
NC
14812003-07-21 Nick Clifton <nickc@redhat.com>
1482
1483 * po/sv.po: Updated Swedish translation.
1484
f6c52c13
AM
14852003-07-21 Alan Modra <amodra@bigpond.net.au>
1486
1487 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use..
1488 (_bfd_elf_symbol_refs_local_p): ..this. Declare.
1489 * elflink.c (_bfd_elf_symbol_refs_local_p): New function.
1490 * elf32-i386.c (elf_i386_relocate_section): Remove h NULL test
1491 now done in _bfd_elf_symbol_refs_local_p.
1492 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1493 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1494 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1495
aa37626c
L
14962003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1497
1498 * elflink.c (_bfd_elf_dynamic_symbol_p): Undo the last change.
1499
1e364ec9
L
15002003-07-18 H.J. Lu <hongjiu.lu@intel.com>
1501
1502 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL): Fix a typo.
1503 (SYMBOL_CALLS_LOCAL): Likewise.
1504
1505 * elflink.c (_bfd_elf_dynamic_symbol_p): Return TRUE
1506 immediately if symbol isn't defined locally.
1507
986a241f
RH
15082003-07-18 Richard Henderson <rth@redhat.com>
1509
1510 * elflink.c (_bfd_elf_dynamic_symbol_p): New.
1511 * elf-bfd.h (_bfd_elf_dynamic_symbol_p): Declare it.
1512 (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Use it.
1513 * elf32-xtensa.c (xtensa_elf_dynamic_symbol_p): Likewise.
1514 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
1515 * elf64-hppa.c (elf64_hppa_dynamic_symbol_p): Likewise.
1516 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Likewise.
1517 Update all callers to provide the relocation being resolved.
1518
ac4b3dd8
NC
15192003-07-17 Shaun Jackman <sjackman@pathwayconnect.com>
1520
1521 * config.bfd (arm-wince-pe): Add -DARM_COFF_BUGFIX to
1522 targ_cflags.
1523
6c37ac4d
NC
15242003-07-17 Nick Clifton <nickc@redhat.com>
1525
1526 * po/es.po: New Spanish translation.
1527 * po/sv.po: New Swedish translation.
1528 * po/opcodes.pot: Regenerate.
1529
02e6ad56
RH
15302003-07-16 Richard Henderson <rth@redhat.com>
1531
1532 * config.bfd, configure.host, configure.in: Remove ia64-aix support.
1533 * elfxx-ia64.c, targets.c: Likewise.
1534
5686517c
RH
15352003-07-16 Richard Henderson <rth@redhat.com>
1536
1537 * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Properly return false
1538 for symbols defined locally plus -Bsymbolic. Tidy logic.
1539
5a7ea749
RS
15402003-07-15 Richard Sandiford <rsandifo@redhat.com>
1541
1542 * archures.c (bfd_mach_mips7000): New.
1543 * bfd-in2.h: Regenerated.
1544 * cpu-mips.c (arch_info_struct): Add an entry for mips:7000.
1545 * elfxx-mips.c (mips_set_isa_flags): Handle bfd_mach_mips7000.
1546 (mips_mach_extensions): Add an entry for it.
1547
76bff705
NC
15482003-07-14 Nick Clifton <nickc@redhat.com>
1549
1550 * po/tr.po: Update with latest version.
1551 * po/SRC-POTFILES.in: Regenerate.
1552 * po/bfd.pot: Regenerate.
1553 * Makfile.in: Regenerate.
1554 * configure: Regenerate.
1555
d0facd1b
NC
15562003-07-12 Jeff Baker <jbaker@qnx.com>
1557
1558 * bfd/config.bfd (__QNXTARGET__): Define for Neutrino architectures.
1559 * bfd/elf32-arm.h (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1560 * bfd/elf32-sh.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1561 * bfd/elf32-ppc.c (ELF_MAXPAGESIZE): Set to 4k for Neutrino.
1562
bcb9b88d
NC
15632003-07-12 Jeff Muizelaar <muizelaar@rogers.com>
1564
1565 * coffcode.h (coff_set_section_contents): Set the
1566 IMAGE_FILE_32BIT_MACHINE flag for PE targets.
1567
7a9823f1
RS
15682003-07-11 Richard Sandiford <rsandifo@redhat.com>
1569
1570 * bfd-in.h (bfd_h8300_pad_address): Declare.
1571 * bfd-in2.h: Regenerate.
1572 * cpu-h8300.c (bfd_h8300_pad_address): New function.
1573 * coff-h8300.c (h8300_reloc16_estimate): Use it to canonicalize
1574 addresses before checking whether they can be relaxed.
1575 (h8300_reloc16_extra_cases): Likewise for the R_MOVL2 sanity check.
1576 Don't complain about overflows in general 8-bit relocations.
1577 * elf32-h8300.c (elf32_h8_relax_section): Use bfd_h8300_pad_address.
1578 Fix handling of R_H8_DIR24A8.
1579
c6baf75e
RS
15802003-07-11 Richard Sandiford <rsandifo@redhat.com>
1581
1582 * elf32-h8300.c: Convert function prototypes and definitions
1583 to C90 syntax.
1584 * coff-h8300.c: Likewise.
1585 * cpu-h8300.c: Likewise.
1586
fce00800
AM
15872003-07-11 Alan Modra <amodra@bigpond.net.au>
1588
1589 * po/SRC-POTFILES.in: Regenerate.
1590 * po/bfd.pot: Likewise.
1591
e901de89
BW
15922003-07-10 Bob Wilson <bob.wilson@acm.org>
1593
1594 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Create new
1595 .got.loc section. Do not set SEC_ALLOC or SEC_LOAD flags for the
1596 .xt.lit.plt section.
1597 (elf_xtensa_size_dynamic_sections): Set size of the .got.loc section
1598 and allocate memory for it.
1599 (elf_xtensa_combine_prop_entries): Copy contents of .xt.lit output
1600 section to the .got.loc section.
1601 (elf_xtensa_finish_dynamic_sections): Fix up call to
1602 elf_xtensa_combine_prop_entries and set DT_XTENSA_GOT_LOC_OFF to
1603 the address of .got.loc.
1604 (relax_property_section): Shrink .got.loc to match changes in any
1605 literal table section.
1606 (xtensa_is_property_section): Change to match
1607 xtensa_get_property_section_name.
1608 (xtensa_is_littable_section): New.
1609
eff26f78
L
16102003-07-10 H.J. Lu <hongjiu.lu@intel.com>
1611
1612 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1 instead of
1613 -1LL.
1614
942e0f42
AM
16152003-07-10 Alan Modra <amodra@bigpond.net.au>
1616
1617 * Makefile.am (BFD32_BACKENDS): Add elf32-am33lin.lo.
1618 (BFD32_BACKENDS_CFILES): elf32-am33lin.c not elf32-am33lin.lo.
1619 Run "make dep-am".
1620 * Makefile.in: Regenerate.
1621
73c3cd1c
AO
16222003-07-10 Alexandre Oliva <aoliva@redhat.com>
1623
1624 2001-09-12 Alexandre Oliva <aoliva@redhat.com>
1625 * elf32-am33lin.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
1626 (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
1627 2001-06-02 Nick Clifton <nickc@cambridge.redhat.com>
1628 * elf32-am33lin.c: Rename global functions.
1629 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
1630 * config.bfd (am33_2.0, am33_2.0-*-linux*): Added.
1631 * configure.in (bfd_elf32_am33lin_vec): Added.
1632 * Makefile.am (BFD32_BACKENDS): Added elf32-am33lin.lo.
1633 (elf32-am33lin.lo): List dependencies.
1634 * aclocal.m4, configure, Makefile.in: Rebuilt.
1635 * elf-m10300.c (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME,
1636 ELF_ARCH, ELF_MACHINE_CODE, ELF_MAXPAGESIZE): Define only if
1637 ELF_ARCH was not defined before.
1638 (elf_symbol_leading_char): Define if not defined.
1639 * elf32-am33lin.c: Override the definitions above.
1640 * targets.c (bfd_elf32_am33lin_vec): New.
1641
03a12831
AO
16422003-07-09 Alexandre Oliva <aoliva@redhat.com>
1643
1644 2002-12-12 Alexandre Oliva <aoliva@redhat.com>
1645 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Initialize
1646 pcrel_relocs_copied.
1647 2001-12-13 Alexandre Oliva <aoliva@redhat.com>
1648 * elf-m10300.c (ELF_DYNAMIC_INTERPRETER): Renamed from
1649 ld-linux.so.2 to ld.so.1.
1650 2001-10-10 Alexandre Oliva <aoliva@redhat.com>
1651 * elf-m10300.c (elf_mn10300_sizeof_plt0): New macro.
1652 (_bfd_mn10300_elf_adjust_dynamic_symbol): Use it.
1653 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1654 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Allocate
1655 .rela.* section contents with bfd_zalloc.
1656 2001-09-25 Alexandre Oliva <aoliva@redhat.com>
1657 * elf-m10300.c: Added declarations for functions missing them.
1658 Merge some shared-library changes from the i386 back-end. Use
1659 R_MN10300_RELATIVE instead of R_MN10300_PCREL32 and
1660 R_MN10300_GLOB_DAT instead of R_MN10300_32 where appropriate.
1661 (struct elf32_mn10300_link_hash_entry): Remove duplicates of
1662 members of elf_link_hash_entry. Adjusted references.
1663 (mn10300_elf_final_link_relocate): dynobj was already loaded
1664 into a local variable, use it.
1665 2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
1666 * elf-m10300.c: Add missing function prototypes.
1667 2001-08-24 Alexandre Oliva <aoliva@redhat.com>
1668 * elf-m10300.c (mn10300_elf_relocate_section): Don't compute
1669 relocation for dynamic relocations.
1670 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
1671 * reloc.c (BFD_RELOC_MN10300_GOTOFF24): New.
1672 * elf-m10300.c: Introduce GOTPC16, GOTOFF24, GOTOFF16 and
1673 PLT16, and rename GOTPC to GOTPC32 and GOTOFF to GOTOFF32.
1674 (_bfd_mn10300_elf_create_dynamic_sections): Move creation ot PLT...
1675 (_bfd_mn10300_elf_create_got_section): ... here, so that its
1676 adress is already known at the time we compute relaxations.
1677 (mn10300_elf_relax_section): Relax GOTPC32, GOTOFF32, GOT32
1678 and PLT32 to narrower relocations.
1679 * libbfd.h, bfd-in2.h: Rebuilt.
1680 2001-04-12 Alexandre Oliva <aoliva@redhat.com>
1681 * reloc.c (BFD_RELOC_MN10300_GOT32, BFD_RELOC_MN10300_GOT24,
1682 BFD_RELOC_MN10300_GOT16, BFD_RELOC_MN10300_COPY,
1683 BFD_RELOC_MN10300_GLOB_DAT, BFD_RELOC_MN10300_JMP_SLOT,
1684 BFD_RELOC_MN10300_RELATIVE): New relocs.
1685 * libbfd.h, bfd-in2.h: Rebuilt.
1686 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): New.
1687 (struct elf32_mn10300_link_hash_entry): Added DSO-related
1688 fields.
1689 (elf_mn10300_howto): Defined new relocation types.
1690 (mn10300_reloc_map): Map them.
1691 (_bfd_mn10300_elf_create_got_section): New fn.
1692 (mn10300_elf_check_relocs): Handle PIC relocs.
1693 (mn10300_elf_final_link_relocate): Likewise.
1694 (mn10300_elf_relocate_section): Handle DSOs.
1695 (PLT0_ENTRY_SIZE, PLT_ENTRY_SIZE, PIC_PLT_ENTRY_SIZE): New macros.
1696 (elf_mn10300_plt0_entry, elf_mn10300_plt_entry,
1697 elf_mn10300_pic_plt_entry): New.
1698 (elf_mn10300_sizeof_plt, elf_mn10300_plt_plt0_offset,
1699 elf_mn10300_plt0_linker_offset, elf_mn10300_plt0_gotid_offset,
1700 elf_mn10300_plt_temp_offset, elf_mn10300_plt_symbol_offset,
1701 elf_mn10300_plt_reloc_offset: New macros.
1702 (ELF_DYNAMIC_INTERPRETER): Likewise.
1703 (_bfd_mn10300_elf_create_dynamic_sections): New function.
1704 (_bfd_mn10300_elf_adjust_dynamic_symbol): Likewise.
1705 (_bfd_mn10300_elf_discard_copies): Likewise.
1706 (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
1707 (_bfd_mn10300_elf_finish_dynamic_symbol): Likewise.
1708 (_bfd_mn10300_elf_finish_dynamic_sections): Likewise.
1709 (elf_backend_can_gc_sections,
1710 elf_backend_create_dynamic_sections,
1711 elf_backend_adjust_dynamic_sections,
1712 elf_backend_size_dynamic_sections,
1713 elf_backend_finish_dynamic_symbol,
1714 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
1715 elf_backend_plt_readonly, elf_backend_want_plt_sym,
1716 elf_backend_got_header_size, elf_backend_plt_header_size): New
1717 macros.
1718
b08fa4d3
AO
17192003-07-09 Alexandre Oliva <aoliva@redhat.com>
1720
1721 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
1722 * elf-m10300.c (compute_function_info): Account for AM33
1723 registers in `movm' when computing stack space for `call' when
1724 linking for AM33/2.0 link.
1725 2000-04-01 Alexandre Oliva <aoliva@cygnus.com>
1726 * archures.c (bfd_mach_am33_2): Renamed from bfd_mach_am332.
1727 * bfd-in2.h: Rebuilt.
1728 * cpu-m10300.c (bfd_am33_2_arch): Renamed from bfd_am332_arch.
1729 * elf-m10300.c: Updated.
1730 2000-03-31 Alexandre Oliva <aoliva@cygnus.com>
1731 * archures.c (bfd_mach_am332): Defined.
1732 * bfd-in2.h: Rebuilt.
1733 * cpu-m10300.c (bfd_am332_arch): Defined.
1734 (bfd_am33_arch): Chained with am33-2.
1735 * elf-m10300.c (elf_mn10300_mach): Handle am332.
1736 (_bfd_mn10300_elf_final_write_processing): Likewise.
1737
201933ea
L
17382003-07-09 H.J. Lu <hongjiu.lu@intel.com>
1739
1740 * elfxx-ia64.c (IA64_HOWTO): Set dst_mask to -1LL.
1741
e717da7e
AM
17422003-07-10 Alan Modra <amodra@bigpond.net.au>
1743
1744 * elf64-ppc.c (bfd_elf64_mkobject): Define.
1745 (struct ppc64_elf_obj_tdata): New.
1746 (ppc64_elf_tdata, ppc64_tlsld_got): Define.
1747 (ppc64_elf_mkobject): New function.
1748 (struct got_entry): Add "owner". Move "tls_type".
1749 (struct ppc_link_hash_table): Delete "relgot", "tlsld_got".
1750 (ppc64_elf_init_stub_bfd): New function.
1751 (create_got_section): Create header .got in dynobj. Create .got
1752 and .rela.got in each bfd. Stash pointers in ppc64_elf_obj_tdata.
1753 (ppc64_elf_create_dynamic_sections): Don't call create_got_section.
1754 Look for dynobj .got, and test it.
1755 (ppc64_elf_copy_indirect_symbol): Adjust for changed got.
1756 (update_local_sym_info): Likewise.
1757 (ppc64_elf_check_relocs): Likewise.
1758 (ppc64_elf_gc_sweep_hook): Likewise.
1759 (ppc64_elf_tls_optimize): Likewise.
1760 (allocate_dynrelocs): Likewise.
1761 (ppc64_elf_size_dynamic_sections): Likewise.
1762 (ppc64_elf_relocate_section): Likewise.
1763 (ppc64_elf_next_toc_section): Update comment.
1764 (toc_adjusting_stub_needed): Remove unneeded cast.
1765 (ppc64_elf_build_stubs): Check for stub sections in stub bfd by
1766 testing section flags.
1767 (ppc64_elf_build_stubs): Likewise.
1768 (ppc64_elf_size_stubs): Likewise. Remove stub_bfd param.
1769 (ppc64_elf_finish_dynamic_sections): Write out got sections.
1770 (func_desc_adjust): Copy over dynamic info for undef weaks.
1771 * elf64-ppc.h (ppc64_elf_init_stub_bfd): Declare.
1772 (ppc64_elf_size_stubs): Update prototype.
1773 * elflink.h (elf_link_sort_relocs): Use link_orders to find reldyn
1774 input sections rather than scanning dynobj.
1775
18ad015f
RS
17762003-07-09 Richard Sandiford <rsandifo@redhat.com>
1777
1778 * elfxx-mips.c (mips_elf_link_hash_entry): Remove min_dyn_reloc_index.
1779 (bfd_mips_elf_swap_msym_in, bfd_mips_elf_swap_msym_out): Delete.
1780 (mips_elf_create_msym_section): Delete.
1781 (mips_elf_create_dynamic_relocation): Don't set min_dyn_reloc_index.
1782 (_bfd_mips_elf_copy_indirect_symbol): Likewise.
1783 (_bfd_mips_elf_create_dynamic_sections): Don't create .msym.
1784 (_bfd_mips_elf_size_dynamic_sections): Don't calculate its size.
1785 (_bfd_mips_elf_size_dynamic_sections): Don't add DT_MIPS_MSYM.
1786 (_bfd_mips_elf_finish_dynamic_symbol): Don't add symbols to .msym.
1787 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1788
e10609d3
RS
17892003-07-09 Richard Sandiford <rsandifo@redhat.com>
1790
1791 * elfxx-mips.c (mips_elf_irix6_finish_dynamic_symbol): Make the
1792 symbols protected.
1793
0d591ff7
RS
17942003-07-09 Richard Sandiford <rsandifo@redhat.com>
1795
1796 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
1797 of relocations whose offset is -2.
1798
fdd07405
RS
17992003-07-09 Richard Sandiford <rsandifo@redhat.com>
1800
1801 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
1802 forced-local symbols like other locals. Don't create relocations
1803 against STN_UNDEF in irix objects.
1804
d2fba50d
RS
18052003-07-09 Richard Sandiford <rsandifo@redhat.com>
1806
1807 * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): In SGI-
1808 compatible objects, add the values of defined external symbols
1809 to the addend.
1810
6eaa6adc
RS
18112003-07-09 Richard Sandiford <rsandifo@redhat.com>
1812
1813 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Always
1814 initialize a GOT entry to the symbol's st_value.
1815
0c83546a
AM
18162003-07-08 Alan Modra <amodra@bigpond.net.au>
1817
43c40ab2
AM
1818 * elf-bfd.h (struct elf_obj_tdata): Move linker_section_pointers..
1819 * elf32-ppc.c (struct ppc_elf_obj_tdata): ..to here. New.
1820 (ppc_elf_tdata): Define.
1821 (elf_local_ptr_offsets): Adjust.
1822 (ppc_elf_mkobject): New function.
1823 (bfd_elf32_mkobject): Define.
1824
0c83546a
AM
1825 * elfcode.h (elf_object_p): Allocate tdata via _bfd_set_format.
1826 * elfcore.h (elf_core_file_p): Likewise.
1827 * section.c (bfd_section_init): Remove prototype.
1828
58111eb7
AM
18292003-07-08 Alan Modra <amodra@bigpond.net.au>
1830
1831 * elf-bfd.h (struct elf_link_hash_entry): Remove linker_section_pointer
1832 field.
1833 (enum elf_linker_section_enum): Delete.
1834 (struct elf_linker_section): Delete.
1835 (struct elf_linker_section_pointers): Delete.
1836 (struct elf_obj_tdata): Remove #if 0 chunk. Remove linker_section.
1837 Make linker_section_pointers a void**.
1838 (elf_local_ptr_offsets, elf_linker_section): Don't define.
1839 * elf32-ppc.c (enum elf_linker_section_enum): New, cut-down version
1840 of old item in elf-bfd.h.
1841 (struct elf_linker_section): Likewise.
1842 (struct elf_linker_section_pointers): Likewise.
1843 (elf_local_ptr_offsets): Define.
1844 (struct ppc_elf_link_hash_entry): Add linker_section_pointer.
1845 (ppc_elf_link_hash_newfunc): Init it.
1846 (struct ppc_elf_link_hash_table): Add sbss.
1847 (ppc_elf_link_hash_table_create): zmalloc rather than clearing
1848 individual fields.
1849 (elf_create_linker_section): Fold into..
1850 (ppc_elf_create_linker_section): ..here. Remove hole_size code.
1851 Make rela section here if shared.
1852 (elf_find_pointer_linker_section): Pass lsect rather than enum.
1853 (elf_create_pointer_linker_section): Adjust. zalloc rather than
1854 clearing in a loop.
1855 (elf_finish_pointer_linker_section): Adjust. Don't make rela
1856 section here.
1857 (ppc_elf_check_relocs): Adjust.
1858 (ppc_elf_add_symbol_hook): Tighten hash creator test. Remove code
1859 creating .sbss by hand.
1860 * elf.c (_bfd_elf_link_hash_newfunc): Adjust.
1861
15f8604d
JJ
18622003-07-04 Jakub Jelinek <jakub@redhat.com>
1863
1864 * elf32-s390.c (elf_howto_table): Change R_390_GOT12 to
1865 complain_overflow_bitfield.
1866 * elf64-s390.c (elf_howto_table): Change R_390_GOT12 to
1867 complain_overflow_bitfield.
1868
3368a7fb
JJ
18692003-07-04 Jakub Jelinek <jakub@redhat.com>
1870
1871 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Return
1872 true even if -pie.
1873
9203ba99
JJ
18742003-07-04 Jakub Jelinek <jakub@redhat.com>
1875
1876 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add rel_fptr_sec.
1877 (elfNN_ia64_dynamic_symbol_p): Change info->shared into
1878 !info->executable.
1879 (get_fptr): For -pie create .opd as writable section and create
1880 .rela.opd as well.
1881 (elfNN_ia64_check_relocs): Change info->shared into
1882 !info->executable.
1883 (allocate_fptr): Likewise.
1884 (allocate_dynrel_entries): Account for a relative reloc for -pie
1885 @fptr(). Don't account for a relative reloc if -pie want_ltoff_fptr
1886 for undefweak symbol. Account for an IPLT reloc in .rela.opd
1887 section if -pie.
1888 (set_got_entry): Don't create a relative reloc if -pie
1889 want_ltoff_fptr for undefweak symbol.
1890 (set_fptr_entry): Emit an IPLT reloc in .rela.opd for -pie.
1891 (elfNN_ia64_relocate_section): Emit a relative reloc for -pie
1892 @fptr().
1893
1894 * elfxx-ia64.c (elfNN_ia64_relocate_section): Issue undefined_symbol
1895 even if -pie.
1896 * elf32-i386.c (elf_i386_relocate_section): Likewise.
1897 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
1898 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
1899 * elf64-s390.c (elf_s390_relocate_section): Likewise.
1900 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
1901 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
1902 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
1903 * elf32-s390.c (elf_s390_relocate_section): Likewise.
1904 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
1905
e0a868d1 19062003-07-04 Paul Clarke <paulc@senet.com.au>
8c17da6e
NC
1907
1908 * elf32-h8300.c (R_H8_DIR32A16): Fix name field.
1909 (elf32_h8_relax_section) <R_H8_DIR16A8>: Adjust position of relocation.
1910 <R_H8_DIR32A16>: Fix type of relocation.
1911
35cad4c4
KK
19122003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1913
1914 * elf32-sh.c (sh_elf_create_dynamic_sections): Return if dynamic
1915 sections were created already. Remove unnecessary tests of
1916 the previous change.
1917
03151a5a
KK
19182003-07-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
1919
1920 * elf32-sh.c (sh_elf_create_dynamic_sections): Don't call
1921 bfd_make_section for existing sections.
1922
003d627e
AM
19232003-07-04 Alan Modra <amodra@bigpond.net.au>
1924
2293c499
AM
1925 * elf32-sparc.c (elf32_sparc_check_relocs): Don't call
1926 create_got_section if we already have done so.
1927 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
1928 (sh_elf_check_relocs): Likewise.
1929 (sh_elf_adjust_dynamic_symbol): Delete "dynobj" var. Use
1930 htab->root.dynobj instead.
1931 (sh_elf_check_relocs): Likewise.
1932 (sh_elf_finish_dynamic_sections): Likewise.
1933
003d627e
AM
1934 * section.c (bfd_make_section): Return NULL for existing section.
1935
fa681e5d
AM
19362003-07-04 Alan Modra <amodra@bigpond.net.au>
1937
1938 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Don't call
1939 ppc_elf_create_got if we've already done so.
3dab13f6
AM
1940
1941 * elf-bfd.h (_bfd_elf_create_linker_section) Don't declare.
1942 (_bfd_elf_find_pointer_linker_section): Likewise.
1943 (bfd_elf32_create_pointer_linker_section): Likewise.
1944 (bfd_elf32_finish_pointer_linker_section): Likewise.
1945 (bfd_elf64_create_pointer_linker_section): Likewise.
1946 (bfd_elf64_finish_pointer_linker_section): Likewise.
1947 (_bfd_elf_make_linker_section_rela): Likewise.
1948 * elfcode.h (elf_create_pointer_linker_section): Don't define.
1949 (elf_finish_pointer_linker_section): Likewise.
1950 * elflink.c (_bfd_elf_make_linker_section_rela): Delete.
1951 (_bfd_elf_create_linker_section): Move this function..
1952 (_bfd_elf_find_pointer_linker_section): ..and this..
1953 * elflink.h (elf_create_pointer_linker_section): ..and this..
1954 (elf_finish_pointer_linker_section): ..and this..
1955 * elf32-ppc.c: ..to here, renaming to the following, and adjusting
1956 calls.
1957 (elf_create_linker_section): Convert to C90, tidy.
1958 (elf_find_pointer_linker_section): Likewise.
1959 (elf_create_pointer_linker_section): Likewise.
1960 (elf_finish_pointer_linker_section): Likewise.
1961 * elf32-i370.c: Delete #if 0 code.
1962
772119ce
AM
19632003-07-02 Alan Modra <amodra@bigpond.net.au>
1964
1965 * elf64-ppc.c (ppc64_elf_func_desc_adjust): Don't allow _savef* and
1966 _restf* to be satisfied by shared libs, and always force them local.
1967 (toc_adjusting_stub_needed): Avoid scanning linker created sections.
1968 Correct test for "bl".
1969 (ppc64_elf_relocate_section <R_PPC64_TLS>): Correct test for
1970 primary opcode 31.
1971
bd1ea41b
MS
19722003-07-01 Martin Schwidefsky <schwidefsky@de.ibm.com>
1973
1974 * elf32-s390.c (s390_elf_ldisp_reloc): New prototype.
1975 (s390_tls_reloc): New function.
1976 (elf_howto_table): Add long displacement relocations R_390_20,
1977 R_390_GOT20, R_390_GOTPLT20 and R_390_TLS_GOTIE20.
1978 (elf_s390_reloc_type_lookup): Likewise.
1979 (elf_s390_check_relocs): Likewise.
1980 (elf_s390_gc_sweep_hook): Likewise.
1981 (elf_s390_relocate_section): Likewise.
1982 * elf64-s390.c: Same changes as for elf32-s390.c.
1983 * reloc.c: Add long displacement relocations BFD_RELOC_390_20,
43c40ab2 1984 BFD_RELOC_390_GOT20, BFD_RELOC_390_GOTPLT20 and
bd1ea41b
MS
1985 BFD_RELOC_390_TLS_GOTIE20.
1986 * bfd-in2.h: Regenerate.
1987 * libbfd.h: Likewise.
1988
113202d6
AM
19892003-06-30 Alan Modra <amodra@bigpond.net.au>
1990
1991 * cpu-ia64-opc.c (ext_imms_scaled): Don't sign extend using shifts.
1992 (ins_imms, ins_immsm1u4): Likewise. Warning fix.
1993
c58b9523
AM
19942003-06-29 Alan Modra <amodra@bigpond.net.au>
1995
1996 * archive.c: Convert to C90, remove unnecessary prototypes and casts.
1997 Replace PTR with void *. Formatting.
1998 * archive64.c: Likewise.
1999 * archures.c: Likewise.
2000 * bfd-in.h: Likewise.
2001 * bfd.c: Likewise.
2002 * bfdio.c: Likewise.
2003 * bfdwin.c: Likewise.
2004 * cache.c: Likewise.
2005 * corefile.c: Likewise.
2006 * format.c: Likewise.
2007 * init.c: Likewise.
2008 * libbfd-in.h: Likewise.
2009 * libbfd.c: Likewise.
2010 * linker.c: Likewise.
2011 * opncls.c: Likewise.
2012 * reloc.c: Likewise.
2013 * section.c: Likewise.
2014 * simple.c: Likewise.
2015 * syms.c: Likewise.
2016 * targets.c: Likewise.
2017 * bfd-in2.h: Regenerate.
2018 * libbfd.h: Regenerate.
2019
2020 * ecoff.c (bfd_debug_section): Add missing kept_section initialization.
2021 * libbfd-in.h (_bfd_sh_align_load_span): Don't declare if defined.
2022 * libbfd.c (COERCE32, EIGHT_GAZILLION): Simplify.
2023 (bfd_getb64): Rewrite without parens.
2024 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
2025 * cache.c (insert, snip): Remove INLINE.
2026 * linker.c (bfd_link_add_undef): Likewise.
2027
27482721
AJ
20282003-06-29 Andreas Jaeger <aj@suse.de>
2029
2030 * elf64-x86-64.c: Convert to ISO C90 prototypes, remove
2031 unnecessary prototypes. Replace PTR with void *.
58611256
AJ
2032 (elf64_x86_64_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL to
2033 trim plt entries. Move undefweak non-default visibility test ...
2034 (allocate_dynrelocs): ... from here.
2035 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2036 Change all callers.
2037 (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL. Use
2038 SYMBOL_REFERENCES_LOCAL for dynreloc check.
2039 (elf64_x86_64_relocate_section): Use SYMBOL_CALLS_LOCAL for
2040 dynreloc and .got relocs.
2041 (elf64_x86_64_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL
2042 for .got relocs.
27482721 2043
2b86c02e
TS
20442003-06-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2045
2046 * elfxx-mips.c: Allow lazy binding for R_MIPS_JALR.
2047
e7c81c25
NC
20482003-06-27 Nick Clifton <nickc@redhat.com>
2049
2050 * opncls.c (bfd_add_gnu_debuglink_section): Rename to
2051 bfd_add_gnu_debuglink_section and only create the section, do not
2052 fill in its contents.
2053 (bfd_fill_in_gnu_debuglink_section): New function. Fill in the
2054 contents of a .gnu-debuglink section.
2055 * bfd-in2.h: Regenerate.
2056
72b4917c
TS
20572003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2058
2059 * elfxx-mips.c: Revert .got alignment to 2**4.
2060
91709090
TS
20612003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2062
2063 * elf32-mips.c: Fix addend for _gp_disp special symbol.
2064
7a79a000
TS
20652003-06-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2066
2067 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Remove non-default
2068 relocation header setup.
2069
e47cd125
AM
20702003-06-25 Alan Modra <amodra@bigpond.net.au>
2071
2072 * elf32-ppc.c (ppc_elf_howto_table): Remove unnecessary cast.
2073 (ppc_elf_reloc_type_lookup): Modify comment.
2074 (ppc_elf_info_to_howto): Ditto.
2075 (ppc_elf_relocate_section): Ditto.
2076 (ppc_elf_check_relocs): Call ppc_elf_howto_init.
2077
1049f94e
AM
20782003-06-25 Alan Modra <amodra@bigpond.net.au>
2079
2080 * aout-ns32k.c: Correct spelling of "relocatable".
2081 * aoutx.h: Likewise.
2082 * bfd-in.h: Likewise.
2083 * bfd.c: Likewise.
2084 * bout.c: Likewise.
2085 * coff-a29k.c: Likewise.
2086 * coff-alpha.c: Likewise.
2087 * coff-arm.c: Likewise.
2088 * coff-i386.c: Likewise.
2089 * coff-i860.c: Likewise.
2090 * coff-i960.c: Likewise.
2091 * coff-m68k.c: Likewise.
2092 * coff-m88k.c: Likewise.
2093 * coff-mcore.c: Likewise.
2094 * coff-mips.c: Likewise.
2095 * coff-or32.c: Likewise.
2096 * coff-ppc.c: Likewise.
2097 * coff-rs6000.c: Likewise.
2098 * coff-sh.c: Likewise.
2099 * coff-tic80.c: Likewise.
2100 * coff64-rs6000.c: Likewise.
2101 * cofflink.c: Likewise.
2102 * cpu-ns32k.c: Likewise.
2103 * ecoff.c: Likewise.
2104 * ecofflink.c: Likewise.
2105 * elf-bfd.h: Likewise.
2106 * elf-eh-frame.c: Likewise.
2107 * elf-hppa.h: Likewise.
2108 * elf-m10200.c: Likewise.
2109 * elf-m10300.c: Likewise.
2110 * elf.c: Likewise.
2111 * elf32-arm.h: Likewise.
2112 * elf32-avr.c: Likewise.
2113 * elf32-cris.c: Likewise.
2114 * elf32-d10v.c: Likewise.
2115 * elf32-dlx.c: Likewise.
2116 * elf32-fr30.c: Likewise.
2117 * elf32-frv.c: Likewise.
2118 * elf32-h8300.c: Likewise.
2119 * elf32-hppa.c: Likewise.
2120 * elf32-i370.c: Likewise.
2121 * elf32-i386.c: Likewise.
2122 * elf32-i860.c: Likewise.
2123 * elf32-i960.c: Likewise.
2124 * elf32-ip2k.c: Likewise.
2125 * elf32-iq2000.c: Likewise.
2126 * elf32-m32r.c: Likewise.
2127 * elf32-m68hc11.c: Likewise.
2128 * elf32-m68hc1x.c: Likewise.
2129 * elf32-m68k.c: Likewise.
2130 * elf32-mcore.c: Likewise.
2131 * elf32-mips.c: Likewise.
2132 * elf32-msp430.c: Likewise.
2133 * elf32-openrisc.c: Likewise.
2134 * elf32-ppc.c: Likewise.
2135 * elf32-s390.c: Likewise.
2136 * elf32-sh.c: Likewise.
2137 * elf32-sh64.c: Likewise.
2138 * elf32-sparc.c: Likewise.
2139 * elf32-v850.c: Likewise.
2140 * elf32-vax.c: Likewise.
2141 * elf32-xstormy16.c: Likewise.
2142 * elf32-xtensa.c: Likewise.
2143 * elf64-alpha.c: Likewise.
2144 * elf64-hppa.c: Likewise.
2145 * elf64-mips.c: Likewise.
2146 * elf64-mmix.c: Likewise.
2147 * elf64-ppc.c: Likewise.
2148 * elf64-s390.c: Likewise.
2149 * elf64-sh64.c: Likewise.
2150 * elf64-sparc.c: Likewise.
2151 * elf64-x86-64.c: Likewise.
2152 * elfcode.h: Likewise.
2153 * elflink.h: Likewise.
2154 * elfn32-mips.c: Likewise.
2155 * elfxx-ia64.c: Likewise.
2156 * elfxx-mips.c: Likewise.
2157 * i386linux.c: Likewise.
2158 * ieee.c: Likewise.
2159 * libcoff-in.h: Likewise.
2160 * linker.c: Likewise.
2161 * m68klinux.c: Likewise.
2162 * pdp11.c: Likewise.
2163 * pe-mips.c: Likewise.
2164 * peXXigen.c: Likewise.
2165 * reloc.c: Likewise.
2166 * reloc16.c: Likewise.
2167 * sparclinux.c: Likewise.
2168 * sunos.c: Likewise.
2169 * syms.c: Likewise.
2170 * versados.c: Likewise.
2171 * vms.c: Likewise.
2172 * xcofflink.c: Likewise.
2173 * bfd-in2.h: Regenerate.
2174 * libcoff.h: Regenerate.
2175 * libbfd.h: Regenerate.
2176
55fd94b0
AM
21772003-06-24 Alan Modra <amodra@bigpond.net.au>
2178
d85f2c7d
AM
2179 * elf32-ppc.c (ppc_elf_check_relocs): Report plt reloc against
2180 local sym errors.
2181
55fd94b0
AM
2182 * elf32-i386.c: Convert to C90 function definitions, remove unnecessary
2183 prototypes and casts. Replace PTR with void *. Formatting.
2184 * elf32-ppc.c: Likewise. Break long strings too.
2185 (ppc_elf_relax_section): Use enum elf_ppc_reloc_type for r_type.
2186 (ppc_elf_unhandled_reloc): Internationalize error message.
2187 * elf32-ppc.h: Remove PARAMS.
2188
88810f8c
MM
21892003-06-23 Mark Mitchell <mark@codesourcery.com>
2190
2191 * elf32-ppc.c (ppc_elf_begin_write_processing): Use bytes to count
2192 APUinfo slots.
2193 (ppc_elf_final_write_processing): Likewise.
2194
6e35c4da
L
21952003-06-23 H.J. Lu <hongjiu.lu@intel.com>
2196
2197 * elflink.h (elf_link_input_bfd): Check raw size when using
2198 kept_section to preserve debug information discarded by
2199 linkonce.
2200
8f3bab57
AM
22012003-06-20 Alan Modra <amodra@bigpond.net.au>
2202
2203 * elf64-ppc.c (struct ppc_link_hash_table): Add top_id.
2204 (ppc64_elf_setup_section_lists): Set it.
2205 (ppc64_elf_relocate_section): Check sym section id against top_id.
2206 (ppc_build_one_stub): Comment on top_id.
2207
efbc813e
NC
22082003-06-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
2209
2210 * config.bfd: Add tic4x-*-rtems*.
2211
4ce794b7
AM
22122003-06-20 Alan Modra <amodra@bigpond.net.au>
2213
2214 * elf64-ppc.c: Convert to C90 function definitions, remove unnecessary
2215 prototypes and casts. Replace PTR with void *. Format copyright.
2216 Mention ABI links.
2217 (struct ppc_link_hash_table): Rename sgot, srelgot, splt, srelplt,
2218 sdynbss, srelbss, sglink, sbrlt and srelbrlt to got, relgot .. relbrlt.
2219 (ppc_type_of_stub): Make r_type an enum.
2220 (ppc64_elf_size_stubs): Likewise.
2221 * elf64-ppc.h: Remove PARAMS macro.
2222
d2a300cf
AM
22232003-06-19 Alan Modra <amodra@bigpond.net.au>
2224
3254fd24
AM
2225 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Reinstate init of
2226 elf hash tab fields.
2227
d2a300cf
AM
2228 * elf64-ppc.c (ppc64_elf_reloc_type_lookup): Tidy prototype.
2229 (ppc64_elf_info_to_howto): Likewise.
2230 (ppc64_elf_build_stubs): Add "stats" param, and print statistics.
2231 * elf64-ppc.h (ppc64_elf_build_stubs): Adjust prototype.
2232
83615de0
AM
22332003-06-19 Alan Modra <amodra@bigpond.net.au>
2234
2235 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore R_SPARC_DISP32
2236 reloc overflow on discarded eh_frame entries.
2237
9b5ecbd0
AM
22382003-06-19 Alan Modra <amodra@bigpond.net.au>
2239
2240 * elf64-ppc.c (toc_adjusting_stub_needed): New function.
2241 (ppc64_elf_next_input_section): Use it here to set has_gp_reloc.
2242 Return error condition.
2243 (ppc64_elf_size_stubs): Restrict toc adjusting stubs to sections
2244 that have has_gp_reloc set.
2245 (struct ppc_link_hash_table): Add stub_count.
2246 (ppc_build_one_stub): Increment it.
2247 (ppc64_elf_link_hash_table_create): zmalloc rather than clearing
2248 individual fields.
2249 * elf64-ppc.h (ppc64_elf_next_input_section): Update prototype.
2250
64c456e1
AM
22512003-06-18 Alan Modra <amodra@bigpond.net.au>
2252
2253 * elflink.h (elf_gc_record_vtentry): Revert last change. Correct
2254 size calculation from addend. Round size up.
2255
3dab95d3
HPN
22562003-06-18 Hans-Peter Nilsson <hp@axis.com>
2257
2258 * elf32-cris.c (cris_elf_relocate_section) <case
2259 R_CRIS_32_GOTREL>: When linking a program, don't complain about a
2260 symbol from a normal object or an undefined weak symbol.
2261
0b13192e
AM
22622003-06-18 Alan Modra <amodra@bigpond.net.au>
2263
2264 * elf64-ppc.c (ppc64_elf_relocate_section): Accept a symbol on
2265 R_PPC64_TOC relocs.
2266
f97b9cb8
L
22672003-06-17 H.J. Lu <hongjiu.lu@intel.com>
2268
2269 * section.c (struct sec): Put back kept_section.
2270 (STD_SECTION): Put back kept_section initialization.
2271 * bfd-in2.h: Regenerate.
2272
2273 * elflink.h (elf_link_input_bfd): Also check discarded linkonce
2274 sections for relocateable output. Use kept_section to preserve
2275 debug information discarded by linkonce.
2276
9f1c3a0a
L
22772003-06-17 Roland McGrath <roland@redhat.com>
2278
2279 * elfxx-ia64.c (elfNN_ia64_relocate_section): Support
2280 segment-relative relocation between different segments.
2281
734b6cf9
AM
22822003-06-17 Alan Modra <amodra@bigpond.net.au>
2283
1cf1f670
AM
2284 * elf64-ppc.c (ppc64_elf_relocate_section): Do unaligned reloc
2285 optimizations earlier.
2286
734b6cf9
AM
2287 * elf64-ppc.c (struct ppc_link_hash_table): Reinstate top_index.
2288 Restore previous input_list type.
2289 (ppc64_elf_link_hash_table_create): Undo last change.
2290 (ppc64_elf_setup_section_lists): Reinstate code setting up input lists
2291 per output section, but don't bother with bfd_abs_section marker.
2292 (ppc64_elf_next_input_section): Adjust for multiple input section
2293 lists.
2294 (group_sections): Likewise.
2295
23fbd6fa
JJ
22962003-06-17 Jakub Jelinek <jakub@redhat.com>
2297
2298 * elf64-ppc.c (ppc64_elf_relocation_section): Ensure
2299 *r_offset == r_addend for RELATIVE relocs against .got.
2300
dad27d18
AM
23012003-06-17 Alan Modra <amodra@bigpond.net.au>
2302
2303 * elf64-ppc.c (ppc64_elf_relocate_section): Optimize unaligned relocs.
2304
b613960a
NC
23052003-06-17 Nick Clifton <nickc@redhat.com>
2306
2307 * elflink.h (elf_gc_record_vtentry): Allocate an extra element
4ce794b7
AM
2308 in the vtable_entries_used array to allow for the accessing
2309 the largest element.
b613960a 2310
000732f7
AM
23112003-06-17 Alan Modra <amodra@bigpond.net.au>
2312
3d6f9012
AM
2313 * elf64-ppc.c (struct ppc_link_hash_table): Remove top_index. Modify
2314 input_list.
2315 (ppc64_elf_link_hash_table_create): Init input_list here.
2316 (ppc64_elf_setup_section_lists): Remove code setting up input lists
2317 per output section. Set toc_off for abs and other standard sections.
2318 (ppc64_elf_reinit_toc): Don't set elf_gp on input bfds lacking a toc.
2319 (ppc64_elf_next_input_section): Adjust for single input section list.
2320 Don't set toc_curr from input bfds that haven't set elf_gp.
2321 (group_sections): Adjust for single input section list.
2322
000732f7
AM
2323 * elf64-ppc.c (ppc64_elf_relocate_section): Correct pcrel section zero.
2324
81407a69
AM
23252003-06-16 Alan Modra <amodra@bigpond.net.au>
2326
2327 * elf64-ppc.c (ppc64_elf_relocate_section): When optimizing toctprel
2328 tls, check that a TOC16_DS or TOC16_LO_DS reloc isn't pointing to a
2329 dtprel entry. Ensure TLS_LD DTPMOD reloc has a zero addend. Write
2330 got section for RELATIVE relocs. Fix wrong comment. Change condition
2331 under which dynamic relocs update the section contents.
2332
a06a29f2
NC
23332003-06-13 Robert Millan <zeratul2@wanadoo.es>
2334
2335 * config.bfd: Add i386-netbsd-gnu target.
2336
7d1ebfb2
NC
23372003-06-12 Nick Clifton <nickc@redhat.com>
2338
2339 * opncls.c (calc_crc32): Rename to
2340 bfd_calc_gnu_debuglink_crc32 and export.
81407a69 2341 (GNU_DEBUGLINK): Define and use to replace occurrences of
7d1ebfb2 2342 hard-coded ".gnu_debuglink" in the code.
81407a69 2343 (get_debug_link_info): Prevent aborts by replacing call to
7d1ebfb2 2344 xmalloc with a call to malloc.
81407a69 2345 (find_separate_debug_file): Prevent aborts by replacing calls
7d1ebfb2 2346 to xmalloc and xstrdup with calls to malloc and strdup.
81407a69 2347 (bfd_add_gnu_debuglink): New function. Add a .gnu_debuglink
7d1ebfb2
NC
2348 section to a bfd.
2349 * bfd-in2.h: Regenerate.
2350
23512003-06-12 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2352
7d1ebfb2
NC
2353 * config.bfd (i[3-7]86-*-openbsd[0-2].* | i[3-7]86-*-openbsd3.[0-3]):
2354 New target (was i[3-7]86-*-openbsd* before).
2355 (i[3-7]86-*-openbsd*): Change to use bfd_elf32_i386_vec.
2356 (vax-*-openbsd*): New target.
2357
d80dcc6a
TS
23582003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2359
2360 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME): Use .MIPS.options
2361 for n32, too.
2362 (MIPS_ELF_STUB_SECTION_NAME): Use .MIPS.stubs for n32, too.
2363 (mips_elf_rel_dyn_section): Use appropriate section alignment.
2364 (mips_elf_create_got_section): Likewise.
2365 (_bfd_mips_elf_create_dynamic_sections): Likewise.
2366
a7ebbfdf
TS
23672003-06-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2368
2369 * elf32-mips.c (mips_elf_generic_reloc): New Function.
2370 (elf_mips_howto_table_rel): Use it.
2371 (gprel32_with_gp): Move prototype.
2372 (mips_elf_hi16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2373 Use mips_elf_generic_reloc.
2374 (mips_elf_got16_reloc): Check for ! BSF_LOCAL instead of zero addend.
2375 Code cleanup.
2376 (_bfd_mips_elf32_gprel16_reloc): Check for ! BSF_LOCAL instead of
2377 zero addend.
2378 (mips_elf_gprel32_reloc): Likewise. Use the same GP assignment logic
2379 as in the other *_gprel*_reloc functions.
2380 (gprel32_with_gp): Handle partial_inplace properly.
2381 (mips32_64bit_reloc): Use mips_elf_generic_reloc.
2382 (mips16_gprel_reloc): Check for ! BSF_LOCAL instead of zero addend.
2383 Do addend handling directly instead of calling
2384 _bfd_mips_elf_gprel16_with_gp. Handle partial_inplace properly.
2385 * elf64-mips.c (mips_elf64_hi16_reloc): Check for ! BSF_LOCAL instead
2386 of zero addend. Handle partial_inplace properly.
2387 (mips_elf64_got16_reloc): Check for ! BSF_LOCAL instead of zero
2388 addend.
2389 (mips_elf64_gprel16_reloc): Likewise.
2390 (mips_elf64_literal_reloc): Likewise.
2391 (mips_elf64_gprel32_reloc): Likewise. Use the same GP assignment
2392 logic as in the other *_gprel*_reloc functions. Handle
2393 partial_inplace properly.
2394 (mips_elf64_shift6_reloc): Check for ! BSF_LOCAL instead of zero
2395 addend. Handle partial_inplace properly.
2396 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2397 of calling _bfd_mips_elf_gprel16_with_gp.
2398 * elfn32-mips.c (mips_elf_got16_reloc): Check for BSF_LOCAL.
2399 (mips_elf_gprel32_reloc): Check for ! BSF_LOCAL instead
2400 of zero addend.
2401 (mips_elf_shift6_reloc): Handle partial_inplace properly.
2402 (mips16_gprel_reloc): Likewise. Do addend handling directly instead
2403 of calling _bfd_mips_elf_gprel16_with_gp.
2404 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp): Handle
2405 partial_inplace properly. Fix wrong addend handling. Fix overflow
2406 check.
2407 (_bfd_mips_elf_sign_extend): Renamed from mips_elf_sign_extend and
2408 exported.
2409 (mips_elf_calculate_relocation): Use _bfd_mips_elf_sign_extend.
2410 (_bfd_mips_elf_relocate_section): Likewise.
2411 (mips_elf_create_dynamic_relocation): Update sec_info_type access.
2412 * elfxx-mips.h (_bfd_mips_relax_section): Fix prototype declaration.
2413 (_bfd_mips_elf_sign_extend): New prototype.
2414
49ba19a4 24152003-06-11 Federico G. Schwindt <fgsch@lodoss.net>
81407a69 2416
49ba19a4
NC
2417 * config.bfd (sparc-*-openbsd[0-2].* | sparc-*-openbsd3.[0-1]):
2418 New target (was sparc-*-openbsd* before).
2419 (sparc-*-openbsd*): Change to use bfd_elf32_sparc_vec.
81407a69 2420
de6e5e1a
NC
2421 * configure.in (vax-*-openbsd*): Set COREFILE to netbsd-core.lo.
2422 * configure: Regenerate.
2423
3b443373
L
24242003-06-11 H.J. Lu <hongjiu.lu@intel.com>
2425
2426 * po/Make-in (DESTDIR): New.
2427 (install-data-yes): Support $(DESTDIR).
2428 (uninstall): Likewise.
2429
795bb480
AM
24302003-06-11 Alan Modra <amodra@bigpond.net.au>
2431
2432 * Makefile.am (config.status): Depend on version.h.
2433 Run "make dep-am".
2434 * Makefile.in: Regenerate.
2435 * po/SRC-POTFILES.in: Regenerate.
2436
adadcc0c
AM
24372003-06-10 Alan Modra <amodra@bigpond.net.au>
2438 Gary Hade <garyhade@us.ibm.com>
2439
2440 * elf64-ppc.c (ppc64_elf_relocate_section <*_DS>): Special case lq.
2441
f4984206
RS
24422003-06-10 Richard Sandiford <rsandifo@redhat.com>
2443
2444 * archures.c (bfd_mach_h8300sxn): New architecture.
2445 * bfd-in2.h: Regenerate.
2446 * cpu-h8300.c (h8300_scan): Check for 'sxn'.
2447 (h8300sxn_info_struct): New.
2448 (h8300sx_info_struct): Link to it.
2449 * elf32-h8300.c (elf32_h8_mach): Add h8300sxn case.
2450 (elf32_h8_final_write_processing): Likewise.
2451
ad8e1ba5
AM
24522003-06-08 Alan Modra <amodra@bigpond.net.au>
2453
2454 * elf64-ppc.c: Move TARGET_LITTLE_SYM and other macros used by
2455 elfxx-target.h so that we can use elf_backend_got_header_size.
2456 (ELF_MACHINE_ALT1, ELF_MACHINE_ALT2): Delete.
2457 (GLINK_CALL_STUB_SIZE): Modify. Define new glink call stub and
2458 associated macros.
2459 (ppc64_elf_howto_raw <GOT_TPREL16_DS, GOT_TPREL16_LO_DS>): Correct
2460 dst_mask.
2461 (enum ppc_stub_type): Add ppc_stub_long_branch_r2off and
2462 ppc_stub_plt_branch_r2off.
2463 (struct ppc_stub_hash_entry): Reorganize.
2464 (struct ppc_link_hash_table): Add no_multi_toc, multi_toc_needed,
2465 toc_curr, toc_off and emit_stub_syms.
2466 (ppc64_elf_link_hash_table_create): Init them.
2467 (ppc_stub_name): Correct string size.
2468 (ppc64_elf_check_relocs): Set has_gp_reloc on GOT and TOC relocs.
2469 (ppc64_elf_size_dynamic_sections): Set no_multi_toc if GOT entries
2470 used.
2471 (ppc_type_of_stub): Tweak root.type test.
2472 (build_plt_stub): Remove glink code. Adjust for insn macro changes.
2473 (ppc_size_one_stub): Handle ppc_stub_long_branch_r2off and
2474 ppc_stub_plt_branch_r2off.
2475 (ppc_build_one_stub): Likewise. Fix var shadowing. Correct addis,addi
2476 range test. Use toc_off to calculte r2 values. Handle emit_stub_syms.
2477 (ppc64_elf_setup_section_lists): Remove htab creator flavour test.
2478 Initialize elf_gp and toc_curr.
2479 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): New functions.
2480 (ppc64_elf_next_input_section): Set toc_off.
2481 (group_sections): Ensure groups have the same TOC.
2482 (ppc64_elf_size_stubs): Check whether we need a TOC adjusting stub.
2483 (ppc64_elf_build_stubs): Add emit_stub_syms param, and stash in htab.
2484 Build new glink stub.
2485 (ppc64_elf_relocate_section): Handle multiple TOCs. Fix comments.
2486 (ppc64_elf_finish_dynamic_sections): Adjust DT_PPC64_GLINK.
2487 * elf64-ppc.h (ppc64_elf_build_stubs): Update prototype.
2488 (ppc64_elf_next_toc_section, ppc64_elf_reinit_toc): Declare.
2489 * section.c (struct sec): Rename flag12 to has_gp_reloc.
2490 (STD_SECTION): Update.
2491 * ecoff.c (bfd_debug_section): Update comment.
2492 * bfd-in2.h: Regenerate.
2493
90fff0d4
DJ
24942003-06-05 Daniel Jacobowitz <drow@mvista.com>
2495
2496 * elfcode.h (elf_slurp_reloc_table_from_section): Don't dereference
2497 NULL function pointers.
2498
c82b20e4
DJ
24992003-06-05 Daniel Jacobowitz <drow@mvista.com>
2500
2501 * simple.c (bfd_simple_get_relocated_section_contents): Call
2502 _bfd_generic_link_add_symbols instead of bfd_link_add_symbols.
2503
53d4437a
SS
25042003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2505
5a5b9651
SS
2506 * coff-tic54x.c: Removed the ticoff0_bad_format_hook() and
2507 ticoff1_bad_format_hook() functions. Removed the coff0 and coff1
2508 swaptables.
2509 * coff-tic4x.c: Ditto
53d4437a
SS
2510 * coffcode.h: Added extra arguments to CREATE_BIG_COFF_TARGET_VEC
2511 and CREATE_LITTLE_COFF_TARGET_VEC. Created the macro
5a5b9651
SS
2512 CREATE_BIGHDR_COFF_TARGET_VEC. Created the ticoff0_bad_format_hook(),
2513 ticoff1_bad_format_hook() functions. Created the coff0 and coff1
2514 swap tables.
53d4437a
SS
2515 * coff-tic4x.c: Adopted new CREATE_xxx_COFF_TARGET_VEC macros.
2516 * coff-a29k.c: Append COFF_SWAP_TABLE argument
2517 * coff-apollo.c: Ditto
2518 * coff-arm.c: Ditto
2519 * coff-h8300.c: Ditto
2520 * coff-h8500.c: Ditto
2521 * coff-i960.c: Ditto
2522 * coff-m68k.c: Ditto
2523 * coff-m88k.c: Ditto
2524 * coff-mcore.c: Ditto
2525 * coff-sh.c: Ditto
2526 * coff-sparc.c: Ditto
2527 * coff-tic80.c: Ditto
2528 * coff-we32k.c: Ditto
2529 * coff-z8k.c: Ditto
2530 * coff-w65.c: Ditto
2531
736694c8
SS
25322003-06-04 Svein E. Seldal <Svein.Seldal@solidas.com>
2533
2534 * coff-tic4x.c (ticoff0_swap_table, ticoff1_swap_table): Fixed
2535 initialization bug
2536
9ee5e499
JJ
25372003-06-03 Jakub Jelinek <jakub@redhat.com>
2538
2539 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_STACK.
2540 (bfd_section_from_phdr): Likewise.
2541 (map_sections_to_segments): Create PT_GNU_STACK segment header.
2542 (get_program_header_size): Count with PT_GNU_STACK.
2543 * elf-bfd.h (struct elf_obj_tdata): Add stack_flags.
2544 * elflink.h (bfd_elfNN_size_dynamic_sections): Set stack_flags.
2545
6f6f27f8
L
25462003-06-03 H.J. Lu <hongjiu.lu@intel.com>
2547
2548 * elflink.h (elf_link_input_bfd): Call linker error_handler
2549 for discarded definitions.
2550
a3b6428f
NC
25512003-06-03 Elias Athanasopoulos <elathan@phys.uoa.gr>
2552
2553 * syms.c (decode_section_type): Return 'n' if section flags are
2554 SEC_HAS_CONTENTS && SEC_READONLY.
2555
e30ddb24
NC
25562003-06-03 Nick Clifton <nickc@redhat.com>
2557
2558 * elf32-v850.c (v850_elf_howto_t): Rename R_V850_32to
2559 R_V850_ABS32. Add entry for R_V850_REL32.
adadcc0c
AM
2560 (v850_elf_reloc_map): Likewise.
2561 (v850_elf_check_relocs): Likewise.
2562 (v850_elf_perform_relocation): Likewise.
2563 (v850_elf_final_link_relocate): Likewise. Include computation
e30ddb24 2564 to make R_V850_REl32 pc-relative.
adadcc0c 2565
2558b9a9
KK
25662003-06-03 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2567
2568 * elf32-sh.c (sh_elf_size_dynamic_sections): Create .interp section
2569 and DT_DEBUG dynamic tag even for position independent executables.
2570 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewize.
2571
f15398ef
DJ
25722003-06-02 Daniel Jacobowitz <drow@mvista.com>
2573
2574 * config.bfd: Move obsolete entries out of the range of the
2575 targmatch sed script.
2576
cad28985
DJ
25772003-06-02 Daniel Jacobowitz <drow@mvista.com>
2578
2579 * config.bfd (mips*-dec-bsd*, mips*-*-pe*): Mark as obsolete.
2580
f2c822e3
JJ
25812003-05-31 Jakub Jelinek <jakub@redhat.com>
2582
2583 * elf32-ppc.c (allocate_dynrelocs): Use single slot for first 8192
2584 plt entries, not just 8191.
2585
c9c27aad
DJ
25862003-05-30 Daniel Jacobowitz <drow@mvista.com>
2587
2588 * elfxx-mips.c (_bfd_mips_elf_discard_info): Correct loop index.
2589 Reported by Ken Faiczak <kfaiczak@SANDVINE.com>.
2590
36af4a4e
JJ
25912003-05-30 Ulrich Drepper <drepper@redhat.com>
2592 Jakub Jelinek <jakub@redhat.com>
2593
2594 * elflink.h (elf_link_add_object_symbols): Use !info->executable
2595 instead of info->shared where appropriate.
2596 (bfd_elfNN_size_dynamic_sections, elf_link_output_extsym): Likewise.
2597 * elflink.c (_bfd_elf_create_got_section): Likewise.
2598 (_bfd_elf_link_create_dynamic_sections): Likewise.
2599 (_bfd_elf_link_assign_sym_version): Likewise.
2600 * elf32-i386.c (elf_i386_size_dynamic_sections): Create .interp section
2601 and DT_DEBUG dynamic tag even for position independent executables.
2602 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
2603 * elf32-s390.c (elf_s390_size_dynamic_sections: Likewise.
2604 * elf64-ppc.c (ppc64_elf_size_dynamic_sections: Likewise.
2605 * elf64-s390.c (elf_s390_size_dynamic_sections: Likewise.
2606 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections: Likewise.
2607 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections: Likewise.
2608 * elf32-sparc.c (elf32_sparc_size_dynamic_sections: Likewise.
2609 * elf64-alpha.c (elf64_alpha_size_dynamic_sections: Likewise.
2610 * elf64-sparc.c (sparc64_elf_size_dynamic_sections: Likewise.
2611
f8843e87
AM
26122003-05-30 Kris Warkentin <kewarken@qnx.com>
2613
2614 * elf.c (elfcore_grok_nto_status): Only set lwpid for the active or
2615 signalled thread.
2616 (elfcore_grok_nto_gregs): Only make .reg section for the active thread.
2617
29e1a6e4
NC
26182003-05-29 Nick Clifton <nickc@redhat.com>
2619
2620 * pef.c: Include "safe-ctype.h" instead of <ctype.h>.
2621 Tidy up formatting.
2622 * Makefile.am: Add dependency on safe-ctype.h.
2623 * Makefile.in: Regenerate.
2624
4b555070
TS
26252003-05-29 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2626
2627 * elfxx-mips.c: Don't force symbols local unconditionally.
2628
0236e03e
L
26292003-05-28 Alan Modra <amodra@bigpond.net.au>
2630
2631 * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
2632 undefined_symbol call.
2633
9e4aeb93
RS
26342003-05-27 Richard Sandiford <rsandifo@redhat.com>
2635
2636 * elfxx-mips.c (mips_elf_hash_sort_data): Fix formattting.
2637 (mips_elf_link_hash_table): Likewise.
2638
d0c728db
TS
26392003-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2640
2641 * elf64-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2642 R_MIPS_GNU_REL16_S2 support.
2643 (bfd_elf64_bfd_reloc_type_lookup): Use it.
2644 (mips_elf64_rtype_to_howto): Use it.
2645 * elfn32-mips.c (elf_mips_gnu_rel16_s2): Add internally used
2646 R_MIPS_GNU_REL16_S2 support.
2647 (bfd_elf32_bfd_reloc_type_lookup): Use it.
2648 (mips_elf_n32_rtype_to_howto): Use it.
2649
759ebd76
DA
26502003-05-21 Stuart F. Downing <sdowning@fame.com>
2651
2652 * som.h: Define PA_2_0 before including a.out.h
2653
143d77c5
EC
26542003-05-07 Eric Christopher <echristo@redhat.com>
2655 Alexandre Oliva <aoliva@redhat.com>
2656
2657 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Adjust
2658 pic tests, change to warning.
2659 (_bfd_mips_elf_final_link): Remove EF_MIPS_CPIC flag setting.
2660
cea3d58d
NC
26612003-05-21 Marcus Comstedt <marcus@mc.pp.se>
2662
2663 * config.bfd: Check for a target triplet of shl-...-netbsdelf as
2664 well as shle-...-netbsdelf. Remove duplicate entry.
2665
385a4c14
NC
26662003-05-21 Nick Clifton <nickc@redhat.com>
2667
60e42408
NC
2668 * elf32-xstormy16.c (xstormy16_elf_howto_table): Fix dst_mask
2669 for X_STORMY16_REL_12 reloc.
2670
385a4c14 2671 * elf.c (bfd_elf_get_needed_list): Use is_elf_hash_table to check
9b5ecbd0 2672 the type of the hash table in the bfd_link_info structure.
385a4c14
NC
2673 (bfd_elf_get_runpath_list): Likewise.
2674
129b8c20
RM
26752003-05-19 Roland McGrath <roland@redhat.com>
2676
2677 * elf.c (bfd_elf_bfd_from_remote_memory): New function.
2678 * bfd-in.h: Declare it.
2679 * bfd-in2.h: Regenerated.
2680 * elfcode.h (NAME(_bfd_elf,bfd_from_remote_memory)): New function.
2681 * elf-bfd.h (struct elf_backend_data): New function pointer member
2682 elf_backend_bfd_from_remote_memory.
2683 (_bfd_elf32_bfd_from_remote_memory, _bfd_elf64_bfd_from_remote_memory):
2684 Declare them.
2685 * elfxx-target.h (elf_backend_bfd_from_remote_memory): New macro.
2686 (elfNN_bed): Add that to the initializer.
2687
26882003-05-15 Roland McGrath <roland@redhat.com>
2689
2690 * elf.c (elfcore_grok_note): Grok NT_AUXV note, make ".auxv" section.
2691
22d5e339
L
26922003-05-20 Jakub Jelinek <jakub@redhat.com>
2693
2694 * elflink.h (elf_link_output_extsym): Only issue error about !=
2695 STV_DEFAULT symbols if they are bfd_link_hash_undefined.
2696
26972003-05-20 H.J. Lu <hongjiu.lu@intel.com>
2698
2699 * elflink.c (_bfd_elf_merge_symbol): Check ELF_LINK_DYNAMIC_DEF
2700 when removing the old definition for symbols with non-default
2701 visibility.
2702
b645cb17
JE
27032003-05-18 Jason Eckhardt <jle@rice.edu>
2704
2705 * elf32-i860.c (elf32_i860_relocate_highadj): Simplify calculation.
2706
d2ff124f
AS
27072003-05-17 Andreas Schwab <schwab@suse.de>
2708
2709 * elf32-m68k.c (elf_m68k_check_relocs): Cache reloc section in
2710 elf_section_data during processing of pc-relative and absolute
2711 relocations.
2712 (elf_m68k_relocate_section): Use the cached reloc section instead
2713 of computing it again. Fix handling of visibility. Don't modify
2714 addend when copying over a relocation into the output.
2715
9c7a29a3
AM
27162003-05-17 Alan Modra <amodra@bigpond.net.au>
2717
2718 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2719 to trim plt entries. Move undefweak non-default visibility test..
2720 (allocate_dynrelocs): ..from here.
2721 * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Don't test
2722 dynamic_sections_created here. Update comment. Move undefweak
2723 non-default visibility test..
2724 (allocate_dynrelocs): ..from here. Fix comment.
2725 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL
2726 to trim plt entries. Move undefweak non-default visibility test..
2727 (allocate_dynrelocs): ..from here. Fix comment.
2728 * elflink.h (elf_link_output_extsym): Compare ELF_ST_VISIBILITY with
2729 STV_DEFAULT rather than comparing with zero.
2730 * elflink.c (_bfd_elf_merge_symbol): Likewise.
2731 (_bfd_elf_fix_symbol_flags): Likewise. Format comment.
2732
9bcf4de0
TS
27332003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2734
2735 * bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
2736 pointers.
2737 (_bfd_set_gp_value): Likewise.
2738
5d1db417
MS
27392003-05-16 Michael Snyder <msnyder@redhat.com>
2740 From Bernd Schmidt <bernds@redhat.com>
2741 * archures.c (bfd_mach_h8300sx): New.
2742 * bfd-in2.h: Regenerate.
2743 * cpu-h8300.c (h8300_scan)): Add support for h8300sx.
2744 (h8300sx_info_struct): New.
2745 (h8300s_info_struct): Link to it.
2746 * elf32-h8300.c (elf32_h8_mach): Add support for h8300sx.
2747 (elf32_h8_final_write_processing): Likewise.
2748 (elf32_h8_relax_section): Likewise.
2749
80c7c40a
NC
27502003-05-16 Kelley Cook <kelleycook@wideopenwest.com>
2751
2752 * config.bfd: Accept i[3-7]86 variants.
2753 * configure.host: Likewise.
2754 * configure.in: Likewise.
2755 * configure: Regenerate.
2756
c1be741f
L
27572003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2758
2759 * elflink.c (_bfd_elf_fix_symbol_flags): Also hide protected
2760 symbol.
2761
a15d9d3a
L
27622003-05-15 H.J. Lu <hongjiu.lu@intel.com>
2763
2764 * elflink.h (elf_link_check_versioned_symbol): Also allow
2765 the base version.
2766
09695f56
AM
27672003-05-15 Alan Modra <amodra@bigpond.net.au>
2768 H.J. Lu <hongjiu.lu@intel.com>
2769
2770 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_CALLS_LOCAL.
2771 (elf_i386_relocate_section): Likewise.
2772 * elf32-ppc.c (allocate_dynrelocs): Likewise.
2773 (ppc_elf_relocate_section): Likewise.
2774 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2775 (ppc64_elf_relocate_section): Likewise.
2776
40f62fa0
TS
27772003-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2778
2779 * elf32-mips.c (gprel32_with_gp): Remove useless N64 ABI case.
2780
47247ced
SC
27812003-05-13 Stephane Carrez <stcarrez@nerim.fr>
2782
2783 * elf32-m68hc1x.c (_bfd_m68hc11_elf_merge_private_bfd_data): Check for
2784 processor capability, allow merge of HC12 and HCS12 in some cases.
2785 (m68hc11_elf_hash_table_create): Use bfd_malloc instead of bfd_zalloc.
2786 * cpu-m68hc12.c (bfd_m68hc12s_arch): New struct.
2787 (bfd_m68hc12_arch): Link it.
2788 (scan_mach): New function.
2789
32dfa85d
AH
27902003-05-13 Andrew Haley <aph@redhat.com>
2791
2792 * elf.c (bfd_elf_hash): Mask lower 32 bits of hash.
2793
586119b3
AM
27942003-05-13 Alan Modra <amodra@bigpond.net.au>
2795 H.J. Lu <hongjiu.lu@intel.com>
2796
2797 * elf-bfd.h (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Move from
2798 elf32-ppc.c. Add ELF_LINK_FORCED_LOCAL check.
2799 * elf32-ppc.c: (SYMBOL_REFERENCES_LOCAL, SYMBOL_CALLS_LOCAL): Delete.
2800 (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for dynreloc check.
2801 (ppc_elf_relocate_section): Likewise.
2802 * elf64-ppc.c (allocate_dynrelocs): Likewise.
2803 (ppc64_elf_relocate_section): Likewise. Use for .got relocs too.
2804 (ppc64_elf_adjust_dynamic_symbol): Don't assume symbols with .plt
2805 relocs need no other types.
2806 * elf32-i386.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL for
2807 dynreloc check.
2808 (elf_i386_relocate_section): Likewise. Use for .got relocs too.
2809 (elf_i386_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL for
2810 .got relocs.
2811
04e534c3
KK
28122003-05-13 Kaz Kojima <kkojima@rr.iij4u.or.jp>
2813
2814 * elf32-sh.c (sh_elf_adjust_dynamic_symbol): For weak symbols,
2815 copy ELF_LINK_NON_GOT_REF from weakdef.
9b5ecbd0 2816 (allocate_dynrelocs): For undef weak syms with non-default
04e534c3
KK
2817 visibility, a) don't allocate plt entries, b) don't allocate
2818 .got relocs, c) discard dyn rel space
adadcc0c
AM
2819 (sh_elf_relocate_section): d) don't generate .got relocs, e)
2820 don't generate dynamic relocs.
04e534c3
KK
2821 (sh_elf_copy_indirect_symbol): Don't copy ELF_LINK_NON_GOT_REF
2822 for weakdefs when symbol already adjusted.
2823
0afb2dc0
NC
28242003-05-12 Nick Clifton <nickc@redhat.com>
2825
2826 * elf32-xstormy16.c (xstormy16_elf_howto_table): use 'bitfield'
2827 overflow detection for R_XSTORMY16_16 reloc.
2828
9d29900b
NC
28292003-05-12 Paul Clarke <paulc@senet.com.au>
2830
2831 * elf32-h8300.c: Fix typo in name of R_H8_DIR8 reloc.
2832
a48c6a54
JE
28332003-05-11 Jason Eckhardt <jle@rice.edu>
2834
2835 * elf32-i860.c (elf32_i860_relocate_highadj): Properly
2836 adjust upper bits.
2837 (elf32_i860_relocate_splitn): Obtain upper 5 bits from the
2838 proper place.
2839 (elf32_i860_relocate_pc16): Obtain upper 5 bits from the
2840 proper place.
2841
44f745a6
AS
28422003-05-11 Andreas Schwab <schwab@suse.de>
2843
2844 * elf32-m68k.c (elf_m68k_relocate_section): Replace ugly
2845 complicated tests for unresolvable relocs with a simple direct
2846 scheme using "unresolved_reloc" var. Report some detail on
2847 bfd_reloc_outofrange and similar errors.
2848
4ec72bde
MS
28492003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2850
2851 * elf32-s390.c (allocate_dynrelocs, elf_s390_relocate_section):
2852 Fix WILL_CALL_FINISH_DYNAMIC_SYMBOL call.
2853 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
2854 * elf64-s390.c: Likewise.
2855
64285810
MS
28562003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2857
2858 * elf32-s390.c (ELIMINATE_COPY_RELOCS): Define as one.
2859 (elf_s390_adjust_dynamic_symbol): For weak symbols, copy
2860 ELF_LINK_NON_GOT_REF from weakdef.
2861 (elf_s390_copy_indirect_symbol): Test whether the weakdef sym has
2862 already been adjusted before treating it specially.
2863 * el64-s390.c: Likwise.
2864
82058a73
MS
28652003-05-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
2866
2867 * elf32-s390.c (allocate_dynrelocs): For undef weak syms with
2868 non-default visibility, a) don't make them dynamic, b) discard
2869 space for dynamic relocs.
2870 (elf_s390_relocate_section): Initialize the GOT entries and skip
2871 R_390_{8,16,32}/R_390_PC{16,16DBL,32DBL,32} for weak undefined
2872 symbols with non-default visibility.
2873 * elf64-s390.c: Likewise.
2874
60d8b524
AM
28752003-05-09 Alan Modra <amodra@bigpond.net.au>
2876
2877 * cpu-arm.c (arm_check_note): Warning fix.
2878 * elf32-iq2000.c (iq2000_elf_check_relocs): Warning fixes. Arrange
2879 to keep relocs if edited.
2880 (iq2000_elf_print_private_bfd_data): Return TRUE.
2881 * elfxx-ia64.c (elfNN_ia64_relax_section): Use ELFNN_R_SYM, not
2882 ELF64_R_SYM.
2883 (elfNN_ia64_relax_ldxmov): Warning fix.
2884 * xtensa-isa.c (xtensa_add_isa): Warning fix.
2885 * xtensa-modules.c (get_num_opcodes): Warning fix.
2886
e57b5356
AM
28872003-05-09 Andrey Petrov <petrov@netbsd.org>
2888
2889 * elf.c (elf_fake_sections): Use correct cast for sh_name.
2890
45d6a902
AM
28912003-05-09 Alan Modra <amodra@bigpond.net.au>
2892
2893 * elflink.c (_bfd_elf_link_create_dynamic_sections): Move from
2894 elflink.h. Replace LOG_FILE_ALIGN with bed->s->log_file_align.
2895 (_bfd_elf_create_dynamic_sections): Use bed->s->log_file_align.
2896 (bfd_elf_record_link_assignment): Move from elflink.h.
2897 (_bfd_elf_merge_symbol): Likewise.
2898 (_bfd_elf_add_default_symbol): Likewise.
2899 (_bfd_elf_export_symbol): Likewise.
2900 (_bfd_elf_link_find_version_dependencies): Likewise.
2901 (_bfd_elf_link_assign_sym_version): Likewise.
2902 (_bfd_elf_link_read_relocs): Likewise.
2903 (_bfd_elf_link_size_reloc_section): Likewise.
2904 (_bfd_elf_fix_symbol_flags): Likewise.
2905 (_bfd_elf_adjust_dynamic_symbol): Likewise.
2906 (_bfd_elf_link_sec_merge_syms): Likewise.
2907 (elf_link_read_relocs_from_section): Likewise. Use bed->s->sizeof_rel
2908 and bed->s->sizeof_rela.
2909 (_bfd_elf_link_output_relocs): Likewise.
2910 * elf-bfd.h (struct elf_size_info): Rename file_align to
2911 log_file_align.
2912 (struct elf_info_failed): Move from elflink.h.
2913 (struct elf_assign_sym_version_info): Likewise.
2914 (struct elf_find_verdep_info): Likewise.
2915 (_bfd_elf_create_dynamic_sections): Delete duplicate declaration.
2916 (_bfd_elf_merge_symbol, _bfd_elf_add_default_symbol,
2917 _bfd_elf_export_symbol, _bfd_elf_link_find_version_dependencies,
2918 _bfd_elf_link_assign_sym_version,
2919 _bfd_elf_link_create_dynamic_sections, _bfd_elf_link_read_relocs,
2920 _bfd_elf_link_size_reloc_section, _bfd_elf_link_output_relocs,
2921 _bfd_elf_fix_symbol_flags, _bfd_elf_adjust_dynamic_symbol,
2922 _bfd_elf_link_sec_merge_syms): Declare.
2923 (bfd_elf32_link_create_dynamic_sections): Don't declare.
2924 (_bfd_elf32_link_read_relocs): Likewise.
2925 (bfd_elf64_link_create_dynamic_sections): Likewise.
2926 (_bfd_elf64_link_read_relocs): Likewise.
2927 * elflink.h: Move lots o' stuff elsewhere.
2928 * bfd-in.h (bfd_elf32_record_link_assignment): Don't declare.
2929 (bfd_elf64_record_link_assignment): Likewise.
2930 (bfd_elf_record_link_assignment): Declare.
2931 * bfd-in2.h: Regenerate.
2932 * elfcode.h (elf_link_create_dynamic_sections): Don't declare.
2933 (NAME(_bfd_elf,size_info)): Adjust for log_file_align.
2934 * elf.c (_bfd_elf_init_reloc_shdr): Adjust for bed->s->log_file_align.
2935 (assign_file_positions_for_segments): Likewise.
2936 (assign_file_positions_except_relocs): Likewise.
2937 (swap_out_syms, elfcore_write_note): Likewise.
2938 * elf-m10200.c: Adjust for changed function names.
2939 * elf-m10300.c: Likewise.
2940 * elf32-arm.h: Likewise.
2941 * elf32-h8300.c: Likewise.
2942 * elf32-hppa.c: Likewise.
2943 * elf32-ip2k.c: Likewise.
2944 * elf32-m32r.c: Likewise.
2945 * elf32-m68hc11.c: Likewise.
2946 * elf32-m68hc1x.c: Likewise.
2947 * elf32-m68k.c: Likewise.
2948 * elf32-mips.c: Likewise.
2949 * elf32-ppc.c: Likewise.
2950 * elf32-sh.c: Likewise.
2951 * elf32-v850.c: Likewise.
2952 * elf32-xtensa.c: Likewise.
2953 * elf64-alpha.c: Likewise.
2954 * elf64-hppa.c: Likewise.
2955 * elf64-mmix.c: Likewise.
2956 * elf64-ppc.c: Likewise.
2957 * elf64-sh64.c: Likewise.
2958 * elfxx-ia64.c: Likewise.
2959 * elfxx-mips.c: Likewise.
2960 (MIPS_ELF_LOG_FILE_ALIGN): Use log_file_align.
2961 * elf64-alpha.c (alpha_elf_size_info): Adjust for log_file_align.
2962 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
2963 * elf64-mips.c (mips_elf64_size_info): Likewise.
2964 * elf64-s390.c (s390_elf64_size_info): Likewise.
2965 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
2966
bf1e742e
L
29672003-05-08 H.J. Lu <hongjiu.lu@intel.com>
2968
2969 * elflink.h (elf_add_default_symbol): After skipping the
2970 unversioned symbol, go to non-default one.
2971
6a32c710
L
29722003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2973
2974 * elfxx-ia64.c (_bfd_elf_link_hash_hide_symbol): Also clear the
2975 want_plt field.
2976 (elfNN_ia64_relocate_section): Don't do dynamic symbol lookup
2977 for symbols with non-default visibility.
2978
71552942
L
29792003-05-07 H.J. Lu <hongjiu.lu@intel.com>
2980
2981 * elflink.h (elf_link_check_versioned_symbol): Also handle the
2982 case that a DSO references a hidden symbol which may be
2983 satisfied by a versioned symbol in another DSO.
2984 (elf_link_output_extsym): Check versioned definition for hidden
2985 symbol referenced by a DSO.
2986
208c2cd6
NC
29872003-05-07 Nick Clifton <nickc@redhat.com>
2988
2989 * elf32-xstormy16.c (xstormy16_elf_howto_table): Reset
2990 R_XSTORMY16_16 reloc to ignore overflows.
2991
aa701218
AO
29922003-05-06 Alexandre Oliva <aoliva@redhat.com>
2993
2994 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Improve
2995 error message for mixing different-endian files. Check for ABI
2996 compatibility of input files with the selected emulation.
2997
4e795f50
AM
29982003-05-05 Alan Modra <amodra@bigpond.net.au>
2999
3000 * elf32-i386.c (allocate_dynrelocs): For undef weak syms with
3001 non-default visibility, a) don't make them dynamic, b) discard
3002 space for dynamic relocs.
3003 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
3004
3005 * elf32-ppc.c (allocate_dynrelocs): For undef weak syms with
3006 non-default visibility, a) don't allocate plt entries, b) don't
3007 allocate .got relocs, c) discard dyn rel space,
3008 (ppc_elf_relocate_section): d) don't generate .got relocs, e)
3009 don't generate dynamic relocs.
3010 * elf64-ppc.c (allocate_dynrelocs): As above.
3011 (ppc64_elf_relocate_section): As above.
3012
4bc6e03a
AJ
30132003-05-05 Andreas Jaeger <aj@suse.de>
3014
3015 * elf64-x86-64.c (allocate_dynrelocs): Don't allocate dynamic
3016 relocation entries for weak undefined symbols with non-default
3017 visibility.
3018 (elf64_x86_64_relocate_section): Initialize the GOT entries and
3019 skip R_386_32/R_386_PC32 for weak undefined symbols with
3020 non-default visibility.
3021
ef5aade5
L
30222003-05-04 H.J. Lu <hjl@gnu.org>
3023
3024 * elf32-i386.c (allocate_dynrelocs): Don't allocate dynamic
3025 relocation entries for weak undefined symbols with non-default
3026 visibility.
3027 (elf_i386_relocate_section): Initialize the GOT entries and
3028 skip R_386_32/R_386_PC32 for weak undefined symbols with
3029 non-default visibility.
129b8c20 3030
ef5aade5
L
3031 * elfxx-ia64.c (allocate_fptr): Don't allocate function
3032 descriptors for weak undefined symbols with non-default
3033 visibility.
3034 (allocate_dynrel_entries): Don't allocate relocation entries
3035 for symbols resolved to 0.
3036 (set_got_entry): Don't install dynamic relocation for weak
3037 undefined symbols with non-default visibility.
3038 (set_pltoff_entry): Likewise.
3039
3040 * elflink.h (elf_fix_symbol_flags): Hide weak undefined symbols
3041 with non-default visibility.
3042 (elf_link_output_extsym): Don't make weak undefined symbols
3043 with non-default visibility dynamic.
3044
c424e0e9
L
30452003-05-04 H.J. Lu <hjl@gnu.org>
3046
3047 * elflink.h (elf_merge_symbol): Correctly handle weak definiton.
3048
d31e3dfe
L
30492003-05-04 H.J. Lu <hjl@gnu.org>
3050
3051 * elflink.h (elf_merge_symbol): Don't record a hidden/internal
3052 symbol dynamic. Check indirection when removing the old
3053 definition for symbols with non-default visibility.
3054 (elf_add_default_symbol): Skip when told by elf_merge_symbol.
3055
4d2e1ff0
NC
30562003-05-02 Nick Clifton <nickc@redhat.com>
3057
3058 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make the
3059 R_XSTORMY16_8 and R_XSTORMY16_16 relocs detect and complain about
3060 unsigned overflow.
3061
d40d037c
AJ
30622003-05-02 Andreas Jaeger <aj@suse.de>
3063
3064 * elf64-x86-64.c (elf_x86_64_copy_indirect_symbol): Don't copy
3065 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3066 (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3067 (elf_x86_64_adjust_dynamic_symbol): For weak symbols, copy
3068 ELF_LINK_NON_GOT_REF from weakdef.
3069
c5d1701e
NC
30702003-05-02 Charles Lepple <clepple@ghz.cc>
3071 Nick Clifton <nickc@redhat.com>
3072
3073 * acinclude.m4: Fix name of --enable-install-libbfd switch.
3074 * aclocal.m4: Regenerate.
3075 * configure: Regenerate.
3076 * Makefile.in: Regenerate.
3077
81848ca0
AM
30782003-05-01 Alan Modra <amodra@bigpond.net.au>
3079
3080 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Test whether the
3081 weakdef sym has already been adjusted before treating it specially.
3082 * elf32-i386.c (elf_i386_copy_indirect_symbol): Don't copy
3083 ELF_LINK_NON_GOT_REF for weakdefs when symbol already adjusted.
3084 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
3085 (ppc64_elf_check_relocs): Set ELF_LINK_NON_GOT_REF.
03d14457 3086
c7996ad6
L
30872003-04-28 H.J. Lu <hjl@gnu.org>
3088
3089 * elfxx-ia64.c (elfNN_ia64_relax_section): Relax ldxmov during
3090 the relax finalize pass.
3091
3092 * section.c (struct sec): Add need_finalize_relax and remove
3093 flag11.
3094 (STD_SECTION): Update struct sec initializer.
3095 * bfd-in2.h: Regenerated.
3096
f006af20
L
30972003-04-28 H.J. Lu <hjl@gnu.org>
3098
3099 * elflink.h (elf_merge_symbol): Call elf_backend_copy_indirect_symbol
3100 to copy any information related to dynamic linking when we flip
3101 the indirection.
3102
1b1fe8fe
L
31032003-04-27 H.J. Lu <hjl@gnu.org>
3104
3105 * elf-bfd.h (ELF_LINK_DYNAMIC_DEF): New.
3106 (ELF_LINK_DYNAMIC_WEAK): New.
3107
3108 * elflink.h (elf_merge_symbol): Add one argument to indicate if
3109 a symbol should be skipped. Ignore definitions in dynamic
3110 objects for symbols with non-default visibility.
3111 (elf_add_default_symbol): Adjusted.
3112 (elf_link_add_object_symbols): Check if a symbol should be
3113 skipped. Don't merge the visibility field with the one from
3114 a dynamic object.
3115 (elf_link_check_versioned_symbol): Use undef_bfd.
3116 (elf_link_output_extsym): Warn if a forced local symbol is
3117 referenced from dynamic objects. Make non-weak undefined symbol
3118 with non-default visibility a fatal error.
3119
052a450c
DJ
31202003-04-27 Daniel Jacobowitz <drow@mvista.com>
3121
3122 * configure.in: Bump version on HEAD to 2.14.90.
3123 * configure: Regenerated.
3124
d204f4c0
SC
31252003-04-26 Stephane Carrez <stcarrez@nerim.fr>
3126
3127 PR savannah/3331:
3128 * elf32-m68hc11.c (m68hc11_elf_relax_section): Clear prev_insn_group
3129 when we couldn't relax something.
3130
3c0a515d
L
31312003-04-25 Alan Modra <amodra@bigpond.net.au>
3132
3133 * elflink.h (elf_merge_symbol): When we find a regular definition
3134 for an indirect symbol, flip the indirection so that the old
3135 direct symbol now points to the new definition.
3136
d145330d
RM
31372003-04-24 Roland McGrath <roland@redhat.com>
3138
3139 * elf.c (bfd_section_from_phdr): Map PT_GNU_EH_FRAME to "eh_frame_hdr".
3140
fc0bffd6
AM
31412003-04-24 Alan Modra <amodra@bigpond.net.au>
3142
3143 * elf32-ppc.c: Formatting and comment fixes.
3144 (ELIMINATE_COPY_RELOCS): Move before ppc_elf_copy_indirect_symbol.
3145 (ppc_elf_copy_indirect_symbol): Copy flags here for weakdefs.
3146
31472003-04-24 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
8d9cd6b1
NC
3148
3149 * archures.c (bfd_mach_h8300hn, bfd_mach_h8300sn): Added.
3150 * bfd-in2.h: Rebuilt.
3151 * coff-h8300.c (BADMAG): Add check for H8300HNBADMAG & H8300SNBADMAG.
fc0bffd6 3152 * coffcode.h (coff_set_arch_mach_hook): Add case for H8300HNMAGIC
8d9cd6b1
NC
3153 & H8300SNMAGIC.
3154 (coff_set_flags): Add case for bfd_mach_h8300hn & bfd_mach_h8300sn.
3155 * cpu-h8300.c (h8300_scan): Handle h8300hn, h8300sn.
3156 (h8300sn_info_struct, h8300hn_info_struct): New.
3157 * elf32-h8300.c (elf32_h8_mach): Handle case for h8300hn & h8300sn
3158 (elf32_h8_final_write_processing): Likewise.
3159
267fb3c1
KK
31602003-04-23 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3161
3162 * elf32-sh.c (tpoff): New.
3163 (struct elf_sh_dyn_relocs): Remove tls_tpoff32.
3164 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
fc0bffd6 3165 (allocate_dynrelocs): Don't make unnecessary dynamic TLS
267fb3c1 3166 relocations. Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses.
fc0bffd6 3167 (sh_elf_relocate_section): Likewise. Remove unnecessary tests.
267fb3c1
KK
3168 (dtpoff_base): Fix wrong indentation.
3169 (sh_elf_check_relocs): Don't set DF_STATIC_TLS flag with non-TLS
3170 relocations. Don't set tls_tpoff32 flag. Don't make unnecessary
3171 R_SH_TLS_TPOFF32 relocations.
3172
ef230218
JR
31732003-04-23 J"orn Rennecke <joern.rennecke@superh.com>
3174
3175 * archures.c (enum bfd_architecture): Amend comment to refer to SuperH.
3176 * cpu-sh.c: Likewise.
3177 * elf32-sh.c: Likewise.
3178 * reloc.c (bfd_reloc_code_real): Likewise.
3179 * elf32-sh64-com.c: Change comment to refer to SuperH.
3180 * elf32-sh64.c: Likewise.
3181 * elf64-sh64.c: Likewise.
3182 * bfd-in2.h (enum bfd_architecture): Regenerate.
3183
8c29f035
AM
31842003-04-23 Alan Modra <amodra@bigpond.net.au>
3185
3186 From Julien LEMOINE <speedblue@debian.org>
3187 * elf32-i386.c (elf_i386_info_to_howto): Delete.
3188 (elf_info_to_howto): Define as elf_i386_info_to_howto_rel.
3189
26597c86
NC
31902003-04-22 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
3191
3192 * archures.c: Replace references to Mitsubishi M32R with references
3193 to Renesas M32R.
3194 * relocs.c: Likewise.
3195 * bfd-in2.h: Regenerate.
3196
cc13e3ef
RH
31972003-04-21 Richard Henderson <rth@redhat.com>
3198
3199 * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Return false for an
3200 executable when a symbol is defined both regular and dynamic.
3201
f5a6f915
SC
32022003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3203
3204 * Makefile.am (BFD32_BACKENDS): Add elf32-m68hc1x.lo.
3205 (elf32-m68hc1x.lo): Update dependencies
3206 * configure.in: Add elf32-m68hc1x.lo.
3207 * configure: Rebuild.
3208 * Makefile.in: Rebuild.
3209
3a65329d
SC
32102003-04-21 Stephane Carrez <stcarrez@nerim.fr>
3211
3212 * elf32-m68hc1x.c: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3213 (m68hc11_elf_hash_table_create): New function.
3214 (elf32_m68hc11_link_hash_table_free): New function.
3215 (stub_hash_newfunc): New function.
3216 (m68hc11_add_stub): New function.
3217 (elf32_m68hc11_add_symbol_hook): New function.
3218 (elf32_m68hc11_setup_section_lists): New function.
3219 (elf32_m68hc11_next_input_section): New function.
3220 (elf32_m68hc11_size_stubs): New function.
3221 (elf32_m68hc11_build_stubs): New function.
3222 (m68hc11_get_relocation_value): New function.
3223 (elf32_m68hc11_relocate_section): Call the above to redirect
3224 some relocations to the trampoline code.
3225 (m68hc11_elf_export_one_stub): New function.
3226 (m68hc11_elf_set_symbol): New function.
3227 (elf32_m68hc11_build_stubs): Call it via bfd_hash_traverse.
3228 (m68hc11_elf_get_bank_parameters): Get parameters only when the info
3229 is not yet initialized.
3230
3231 * elf32-m68hc1x.h: New file (from elf32-m68hc11.c and elf32-m68hc12.c)
3232 (elf32_m68hc11_stub_hash_entry): New struct.
3233 (m68hc11_page_info): Add trampoline handler address.
3234 (m68hc11_elf_link_hash_table): Add stubs generation members.
3235 (elf32_m68hc11_add_symbol_hook): Declare.
3236 (elf32_m68hc11_setup_section_lists): Declare.
3237 (elf32_m68hc11_size_stubs): Declare.
3238 (elf32_m68hc11_build_stubs): Declare.
8c29f035 3239
3a65329d
SC
3240 * elf32-m68hc11.c (m68hc11_elf_ignore_reloc): Move to elf32-m68hc1x.c.
3241 (elf32_m68hc11_gc_mark_hook, elf32_m68hc11_gc_sweep_hook): Likewise.
3242 (elf32_m68hc11_check_relocs, elf32_m68hc11_relocate_section): Ditto.
3243 (_bfd_m68hc11_elf_set_private_flags): Ditto.
3244 (_bfd_m68hc11_elf_merge_private_bfd_data): Ditto.
3245 (_bfd_m68hc11_elf_print_private_bfd_data): Ditto.
3246 (bfd_elf32_bfd_link_hash_table_create): Define.
3247 (elf_backend_add_symbol_hook): Define.
3248 (m68hc11_elf_bfd_link_hash_table_create): New function.
3249 (m68hc11_elf_build_one_stub): New function.
3250 (m68hc11_elf_size_one_stub): New function.
3251 (m68hc11_elf_bfd_link_hash_table_create): Install the above.
3252 (bfd_elf32_bfd_link_hash_table_create): Define.
3253
3254 * elf32-m68hc12.c (m68hc11_elf_ignore_reloc): Remove.
3255 (m68hc12_addr_is_banked): Remove, use m68hc11_addr_is_banked.
3256 (m68hc12_phys_addr): Ditto.
3257 (m68hc12_phys_page): Ditto.
3258 (m68hc12_elf_special_reloc): Move to elf32-m68hc1x.c.
3259 (elf32_m68hc11_gc_mark_hook): Likewise.
3260 (elf32_m68hc11_gc_sweep_hook): Likewise.
3261 (elf32_m68hc11_check_relocs): Likewise.
3262 (elf32_m68hc11_relocate_section): Likewise.
3263 (_bfd_m68hc12_elf_set_private_flags): Likewise.
3264 (_bfd_m68hc12_elf_merge_private_bfd_data): Likewise.
3265 (_bfd_m68hc12_elf_print_private_bfd_data): Likewise.
3266 (m68hc12_elf_build_one_stub): New function.
3267 (m68hc12_elf_size_one_stub): New function.
3268 (m68hc12_elf_bfd_link_hash_table_create): New function, use the above.
3269 (elf_backend_add_symbol_hook): Define.
3270 (elf_m68hc11_howto_table): Use TRUE for pcrel relocs; fix masks.
3271
4081944f
NC
32722003-04-18 Nick Clifton <nickc@redhat.com>
3273
3274 * format.c (bfd_check_format_matches): Only check associated
3275 vector if the matching_vector has been created.
3276
060dc71d
AO
32772003-04-15 Alexandre Oliva <aoliva@redhat.com>
3278
3279 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Fix typo in
3280 2003-04-09's change.
3281
a3476bef
NC
32822003-04-15 Brian Ford <ford@vss.fsi.com>
3283
3284 * peicode.h (coff_swap_scnhdr_in): If a section holds
3285 uninitialized data and is from an object file or from an
3286 executable image that has not initialized the s_size field, or if
3287 the physical size is padded, use the virtual size (stored in
3288 s_paddr) instead.
3289
ca4fa240
NC
32902003-04-15 H.J. Lu <hjl@gnu.org>
3291
3292 * elflink.h (elf_link_add_object_symbols): Properly report
3293 filename for alignment reduction.
3294
c2dcd04e
NC
32952003-04-15 Rohit Kumar Srivastava <rohits@kpitcummins.com>
3296
3297 * archures.c: Replace occurrances of 'Hitachi' with 'Renesas'.
3298 * reloc.c: Likewise.
3299 * coff-h8300.c: Likewise.
3300 * coff-h8500.c: Likewise.
3301 * coff-sh.c: Likewise.
3302 * cpu-h8300.c: Likewise.
3303 * cpu-sh.c: Likewise.
3304 * elf32-h8300.c: Likewise.
3305 * elf32-sh.c: Likewise.
3306 * elf32-sh64-com.c: Likewise.
3307 * elf32-sh64.c: Likewise.
3308 * elf64-sh64.c: Likewise.
3309 * bfd-in2.h: Regenerate.
3310
f7661995
NC
33112003-04-14 H.J. Lu <hjl@gnu.org>
3312
3313 * elflink.h (elf_link_add_object_symbols): Maintain maximum
3314 alignment for common symbols. Warn reducing alignment for
3315 common symbols. Report old filename when symbol size changes.
3316
93a2b7ae
AO
33172003-04-12 Alexandre Oliva <aoliva@redhat.com>
3318
3319 * elfxx-mips.c (mips_elf_calculate_relocation): Adjust two other
3320 occurrences of the same test changed in the previous patch.
3321 Optimize.
3322
0176c794
AO
33232003-04-11 Alexandre Oliva <aoliva@redhat.com>
3324
3325 * elfxx-mips.c (mips_elf_get_global_gotsym_index): New.
3326 (mips_elf_calculate_relocation): Decay GOT_PAGE/GOT_OFST to
3327 GOT_DISP/addend only if the symbol got a global GOT entry.
3328
0fdc1bf1
AO
33292003-04-10 Alexandre Oliva <aoliva@redhat.com>
3330
3331 * elfxx-mips.c (mips_elf_calculate_relocation): Decay
3332 GOT_PAGE/GOT_OFST referencing overridable symbol to
3333 GOT_DISP/addend.
3334 (_bfd_mips_elf_check_relocs): Handle GOT_PAGE referencing
3335 global symbol as GOT_DISP.
3336
9b8c98a4
BW
33372003-04-10 Bob Wilson <bob.wilson@acm.org>
3338
3339 * elf32-xtensa.c (elf_xtensa_relocate_section): Don't continue to the
3340 next relocation on an undefined symbol.
3341
ec1659c8
RH
33422003-04-09 Richard Henderson <rth@redhat.com>
3343
3344 * elf64-alpha.c (elf64_alpha_relocate_section) <R_ALPHA_GPREL32>:
3345 Ignore relocations against r_symndx == 0.
3346
7dfb07f7
L
33472003-04-09 H.J. Lu <hjl@gnu.org>
3348
3349 * elf64-alpha.c (elf64_alpha_relocate_section): Don't return
3350 FALSE for undefined symbols.
3351 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3352
a3805e4e
AO
33532003-04-09 Alexandre Oliva <aoliva@redhat.com>
3354
3355 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Try DWARF3-standard
3356 and IRIX-specific shift-to-64-bit 4-byte lengths before following
3357 addr_size.
3358
69931e60
AO
33592003-04-08 Alexandre Oliva <aoliva@redhat.com>
3360
3361 * elf32-mips.c (bfd_elf32_bfd_reloc_type_lookup): Detect (ctor)
3362 pointer size from ABI, not arch_bits_per_address.
3363
59a8c196
KB
33642003-04-07 Kevin Buettner <kevinb@redhat.com>
3365
3366 * elfn32-mips.c (elf32_mips_grok_prstatus): Adjust core file related
3367 constants for n32 ABI.
3368
8e16317c
NC
33692003-04-06 Andrew Cagney <cagney@redhat.com>
3370
3371 * simple.c (bfd_simple_get_relocated_section_contents): Disable
3372 free that leads to GDB vs BFD memory corruption.
3373
196486be
SC
33742003-04-04 Stephane Carrez <stcarrez@nerim.fr>
3375
3376 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Also adjust
3377 symbols that mark the end of the section.
3378 (m68hc11_elf_relax_section): Use R_M68HC11_PCREL_8 relocs when
3379 converting to a relative branch so that the offset is computed after
3380 the relaxation; also relocate a jsr into a bsr if possible but don't
3381 relax them if they are to a far symbol as we need to call the
3382 trampoline code.
3383 (elf_m68hc11_howto_table): Set pcrel_offset to true.
3384
be33c5dd
SS
33852003-04-04 Svein E. Seldal <Svein.Seldal@solidas.com>
3386
3387 * archures.c: Namespace cleanup. Rename bfd_mach_c3x to
3388 bfd_mach_tic3x and bfd_mach_c4x to bfd_mach_tic4x
3389 * bfd-in2.h: Regenerate
3390 * coff-tic4x.c: Namespace cleanup. Replace s/c4x/tic4x/
3391 * cpu-tic4x.c: Ditto
3392
ff0c9faf
NC
33932003-04-03 Nick Clifton <nickc@redhat.com>
3394
3395 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Compute ps and ss
3396 differently for object files and executables.
3397 * peicode.h (coff_swap_scnhdr_in): Only set the s_size field
3398 for object files or for executables who have not already
3399 initialised the field.
3400 * libpei.h (bfd_pe_executable_p): New macro. Return true if
3401 the PE format bfd is an executable.
3402
2b98e6c0
AM
34032003-04-03 Alan Modra <amodra@bigpond.net.au>
3404
3405 * elf32-ppc.c (ppc_elf_check_relocs): Don't use SYMBOL_REFERENCES_LOCAL
3406 here as it's too early to reliably determine locality.
3407 (ppc_elf_gc_sweep_hook): Likewise.
c8b21ee5 3408 (SYMBOL_REFERENCES_LOCAL): Expand comment.
2b98e6c0 3409
92403579
BW
34102003-04-02 Bob Wilson <bob.wilson@acm.org>
3411
3412 * xtensa-modules.c: Remove comment indicating that this is a
3413 generated file.
3414
c45a316a
AM
34152003-04-02 Alan Modra <amodra@bigpond.net.au>
3416
3417 * elfxx-mips.c (_bfd_mips_elf_hide_symbol): Test for NULL dynobj.
3418
e0001a05
NC
34192003-04-01 Bob Wilson <bob.wilson@acm.org>
3420
8c29f035
AM
3421 * Makefile.am (ALL_MACHINES): Add cpu-xtensa.lo.
3422 (ALL_MACHINES_CFILES): Add cpu-xtensa.c.
3423 (BFD32_BACKENDS): Add elf32-xtensa.lo, xtensa-isa.lo, and
3424 xtensa-modules.lo.
3425 (BFD32_BACKENDS_CFILES): Add elf32-xtensa.c, xtensa-isa.c, and
3426 xtensa-modules.c.
3427 (cpu-xtensa.lo): New target.
3428 (elf32-xtensa.lo): Likewise.
3429 (xtensa-isa.lo): Likewise.
3430 (xtensa-modules.lo): Likewise.
3431 * Makefile.in: Regenerate.
3432 * archures.c (bfd_architecture): Add bfd_{arch,mach}_xtensa.
3433 (bfd_archures_list): Add bfd_xtensa_arch.
3434 * config.bfd: Handle xtensa-*-*.
3435 * configure.in: Handle bfd_elf32_xtensa_{le,be}_vec.
3436 * configure: Regenerate.
3437 * reloc.c: Add BFD_RELOC_XTENSA_{RTLD,GLOB_DAT,JMP_SLOT,RELATIVE,
3438 PLT,OP0,OP1,OP2,ASM_EXPAND,ASM_SIMPLIFY}.
3439 * targets.c (bfd_elf32_xtensa_be_vec): Declare.
3440 (bfd_elf32_xtensa_le_vec): Likewise.
3441 (bfd_target_vector): Add bfd_elf32_xtensa_{be,le}_vec.
3442 * cpu-xtensa.c: New file.
3443 * elf32-xtensa.c: Likewise.
3444 * xtensa-isa.c: Likewise.
3445 * xtensa-modules.c: Likewise.
3446 * libbfd.h: Regenerate.
3447 * bfd-in2.h: Likewise.
e0001a05 3448
5a6c6817
NC
34492003-04-01 Nick Clifton <nickc@redhat.com>
3450
3451 * archures.c (bfd_mach_arm_unknown): Define.
3452 * bfd-in.h (bfd_arm_merge_machines, bfd_arm+update_notes,
3453 bfd_arm_get_mach_from_notes): Prototype.
3454 * bfd-in2.h: Regenerate.
3455 * coff-arm.c (coff_arm_merge_private_bfd_data): Call
3456 bfd_arm_merge_machines.
3457 (coff_arm_final_link_postscript): Call bfd_arm_update_notes.
3458 * coffcode.h (coff_set_arch_mach_hook): Call
3459 bfd_arm_get_mach_from_notes.
3460 * coffgen.c (coff_real_object_p): Revert previous delta.
3461 * cpu_arm.c (arm_check_note): New function. Examine a note in a
3462 .note section.
3463 (bfd_arm_merge_machines): New function: Handle the merging of ARM
3464 binaries compiled for different architectures..
3465 (bfd_arm_update_notes): New function: Update an ARM note section.
3466 (bfd_arm_get_mach_from_notes): New function: Extract a bfd machine
3467 number from an ARM note section.
3468 * elf32-arm.h (elf32_arm_object_p): Use
3469 bfd_arm_get_mach_from_notes.
3470 (elf32_arm_merge_private_bfd_data): Use bfd_arm_merge_machines.
3471 (elf32_arm_final_write_processing): Use bfd_arm_update_notes.
8c29f035 3472
0cc1cf99
BE
34732003-04-01 Ben Elliston <bje@wasabisystems.com>
3474
3475 * dwarf2.c (read_attribute_value): Correct typo in comment.
3476
af3ef9fe
NC
34772003-04-01 Nick Clifton <nickc@redhat.com>
3478
3479 * dwarf2.c (concat_filename): Use bfd_malloc() and strdup()
3480 instead of concat().
3481 (decode_line_info): Only free filename if it is not NULL.
d63fd5d1
NC
3482 (add_line_info): Make a copy of the filename when storing it into
3483 the info structure.
af3ef9fe 3484
6e84a906
DJ
34852003-03-31 Andreas Schwab <schwab@suse.de>
3486 Daniel Jacobowitz <drow@mvista.com>
3487
3488 * simple.c (bfd_simple_get_relocated_section_contents): Add
3489 parameter symbol_table. Optionally use it instead of the symbol
3490 table from the bfd. Save and restore output offsets and output
3491 sections around bfd_get_relocated_section_contents. Fix a memory
3492 leak.
3493 (simple_save_output_info, simple_restore_output_info): New
3494 functions.
3495 * bfd-in2.h: Regenerate.
3496 * dwarf2.c (read_abbrevs): Use
3497 bfd_simple_get_relocated_section_contents instead of
3498 bfd_get_section_contents.
3499 (decode_line_info): Likewise.
3500 (_bfd_dwarf2_find_nearest_line): Likewise. Don't call
3501 find_rela_addend.
3502 (find_rela_addend): Remove.
3503 * elfxx-ia64.c (elfNN_ia64_reloc): Weaken sanity check for
3504 debugging sections.
3505 (elfNN_ia64_hash_table_create): Create the hash table with malloc,
3506 not bfd_zalloc.
3507
5ed6aba4
NC
35082003-03-31 David Heine <dlheine@suif.stanford.edu>
3509
3510 * aoutx.h (aout_link_hash_table_create): Use bfd_malloc instead of
3511 bfd_alloc.
3512 * dwarf2.c (concat_filename): Always allocate space for the
3513 returned filename.
3514 (decode_line_info): Free the allocated filename returned by
3515 concat_filename.
3516 * elf-eh-frame.c (bfd_elf_write_section_eh_frame): Fix memory leaks.
3517 * elf.c (copy_private_bfd_data): Likewise.
3518 (_bfd_elf_slurp_version_tables): Fix bug freeing contents pointer.
3519 * elflink.h (elf_link_sort_relocs): Fix memory leak.
3520 * format.c (bfd_check_format_matches): Likewise.
3521 * linker.c (bfd_generic_final_link): Likewise.
3522 * opncls.c (find_separate_debug_info): Likewise.
3523 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
8c29f035 3524
5941afc1
L
35252003-03-28 H.J. Lu <hjl@gnu.org>
3526
3527 * elflink.h (elf_link_add_object_symbols): Correctly combine
3528 visibilities.
3529
9d73f260
JJ
35302003-03-27 Jakub Jelinek <jakub@redhat.com>
3531
3532 * elfxx-ia64.c (elfNN_ia64_relax_section): Reset self_dtpmod_offset
3533 to -1 before recomputing got offsets.
3534
a5ad465a
AS
35352003-03-26 Andreas Schwab <schwab@suse.de>
3536
3537 * elf32-m68k.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3538 (elf_m68k_relocate_section): Use it to correctly handle symbols
3539 forced to be local.
3540 (elf_m68k_finish_dynamic_symbol): Emit RELATIVE reloc for got
3541 entries for symbols that are forced to be local.
3542
d0647110
AO
35432003-03-25 Alexandre Oliva <aoliva@redhat.com>
3544
3545 * elfxx-mips.c (_bfd_mips_relax_section): New function.
3546 * elfxx-mips.h (_bfd_mips_relax_section): Declare.
3547 * elfn32-mips.c, elf64-mips.c: Use it.
3548
e16bb312
NC
35492003-03-25 Stan Cox <scox@redhat.com>
3550 Nick Clifton <nickc@redhat.com>
8c29f035 3551
9b5ecbd0 3552 Contribute support for Intel's iWMMXt chip - an ARM variant:
e16bb312
NC
3553
3554 * archures.c: Add bfd_mach_arm_iWMMXt.
3555 * reloc.c: Add BFD_RELOC_ARM_CP_OFF_IMM_S2.
3556 * bfd-in2.h: Regenerate.
3557 * libbfd.h: Regenerate.
3558 * coff-arm.c (coff_arm_merge_private_bfd_data): Allow iWMMXt
3559 object files to be linked with XScale ones.
3560 (coff_arm_final_link_postscript): Update note section.
3561 * coffcode.h (coff_set_arch_mach_hook): Handle note section.
3562 * coffgen.c (coff_real_object_p): Call bfd_coff_set_arch_mach_hook
3563 after identifying a coff binary.
3564 * cpu-arm.c (processors): Add iWMMXt.
3565 (arch_inf): Likewise.
3566 * elf32-arm.h (arm_object_p): Handle note section.
9b5ecbd0 3567 (elf32_arm_merge_private_bfd_data): Allow iWMMXt object files to
e16bb312
NC
3568 be linked with XScale ones.
3569 (elf32_arm_section_flags): New function: Set flags on note section.
3570 (elf32_arm_final_write_processing): Handle note section.
3571
25f14c34
DD
35722003-03-21 DJ Delorie <dj@redhat.com>
3573
3574 * elf32-xstormy16.c (elf32_xstormy16_relocate_section): Call
3575 _bfd_elf_rela_local_sym.
3576
04b3329b
L
35772003-03-20 H.J. Lu <hjl@gnu.org>
3578
3579 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't try relax for
3580 non-ELF outputs.
3581
c25cfdf8
NC
35822003-03-20 Nick Clifton <nickc@redhat.com>
3583
3584 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Initialise $idata2 and
3585 $idata5 in case bfd_coff_final_link is not called.
3586
3e1d7f19
JJ
35872003-03-19 Jakub Jelinek <jakub@redhat.com>
3588
3589 * elf64-sparc.c (struct sparc64_elf_section_data): Add reloc_count
3590 field.
3591 (canon_reloc_count): Define.
3592 (sparc64_elf_slurp_one_reloc_table, sparc64_elf_slurp_reloc_table,
3593 sparc64_elf_canonicalize_dynamic_reloc): Use it instead of
3594 reloc_count.
3595 (sparc64_elf_canonicalize_reloc): New routine.
3596 (bfd_elf64_canonicalize_reloc): Define.
3597
3fa1d917
JJ
35982003-03-18 Jakub Jelinek <jakub@redhat.com>
3599
3600 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle relaxation
3601 againt mergeable sections. Take r_addend into account when caching
3602 trampolines.
3603
f86b235a
RH
36042003-03-18 Richard Henderson <rth@redhat.com>
3605
8c29f035
AM
3606 * elfxx-ia64.c (get_dyn_sym_info): Return NULL gracefully for
3607 local symbols that have no dyninfo.
f86b235a 3608
49ae03bf
NC
36092003-03-14 Gene Smith <gene.smith@siemens.com>
3610
3611 * ieee.c (ieee_write_expression): Handle the case where symbol is
3612 NULL.
3613 General formatting improvements.
3614
6a457e5c
NC
36152003-03-13 Nick Clifton <nickc@redhat.com>
3616
3617 * configure.in (LINGUAS): Add zh_CN.
3618 * configure: Regenerate.
3619 * po/zh_CN.po: New file.
3620
93516ec3
NC
36212003-03-13 Elias Athanasopoulos <elathan@phys.uoa.gr>
3622
3623 * aout-cris.c (BYTES_IN_WORD): Don't define.
3624 aout-encap.c: Likewise.
3625 aout-ns32k.c: Likewise.
3626 aout-tic30.c: Likewise.
3627 hp300bsd.c: Likewise.
3628 i386aout.c: Likewise.
3629 i386dynix.c: Likewise.
3630 i386linux.c: Likewise.
3631 i386lynx.c: Likewise.
3632 i386mach3.c: Likewise.
3633 m68k4knetbsd.c: Likewise.
3634 m68klinux.c: Likewise.
3635 m68klynx.c: Likewise.
3636 m68knetbsd.c: Likewise.
3637 m88kmach3.c: Likewise.
3638 mipsbsd.c: Likewise.
3639 newsos3.c: Likewise.
3640 sparclinux.c: Likewise.
3641 sparclynx.c: Likewise.
3642 sparcnetbsd.c: Likewise.
3643 vaxbsd.c: Likewise. Fix comment formatting.
3644
fee24f1c
AO
36452003-03-12 Alexandre Oliva <aoliva@redhat.com>
3646
0b25d3e6
AO
3647 * Reverted 2003-03-02's patch.
3648
fee24f1c
AO
3649 * elfxx-target.h (bfd_elfNN_canonicalize_reloc): Make it
3650 overridable.
3651 * elf64-mips.c (mips_elf64_canonicalize_reloc,
3652 mips_elf64_get_dynamic_reloc_upper_bound,
3653 mips_elf64_canonicalize_dynamic_reloc): New, adapted from elf.c.
3654 (bfd_elf64_get_canonicalize_reloc,
3655 bfd_elf64_get_dynamic_reloc_upper_bound,
3656 bfd_elf64_canonicalize_dynamic_reloc): Define.
3657 (mips_elf64_slurp_reloc_table): Support dynamic.
3658 (mips_elf64_slurp_one_reloc_table): Adjust.
3659
64fb1839
NC
36602003-03-12 Nick Clifton <nickc@redhat.com>
3661
3662 * xsym.c (bfd_sym_fetch_type_information_table_entry): Change
3663 'index' to 'offset' in test for zero value.
3664
908488f1
AO
36652003-03-11 Alexandre Oliva <aoliva@redhat.com>
3666
3667 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Do not create
3668 dynamic relocations pointing to local or section symbols, use the
3669 NULL symbol instead. Document the choice to not emit an
3670 additional R_MIPS_64 relocation.
3671
e515b051
AM
36722003-03-11 Alan Modra <amodra@bigpond.net.au>
3673
3674 * elf32-ppc.c (ppc_elf_relocate_section): Subtract tls seg vma from
3675 zero index dynamic tls relocs generated for the GOT. Tidy code.
3676 Set "relocation" to 1 on DTPMOD32 relocs. Optimize HA adjustment.
3677 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3678
a23b6845
AM
36792003-03-07 Alan Modra <amodra@bigpond.net.au>
3680
87d243f1
AM
3681 * elf32-ppc.c (ppc_elf_relocate_section): Don't look for a nop after
3682 a tls_get_addr call.
3683
a23b6845
AM
3684 * elf32-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3685 (ppc_elf_adjust_dynamic_symbol): For weak symbols, copy
3686 ELF_LINK_NON_GOT_REF from weakdef.
3687 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define as one.
3688 (ppc64_elf_adjust_dynamic_symbol): For weak symbols, copy
3689 ELF_LINK_NON_GOT_REF from weakdef.
3690 * elf32-i386.c (ELIMINATE_COPY_RELOCS): Define as one. Use throughout.
3691 (elf_i386_adjust_dynamic_symbol): For weak symbols, copy
3692 ELF_LINK_NON_GOT_REF from weakdef.
3693
2d36fe5f
AH
36942003-03-06 Jakub Jelinek <jakub@redhat.com>
3695 Andrew Haley <aph@redhat.com>
3696
3697 * elflink.h (elf_bfd_discard_info): Don't process eh frames if
3698 output is relocateable.
3699
34f304a7
NC
37002003-03-06 Steven Konopa <skonopa@kgo.csc.com>
3701
3702 * som.c (som_fixup_formats): Correct formats for R_AUX_UNWIND and
3703 R_COMMENT.
3704
7b609f53
AM
37052003-03-06 Alan Modra <amodra@bigpond.net.au>
3706
3707 * elf32-ppc.c (ppc_elf_create_linker_section): Don't capitalize
3708 error messages.
3709 (ELIMINATE_COPY_RELOCS): Define to zero.
3710 (ppc_elf_relocate_section): Don't deref htab->tls_sec when calculating
3711 TLSLD relocs. Report reloc types on a number of errors. Optimize
3712 LOCAL24PC check for non-local syms. Don't capitalize error messages.
3713 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define to zero.
3714 (ppc64_elf_relocate_section): Don't deref htab->tls_sec when
3715 calculating TLSLD relocs. Report reloc types on a number of errors.
3716 Don't capitalize error messages.
3717
6a0fb186
L
37182003-03-03 H.J. Lu <hjl@gnu.org>
3719
3720 * elfxx-ia64.c (USE_BRL): Removed.
3721 (oor_ip): Removed.
3722
34f304a7 37232003-03-03 J"orn Rennecke <joern.rennecke@superh.com>
bdfaef52
JR
3724
3725 * elf32-sh.c (sh_elf_howto_tab): Make R_SH_IND12W into an ordinary
3726 relocation (no special function), and make it non-partial_inplace.
3727 (sh_elf_relax_section): When creating a bsr, use a consistent value
3728 no matter if the symbol is extern or not; set addend to -4.
3729 Don't swap load / non-load instructions for SH4.
3730 (sh_elf_relax_delete_bytes): In R_SH_IND12W case, check the offset
3731 rather than if the symbol is external to determine if adjusting the
3732 offset makes sense. Adjust the addend too if appropriate.
3733 (sh_elf_relocate_section): In R_SH_IND12W, don't fiddle with the
3734 relocation.
3735
a9d68a1e
NC
37362003-03-03 Nick Clifton <nickc@redhat.com>
3737
3738 * po/da.po: Installed latest translation.
3739
7c2be35c
TS
37402003-03-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
3741
3742 * elf32-mips.c (elf_mips_howto_table_rel): Change definition of
3743 R_MIPS_PC16 to rightshift 2.
3744 (elf_reloc_map mips_reloc_map): Map to rightshifted BFD reloc.
3745 (bfd_elf32_bfd_reloc_type_lookup): Support
3746 BFD_RELOC_MIPSEMB_16_PCREL_S2.
3747 * elf64-mips.c (mips_elf64_howto_table_rel): Change definition of
3748 R_MIPS_PC16 to rightshift 2.
3749 (mips_elf64_howto_table_rela): Likewise.
3750 (mips_reloc_map): Map to rightshifted BFD reloc.
3751 * elfn32-mips.c: The same as in elf64-mips.c.
3752 * elfxx-mips.c (mips_elf_got_for_ibfd): Typo in comment.
3753 (mips_elf_calculate_relocation): Handle rightshifted addends for
3754 R_MIPS_PC16.
3755 * reloc.c (BFD_RELOC_MIPSEMB_16_PCREL_S2): New BFD relocation for
3756 MIPS Embedded PIC. Remove superfluous empty COMMENT.
3757 * libbfd.h: Regenerate.
3758 * bfd-in2.h: Regenerate.
3759
484a4f9c
RH
37602003-02-28 Richard Henderson <rth@redhat.com>
3761
3762 * elfxx-ia64.c (elfNN_ia64_relax_section): Correct bounds
3763 for ltoff22x relaxation.
3764
2ce40c65
AM
37652003-03-01 Alan Modra <amodra@bigpond.net.au>
3766
3767 * bfd-in.h (_bfd): Don't define.
3768 * bfd.c: Rename occurrences of "struct _bfd" to "struct bfd".
3769 * syms.c: Likewise.
3770 * bfd-in2.h: Regenerate.
3771
2c4c2bc0
RH
37722003-02-27 Richard Henderson <rth@redhat.com>
3773
3774 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add want_gotx;
3775 (elfNN_ia64_check_relocs): Set it.
3776 (allocate_global_data_got): Check it.
3777 (allocate_local_got): Likewise.
3778 (allocate_dynrel_entries): Likewise.
3779 (elfNN_ia64_relax_ldxmov): New.
3780 (elfNN_ia64_relax_section): Handle LTOFF22X, LDXMOV.
3781 (elfNN_ia64_choose_gp): Split out from ...
3782 (elfNN_ia64_final_link): ... here.
8c29f035 3783
c2852e88
AC
37842003-02-27 Andrew Cagney <cagney@redhat.com>
3785
3786 * bfd.c (struct bfd): Rename "struct _bfd".
3787 * bfd-in.h: Update copyright.
3788 (struct bfd): Rename "struct _bfd".
3789 (_bfd): Define for backward compatibility.
3790 * bfd-in2.h: Regenerate.
3791
3f87cb70
AM
37922003-02-25 Alan Modra <amodra@bigpond.net.au>
3793
3f9a32bd
AM
3794 * elflink.h (elf_bfd_final_link): Apportion reloc counts to rel_hdr
3795 and rel_hdr2 when initially counting input relocs rather than after
3796 creating output reloc sections.
4fabe71e
AM
3797 (elf_link_read_relocs_from_section): Don't abort with wrong reloc
3798 sizes.
3f9a32bd 3799
3f87cb70
AM
3800 * Makefile.am: Run "make dep-am".
3801 * Makefile.in: Regenerate.
3802
07c6e936
NC
38032003-02-24 Kris Warkentin <kewarken@qnx.com>
3804
3805 * elf.c (elfcore_read_notes): Add check for QNX style core file.
3806 (elfcore_grog_nto_note): New function.
3807 (elfcore_grog_nto_gregs): New function.
3808 (elfcore_grog_nto_status): New function.
3809
aad5d350
AM
38102003-02-24 Alan Modra <amodra@bigpond.net.au>
3811
3812 * elflink.c (_bfd_elf_create_got_section): Check existing .got
3813 section flags before concluding that we've already been called.
3814 Don't use register keyword.
3815 (_bfd_elf_create_dynamic_sections): Don't use register keyword.
3816 (_bfd_elf_create_linker_section): Formatting.
3817
2ab1486e
NC
38182003-02-20 jmc <jmc@prioris.mini.pw.edu.pl>
3819
3820 * coff-h8300.c: Fix typo: intial -> initial.
3821 * coff-ppc.c: Likewise.
3822
70bccea4
AM
38232003-02-20 Alan Modra <amodra@bigpond.net.au>
3824
3825 * elf32-ppc.c: Formatting.
3826 (allocate_dynrelocs): LD and GD relocs against the same sym need
3827 separate GOT entries.
3828 (ppc_elf_relocate_section): Correct GOT handling for multiple GOT
3829 entries per symbol.
3830
ee05f2fe
AM
38312003-02-19 Alan Modra <amodra@bigpond.net.au>
3832
26e41594
AM
3833 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Simplify dynamic reloc
3834 removal. Localize vars. Remove unnecessary dynobj test.
3835 * elf32-i386 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead
3836 of INFO.
3837 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3838 and optimize.
3839 (elf_i386_relocate_section): Likewise.
3840 (elf_i386_gc_sweep_hook): Simplify dyn reloc removal. Localize vars.
3841 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3842 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3843 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3844 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3845 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise. Remove
3846 local_dynrel for section too. Don't touch HIPLT22, LOPLT10, PCPLT32
3847 or PCPLT10 relocs. Don't subtract twice on PLT32 relocs.
3848 Formatting.
3849
f4656909
AM
3850 * elf64-ppc.c (ELIMINATE_COPY_RELOCS): Define.
3851 (ppc64_elf_check_relocs): Use it. Correct comment. Move SEC_ALLOC
3852 test.
3853 (ppc64_elf_adjust_dynamic_symbol): Use ELIMINATE_COPY_RELOCS.
3854 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3855 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3856 and optimize. Use ELIMINATE_COPY_RELOCS.
3857 (ppc64_elf_relocate_section): Likewise.
3858
ee05f2fe
AM
3859 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Add pc_count field.
3860 (ppc_elf_copy_indirect_symbol): Copy pc_count field.
3861 (ELIMINATE_COPY_RELOCS): Define.
3862 (ppc_elf_adjust_dynamic_symbol): Convert copy relocs to dynamic.
3863 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Pass SHARED instead of INFO.
3864 (MUST_BE_DYN_RELOC): Define.
3865 (allocate_dynrelocs): Adjust WILL_CALL_FINISH_DYNAMIC_SYMBOL uses,
3866 and optimize. Trim dyn_relocs.
3867 (ppc_elf_check_relocs): Don't generate dyn_relocs when we know they'll
3868 not be used. Do generate dyn_relocs for copy reloc avoidance. Keep
3869 track of pc_rel dyn relocs.
3870 (ppc_elf_relocate_section): Remove "will_become_local". Adjust
3871 WILL_CALL_FINISH_DYNAMIC_SYMBOL use. Trim dyn relocs as per
3872 allocate_dynrelocs. Don't recalculate "sec".
3873
7619e7c7
AM
38742003-02-18 Alan Modra <amodra@bigpond.net.au>
3875
d881513a
AM
3876 * elf32-ppc.c (ppc_elf_relocate_section): Remove unnecessary test.
3877 * elf64-ppc.c (ppc64_elf_tls_optimize): Decrement tlsld_got.refcount
3878 on invalid LD relocs.
3879 (allocate_dynrelocs): Invalid LD relocs don't use tlsld_got entry.
3880 (ppc64_elf_relocate_section): Unify new handling of LD relocs and
3881 tlsld_got entry. Use IS_PPC64_TLS_RELOC.
3882
7619e7c7
AM
3883 * elf32-ppc.h: New file.
3884 * elf32-ppc.c: Include elf32-ppc.h.
3885 (NOP, CROR_151515, CROR_313131, TP_OFFSET, DTP_OFFSET): Define.
3886 (struct ppc_elf_link_hash_entry): Rename "root" to "elf". Adjust uses.
3887 Add "tls_mask" field.
3888 (TLS_GD, TLS_LD, TLS_TPREL, TLS_DTPREL, TLS_TLS, TLS_TPRELGD): Define.
3889 (struct ppc_elf_link_hash_table): Rename "root" to "elf". Adjust uses.
3890 Add got, relgot, plt, relplt, dynbss, relbss, dynsbss, relsbss,
3891 sdata, sdata2, tls_sec, tls_get_addr, tlsld_got fields.
3892 Make use of htab shortcuts throughout file.
3893 (ppc_elf_link_hash_newfunc): Init tls_mask field.
3894 (ppc_elf_link_hash_table_create): Init new fields.
3895 (ppc_elf_copy_indirect_symbol): Copy tls_mask.
3896 (ppc_elf_howto_raw): Add tls relocs.
3897 (ppc_elf_reloc_type_lookup): Handle them.
3898 (ppc_elf_unhandled_reloc): New function.
3899 (ppc_elf_create_got): Stash got section pointer in hash table,
3900 return status. Make .rela.got too.
3901 (ppc_elf_create_dynamic_sections): Stash section pointers in htab.
3902 (ppc_elf_adjust_dynamic_symbol): Only set up copy relocs when
3903 NON_GOT_REF set. Don't allocate space in .plt here..
3904 (allocate_dynrelocs): ..do so here instead, properly ref-counting and
3905 not allocating plt entries unnecessarily. Allocate got entries here.
3906 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
3907 (ppc_elf_size_dynamic_sections): Allocate local got entries. Pass
3908 "info" during allocate_dynrelocs hash traversal. Use htab section
3909 shortcuts rather than searching for named sections. Get rid of
3910 "plt" and "strip" booleans.
3911 (update_local_sym_info, bad_shared_reloc): New functions.
3912 (ppc_elf_check_relocs): Handle TLS relocs. Move .rela.got creation to
3913 ppc_elf_create_got. Don't mark got or plt reloc syms dynamic, do so
3914 in allocate_dynreloc. Use update_local_sym_info and bad_shared_reloc.
3915 Disallow R_PPC_EMB_RELSDA, R_PPC_EMB_NADDR32, R_PPC_EMB_NADDR16,
3916 R_PPC_EMB_NADDR16_LO, R_PPC_EMB_NADDR16_HI and R_PPC_EMB_NADDR16_HA
3917 in shared libs. R_PPC_PLTREL32 is a plt reloc too. Refcount all
3918 relocs that might use a plt entry. Set NON_GOT_REF too.
3919 Enumerate all do-nothing relocs.
3920 (ppc_elf_gc_sweep_hook): Simplify removal of dynrelocs. Handle
3921 tls relocs and all plt relocs.
3922 (ppc_elf_tls_setup, ppc_elf_tls_optimize): New functions.
3923 (ppc_elf_finish_dynamic_symbol): Don't build got entries here.
3924 (ppc_elf_finish_dynamic_sections): Rewrite tag code using htab
3925 shortcuts.
3926 (ppc_elf_relocate_section): Tidy. Handle TLS relocs. Use
3927 bfd_elf_local_sym_name. Simplify unresolved reloc code. Build got
3928 entries and got relocs here. Warn on non-zero got reloc addend.
3929 Split out branch taken/not taken reloc code into a separate switch
3930 and correct offset calculation. Allow BRTAKEN/BRNTAKEN dynamic relocs.
3931 Split out HA reloc adjustments to separate switch statement. Don't
3932 warn on reloc overflow if we've already warned about undefined.
3933 Don't rebuild sym name when reporting errors. Report all possible
3934 errors from _bfd_final_link_relocate.
3935 (bfd_elf32_bfd_final_link): Don't define.
3936
cd27b276
AM
39372003-02-18 Alan Modra <amodra@bigpond.net.au>
3938
3939 * elf64-ppc.c (ppc64_elf_relocate_section): Don't init "r". Don't
3940 rebuild sym name when reporting errors.
3941
ae9a127f
NC
39422003-02-17 Nick Clifton <nickc@redhat.com>
3943
3f9a32bd 3944 * elflink.h (elf_link_output_extsym): Only check
ae9a127f
NC
3945 allow_shlib_undefined for shared libraries.
3946 * elf32-i386.c (elf_i386_relocate_section): Remove bogus check
3947 of allow_shlib_undefined.
3948 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3949 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3950 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3951 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3952 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3953 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3954 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3955 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3956 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3957 * elf64-hppa.c (elf64_hppa_relocate_section): Likewise.
3958 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3959 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3960 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3961 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3962 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3963 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3964
b5f852ea
NC
39652003-02-17 Nick Clifton <nickc@redhat.com>
3966
3967 * elf.c (SEGMENT_AFTER_SEGMENT): Add third parameter - the
3968 address field to use in the comparison.
3f9a32bd 3969 (SEGMENT_OVERLAPS): Check that LMAs overlap as well.
b5f852ea 3970
3193e234
NC
39712003-02-14 Bob Wilson <bob.wilson@acm.org>
3972
3973 * elfcore.h (elf_core_file_p): Compare alternate machine codes for ELF
3974 backends when checking if the generic ELF target should be used.
3975
21efdc8d
NC
3976 * syms.c (_bfd_stab_section_find_nearest_line): For line number stabs
3977 outside of functions, treat values as absolute addresses.
3978
ed781d5d
NC
3979 * bfd.c: Change embedded documentation to use consistent indentation
3980 and to split up long lines. Change informal style of description
3981 for functions lacking real documentation.
3982 * coffcode.h: Break up long lines in embedded documentation.
3983 * format.c: Likewise.
3984 * targets.c: Likewise.
3985 * libcoff.h: Regenerate.
3986 * bfd-in2.h: Regenerate.
3987
58ac9f71
AM
39882003-02-14 Alan Modra <amodra@bigpond.net.au>
3989
3990 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Init tls_get_addr.
3991 (ppc64_elf_copy_indirect_symbol): Merge tls_mask too.
3992 (ppc64_elf_gc_sweep_hook): Simplify removal of dyn_relocs.
3993 (allocate_dynrelocs): Don't treat undefined and undefweak specially.
3994 (ppc_size_one_stub): Fix warning, and tighten plt entry check.
3995 (group_sections): Don't share a stub section if stubs are for a large
3996 section. Adjust comment.
3997 (ppc64_elf_size_stubs): Roughly double the size left for stubs if
3998 !stubs_always_before_branch.
3999 (ppc64_elf_relocate_section): Initialize tlsld GOT entry once. Don't
4000 treat undefined and undefweak specially when processing dyn relocs.
4001
9147e853
JJ
40022003-02-13 Jakub Jelinek <jakub@redhat.com>
4003
4004 * elflink.h (elf_link_add_object_symbols): Handle .symver x, x@FOO.
4005
427bfd90
NC
40062003-02-13 Nick Clifton <nickc@redhat.com>
4007
4008 * elf32-arm.h (elf32_thumb_to_arm_stub): Include section VMAs
4009 in computation of offset to insert into BL instruction.
4010
42b5d0ea
NC
40112003-02-11 Uwe Stieber <uwe@wwws.de>
4012
4013 * config.bfd: Add support for kaOS as cross build target system.
4014
a48ebf4d
AM
40152003-02-11 Alan Modra <amodra@bigpond.net.au>
4016
4017 * elf64-ppc.c (ppc64_elf_check_relocs): Match versioned
4018 .__tls_get_addr too.
4019 (ppc64_elf_tls_setup): Ensure cached tls_get_addr is not indirect.
4020
c95b8a7a
KK
40212003-02-10 Kaz kojima <kkojima@rr.iij4u.or.jp>
4022
4023 * elf32-sh.c (elf_sh_dyn_relocs): Add tls_tpoff32 field.
4024 (elf_sh_link_hash_entry): Remove tls_tpoff32 field.
4025 (sh_elf_link_hash_newfunc): Remove the initialization of
4026 tls_tpoff32 field.
4027 (allocate_dynrelocs): Keep dyn_relocs if it includes the entry
4028 for which tls_tpoff32 flag is set.
4029 (sh_elf_relocate_section): Covert to LE only if the dyn_relocs
4030 of the symbol includes the entry matched with the input_section
4031 and having tls_tpoff32 flag on. When linking statically, set
4032 symbol index of R_SH_TLS_TPOFF32 relocation to zero if the symbol
4033 is defined in this executable.
4034 (sh_elf_check_relocs): Set tls_tpoff32 flag appropriately.
4035
a779acda
JJ
40362003-02-10 Jakub Jelinek <jakub@redhat.com>
4037
4038 * elf32-s390.c (elf_s390_size_dynamic_sections): Set relocs to TRUE
4039 even if there is just non-empty .rela.plt.
4040
fde78edd
NC
40412003-02-10 Nick Clifton <nickc@redhat.com>
4042
4043 * archures.c (bfd_mach_arm_ep9312): Define.
4044 * bfd-in2.h: Regenerate.
4045 * cpu-arm.c (processors[]): Add ep9312.
4046 (bfd_arm_arch): Add ep9312.
4047 * elf32-arm.h (elf32_arm_merge_private_data): Update error
4048 messages and add test for Maverick floating point support.
4049 (elf32_arm_print_private_bfd_data): Handle
4050 EF_ARM_MAVERICK_FLOAT flag.
c178919b
NC
4051 (elf32_arm_object_p): New function.
4052 (elf_backend_object_p): Define.
fde78edd 4053
e7b938ca
AM
40542003-02-10 Alan Modra <amodra@bigpond.net.au>
4055
4056 * elf64-ppc.c: Rename assorted occurrences of tls_type and similar
4057 variables, structure fields or function params to tls_mask or
4058 similar to better reflect usage.
4059 (struct got_entry): Comment.
9b5ecbd0 4060 (struct ppc_link_hash_entry): Expand comment, and renumber TLS_*.
e7b938ca
AM
4061 (get_tls_mask): Rename from get_tls_type.
4062
951fd09b
AM
40632003-02-09 Alan Modra <amodra@bigpond.net.au>
4064
4065 * elf64-ppc.c (TLS_GD_LD): Don't define..
4066 (TLS_GD): ..define this instead and update all uses.
4067 (TLS_TPRELGD): Define.
4068 (ppc64_elf_link_hash_table_create): Tweak initialization of
4069 init_refcount and init_offset.
4070 (ppc64_elf_check_relocs): Add one extra element to t_symndx array.
4071 Mark second slot of GD or LD toc entries.
4072 (get_tls_type): Return an int. Distinguish toc GD and LD entries
4073 from other tls types.
4074 (ppc64_elf_tls_setup): New function, split out from..
4075 (ppc64_elf_tls_optimize): ..here. Don't optimize when symbols are
4076 defined in a dynamic object. Fix LD optimization. Don't set TLS_TPREL
4077 on GD->IE optimization, use TLS_TPRELGD instead. Use get_tls_type
4078 return value to properly decide whether toc GD and LD entries can
4079 optimize away __tls_get_addr call. Check next reloc after DTPMOD64
4080 to determine GD or LD rather than looking at TLS_LD flag. Don't
4081 attempt to adjust got entry tls_type here..
4082 (allocate_dynrelocs): ..instead, adjust got entry tls_type here, and
4083 look for possible merges.
4084 (ppc64_elf_size_dynamic_sections): Adjust local got entries for
4085 optimization.
4086 (ppc64_elf_size_stubs): Tweak __tls_get_addr fudge.
4087 (ppc64_elf_relocate_section): Rename some vars to better reflect usage.
4088 Make use of return value from get_tls_type to properly detect GD and
4089 LD optimizations. Split tlsld/gd hi/ha from lo/ds case. Don't
4090 handle tls_get_addr removal when looking at REL24 relocs, do it when
4091 looking at the previous reloc. Check reloc after DTPMOD64 to determine
4092 GD or LD.
4093 * elf64-ppc.h (ppc64_elf_tls_setup): Declare.
4094
acc990f2
AM
40952003-02-08 Alan Modra <amodra@bigpond.net.au>
4096
00b28bb0
AM
4097 * elf32-hppa.c (group_sections): Don't share a stub section if
4098 stubs are for a large section.
4099
acc990f2
AM
4100 * elf32-hppa.c (elf32_hppa_size_stubs): Double the size left for
4101 stubs if !stubs_always_before_branch.
4102
589e6347
NC
41032003-02-07 Nick Clifton <nickc@redhat.com>
4104
4105 * elf.c (swap_out_syms): Generate an error message if an
4106 equivalent output section cannot be found for a symbol.
4107
c328dc3f
JJ
41082003-02-07 Jakub Jelinek <jakub@redhat.com>
4109
4110 * elf64-alpha.c (elf64_alpha_relax_section): Don't crash if
4111 local_got_entries is NULL.
4112
84f97cb6
AS
41132003-02-06 Andreas Schwab <schwab@suse.de>
4114
4115 * elf-eh-frame.c (get_DW_EH_PE_signed): Define.
4116 (read_value): Add parameter is_signed, use signed extraction if
4117 the value is signed.
4118 (_bfd_elf_write_section_eh_frame): Pass signed flag of the
4119 encoding to read_value.
4120
6349e628
AM
41212003-02-06 Alan Modra <amodra@bigpond.net.au>
4122
4123 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
4124 plt info when called to transfer weak sym info.
4125
411e1bfb
AM
41262003-02-05 Alan Modra <amodra@bigpond.net.au>
4127
4128 * reloc.c: Add PPC and PPC64 TLS relocs.
4129 * libbfd.h: Regenerate.
4130 * bfd-in2.h: Regenerate.
4131 * elf64-ppc.c (TP_OFFSET, DTP_OFFSET): Declare.
4132 (ppc64_elf_howto_raw): Add TLS howto's. Adjust R_PPC64_NONE to be
4133 against a 32 bit field.
4134 (ppc64_elf_reloc_type_lookup): Handle TLS relocs.
4135 (_ppc64_elf_section_data): Add t_symndx and comments.
4136 (ppc64_elf_section_data): Use elf_section_data macro.
4137 (ppc64_elf_new_section_hook): American spelling.
4138 (struct got_entry, struct plt_entry): New.
4139 (MUST_BE_DYN_RELOC): Rename from IS_ABSOLUTE_RELOC.
4140 (struct ppc_stub_hash_entry): Add "addend" field.
4141 (struct ppc_link_hash_entry): Add "tls_type".
4142 (TLS_TLS, TLS_GD_LD, TLS_LD, TLS_TPREL, TLS_DTPREL,
4143 TLS_EXPLICIT): Define.
4144 (struct ppc_link_hash_table): Add tls_sec, tls_get_addr, tlsld_got.
4145 (link_hash_newfunc): Init new fields.
58ac9f71 4146 (ppc64_elf_link_hash_table_create): Likewise. Set init_refcount and
411e1bfb
AM
4147 init_offset to NULL.
4148 (ppc64_elf_copy_indirect_symbol): Copy got and plt info. Don't call
4149 _bfd_elf_link_hash_copy_indirect, rather insert relevant code from
4150 there.
4151 (update_local_sym_info, update_plt_info): New functions.
4152 (ppc64_elf_check_relocs): Use them. Handle TLS relocs. Adjust GOT
4153 handling to use got.glist rather than got.refcount. Likewise for PLT.
4154 (ppc64_elf_gc_sweep_hook): Handle TLS relocs, new GOT and PLT lists.
4155 (func_desc_adjust): Adjust for new PLT list.
4156 (ppc64_elf_adjust_dynamic_symbol): Likewise.
4157 (get_sym_h, get_tls_type): New functions.
4158 (ppc64_elf_edit_opd): Remove unused variable. Use get_sym_h.
4159 (ppc64_elf_tls_optimize): New function.
4160 (allocate_dynrelocs): Adjust for new PLT and GOT lists. Allocate
4161 TLS relocs.
4162 (ppc64_elf_size_dynamic_sections): Likewise.
4163 (ppc_type_of_stub): Adjust for new PLT list.
4164 (ppc_build_one_stub): Likewise.
4165 (ppc64_elf_size_stubs): Likewise. Use get_sym_h. Treat __tls_get_addr
4166 calls specially.
4167 (ppc64_elf_relocate_section): Adjust for new GOT and PLT lists. Handle
4168 TLS relocs. Report local syms using bfd_elf_local_sym_name. Don't
4169 init GOT entries that have a reloc. Generate GOT relocs here..
4170 (ppc64_elf_finish_dynamic_symbol): ..not here. Adjust for PLT list.
4171 * elf64-ppc.h (ppc64_elf_tls_optimize): Declare.
4172
0cca5f05
AS
41732003-02-04 Andreas Schwab <schwab@suse.de>
4174
4175 * elf32-m68k.c (elf_m68k_hash_entry): Define.
4176 (elf_m68k_link_hash_traverse): Remove.
4177 (elf_m68k_link_hash_newfunc): Use struct bfd_hash_entry and
4178 elf_m68k_hash_entry instead of struct elf_m68k_link_hash_entry to
4179 reduce casting.
4180 (elf_m68k_check_relocs): Use elf_m68k_hash_entry instead of
4181 casting.
4182 (elf_m68k_size_dynamic_sections): Use elf_link_hash_traverse
4183 instead of elf_m68k_link_hash_traverse.
4184 (elf_m68k_discard_copies): Change first parameter to pointer to
4185 struct elf_link_hash_entry and use elf_m68k_hash_entry when struct
4186 elf_m68k_link_hash_entry is needed.
4187
5cab59f6
AM
41882003-02-04 Alan Modra <amodra@bigpond.net.au>
4189
4190 * elf-bfd.h (struct got_entry, struct plt_entry): Forward declare.
4191 (struct elf_link_hash_entry): Add "glist" and "plist" fields to
4192 "got" union, and declare as gotplt_union. Use gotplt_uinion for
4193 "plt" field.
4194 (struct elf_link_hash_table): Make "init_refcount" a gotplt_union.
4195 Add "init_offset" field.
4196 (struct elf_obj_tdata <local_got>): Add "struct got_entry **" to union.
4197 (elf_local_got_ents): Declare.
4198 * elf.c (_bfd_elf_link_hash_newfunc): Adjust initialization of "got"
4199 and "plt".
4200 (_bfd_elf_link_hash_hide_symbol): Use "init_offset".
4201 (_bfd_elf_link_hash_table_init): Set "init_offset".
4202 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set init_refcount
4203 from init_offset.
4204 (elf_adjust_dynamic_symbol): Set plt and got offsets using init_offset.
4205
4206 * elf.c (bfd_elf_local_sym_name): Split out from..
4207 (group_signature): ..here.
4208 * elf-bfd.h (bfd_elf_local_sym_name): Declare.
4209
68bfbfcc
AM
42102003-02-04 Alan Modra <amodra@bigpond.net.au>
4211
4212 * elf-bfd.h (enum elf_link_info_type): Remove.
4213 (struct bfd_elf_section_data): Move sec_info_type, use_rela_p fields
4214 to struct sec. Remove linkonce_p field.
4215 (elf_linkonce_p): Delete.
4216 (elf_discarded_section): Update for sec_info_type change.
4217 * section.c (struct sec): Add sec_info_type, use_rela_p, has_tls_reloc,
4218 flag11, flag12, flag13, flag14, flag15, flag16, flag20, flag24.
4219 (ELF_INFO_TYPE_NONE): Define.
4220 (ELF_INFO_TYPE_STABS): Define.
4221 (ELF_INFO_TYPE_MERGE): Define.
4222 (ELF_INFO_TYPE_EH_FRAME): Define.
4223 (ELF_INFO_TYPE_JUST_SYMS): Define.
4224 (STD_SECTION): Update struct sec initializer.
4225 * ecoff.c (bfd_debug_section): Likewise.
4226 * elf.c: Likewise. Update occurrences of sec_info_type and use_rela_p.
4227 * elflink.h: Likewise.
4228 * elf-eh-frame.c: Likewise.
4229 * elf64-alpha.c: Likewise.
4230 * elfxx-ia64.c: Likewise.
4231 * elfxx-mips.c: Likewise.
4232 * bfd-in2.h: Regenerate.
4233
4234 * elf32-sparc.c (sec_do_relax): Use elf_section_data macro rather than
4235 referring to used_by_bfd.
4236 * elf64-sparc.c (sec_do_relax): Likewise.
4237 * elf64-mmix.c (mmix_elf_section_data): Likewise.
4238 * elfxx-mips.c (mips_elf_section_data): Likewise.
4239 * ieee.c (ieee_slurp_section_data): Use ieee_per_section macro.
4240 (ieee_get_section_contents): Likewise.
4241 (ieee_new_section_hook): Formatting.
4242 (ieee_canonicalize_reloc): Remove commented out code.
4243 * mmo.c (mmo_section_data): Define. Use throughout file.
4244 * oasys.c (oasys_get_section_contents): Use oasys_per_section macro.
4245
31f7ba04
NC
42462003-01-31 Graydon Hoare <graydon@redhat.com>
4247
4248 * Makefile.am (opncls.lo): Add dependency upon libiberty.h.
4249 * Makefile.in: Regenerate.
4250 * opncls.c (calc_crc32, get_debug_link_info,
4251 seperate_debug_file_exists, find_seperate_debug_file): New
4252 internal functions.
4253 (bfd_follow_gnu_debuglink): New function. Follow the pointer
4254 contained inside a .gnu_debuglink section.
4255 * bfd-in2.h: Regenerate.
4256
38985a1c
AO
42572003-01-29 Alexandre Oliva <aoliva@redhat.com>
4258
4259 * elfxx-mips.c (mips_elf_got_entry_hash): Don't dereference
4260 entry->abfd when it's NULL.
4261
4bb9a95f
AO
42622003-01-27 Alexandre Oliva <aoliva@redhat.com>
4263
4264 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Handle
4265 _bfd_elf_section_offset returning -2 the same way as -1.
4266
f4416af6
AO
4267 * elfxx-mips.c (mips_elf_multi_got): New function.
4268 (struct mips_got_entry): Make symndx and gotidx signed. Moved
4269 addend into union along with address and link hash entry.
4270 (struct mips_got_info): Added bfd2got and next.
4271 (struct mips_elf_hash_sort_data): Added max_unref_got_dynindx.
4272 (mips_elf_got_section, mips_elf_create_got_section): Use
4273 SEC_EXCLUDE bit to tell whether we really need the got
4274 section. Take boolean arguments to disregard an excluded
4275 section, or to create it as excluded. Adjust all callers.
4276 Use mips_elf_got_section all over.
4277 (mips_elf_local_got_index, mips_elf_got_page,
4278 mips_elf_got16_entry): Take input bfd as argument, and pass it
4279 on to mips_elf_create_local_got_entry.
4280 (mips_elf_global_got_index, mips_elf_create_local_got_entry):
4281 Take input bfd as argument, and manage entries in the
4282 appropriate GOT.
4283 (mips_elf_got_offset_from_index): Take input bfd as argument,
4284 and use it to adjust the GP offset of the bfd.
4285 (mips_elf_sort_hash_table, mips_elf_sort_hash_table_f): Move
4286 unreferenced GOT entries of global symbols to the end.
4287 (mips_elf_record_global_got_symbol): Take input bfd as
4288 argument. Add entries to the master GOT hash table.
4289 (struct mips_elf_bfd2got_hash): New.
4290 (struct mips_elf_got_per_bfd_arg): New.
4291 (struct mips_elf_set_global_got_offset_arg): New.
4292 (mips_elf_hash_bfd_vma, mips_elf_multi_got_entry_hash,
4293 mips_elf_multi_got_entry_eq, mips_elf_bfd2got_entry_hash,
4294 mips_elf_bfd2got_entry_eq, mips_elf_make_got_per_bfd,
4295 mips_elf_merge_gots, mips_elf_set_global_got_offset,
4296 mips_elf_resolve_final_got_entry,
4297 mips_elf_resolve_final_got_entries, mips_elf_adjust_gp,
4298 mips_elf_got_for_ibfd): New functions.
4299 (ELF_MIPS_GP_OFFSET): Don't depend on SGI_COMPAT.
4300 (MIPS_ELF_GOT_MAX_SIZE): New macro.
4301 (STUB_LW): Generate 64-bit stub regardless of SGI_COMPAT.
4302 (mips_elf_got_entry_hash): Take new fields into account. Use
4303 mips_elf_hash_bfd_vma.
4304 (mips_elf_got_entry_eq): Take new fields into account.
4305 (mips_elf_create_got_section): Initialize new fields.
4306 (mips_elf_calculate_relocation): Pass input_bfd to functions
4307 that now take it. Adjust gp for the input_bfd.
4308 (mips_elf_allocate_dynamic_relocation,
4309 mips_elf_create_dynamic_relocation,
4310 _bfd_mips_elf_create_dynamic_sections): Use...
4311 (mips_elf_rel_dyn_section): New function. Borrow code from...
4312 (_bfd_mips_elf_check_relocs): Pass input_bfd to functions that
4313 now take it. Create the got section if needed, even if
4314 excluded, before recording a global got symbol. Move some
4315 code to...
4316 (mips_elf_record_local_got_symbol): New fn.
4317 (_bfd_mips_elf_size_dynamic_sections): Disable combreloc.
4318 Compute multi-got global entries offsets. Move GOT code to...
4319 (_bfd_mips_elf_always_size_sections): Call mips_elf_multi_got
4320 if the GOT is too big.
4321 (_bfd_mips_elf_finish_dynamic_symbol): Set got entry of
4322 undefweak symbol to zero. Generate dynamic relocations for
4323 non-primary GOT entries for global symbols.
4324 (_bfd_mips_elf_finish_dynamic_sections): Handle multi-got
4325 case. Generate dynamic relocations for local got entries.
4326 Sort dynamic relocations on N64 too, using...
4327 (sort_dynamic_relocs_64): New fns.
4328 (_bfd_mips_elf_hide_symbol): Adjust multi-got counters.
4329 (_bfd_mips_elf_merge_private_bfd_data): Ignore EF_MIPS_XGOT.
4330
52b69c9e
AO
43312003-01-27 Alexandre Oliva <aoliva@redhat.com>
4332
4333 * bfd.c (struct _bfd): Added id field.
4334 * opncls.c (_bfd_id_counter): New static variable.
4335 (_bfd_new_bfd): Use it.
4336 * bfd-in2.h: Rebuilt.
4337
71e5db1c
AM
43382003-01-25 Alan Modra <amodra@bigpond.net.au>
4339
4340 * elf32-sparc.c (bfd_elf32_new_section_hook): Define.
4341
b9734f35
JJ
43422003-01-25 Jakub Jelinek <jakub@redhat.com>
4343
4344 * elf32-sparc.c (_bfd_sparc_elf_howto_table): Add TLS relocs.
4345 (elf32_sparc_rev32_howto): New variable.
4346 (sparc_reloc_map): Add TLS relocs.
4347 (elf32_sparc_reloc_type_lookup, elf32_sparc_info_to_howto):
4348 Handle REV32.
4349 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc, elf32_sparc_mkobject):
4350 New functions.
4351 (struct elf32_sparc_dyn_relocs, struct elf32_sparc_link_hash_entry,
4352 struct elf32_sparc_link_hash_table):
4353 New structures.
4354 (elf32_sparc_tdata, elf32_sparc_local_got_tls_type,
4355 elf32_sparc_hash_table): Define.
4356 (link_hash_newfunc, elf32_sparc_link_hash_table_create,
4357 create_got_section, elf32_sparc_create_dynamic_sections,
4358 elf32_sparc_copy_indirect_symbol, elf32_sparc_tls_transition): New
4359 functions.
4360 (elf32_sparc_check_relocs): Handle TLS relocs. Add dynamic reloc
4361 reference counting.
4362 (elf32_sparc_gc_sweep_hook): Likewise.
4363 (elf32_sparc_adjust_dynamic_symbol): Likewise.
4364 (elf32_sparc_size_dynamic_sections): Likewise.
4365 (elf32_sparc_relocate_section): Likewise.
4366 (allocate_dynrelocs, readonly_dynrelocs, dtpoff_base, tpoff):
4367 New functions.
4368 (elf32_sparc_object_p): Allocate backend private object data.
4369 (bfd_elf32_bfd_link_hash_table_create,
4370 elf_backend_copy_indirect_symbol, bfd_elf32_mkobject,
4371 elf_backend_can_refcount): Define.
4372 (elf_backend_create_dynamic_sections): Define to
4373 elf32_sparc_create_dynamic_sections.
4374 * reloc.c: Add SPARC TLS relocs.
4375 * bfd-in2.h, libbfd.h: Rebuilt.
4376 * elf64-sparc.c (sparc64_elf_howto_table): Add TLS relocs.
4377 (sparc_reloc_map): Likewise.
4378
69fc87f1
MS
43792003-01-24 Martin Schwidefsky <schwidefsky@de.ibm.com>
4380
4381 * bfd-in2.h: Regenerate.
4382 * elf32-s390.c (elf_s390_mkobject, elf_s390_tls_transition,
4383 s390_tls_reloc, dtpoff_base, tpoff, invalid_tls_insn): New functions.
4384 (elf_howto_table): Add TLS relocs.
4385 (elf_s390_reloc_type_lookup): Likewise.
4386 (elf_s390_link_hash_entry): Add tls_type.
4387 (elf_s390_hash_entry, elf_s390_obj_tdata, elf_s390_local_got_tls_type):
4388 New macros.
4389 (elf_s390_link_hash_table): Add tls_ldm_got.
4390 (link_hash_newfunc): Initialize tls_type.
4391 (elf_s390_link_hash_table_create): Initialize refcount of tls_ldm_got.
4392 (elf_s390_copy_indirect_symbol): Copy tls_type information.
4393 (elf_s390_check_relocs): Support TLS relocs.
4394 (elf_s390_gc_sweep_hook): Likewise.
4395 (allocate_dynrelocs): Likewise.
4396 (elf_s390_size_dynamic_sections): Likewise.
4397 (elf_s390_relocate_section): Likewise.
4398 (elf_s390_finish_dynamic_symbol): Likewise.
4399 (bfd_elf32_mkobject): Define for TLS.
4400 * elf64-s390.c: Same changes as for elf32-s390.c.
4401 * libbfd.h: Regenerate.
4402 * reloc.c: Add s390 TLS relocations.
4403
c5d1701e 44042003-01-24 Charles Lepple <clepple@ghz.cc>
9aa4e505
NC
4405
4406 * aclocal.m4: Fix name of --enable-install-libbfd switch.
4407
5177500f
NC
44082003-01-23 Nick Clifton <nickc@redhat.com>
4409
4410 * Add sh2e support:
5177500f 4411 2002-04-02 Elena Zannoni <ezannoni@redhat.com>
9b5ecbd0
AM
4412 * archures.c (bfd_mach_sh2e): Added.
4413 * bfd-in2.h: Rebuilt.
4414 * cpu-sh.c (arch_info_struct): Added SH2e.
4415 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle EF_SH2E.
5177500f 4416
f0abc2a1
AM
44172003-01-23 Alan Modra <amodra@bigpond.net.au>
4418
4419 * elf-bfd.h (struct bfd_elf_section_data): Remove tdata. Change
4420 dynindx to an int. Rearrange for better packing.
4421 * elf.c (_bfd_elf_new_section_hook): Don't alloc if already done.
4422 * elf32-mips.c (bfd_elf32_new_section_hook): Define.
4423 * elf32-sh64.h: New. Split out from include/elf/sh.h.
4424 (struct _sh64_elf_section_data): New struct.
4425 (sh64_elf_section_data): Don't dereference sh64_info (was tdata).
4426 * elf32-sh64-com.c: Include elf32-sh64.h.
4427 * elf32-sh64.c: Likewise.
4428 (sh64_elf_new_section_hook): New function.
4429 (bfd_elf32_new_section_hook): Define.
4430 (sh64_elf_fake_sections): Adjust for sh64_elf_section_data change.
4431 (sh64_bfd_elf_copy_private_section_data): Likewise.
4432 (sh64_elf_final_write_processing): Likewise.
4433 * elf32-sparc.c (struct elf32_sparc_section_data): New.
4434 (elf32_sparc_new_section_hook): New function.
4435 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4436 (sec_do_relax): Define.
4437 (elf32_sparc_relax_section): Adjust to use sec_do_relax.
4438 (elf32_sparc_relocate_section): Likewise.
4439 * elf64-mips.c (bfd_elf64_new_section_hook): Define.
4440 * elf64-mmix.c (struct _mmix_elf_section_data): New.
4441 (mmix_elf_section_data): Define. Use throughout file.
4442 (mmix_elf_new_section_hook): New function.
4443 (bfd_elf64_new_section_hook): Define.
4444 * elf64-ppc.c (struct _ppc64_elf_section_data): New.
4445 (ppc64_elf_section_data): Define. Use throughout.
4446 (ppc64_elf_new_section_hook): New function.
4447 (bfd_elf64_new_section_hook): Define.
4448 * elf64-sparc.c (struct sparc64_elf_section_data): New.
4449 (sparc64_elf_new_section_hook): New function.
4450 (SET_SEC_DO_RELAX, SEC_DO_RELAX): Delete.
4451 (sec_do_relax): Define.
4452 (sparc64_elf_relax_section): Adjust to use sec_do_relax.
4453 (sparc64_elf_relocate_section): Likewise.
4454 (bfd_elf64_new_section_hook): Define.
4455 * elfn32-mips.c (bfd_elf32_new_section_hook): Define.
4456 * elfxx-mips.c (struct _mips_elf_section_data): New.
4457 (mips_elf_section_data): Define. Use throughout.
4458 (_bfd_mips_elf_new_section_hook): New function.
4459 (mips_elf_create_got_section): Don't alloc used_by_bfd.
4460 * elfxx-mips.h (_bfd_mips_elf_new_section_hook): Declare.
4461 * elfxx-target.h (bfd_elfNN_new_section_hook): Add #ifndef.
4462 * Makefile.am: Run "make dep-am".
4463 * Makefile.in: Regenerate.
4464
cc03ec80
RH
44652003-01-21 Richard Henderson <rth@redhat.com>
4466
4467 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_PLT_LOC): New.
4468 (struct alpha_elf_link_hash_entry): Add plt_old_section, plt_old_value.
4469 (elf64_alpha_adjust_dynamic_symbol): Set them.
4470 (elf64_alpha_size_plt_section_1): Reset them when plt entry removed.
4471 (elf64_alpha_relax_tls_get_addr): Handle LDM relocs. Frob the
4472 symbol index when relaxing LDM to TPREL.
4473 (elf64_alpha_relax_section): Likewise. Allow relaxation of GD
4474 relocs, even if the target isn't locally defined.
4475 (elf64_alpha_check_relocs): Frob LDM reloc symndx to zero.
4476 (elf64_alpha_relocate_section): Likewise. Force TP-relative
4477 relocs vs symndx 0 to the tp base.
4478
da896d3f
NC
44792003-01-21 Fabio Alemagna <falemagn@aros.org>
4480
4481 * config.bfd: Handle i[3456]86-*-aros*.
4482
7fce784e
AS
44832003-01-21 Andreas Schwab <schwab@suse.de>
4484
4485 * elf32-ppc.c (struct ppc_elf_dyn_relocs): Define.
4486 (struct ppc_elf_link_hash_entry): Define.
4487 (ppc_elf_hash_entry): New function.
4488 (struct ppc_elf_link_hash_table): Define.
4489 (ppc_elf_hash_table): New function.
4490 (ppc_elf_link_hash_newfunc): New function.
4491 (ppc_elf_link_hash_table_create): New function.
4492 (ppc_elf_copy_indirect_symbol): New function.
4493 (allocate_dynrelocs): New function.
4494 (readonly_dynrelocs): New function.
4495 (ppc_elf_size_dynamic_sections): Allocate space for dynamic
4496 relocs and determine DT_TEXTREL.
4497 (ppc_elf_check_relocs): Don't do that here, just count the
4498 dynamic relocs.
4499 (ppc_elf_gc_sweep_hook): Discard any dynamic relocs against the
4500 removed section.
4501 (bfd_elf32_bfd_link_hash_table_create): Define.
4502 (elf_backend_copy_indirect_symbol): Define.
4503
1bbc9cec
RH
45042003-01-21 Richard Henderson <rth@redhat.com>
4505
4506 * elf64-alpha.c (alpha_dynamic_entries_for_reloc): GOTTPREL and
4507 TPREL also get a reloc if shared. Remove SREL support.
4508 (elf64_alpha_emit_dynrel): New.
acc990f2 4509 (elf64_alpha_relocate_section): Use it. Resolve dynamic TPREL
1bbc9cec
RH
4510 and GOTTPREL relocs to local symbols against the tp base.
4511 (elf64_alpha_finish_dynamic_symbol): Use elf64_alpha_emit_dynrel.
4512
4513 * elf64-alpha.c (elf64_alpha_relax_got_load): Decrement got
4514 use count before clobbering r_type.
4515 (elf64_alpha_relax_tls_get_addr): Don't use pos[1] if insn
4516 ordering would mean dataflow inspection is necessary.
4517
0da35f8b
SS
45182003-01-20 Svein E. Seldal <Svein.Seldal@solidas.com>
4519
4520 * coffcode.h (coff_set_flags): Added get/set arch hooks.
acc990f2 4521
571fe01f
NC
45222003-01-20 Fabio Alemagna <falemagn@aros.org>
4523
4524 * elf32-sh.c: Treat elfNN_bed like other macros defined in
4525 elfxx-target.h and #undef it before #define'ing it.
4526 * elf32-i386.c: Likewise.
acc990f2
AM
4527 * elf32-sh64.c: Likewise.
4528 * elf64-alpha.c: Likewise.
4529 * elf64-sh64.c: Likewise.
571fe01f 4530
5236c819
MS
45312003-01-20 Martin Schwidefsky <schwidefsky@de.ibm.com>
4532
4533 * bfd-in2.h: Regenerate.
4534 * elf32-s390.c (elf_s390_adjust_gotplt): New prototype.
4535 (elf_howto_table): Rename R_390_GOTOFF to R_390_GOTOFF32. Add
4536 R_390_GOTOFF16, R_390_GOTOFF64, R_390_GOTPLT12, R_390_GOTPLT16,
4537 R_390_GOTPLT32, R_390_GOTPLT64, R_390_GOTPLTENT, R_390_PLTOFF16,
4538 R_390_PLTOFF32 and R_390_PLTOFF64.
4539 (elf_s390_reloc_type_lookup): Likewise.
4540 (struct elf_s390_link_hash_entry): Add gotplt_refcount to keep track
4541 of GOTPLT references to a function.
4542 (link_hash_newfunc): Initialize gotplt_refcount.
4543 (elf_s390_check_relocs): Move allocation of local_got_refcounts array
4544 and creation of the got section out of the main switch. Add support
4545 for the gotoff, gotplt and pltoff relocations.
4546 (elf_s390_gc_sweep_hook): Add reference counting for gotoff, gotplt
4547 and pltoff.
4548 (elf_s390_adjust_gotplt): New function.
4549 (elf_s390_adjust_dynamic_symbol): Adjust gotplt refcount for removed
4550 plt entries.
4551 (allocate_dynrelocs): Add comment.
4552 (elf_s390_relocate_section): Change r_type to unsigned. Add support
4553 for gotoff, gotplt and pltoff relocations.
4554 * elf64-s390.c: Same changes as for elf32-s390.c.
4555 * libbfd.h: Regenerate.
4556 * reloc.c: Add BFD_RELOC_390_GOTOFF64, BFD_RELOC_390_GOTPLT12,
4557 BFD_RELOC_390_GOTPLT16, BFD_RELOC_390_GOTPLT32, BFD_RELOC_390_GOTPLT64,
4558 BFD_RELOC_390_GOTPLTENT, BFD_RELOC_390_PLTOFF16, BFD_RELOC_390_PLTOFF32
4559 and BFD_RELOC_390_PLTOFF64.
4560
a823975a
JJ
45612003-01-18 Jakub Jelinek <jakub@redhat.com>
4562
4563 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle
4564 R_IA64_TPREL64[LM]SB against non-global symbol properly.
4565
b3dfd7fe
JJ
45662003-01-16 Jakub Jelinek <jakub@redhat.com>
4567
4568 * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add
4569 self_dtpmod_done and self_dtpmod_offset.
4570 (allocate_global_data_got): Only use one got entry for all
4571 dtpmod relocs against local symbols.
4572 (allocate_dynrel_entries): Only need .rela.got entry for
4573 dtpmod against global symbol.
4574 (elfNN_ia64_size_dynamic_sections): Initialize self_dtpmod_offset.
4575 Reserve space in .rela.got for the local dtpmod entry.
4576 (set_got_entry): Initialize the common local dtpmod .got entry.
4577 (elfNN_ia64_relocate_section): Handle R_IA_64_DTPREL64LSB
4578 and R_IA_64_DTPREL64MSB.
4579
04c9666a
AM
45802003-01-16 Alan Modra <amodra@bigpond.net.au>
4581
4582 * elf64-ppc.c: Include elf/ppc64.h rather than elf/ppc.h.
4583 (R_PPC_*): Rename all occurrences to R_PPC64_*.
4584 (R_PPC64_ADDR30): Rename all occurrences to R_PPC64_REL30.
4585 (enum elf_ppc_reloc_type): Ditto to enum elf_ppc64_reloc_type.
4586 (ppc64_elf_gc_sweep_hook): Handle R_PPC64_REL30 along with other
4587 relative relocs, not with absolute ones.
4588 * Makefile.am: Run "make dep-am".
4589 * Makefile.in: Regenerate.
4590 * po/SRC-POTFILES.in: Regenerate.
4591
c87f1ff7
AS
45922003-01-15 Andreas Schwab <schwab@suse.de>
4593
4594 * elf32-ppc.c (ppc_elf_check_relocs): Don't set DF_TEXTREL for a
4595 relocation against a non-allocated readonly section.
4596
86bbe32f
AM
45972003-01-10 Alan Modra <amodra@bigpond.net.au>
4598
4599 * elf32-ppc.c (ppc_elf_relocate_section): Adjust addend for GOT16_HA.
4600 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise. PLTGOT16_HA too.
4601
32d95f29
KD
46022002-01-08 Klee Dienes <kdienes@apple.com>
4603
4604 * Makefile.am (ALL_MACHINES): Use cpu-msp430.lo, not cpu-msp430.c.
4605 (BFD32_BACKENDS): Use elf32-msp430.lo, not elf32-msp430.c.
4606 * Makefile.in: Regenerate.
acc990f2 4607
ab7d0aa0
AO
46082003-01-08 Alexandre Oliva <aoliva@redhat.com>
4609
4610 * elfn32-mips.c (prev_reloc_section): New.
4611 (GET_RELOC_ADDEND): Use it. Parenthesize macro arguments.
4612 (SET_RELOC_ADDEND): Parenthesize macro argument.
4613
95d0f04a
DA
46142003-01-07 John David Anglin <dave.anglin@nrc.gc.ca>
4615
4616 * elf32-hppa.c (final_link_relocate): For all DP relative relocations,
4617 adjust addil instructions if the symbol has no section.
4618
5c9e189c
DD
46192003-01-07 DJ Delorie <dj@redhat.com>
4620
4621 * elf32-xstormy16.c (xstormy16_elf_howto_table): Make REL_12 not
4622 partial_inplace.
4623
3e829b4a
AS
46242003-01-07 Andreas Schwab <schwab@suse.de>
4625
4626 * elf32-m68k.c (elf_m68k_check_relocs): Don't set DF_TEXTREL for
4627 PC relative relocations.
4628 (elf_m68k_discard_copies): Set it here instead.
4629
a75473eb
SC
46302002-01-02 Ben Elliston <bje@redhat.com>
4631 Jeff Johnston <jjohnstn@redhat.com>
4632
4633 * Makefile.am (ALL_MACHINES): Add cpu-iq2000.lo.
4634 (ALL_MACHINES_CFILES): Add cpu-iq2000.c.
4635 (BFD32_BACKENDS): Add elf32-iq2000.lo.
4636 (BFD32_BACKENDS_CFILES): Add elf32-iq2000.c.
4637 (cpu-iq2000.lo): New target.
4638 * Makefile.in: Regenerate.
4639 * config.bfd: Handle iq2000-*-elf.
4640 * archures.c (bfd_architecture): Add bfd_{arch,mach}_iq2000.
4641 (bfd_archures_list): Add bfd_iq2000_arch.
4642 * configure.in: Handle bfd_elf32_iq2000_vec.
4643 * configure: Regenerate.
acc990f2 4644 * reloc.c: Add BFD_RELOC_IQ2000_OFFSET_16, BFD_RELOC_IQ2000_OFFSET_21,
a75473eb
SC
4645 and BFD_RELOC_IQ2000_UHI16.
4646 * targets.c (bfd_elf32_iq2000_vec): Declare.
4647 (bfd_target_vector): Add bfd_elf32_iq2000_vec.
4648 * elf.c (prep_headers): Set e_machine to EM_IQ2000.
4649 * cpu-iq2000.c: New file.
4650 * elf32-iq2000.c: Likewise.
4651 * libbfd.h: Regenerate.
4652 * bfd-in2.h: Likewise.
4653
64543e1a
RS
46542003-01-02 Richard Sandiford <rsandifo@redhat.com>
4655
4656 * elfxx-mips.c: Include libiberty.h.
4657 (elf_mips_isa, _bfd_mips_elf_mach_extends_p): Remove.
4658 (mips_set_isa_flags): New function, split out from...
4659 (_bfd_mips_elf_final_write_processing): ...here. Only call
4660 mips_set_isa_flags if the EF_MIPS_MACH bits are clear.
4661 (mips_mach_extensions): New array.
4662 (mips_32bit_flags_p): New function.
4663 (_bfd_mips_elf_merge_private_bfd_data): Rework architecture checks.
4664 Use mips_32bit_flags_p to check if one binary is 32-bit and the
4665 other is 64-bit. When adopting IBFD's architecture, adopt the
4666 bfd_mach as well as the flags.
4667
4852a44e
NC
46682003-01-02 Nick Kelsey <nickk@ubicom.com>
4669
4670 * elf32-ip2k.c: Re-work of linker relaxation code for the ip2k to
4671 fix internal errors, fix bad code generation, fix incorrect stabs
4672 information, and improve ability to eliminate redundant page
4673 instructions. Added code to ip2k_final_link_relocate to self-verify
4674 the linker relaxation. Fix formatting problems.
4675
af7ee8bf
CD
46762002-12-30 Chris Demetriou <cgd@broadcom.com>
4677
4678 * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mipsisa32r2 case.
4679 * archures.c (bfd_mach_mipsisa32r2): New define.
4680 * bfd-in2.h: Regenerate.
4681 * cpu-mips.c (I_mipsisa32r2): New enum value.
4682 (arch_info_struct): Add entry for I_mipsisa32r2.
4683 * elfxx-mips.c (elf_mips_isa, _bfd_elf_mips_mach)
4684 (_bfd_mips_elf_print_private_bfd_data): Handle E_MIPS_ARCH_32R2.
4685 (_bfd_mips_elf_final_write_processing): Add
4686 bfd_mach_mipsisa32r2 case.
4687 (_bfd_mips_elf_merge_private_bfd_data): Handle merging of
4688 binaries marked as using MIPS32 Release 2.
4689
2469cfa2
NC
46902002-12-30 Dmitry Diky <diwil@mail.ru>
4691
4692 * Makefile.am: Add msp430 target.
4693 * configure.in: Likewise.
4694 * Makefile.in: Regenerate.
4695 * configure: Regenerate.
4696 * archures.c: Add msp430 architecture vector.
4697 * config.bfd: Likewise.
4698 * reloc.c: Add msp430 relocs.
4699 * targets.c: Add msp320 target.
4700 * cpu-msp430.c: New file: msp430 cpu detection.
4701 * elf32-msp430.c: New file: msp430 reloc processing.
4702 * bfd-in2.h: Regenerate.
4703 * libbfd.h: Regenerate.
4704
eecdbe52
JJ
47052002-12-28 Jakub Jelinek <jakub@redhat.com>
4706
4707 * elf.c (elf_sort_sections): Don't reorder .tbss.
4708 (assign_file_positions_for_segments): Only adjust off/voff
4709 for increased alignment in PT_LOAD or PT_NOTE segment,
4710 but adjust p_filesz for .tbss too. in PT_LOAD consider
4711 .tbss to have zero memory size.
4712 (copy_private_bfd_data) [SECTION_SIZE]: Define.
4713 [IS_CONTAINED_BY_VMA, IS_CONTAINED_BY_LMA]: Use it.
4714 [INCLUDE_SECTION_IN_SEGMENT]: Only put SHF_TLS sections
4715 into PT_TLS segment. Never put SHF_TLS sections in
4716 segments other than PT_TLS or PT_LOAD.
4717
4718 * elf64-alpha.c (elf64_alpha_finish_dynamic_sections): Clear .plt
4719 sh_entsize.
4720
213e90f4
DD
47212002-12-23 DJ Delorie <dj@redhat.com>
4722
4723 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Fix logic reversal.
4724
75828352
AM
47252002-12-23 Alan Modra <amodra@bigpond.net.au>
4726
4727 * elflink.h (elf_link_output_extsym): Heed strip_discarded.
4728
312b768e
NC
47292002-12-23 Nick Clifton <nickc@redhat.com>
4730
4731 * archures.c (bfd_arch_get_compatible): Add third parameter
4732 'accept_unknowns'. Only accept unknown format BFDs if
4733 accept_unknowns is true, or if the format is "binary".
acc990f2 4734 * bfd-in2.h: Regenerate.
312b768e 4735
63222ec9
NC
47362002-12-21 Nick Clifton <nickc@redhat.com>
4737
4738 * coff-arm.c (coff_arm_relocate_section): Disable WINCE workaround
4739 that subtracted 8 from pc relative relocations.
4740
19852a2a
KH
47412002-12-20 Kazu Hirata <kazu@cs.umass.edu>
4742
4743 * coff-h8300.c: Fix comment typos.
4744 * coffcode.h: Likewise.
4745 * cpu-cris.c: Likewise.
4746 * elf32-vax.c: Likewise.
4747 * genlink.h: Likewise.
4748 * linker.c: Likewise.
4749 * som.c: Likewise.
4750 * tekhex.c: Likewise.
4751 * vms-misc.c: Likewise.
4752
5fd63999
DD
47532002-12-20 DJ Delorie <dj@redhat.com>
4754
4755 * reloc.c: Add BFD_RELOC_XSTORMY16_12.
4756 * libbfd.h: Regenerate.
4757 * bfd-in2.h: Regenerate.
4758 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_12.
4759 (xstormy16_reloc_map): Add R_XSTORMY16_12.
acc990f2 4760
4ee79850
KH
47612002-12-19 Kazu Hirata <kazu@cs.umass.edu>
4762
4763 * doc/bfdint.texi: Fix typos.
4764
66e25bab
AM
47652002-12-20 Paul Eggert <eggert@twinsun.com>
4766
4767 Port to POSIX 1003.1-2001.
4768 * acinclude.m4 (AM_INSTALL_LIBBFD): Do not rely on "test -o".
4769 * configure.in (build-warnings): Likewise.
4770 (Horrible hacks to build DLLs on Windows): Do not rely on "tail -1".
4771 * aclocal.m4: Regenerate.
4772 * config.in: Regenerate.
4773 * configure: Regenerate.
4774
7dc77aaa
AM
47752002-12-19 Alan Modra <amodra@bigpond.net.au>
4776
0171ee92
AM
4777 * coff-h8300.c: Include libiberty.h.
4778 (h8300_reloc16_extra_cases): Check the hash table creator before
4779 referencing h8300 specific fields. Stash the hash table pointer
4780 in a local var. Comment typo fixes.
4781 (h8300_bfd_link_add_symbols): Likewise.
4782
1049f94e 4783 * reloc.c (struct reloc_howto_struct): Revise src_mask and
7dc77aaa
AM
4784 dst_mask comments.
4785 * bfd-in2.h: Regenerate.
4786
47388f4c
AM
47872002-12-18 Alan Modra <amodra@bigpond.net.au>
4788
4789 * elf32-ppc.c (ppc_elf_relocate_section): Reorganize dynamic reloc
4790 code a little. Comment on dynamic relocs against section symbols.
4791
1b3e3744
AM
47922002-12-17 Roger Sayle <roger@eyesopen.com>
4793
4794 * configure.host (ia64-*-hpux*): Support 64 bit targets using
4795 the HP compiler's "long long".
4796
46f2b541
DD
47972002-12-16 Andrew MacLeod <amacleod@redhat.com>
4798
4799 * elf32-xstormy16.c (xstormy16_elf_howto): Add R_XSTORMY16_LO16
4800 and R_XSTORMY16_HI16) howto entries.
4801 (xstormy16_reloc_map): Map R_XSTORMY16_{LO,HI}16 to BFD_RELOC_{LO,HI}16.
1b3e3744 4802 (xstormy16_info_to_howto_rela): Use R_XSTORMY16_GNU_VTINHERIT to
46f2b541
DD
4803 determine the start of the second reloc table.
4804
af738ea7
NC
48052002-12-16 Nathan Tallent <eraxxon@alumni.rice.edu>
4806
4807 * ecofflink.c: Fix the reading of the debugging information
4808 of Tru64/Alpha binaries that are produced by recent Compaq
4809 compilers.
4810 (mk_fdrtab): Fix error in creating the FDR (file descriptor)
4811 table.
4812 (lookup_line): Because of the strange information sometimes
4813 generated by Compaq's recent compilers, change how the FDR
4814 table is searched so that PDRs (procedure descriptors) are
4815 correctly found. Note that this change is really more of a hack;
4816 however, I have included extensive documentation as to why
4817 this is the best solution short of an extensive rewrite or
4818 another hack.
4819 (fdrtab_lookup): Add comments to explain the algorithm.
4820
5354b572
AO
48212002-12-12 Alexandre Oliva <aoliva@redhat.com>
4822
4823 * elf-m10300.c (elf32_mn10300_link_hash_newfunc): Reorder
4824 initializers to match struct declaration.
4825
ab3acfbe
AM
48262002-12-12 Alan Modra <amodra@bigpond.net.au>
4827
4828 * dwarf2.c (comp_unit_contains_address): Comment typo fix.
4829 * elf.c (get_program_header_size): Likewise.
4830 * elf32-m32r.c (m32r_elf_lo16_reloc): Likewise.
4831 (m32r_elf_generic_reloc): Likewise.
4832 * elf32-ppc.c (ppc_elf_howto_init): Likewise.
4833 * elflink.h (elf_bfd_discard_info): Likewise.
4834
6348e046
AM
48352002-12-12 Alan Modra <amodra@bigpond.net.au>
4836
4837 * elf32-i386.c (elf_i386_finish_dynamic_sections): Add output_offset
4838 to DT_JMPREL. Use srelplt input section size for DT_PLTRELSZ and
4839 DT_RELSZ adjustment, not output section. Avoid writing tags when
4840 unchanged. Don't assume linker script is sane, adjust DT_REL too.
4841 * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Just use raw
4842 size of srelplt for DT_PLTRELSZ. Use srelplt input section size for
4843 DT_RELASZ adjustment, not output section. Avoid writing tags when
4844 unchanged. Adjust DT_RELA.
4845 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Tweaks for better
4846 formatting. Avoid writing tags when unchanged. Adjust DT_RELA.
4847
2e7a68a8
AO
48482002-12-12 Alexandre Oliva <aoliva@redhat.com>
4849
4850 * elfxx-mips.c (mips_elf_calculate_relocation): Don't divide
4851 addend by 4.
4852
b15e6682
AO
48532002-12-12 Alexandre Oliva <aoliva@redhat.com>
4854
4855 * elfxx-mips.c (struct mips_got_entry): New.
4856 (struct mips_got_info): Added got_entries field.
4857 (mips_elf_got_entry_hash, mips_elf_got_entry_eq): New functions.
4858 (mips_elf_local_got_index, mips_elf_got_page,
4859 mips_elf_got16_entry): Re-implement in terms of new...
4860 (mips_elf_create_local_got_entry): Rewrite to use got_entries.
4861 Change return type.
4862 (mips_elf_highest): Warning clean-up.
4863 (mips_elf_create_got_section): Initialize got_entries.
4864 (_bfd_mips_elf_check_relocs): Use got_entries to estimate
4865 local got size.
4866 (_bfd_mips_elf_size_dynamic_sections): Do not account for
4867 GOT_PAGE entries, since we now reuse GOT16 entries.
4868
e6af3a53
NC
48692002-12-10 Jason Thorpe <thorpej@wasabisystems.com>
4870
4871 * aoutx.h (set_section_contents): Allow an otherwise unrepresentable
4872 read-only section that lies after .text and before .data to be
4873 written into the output file and included in a_text.
4874 (translate_to_native_sym_flags): If an otherwise unrepresentable
4875 section was merged with .text, convert its symbols to N_TEXT
4876 symbols.
4877 * libaout.h (aout_section_merge_with_text_p): New macro.
4878
cf3d882d
AM
48792002-12-08 Alan Modra <amodra@bigpond.net.au>
4880
4881 * bfd-in.h: Comment typo fix. Formatting.
4882 * bfd-in2.h: Regenerate.
4883 * coff64-rs6000.c (xcoff64_openr_next_archived_file): Warning fix.
4884 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): Prototype.
4885 * elf64-mmix.c (mmix_dump_bpo_gregs): Warning fix.
4886
2f9bd3f6
RH
48872002-12-05 Richard Henderson <rth@redhat.com>
4888
4889 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21BI.
4890 Only send PCREL21B though the plt. Fix installed reloc type.
4891 (elfNN_ia64_relocate_section): Give error for dynamic reloc
4892 against PCREL22 or PCREL64I; clean up error messages for
4893 branch relocs.
4894
d0112f73
KB
48952002-12-04 Kevin Buettner <kevinb@redhat.com>
4896
4897 * elf64-mips.c (elf64_mips_grok_prstatus, elf64_mips_grok_psinfo):
4898 New functions.
4899 (elf_backend_grok_prstatus, elf_backend_grok_psinfo): Define.
4900
c10d9d8f
JW
49012002-12-04 David Mosberger <davidm@hpl.hp.com>
4902
4903 * cpu-ia64-opc.c: Add operand constant "ar.csd".
4904
d48770d4
L
49052002-12-04 H.J. Lu <hjl@gnu.org>
4906
4907 * elfxx-ia64.c (get_local_sym_hash): Use section ID instead of
4908 BFD address when constructing local name.
4909
b6152c34
AS
49102002-12-04 Andreas Schwab <schwab@suse.de>
4911
4912 * elf32-m68k.c (struct elf_m68k_link_hash_table): Add sym_sec
4913 member.
4914 (elf_m68k_link_hash_table_create): Initialize it.
4915 (elf_m68k_check_relocs): Handle symbols that are forced to be
4916 local due to visibility changes.
4917 (elf_m68k_adjust_dynamic_symbol): Likewise.
4918 (elf_m68k_size_dynamic_sections): Likewise.
4919 (elf_m68k_discard_copies): Likewise.
4920 (elf_m68k_relocate_section): Likewise.
4921
73374ef1
AM
49222002-12-04 Alan Modra <amodra@bigpond.net.au>
4923
4924 * elf64-ppc.c (ppc64_elf_edit_opd): Correct typo.
4925
c5c1944d
AM
49262002-12-04 Alan Modra <amodra@bigpond.net.au>
4927
4928 * srec.c (srec_write_symbols): Restore '$' prefix to address
4929 accidentally removed in 2002-04-04 change.
4930 (srec_get_symtab): Use 0 instead of `(long) FALSE'.
4931
e1a9cb8e
NC
49322002-12-03 Nick Clifton <nickc@redhat.com>
4933
4934 * elf32-ppc.c (apuinfo_list_init): New function.
73374ef1
AM
4935 (apuinfo_list_add): New function: Add a value to the list.
4936 (apuinfo_list_length): New function: Return the number of
4937 values on the list.
4938 (apuinfo_list_element): New function: Return a value on the
4939 list.
4940 (apuinfo_list_finish): New function: Free the resources used
4941 by the list.
4942 (ppc_elf_begin_write_processing): New function. Scan the
4943 input bfds for apuinfo sections.
4944 (ppc_elf_write_section): New function: Delay the creation of
4945 the contents of an apuinfo section in an output bfd.
4946 (ppc_elf_final_write_processing): New function. Create the
4947 contents of an apuinfo section in an output bfd.
4948 (elf_backend_begin_write_processing): Define.
4949 (elf_backend_final_write_processing): Define.
4950 (elf_backend_write_section): Define.
e1a9cb8e 4951
a823923b
RH
49522002-12-03 Richard Henderson <rth@redhat.com>
4953
4954 * cpu-ia64-opc.c (elf64_ia64_operands): Add ldxmov entry.
4955
30491647
SC
49562002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4957
4958 Fix PR savannah/1417:
4959 * elf32-m68hc11.c (m68hc11_elf_relax_delete_bytes): Don't adjust
4960 branch if it goes to the start of the deleted region.
4961
bc7c6a90
SC
49622002-12-01 Stephane Carrez <stcarrez@nerim.fr>
4963
4964 * bfd-in2.h (bfd_mach_m6812): Rebuild.
4965 * archures.c (bfd_mach_m6812_default, bfd_mach_m6812,
4966 bfd_mach_m6812s): Declare.
4967
4968 * elf32-m68hc12.c (m68hc12_elf_set_mach_from_flags): New function.
4969 (_bfd_m68hc12_elf_set_private_flags): Call it.
4970 (_bfd_m68hc12_elf_print_private_bfd_data): Report processor version.
4971 (_bfd_m68hc12_elf_merge_private_bfd_data): Merge the flags and
4972 report microcontroller incompatibilities (HC12 vs HCS12).
4973 (elf_backend_object_p): Update.
4974
b34976b6
AM
49752002-11-30 Alan Modra <amodra@bigpond.net.au>
4976
4977 * bfd-in.h (TRUE_FALSE_ALREADY_DEFINED, BFD_TRUE_FALSE): Delete.
4978 (enum bfd_boolean, boolean): Delete.
4979 (bfd_boolean): Typedef to an int.
4980 (FALSE, TRUE): Define.
4981 * aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c, aout-cris.c,
4982 aout-encap.c, aout-ns32k.c, aout-target.h, aout-tic30.c, aoutf1.h,
4983 aoutx.h, archive.c, archive64.c, archures.c, bfd-in.h, bfd.c, bfdwin.c,
4984 binary.c, bout.c, cache.c, cisco-core.c, coff-a29k.c, coff-alpha.c,
4985 coff-apollo.c, coff-arm.c, coff-aux.c, coff-h8300.c, coff-h8500.c,
4986 coff-i386.c, coff-i860.c, coff-i960.c, coff-ia64.c, coff-m68k.c,
4987 coff-m88k.c, coff-mcore.c, coff-mips.c, coff-or32.c, coff-ppc.c,
4988 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c, coff-tic30.c,
4989 coff-tic4x.c, coff-tic54x.c, coff-tic80.c, coff-w65.c, coff-we32k.c,
4990 coff-z8k.c, coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c,
4991 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c, cpu-avr.c,
4992 cpu-cris.c, cpu-d10v.c, cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c,
4993 cpu-h8300.c, cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c,
4994 cpu-i860.c, cpu-i960.c, cpu-ia64.c, cpu-ip2k.c, cpu-m10200.c,
4995 cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c, cpu-m68hc12.c, cpu-m68k.c,
4996 cpu-m88k.c, cpu-mcore.c, cpu-mips.c, cpu-mmix.c, cpu-ns32k.c,
4997 cpu-openrisc.c, cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c,
4998 cpu-rs6000.c, cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c,
4999 cpu-tic4x.c, cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c,
5000 cpu-w65.c, cpu-we32k.c, cpu-xstormy16.c, cpu-z8k.c, dwarf1.c,
5001 dwarf2.c, ecoff.c, ecofflink.c, efi-app-ia32.c, efi-app-ia64.c,
5002 elf-bfd.h, elf-eh-frame.c, elf-hppa.h, elf-m10200.c, elf-m10300.c,
5003 elf-strtab.c, elf.c, elf32-arc.c, elf32-arm.h, elf32-avr.c,
5004 elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c, elf32-fr30.c,
5005 elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c, elf32-hppa.h,
5006 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5007 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5008 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5009 elf32-pj.c, elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-sh64-com.c,
5010 elf32-sh64.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
5011 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5012 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
5013 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c,
5014 elfarm-oabi.c, elfcode.h, elfcore.h, elflink.c, elflink.h,
5015 elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c, elfxx-mips.h,
5016 elfxx-target.h, format.c, freebsd.h, genlink.h, hash.c, hp300hpux.c,
5017 hppabsd-core.c, hpux-core.c, i386aout.c, i386linux.c, i386lynx.c,
5018 i386mach3.c, i386msdos.c, i386os9k.c, ieee.c, ihex.c, irix-core.c,
5019 libaout.h, libbfd-in.h, libbfd.c, libcoff-in.h, libecoff.h, libieee.h,
5020 libnlm.h, liboasys.h, libpei.h, libxcoff.h, linker.c, lynx-core.c,
5021 m68klinux.c, m68klynx.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c,
5022 mmo.c, netbsd-core.c, netbsd.h, nlm.c, nlm32-alpha.c, nlm32-i386.c,
5023 nlm32-ppc.c, nlm32-sparc.c, nlmcode.h, oasys.c, opncls.c, osf-core.c,
5024 pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c, pe-mcore.c, pe-mips.c,
5025 pe-sh.c, peXXigen.c, pef.c, pei-arm.c, pei-i386.c, pei-mcore.c,
5026 pei-mips.c, pei-sh.c, peicode.h, ppcboot.c, ptrace-core.c, reloc.c,
5027 reloc16.c, riscix.c, rs6000-core.c, sco5-core.c, section.c, simple.c,
5028 som.c, som.h, sparclinux.c, sparclynx.c, srec.c, stabs.c, sunos.c,
73374ef1 5029 syms.c, targets.c, tekhex.c, ticoff.h, trad-core.c, versados.c,
b34976b6
AM
5030 vms-gsd.c, vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h,
5031 xcoff-target.h, xcofflink.c, xsym.c, xsym.h: Replace boolean with
5032 bfd_boolean, true with TRUE, false with FALSE. Simplify comparisons
5033 of bfd_boolean vars with TRUE/FALSE. Formatting.
5034 * bfd-in2.h, libbfd.h, libcoff.h: Regenerate
5035
947216bf
AM
50362002-11-28 Alan Modra <amodra@bigpond.net.au>
5037
5038 * elf-bfd.h: Replace occurrences of Elf32_Internal_* and
5039 Elf64_Internal_* with Elf_Internal_*. Replace Elf_Internal_Rel
5040 with Elf_Internal_Rela.
5041 * elf-hppa.h, elf-m10200.c, elf-m10300.c, elf32-arc.c, elf32-arm.h,
5042 elf32-avr.c, elf32-cris.c, elf32-d10v.c, elf32-d30v.c, elf32-dlx.c,
5043 elf32-fr30.c, elf32-frv.c, elf32-gen.c, elf32-h8300.c, elf32-hppa.c,
5044 elf32-i370.c, elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
5045 elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c, elf32-m68k.c,
5046 elf32-mcore.c, elf32-mips.c, elf32-openrisc.c, elf32-or32.c,
5047 elf32-ppc.c, elf32-s390.c, elf32-sh.c, elf32-v850.c, elf32-vax.c,
5048 elf32-xstormy16.c, elf64-alpha.c, elf64-gen.c, elf64-hppa.c,
5049 elf64-mips.c, elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5050 elf64-sparc.c, elf64-x86-64.c, elfarm-nabi.c, elfarm-oabi.c,
5051 elfcode.h, elflink.h, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c: Ditto.
5052 * elf-hppa.h (elf_hppa_internal_shdr): Delete. Use Elf_Internal_Shdr
5053 throughout instead.
5054 * elf.c (_bfd_elf_no_info_to_howto_rel): Delete.
5055 * elfcode.h (elf_swap_reloca_in): Pass source operand as a bfd_byte *.
5056 Remove INLINE keyword.
5057 (elf_swap_reloc_in): Likewise. Also clear r_addend.
5058 (elf_swap_reloc_out, elf_swap_reloca_out): Pass destination operand
5059 as a bfd_byte *.
5060 (elf_write_relocs): Consolidate REL and RELA code.
5061 (elf_slurp_reloc_table_from_section): Simplify REL code.
5062 (NAME(_bfd_elf,size_info)): Populate reloc swap entries.
5063 * elf-bfd.h (MAX_INT_RELS_PER_EXT_REL): Define.
5064 * elflink.h (elf_link_read_relocs_from_section): Consolidate REL and
5065 RELA code.
5066 (elf_link_adjust_relocs): Likewise. Don't malloc space for temp
5067 reloc array, use a fixed size of MAX_INT_RELS_PER_EXT_REL.
5068 (elf_link_output_relocs): Likewise.
5069 (elf_reloc_link_order): Likewise.
5070 (elf_finish_pointer_linker_section): Likewise.
5071 (struct elf_link_sort_rela): Remove union.
5072 (elf_link_sort_cmp1): Update to suit.
5073 (elf_link_sort_cmp2): Here too.
5074 (elf_link_sort_relocs): Consolidate REL and RELA code. Fix memory
5075 over-allocation for int_rels_per_ext_rel != 1 case.
5076 * elf32-arm.h: Update all bfd_elf32_swap_reloc_out calls.
5077 * elf32-i386.c: Likewise.
5078 * elf32-cris.c: Likewise for bfd_elf32_swap_reloca_out.
5079 * elf32-hppa.c, elf32-i370.c, elf32-m68k.c, elf32-ppc.c, elf32-s390.c,
5080 elf32-sh.c, elf32-vax.c, elfxx-mips.c: Likewise.
5081 * elf64-alpha.c: Likewise for bfd_elf64_swap_reloca_out.
5082 * elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c,
5083 elf64-sparc.c, elf64-x86-64.c: Likewise.
5084 * elfxx-ia64.c: Likewise for bfd_elfNN_swap_reloca_out.
5085 * elfxx-mips.c (sort_dynamic_relocs): Likewise for
5086 bfd_elf32_swap_reloc_in.
5087
5088 * elf32-arm.h: Update elf32_arm_info_to_howto calls.
5089 * elf32-mips.c: Likewise for mips_info_to_howto_rel.
5090 (mips_elf64_swap_reloc_in): Zero r_addend.
5091 (mips_elf64_be_swap_reloc_in): Likewise.
5092 (mips_elf64_slurp_one_reloc_table): Simplify.
5093
5094 * elf64-alpha.c (alpha_elf_size_info): Populate reloc swap entries.
5095 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
5096 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
5097
1448fa32
KK
50982002-11-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5099
5100 * elf32-sh.c (sh_elf_relocate_section): Don't complain about
73374ef1 5101 unresolved debugging relocs in dynamic applications.
1448fa32
KK
5102 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
5103
73722af0
AM
51042002-11-26 Alan Modra <amodra@bigpond.net.au>
5105
5106 * elf-eh-frame.c (ENSURE_NO_RELOCS): Disregard R_*_NONE relocs.
5107 (_bfd_elf_discard_section_eh_frame): Don't discard duplicate CIEs
5108 on a relocatable link. Comment typos.
5109 * elf.c (_bfd_elf_link_hash_newfunc): Assign elements of structure
5110 in the order they are declared. Clear elf_hash_value too.
5111 (_bfd_elf_link_hash_table_init): Likewise assign in order. Clear
5112 eh_info and tls_segment.
5113 * elflink.h (elf_link_input_bfd <emit_relocs>): Keep reloc offsets
5114 sorted when discarding relocs by turning them into R_*_NONE.
5115
5116 * libbfd.c (warn_deprecated): Comment spelling.
5117 * po/SRC-POTFILES.in: Regenerate.
5118
7c25b72c
RH
51192002-11-21 Richard Henderson <rth@redhat.com>
5120
5121 * elflink.h (elf_link_add_object_symbols): Don't overwrite the
5122 arch's st_other bits when merging visibilities.
5123 (elf_link_output_extsym): Tidy clearing of visibility field.
5124
dc12c51f
AM
51252002-11-21 Alan Modra <amodra@bigpond.net.au>
5126
5127 * coff-mcore.c (SWAP_IN_RELOC_OFFSET): Define.
5128 (SWAP_OUT_RELOC_OFFSET): Define.
5129
963f13ec
AO
51302002-11-20 Alexandre Oliva <aoliva@redhat.com>
5131
5132 * elf.c (_bfd_elf_link_hash_table_init): Make sure
5133 can_refcount is properly extended to the type of
5134 init_refcount.
5135
ee6423ed
AO
51362002-11-19 Alexandre Oliva <aoliva@redhat.com>
5137
4ffba85c
AO
5138 * elfxx-mips.c (MIPS_RELOC_RELA_P): New macro.
5139 (_bfd_mips_elf_relocate_section): Use it.
5140
ee6423ed
AO
5141 * elfxx-mips.c (MNAME): New macro.
5142 (_bfd_mips_elf_check_relocs): Use it.
5143 (_bfd_mips_elf_discard_info): Likewise.
5144 (_bfd_mips_elf_final_link): Likewise.
5145
cdcf6e38
AM
51462002-11-19 Alan Modra <amodra@bigpond.net.au>
5147
5148 * elf64-ppc.c (ppc64_elf_edit_opd): When deleting relocs, adjust
5149 rel_hdr.sh_size too.
5150
93509525
KD
51512002-11-18 Klee Dienes <kdienes@apple.com>
5152
5153 * Makefile.am (BFD32_LIBS): Add bfdwin.lo, bfdio.lo.
5154 (BFD32_LIBS_CFILES): Add bfdwin.c, bfdio.c.
5155 (BFD_H_FILES): Add bfdwin.c, bfdio.c.
5156 (LIBBFD_H_FILES): Add bfdwin.c, bfdio.c.
5157 Add dependencies for bfdwin.c, bfdio.c.
5158 * bfd.c: Remove bfd_get_mtime, bfd_get_size.
5159 * libbfd.c: Remove real_read, bfd_bread, _bfd_window_internal,
5160 bfd_init_window, bfd_free_window, bfd_get_file_window, bfd_bwrite,
5161 bfd_tell, bfd_flush, bfd_stat, bfd_seek.
5162 * bfdio.c: New file. Contains real_read, bfd_bread, bfd_write,
5163 bfd_tell, bfd_flush, bfd_stat, bfd_seek, bfd_ge_mtime,
5164 bfd_get_size (moved from libbfd.c and bfd.c).
5165 * bfdwin.c New file. Contains _bfd_window_internal,
5166 bfd_init_window, bfd_free_window, bfd_get_file_window (moved from
5167 libbfd.c and bfd.c).
5168 * po/SRC-POTFILES.in: Regenerate.
5169 * po/bfd.pot: Regenerate.
5170 * libbfd.h: Regenerate.
5171 * bfd-in2.h: Regenerate.
5172 * aclocal.m4: Regenerate.
5173 * Makefile.in: Regenerate.
5174 * configure: Regenerate.
5175
3ae41454
AM
51762002-11-18 Klee Dienes <kdienes@apple.com>
5177
5178 * bfd.c (bfd_preserve_save): Don't zero BFD_IN_MEMORY.
5179
e514ac71
NC
51802002-11-15 Kazu Hirata <kazu@cs.umass.edu>
5181
5182 * coff-h8300.c (h8300_reloc16_estimate): Do not optimize away
5183 jsr after a short jump.
5184 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
5185
eddc4f81
KD
51862002-11-15 Klee Dienes <kdienes@apple.com>
5187
5188 * pef.c (bfd_pef_convert_architecture): Move declaration of
5189 ARCH_POWERPC and ARCH_M68K to the start of the function.
5190
51908eee
SS
51912002-11-14 Svein E. Seldal <Svein.Seldal@solidas.com>
5192
5193 * coff-tic4x.c (tic4x_howto_table): Formatting fixup
5194
3416d2e7
HPN
51952002-11-14 Hans-Peter Nilsson <hp@bitrange.com>
5196
5197 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs):
5198 For bpo_gregs_section->contents, allocate _raw_size, not
5199 _cooked_size.
5200
b1c58715
AM
52012002-11-13 Klee Dienes <kdienes@apple.com>
5202
5203 * config.bfd: Add entries for powerpc-*-darwin and cousins.
5204
077ca68b
L
52052002-11-13 H.J. Lu <hjl@gnu.org>
5206
5207 * elfcode.h (elf_object_p): Don't restore abfd->arch_info.
5208
e84d6fca
AM
52092002-11-13 Klee Dienes <kdienes@apple.com>
5210 Alan Modra <amodra@bigpond.net.au>
5211
5212 * bfd.c (struct bfd_preserve): New.
5213 (bfd_preserve_save): New function.
5214 (bfd_preserve_restore): Ditto.
5215 (bfd_preserve_finish): Ditto.
5216 * bfd-in2.h: Regenerate.
5217 * mach-o.c: Formatting.
5218 (bfd_mach_o_scan_read_symtab_symbol): Make "value" unsigned.
5219 (bfd_mach_o_object_p): Use bfd_preserve_save/restore/finish.
5220 (bfd_mach_o_core_p): Ditto.
5221 (bfd_mach_o_scan): Pass in mdata.
5222 * mach-o.h (bfd_mach_o_scan): Update prototype.
5223 * pef.c: Formatting.
5224 (bfd_pef_object_p): Use bfd_preserve_save/restore/finish.
5225 (bfd_pef_xlib_object_p): Ditto.
5226 (bfd_pef_scan): Pass in mdata. Move version check to bfd_pef_object_p.
5227 * pef.h (bfd_pef_scan): Update prototype.
5228 * xsym.c: Formatting, K&R fixes.
5229 (bfd_sym_object_p): Use bfd_preserve_save/restore/finish.
5230 (bfd_sym_scan): New function split out from bfd_sym_object_p.
5231 * xsym.h (bfd_sym_scan): Declare.
5232 * elfcode.h (elf_object_p): Use bfd_preserve_save/restore/finish.
a7f84125 5233 * elfcore.h (elf_core_file_p): Likewise.
e84d6fca
AM
5234 * targets.c (_bfd_target_vector): Revert 2002-11-08 change.
5235
cd24c222
NC
52362002-11-12 Nick Clifton <nickc@redhat.com>
5237
5238 * po/da.po: Updated Danish translation.
5239
99eb2ac8
AM
52402002-11-12 Alan Modra <amodra@bigpond.net.au>
5241
d6fe2dc1
AM
5242 * elflink.h (elf_link_add_object_symbols): Optimize stabs for
5243 relocatable link too.
5244 (elf_link_input_bfd): When emitting relocs, adjust offsets for
5245 eh_frame and stab sections. Zap deleted relocs.
5246 (elf_reloc_symbol_deleted_p): Return true for zero r_symndx.
5247 (elf_bfd_discard_info): Run for relocatable link too.
5248 * elf64-ppc.c (ppc64_elf_edit_opd): Rename from edit_opd. Make global.
5249 Handle ld -r case.
5250 (ppc64_elf_size_dynamic_sections): Don't call edit_opd from here.
5251 * elf64-ppc.h (ppc64_elf_edit_opd): Declare.
5252
126495ed
AM
5253 * elf-bfd.h (struct cie_header): Move from elf_eh-frame.c.
5254 (struct cie, struct eh_cie_fde, struct eh_frame_sec_info): Likewise.
5255 (struct eh_frame_array_ent, struct eh_frame_hdr_info): Likewise.
5256 (enum elf_link_info_type): Remove ELF_INFO_TYPE_EH_FRAME_HDR.
5257 (struct eh_frame_hdr_info): Add "hdr_sec", remove "split".
5258 (struct elf_link_hash_table): Add eh_info.
5259 (struct elf_obj_tdata): Change eh_frame_hdr to an asection *.
5260 (_bfd_elf_discard_section_eh_frame): Update prototype.
5261 (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
5262 (_bfd_elf_write_section_eh_frame): Likewise.
5263 (_bfd_elf_write_section_eh_frame_hdr): Likewise.
5264 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Remove "ehdrsec"
5265 param. Get "hdr_info" from link hash table.
5266 (_bfd_elf_discard_section_eh_frame_hdr): Remove "sec" param. Get
5267 header section from link hash table. Save header section to elf_tdata.
5268 (_bfd_elf_maybe_strip_eh_frame_hdr): Remove local "sec". Use
5269 header section from link hash table. Don't alloc hdr_info. Clear
5270 hdr_sec instead of setting "strip".
5271 (_bfd_elf_eh_frame_section_offset): Formatting.
5272 (_bfd_elf_write_section_eh_frame): Remove "ehdrsec", add "info" param.
5273 Get header section from link hash table.
5274 (_bfd_elf_write_section_eh_frame_hdr): Remove "sec", add "info" param.
5275 Get header section from link hash table.
5276 * elf.c (map_sections_to_segments): Use cached eh_frame_hdr.
5277 (get_program_header_size): Likewise.
5278 (_bfd_elf_section_offset): Formatting.
5279 * elflink.h (elf_link_create_dynamic_sections): Stash eh frame header
5280 section pointer in link hash table.
5281 (elf_bfd_final_link): Adjust _bfd_elf_write_section_eh_frame_hdr
5282 and _bfd_elf_write_section_eh_frame calls. Update comment about
5283 eh_frame entries.
5284 (elf_bfd_discard_info): Adjust _bfd_elf_discard_section_eh_frame and
5285 _bfd_elf_discard_section_eh_frame_hdr calls. Remove "ehdr".
5286
5287 * po/SRC-POTFILES.in: Regenerate.
5288
99eb2ac8
AM
5289 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't zero
5290 relocs for discarded FDEs. Remove dead code.
5291 (_bfd_elf_write_section_eh_frame_hdr): Remove dead code.
5292 * elflink.h (elf_bfd_discard_info): Don't save edited relocs.
5293 Tidy conditions under which stabs are edited. Formatting.
5294 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
5295 from discarded relocs.
5296 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Add reloc output
5297 section adjustments after testing magic values.
5298
7c319a27
AM
52992002-11-12 Thomas Moestl <tmm@FreeBSD.org>
5300
5301 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Correct
5302 references to large plt symbols.
5303
a95a4550
AM
53042002-11-12 Klee Dienes <kdienes@apple.com>
5305
5306 * mach-o.c (bfd_mach_o_scan_read_thread): Don't re-use 'i' when
5307 looking for an unused section name.
5308
bc7eab72
KH
53092002-11-11 Kazu Hirata <kazu@cs.umass.edu>
5310
5311 * coff-h8300.c: Fix formatting.
5312 * elf32-h8300.c: Likewise.
5313 * reloc16.c: Likewise.
5314
52585bb8
AM
53152002-11-09 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
5316
5317 * elf32-arm.h (elf32_arm_size_dynamic_sections): Don't strip output
5318 section when dynamic section unused; _bfd_strip_section_from_output
5319 instead.
5320
9f632188
AM
53212002-11-08 Alan Modra <amodra@bigpond.net.au>
5322
207b304b
AM
5323 * targets.c (_bfd_target_vector): Disable pef_vec, pef_xlib_vec
5324 and sym_vec.
3b029f65 5325
9f632188
AM
5326 * dwarf2.c: Revert last change.
5327
ec4530b5
NC
53282002-11-07 Michal Ludvig <mludvig@suse.cz>
5329
9b5ecbd0 5330 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
ec4530b5
NC
5331 _bfd_dwarf2_find_nearest_line): Use
5332 bfd_simple_get_relocated_section_contents() instead of
5333 bfd_get_section_contents().
5334 * reloc.c (bfd_perform_relocation): Add sanity check.
5335 * simple.c (simple_get_relocated_section_contents): If the section
5336 does not have any relocs associated with it, just return the
5337 unadjusted contents.
5338
205cfeb0
HPN
53392002-11-07 Hans-Peter Nilsson <hp@axis.com>
5340
5341 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOT,
5342 case R_CRIS_32_GOT>: Correct test for filling in constant .got
5343 contents, enabling for a non-DSO, for symbols defined in the
5344 program with --export-dynamic.
5345
87e226ce
AM
53462002-11-07 Alan Modra <amodra@bigpond.net.au>
5347
5348 * elf64-ppc.c: Comment typo fixes.
5349 (ppc64_elf_merge_private_bfd_data): Allow BFD_ENDIAN_UNKNOWN input.
5350
235c4794
NC
53512002-11-07 Nick Clifton <nickc@redhat.com>
5352
5353 * po/da.po: Updated Danish translation.
5354
49179469
AO
53552002-11-06 Alexandre Oliva <aoliva@redhat.com>
5356
5357 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Generate
5358 exactly three internal relocs per external reloc. Set reloc_count
5359 to the external reloc count.
5360
246178f2
NC
53612002-11-06 Klee Dienes <kdienes@apple.com>
5362
3ae41454 5363 * coff-stgo32.c (stub_bytes): Mark as const.
246178f2
NC
5364 Fix comment formatting.
5365
3af9a47b
NC
53662002-11-06 Klee Dienes <kdienes@apple.com>
5367
3ae41454 5368 * Makefile.am (BFD32_BACKENDS): Add mach-o.lo, pef.lo, and
3af9a47b
NC
5369 xsym.lo.
5370 (BFD32_BACKENDS_CFILES): Add mach-o.c, pef.c, and xsym.c.
5371 (SOURCE_HFILES): Add mach-o.h, pef.h, pef-traceback.h, xsym.h
5372 * archures.c (enum bfd_architecture): Add bfd_arch_m98k.
5373 * bfd.c (struct bfd): Add private data for mach-o, pef, and sym.
5374 * targets.c (enum bfd_flavour): Add flavours for mach-o, pef, and
5375 sym.
3ae41454 5376 (_bfd_target_vector): Add target vectors for mach-o, pef, and sym.
3af9a47b
NC
5377 * Makefile.in: Regenerate.
5378 * doc/Makefile.in: Regenerate.
3ae41454 5379 * bfd-in2.h: Regenerate.
3af9a47b
NC
5380 * xsym.c: New file. Contains support for the Apple/Metrowerks
5381 xSYM debugging format.
5382 * xsym.h: New file.
5383 * pef.c: New file. Contains support for the Apple Code Fragment
5384 Manager Preferred Executable Format
5385 * pef.h: New file.
5386 * pef-traceback.h: New file. Contains support for parsing PowerPC
5387 traceback tables as used by PEF executables (and perhaps other
5388 systems as well).
3ae41454 5389 * mach-o.c: New file. Contains support for the Mach-O object file
3af9a47b
NC
5390 format.
5391 * mach-o.h: New file.
5392 * mach-o-target.c: New file. Declares the mach-o targets
5393 themselves. Included three times by mach-o.c; each time with a
5394 different set of macros set.
3ae41454 5395
b6821651 53962002-11-06 Graeme Peterson <gp@qnx.com>
911b232a
AM
5397
5398 * Makefile.am: Remove entries for elf32-qnx.[ch].
5399 * Makefile.in: Regenerate.
5400 * config.bfd: Change arm-nto to use bfd_elf32_{big|little}arm_vec,
5401 ppc-nto to use bfd_elf32_powerpc{le}_vec, sh-nto to use
5402 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5403 * configure.in: Remove support for bfd_elf32_sh{l}qnx_vec,
5404 bfd_elf32_powerpc{le}qnx_vec, bfd_elf32_{big|little}armqnx_vec,
5405 and bfd_elf32_i386qnx_vec, and removed elf32-qnx.lo from other targets.
5406 bfd_elf32_sh{l}_vec, and i386-nto to use bfd_elf32_i386_vec.
5407 * configure: Regenerate.
5408 * elf32-qnx.c: Remove.
5409 * elf32-qnx.h: Remove.
5410 * elf.c: Remove calls to QNX specific set_nonloadable_filepos,
5411 is_contained_by_filepos, and copy_private_bfd_data_p.
ad12c1c5
AM
5412 * elf-bfd.h (struct elf_backend_data): Remove set_nonloadable_filepos,
5413 is_contained_by_filepos, and copy_private_bfd_data_p.
911b232a
AM
5414 * elf32-i386.c: Remove QNX extended bfd support.
5415 * elf32-ppc.c: Remove QNX extended bfd support.
5416 * elf32-sh.c: Remove QNX extended bfd support.
5417 * elfarm-nabi.c: Remove QNX extended bfd support.
5418 * targets.c: Remove qnx vectors.
5419 * elfxx-target.h (elf_backend_set_nonloadable_filepos): Remove
5420 (elf_backend_is_contained_by_filepos): Remove.
5421 (elf_backend_copy_private_bfd_data_p): Remove.
5422 * po/SRC-POTFILES.in: Regenerate.
5423
b6821651
AM
54242002-11-06 David O'Brien <obrien@FreeBSD.org>
5425 Alan Modra <amodra@bigpond.net.au>
5426
5427 * elf64-sparc.c (sparc64_elf_relocate_section): Adjust addend of
5428 dynamic relocs against section symbols for the output section vma.
5429
54302002-11-05 Alan Modra <amodra@bigpond.net.au>
5431
5432 * elf32-arm.h (t2a1_push_insn, t2a2_ldr_insn, t2a3_mov_insn,
5433 t2a4_bx_insn, t2a5_pop_insn, t2a6_bx_insn): Remove.
5434
08f74004
AM
54352002-11-05 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5436 Alan Modra <amodra@bigpond.net.au>
5437
5438 * config.bfd (sh-*-linux*): Use bfd_elf*_sh64*lin_vec as sh64
5439 vectors in target_selvecs.
5440 (shle-*-netbsdelf*): Use bfd_elf*_sh64*nbsd_vec as sh64 vectors
5441 in target_selvecs.
5442 (sh-*-netbsdelf*): Likewise.
5443 * configure.in (assocvecs): New variable. Handle assocvecs like
5444 selvecs.
5445 * configure: Regenerate.
5446 * format.c (bfd_check_format_matches): Store bfd_target pointers
5447 in matching_vector instead of target names. Select first target
5448 from bfd_associated_vector that matches a list of ambiguous targets.
5449 * targets.c (_bfd_associated_vector): New array.
5450 (bfd_associated_vector): New variable.
5451 (_bfd_target_vector): Add bfd_elf*_sh64*lin_vec.
5452 * libbfd-in.h (bfd_associated_vector): Declare.
5453 * libbfd.h: Regenerate.
5454
89117aab
AM
54552002-11-05 Elias Athanasopoulos <eathan@otenet.gr>
5456
5457 * vms-gsd.c (_bfd_vms_write_gsd): Check that symbol->udata.p is
5458 non-NULL before dereferencing.
5459
5e9aae3e
KK
54602002-11-04 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5461
5462 * vms.c (vms_object_p): Restore the start address when returning
5463 NULL.
5464
c97e73dd
AM
54652002-11-04 Alan Modra <amodra@bigpond.net.au>
5466 Hans-Peter Nilsson <hp@axis.com>
5467
5468 * elflink.h (struct elf_final_link_info): Add shndxbuf_size.
5469 (elf_bfd_final_link): Don't bother zeroing symtab_hdr fields.
5470 Set up a larger symshndxbuf, and write it out. Free it on
5471 exit rather than freeing symbuf twice. Correct section index
5472 on output section symbol loop.
5473 (elf_link_output_sym): Accumulate symbol extension section
5474 indices, reallocating symshndxbuf rather than writing it out.
5475 (elf_link_flush_output_syms): Don't flush symshndxbuf.
5476 * elf.c (assign_section_numbers): Init i_shdrp to all zero.
5477 Use bfd_zalloc to clear i_shdrp[0] too.
5478
3463048e
SC
54792002-11-03 Stephen Clarke <stephen.clarke@earthling.net>
5480
5481 * elf32-sh64-com.c (sh64_address_in_cranges): Use
5482 _raw_size of cranges section if _cooked_size not yet set.
5483
63a23799
HPN
54842002-11-03 Hans-Peter Nilsson <hp@axis.com>
5485
5486 * elf32-v850.c (v850_elf_relax_delete_bytes): Correct parameters
5487 for bfd_elf32_swap_symbol_out.
5488
e68cc12e
DB
54892002-10-31 David O'Brien <obrien@FreeBSD.org>
5490
5491 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't mix
5492 signed and unsigned in comparison.
5493
db4b6d01
DJ
54942002-10-30 Daniel Jacobowitz <drow@mvista.com>
5495
5496 * coffcode.h: Remove extraneous '\'.
5497
840f0243
L
54982002-10-28 H.J. Lu <hjl@gnu.org>
5499
5500 * Makefile.am (targets.lo): Depend on Makefile instead of
5501 config.status.
5502 (archures.lo): Likewise.
5503 * Makefile.in: Regenerated.
5504
05a7e2db
JT
55052002-10-25 Jason Thorpe <thorpej@wasabisystems.com>
5506
5507 * config.bfd (mips*el-*-netbsd*, mips*-*-netbsd*): Add
5508 bfd_elf64_bigmips_vec and bfd_elf64_littlemips_vec to
5509 targ_selvecs.
5510
a0087177
JW
55112002-10-25 Jim Wilson <wilson@redhat.com>
5512
5513 * elf64-sh64.c (sh_elf64_relocate_section): Call
5514 _bfd_elf_rela_local_sym. Handle relocs against STT_SECTION symbol
5515 of SHF_MERGE section.
5516
8718ac9c
HPN
55172002-10-25 Hans-Peter Nilsson <hp@axis.com>
5518
5519 * simple.c: Correct placement of ATTRIBUTE_UNUSED.
5520
d45913a0
DA
55212002-10-24 John David Anglin <dave@hiauly1.hia.nrc.ca>
5522
5523 * aoutx.h (NAME(aout,swap_ext_reloc_in)): Cast bytes->r_index to
5524 unsigned int. Cast RELOC_BASE10, RELOC_BASE13 and RELOC_BASE22 to
5525 unsigned int.
5526 (NAME(aout,final_link)): Cast enum used in assignment.
5527 (aout_link_write_symbols): Cast enums in comparisons, int values to
5528 boolean, enums in assignments to int.
5529 (aout_link_input_section_std): Cast rel->r_index to unsigned int.
3dab13f6
AM
5530 (aout_link_input_section_ext): Likewise. Cast enums used in
5531 comparisons with unsigned ints.
d45913a0
DA
5532 (aout_link_reloc_link_order): Cast enum to int in assignment.
5533 * archive.c (_bfd_generic_read_ar_hdr_mag): Cast result of memchr
5534 calls to char *.
5535 * bfd-in.h (bfd_set_section_vma): Cast enum true to unsigned int in
5536 assignment.
5537 * bfd-in2.h (bfd_set_section_vma): Likewise.
5538 * bfd.c (bfd_record_phdr): Cast enums in assignments.
5539 * binary.c (bfd_alloc): Cast enum to long.
5540 * coffgen.c (_bfd_coff_is_local_label_name): Cast return to boolean.
5541 * dwarf2.c (read_abbrevs): Add casts to enum types.
5542 (read_attribute_value): Likewise.
5543 (arange_add): Cast result of bfd_zalloc call.
5544 (comp_unit_contains_address): Return true and false.
5545 (comp_unit_find_nearest_line): Cast return to boolean.
5546 * format.c (bfd_check_format_matches, bfd_set_format): Likewise.
5547 * gen-aout.c: define macro '_' if not defined.
5548 * libbfd.c (bfd_realloc): Cast malloc and realloc to PTR.
5549 (bfd_bwrite): Cast bfd_realloc to bfd_byte *.
5550 (bfd_write_bigendian_4byte_int): Cast return to boolean.
5551 (bfd_seek): Cast bfd_realloc to bfd_byte *.
5552 (bfd_generic_is_local_label_name): Cast return to boolean.
5553 * libcoff.h (_bfd_coff_adjust_symndx): Remove extraneous '\'.
5554 * linker.c (_bfd_link_hash_newfunc): Cast bfd_hash_allocate result to
5555 struct bfd_hash_entry *.
5556 (_bfd_generic_link_hash_newfunc): likewise.
5557 (_bfd_generic_final_link): Cast enum to unsigned int.
5558 * merge.c (sec_merge_emit): Cast return to boolean.
5559 (merge_strings): Add casts to const unsigned char *.
5560 * reloc.c (bfd_get_reloc_code_name): Cast enums in comparison to int.
5561 (bfd_generic_get_relocated_section_content): Cast enum to unsigned int.
3dab13f6
AM
5562 * section.c (bfd_section_hash_newfunc): Cast bfd_hash_allocate result
5563 to struct bfd_hash_entry *.
d45913a0
DA
5564 (bfd_set_section_content): Add cast to PTR in comparison.
5565 * simple.c (simple_dummy_warning, simple_dummy_undefined_symbol,
5566 simple_dummy_reloc_overflow, simple_dummy_reloc_dangerous,
5567 simple_dummy_unattached_reloc,
5568 bfd_simple_get_relocated_section_contents): Add K&R declarations and
5569 function definitions.
5570 * srec.c (S3Forced): Initialize to false.
5571 (srec_get_symtab): Cast return value from bfd_alloc to asymbol *.
5572 * stabs.c (_bfd_link_section_stabs): Cast enum to int in comparisons.
5573 (_bfd_discard_section_stabs): Likewise. Also cast return to boolean.
5574 * syms.c (bfd_is_undefined_symclass): Cast return to boolean.
5575 (_bfd_stab_section_find_nearest_line): Cast enum to bfd_byte in
5576 comparisons.
5577
475c2a7e
JJ
55782002-10-23 Jakub Jelinek <jakub@redhat.com>
5579
5580 * elf64-alpha.c (elf64_alpha_check_relocs): Only put maybe_dynamic
5581 relocs into shared lib non-allocated reloc sections.
5582
e82ce529
AM
55832002-10-23 Nathan Tallent <eraxxon@alumni.rice.edu>
5584
5585 * dwarf2.c (add_line_info): Ensure that the line_info_table is
5586 sorted even when given an out-of-order line sequence.
5587 (lookup_address_in_line_info_table): When an exact VMA match is
5588 not found, return line information with the closest VMA.
5589
f2482cb2
NC
55902002-10-23 Ross Alexander <ross.alexander@uk.neceur.com>
5591
5592 * elf64-hppa.c: Force DT_FLAGS to always be set. Required by
5593 HPUX 11.00 patch PHSS_26559.
5594
c1fd6598
AO
55952002-10-22 Alexandre Oliva <aoliva@redhat.com>
5596
5597 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Don't move
5598 the options section into a separate section unless IRIX 6
5599 compatibility is enabled.
5600
033fd5f9
AO
56012002-10-22 Alexandre Oliva <aoliva@redhat.com>
5602
5603 * elflink.h (struct elf_link_sort_rela): Turn rel and rela
5604 into arrays.
5605 (elf_link_sort_cmp1, elf_link_sort_cmp2): Adjust.
5606 (elf_link_sort_relocs): Likewise. Take int_rels_per_ext_rel
5607 into account.
5608 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Compose
5609 R_MIPS_REL32 with R_MIPS64 if ABI_64_P.
5610
ef485c01
AM
56112002-10-21 Graeme Peterson <gp@qnx.com>
5612
5613 * targets.c (_bfd_target_vector): Add missing qnx vectors.
5614
b50afec9
AM
56152002-10-21 Alan Modra <amodra@bigpond.net.au>
5616
5617 * targets.c (bfd_target_list): Don't return the default target twice.
5618
5fe39cae
AM
56192002-10-21 Elias Athanasopoulos <eathan@otenet.gr>
5620
5621 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Replace
5622 perror with bfd_perror.
5623
5d603aa9
L
56242002-10-19 H.J. Lu <hjl@gnu.org>
5625
5626 * elflink.h (elf_link_add_object_symbols): Correctly handle
5627 DT_RPATH and DT_RUNPATH.
5628
e377ab71
MK
56292002-10-19 Mark Kettenis <kettenis@gnu.org>
5630
5631 * elf.c (elfcore_grok_note): Fix recognition on NT_PRXFPREG notes.
5632
0d09fec6
DC
56332002-10-17 Denis Chertykov <denisc@overta.ru>
5634
5635 * elf32-ip2k.c (ELF_MACHINE_ALT1): Define alternate machine code
5636 for ip2k port.
5637
acf8aed4
AM
56382002-10-17 Alan Modra <amodra@bigpond.net.au>
5639
5640 * elfxx-target.h (USE_REL): Don't define as 1.
5641 * elf32-arm.h (USE_REL): Provide a default define of 0.
5642 Use #if rather than #ifdef when testing USE_REL.
5643 * elf32-m32r.c: Likewise.
5644
5645 * elf32-arc.c (USE_REL): Define as 1.
5646 * elf32-d10v.c (USE_REL): Likewise.
5647 * elf32-m32r.c (USE_REL): Likewise.
5648 * elf32-m68hc11.c (USE_REL): Likewise.
5649 * elf32-m68hc12.c (USE_REL): Likewise.
5650 * elf32-or32.c (USE_REL): Likewise.
5651 * elfarm-nabi.c (USE_REL): Likewise.
5652
f52d1d64
JJ
56532002-10-16 Jakub Jelinek <jakub@redhat.com>
5654
5655 * config.bfd (s390-*-linux*): Add targ64_selvecs.
5656 (s390x-*-linux*): Add targ_selvecs.
5657
2bc3c89a
AM
56582002-10-16 Alan Modra <amodra@bigpond.net.au>
5659
5660 * Makefile.am (BFD32_BACKENDS): Remove elfarmqnx-nabi.lo,
5fe39cae 5661 elf32-i386-fbsd.lo, elf32-i386qnx.lo, elf32-ppcqnx.lo,
2bc3c89a
AM
5662 elf32-sh-lin.lo, elf32-sh64-lin.lo, elf32-sh-nbsd.lo,
5663 elf32-sh64-nbsd.lo, elf32-shqnx.lo. Add elf32-qnx.lo.
5664 (BFD32_BACKENDS_CFILES): Likewise for corresponding C files.
5665 (BFD64_BACKENDS): Remove elf64-sh64-lin.lo, elf64-sh64-nbsd.lo.
5666 (BFD64_BACKENDS_CFILES): Likewise for corresponding C files.
5667 (SOURCE_HFILES): Add elf32-qnx.h.
5668 (BUILD_HFILES): Add bfdver.h.
5669 Run "make dep-am".
5670 * Makefile.in: Regenerate.
5671 * configure.in Update bfd vector dependencies.
5672 * configure: Regenerate.
5673 * elf32-i386-fbsd.c: Delete. Move code to elf32-i386.c.
5674 * elf32-i386qnx.c: Likewise.
5675 * elf32-ppcqnx.c: Delete. Move code to elf32-ppc.c.
5676 * elf32-sh-nbsd.c: Delete. Move code to elf32-sh.c.
5677 * elf32-sh-lin.c: Likewise.
5678 * elf32-shqnx.c: Likewise.
5679 * elf32-sh64-lin.c: Delete. Move code to elf32-sh64.c.
5680 * elf32-sh64-nbsd.c: Likewise.
5681 * elf64-sh64-lin.c: Delete. Move code to elf64-sh64.c.
5682 * elf64-sh64-nbsd.c: Likewise.
5683 * elfarmqnx-nabi.c: Delete. Move code to elfarm-nabi.c.
5684 * elf32-arm.h (ELF_MAXPAGESIZE): Always define.
5685 * elf32-i386.c: Remove ELF_ARCH and ELF32_I386_C_INCLUDED tests.
5686 * elf32-ppc.c: Remove ELF32_PPC_C_INCLUDED tests.
5687 * elf32-qnx.h (elf_backend_set_nonloadable_filepos): Always define.
5688 (elf_backend_is_contained_by_filepos): Likewise.
5689 (elf_backend_copy_private_bfd_data_p): Likewise.
5690 Globalize and move functions to..
5691 * elf32-qnx.c: ..here. New file.
5692 * elf32-sh.c: Remove ELF_ARCH and ELF32_SH_C_INCLUDED tests. Don't
5693 emit target vectors when INCLUDE_SHMEDIA.
5694 * elf32-sh64.c: Remove ELF_ARCH test. Move TARGET_* etc. defines to
5695 end of file.
5696 * elf64-sh64.c: Remove ELF_ARCH test.
5697 * elfarm-nabi.c: Remove ELFARM_NABI_C_INCLUDED test.
5698 * po/BLD-POTFILES.in: Regenerate.
5699 * po/SRC-POTFILES.in: Regenerate.
5700
90c9df85
AM
57012002-10-16 Alan Modra <amodra@bigpond.net.au>
5702
366f2964
AM
5703 * elflink.h (elf_link_add_object_symbols): Error out on dynamic objects
5704 loaded with --just-symbols.
5705
90c9df85
AM
5706 * elf32-i386qnx.c (TARGET_LITTLE_NAME): Define.
5707 * elf32-ppcqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5708 * elf32-shqnx.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5709 * elfarmqnx-nabi.c (TARGET_LITTLE_NAME, TARGET_BIG_NAME): Define.
5710
2238051f
RH
57112002-10-15 Richard Henderson <rth@redhat.com>
5712
5713 * Makefile.am (BFD64_BACKENDS): Remove elf64-alpha-fbsd.
5714 (BFD64_BACKENDS_CFILES): Likewise.
5715 * configure.in (bfd_elf64_alpha_freebsd_vec): Use elf64-alpha.
5716 * elf64-alpha-fbsd.c: Remove file, move code ...
5717 * elf64-alpha.c: ... here.
5718 * Makefile.in, configure: Rebuild.
5719
64e04ecd
RH
57202002-10-14 Richard Henderson <rth@redhat.com>
5721
5722 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: Increment
5723 VALUE, not ADDEND.
5724
396a6083
SC
57252002-10-14 Stephen Clarke <stephen.clarke@superh.com>
5726
5727 * elf32-sh.c (elf_sh_link_hash_entry): Replace
5728 datalabel_got_offset with union of datalabel_got
5729 offset and refcount.
5730 (sh_elf_link_hash_newfunc): Initialize datalabel_got.refcount.
5731 (allocate_dynrelocs): Delete unnecessary code for
5732 STT_DATALABEL type. Create entry in got for
5733 datalabel version of symbol if datalabel_got.refcount > 0.
5734 (sh_elf_relocate_section): Use datalabel_got union.
5735 (sh_elf_gc_sweep_hook): Pull common code to initialize
5736 h and eh out of switch statement. Declare seen_stt_datalabel.
5737 Initialize it. Decrement datalabel_got.refcount for
5738 got relocs when seen_stt_datalabel is true.
5739 Decrement local_got_refcounts entry for datalabel got relocs
5740 of local symbols.
5741 (sh_elf_copy_indirect_symbol): Copy datalabel_got field over.
5742 (sh_elf_check_relocs): Declare seen_stt_datalabel.
5743 Initialize it. When seen_stt_datalabel is true, increment
5744 datalabel_got refcount rather than got.refcount.
5745 (sh_elf_finish_dynamic_symbol): Create relocs to
5746 initialize got entry for datalabel version of symbol.
5747
6a0735ef
AM
57482002-10-14 Alan Modra <amodra@bigpond.net.au>
5749
5750 * Makefile.am: Run "make dep-am".
5751 (BFD_H_FILES): Remove version.h.
5752 * bfd-in.h (BFD_VERSION, BFD_VERSION_DATE, BFD_VERSION_STRING): Move..
5753 * version.h: ..to here.
5754 * configure.in (bfd_version_date): Remove.
5755 (AC_OUTPUT): Make bfdver.h from version.h.
5756 * bfd.c: #include "bfdver.h".
5757 * vms-hdr.c: Likewise.
5758 * Makefile.in: Regenerate.
5759 * bfd-in2.h: Regenerate.
5760 * configure: Regenerate.
5761 * po/SRC-POTFILES.in: Regenerate.
5762
686e4055
AM
57632002-10-14 Alan Modra <amodra@bigpond.net.au>
5764
5765 * archures.c (bfd_mach_i386_i386, bfd_mach_i386_i8086,
5766 bfd_mach_i386_i386_intel_syntax, bfd_mach_x86_64,
5767 bfd_mach_x86_64_intel_syntax bfd_mach_ppc, bfd_mach_ppc64,
5768 bfd_mach_rs6k, bfd_mach_d10v, bfd_mach_sh, bfd_mach_v850,
5769 bfd_mach_arc_5, bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8,
5770 bfd_mach_m32r, bfd_mach_frv, bfd_mach_frvsimple,
5771 bfd_mach_ia64_elf64, bfd_mach_ia64_elf32,
5772 bfd_mach_ip2022, bfd_mach_ip2022ext,
5773 bfd_mach_s390_31, bfd_mach_s390_64, bfd_mach_xstormy16): Renumber.
5774 * bfd-in2.h: Regenerate.
5775
019dca2b
KK
57762002-10-14 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5777
5778 * config.bfd (sh*eb-*-linux*, sh*-*-linux*): Add the alternative
5779 endian vector to targ_selvecs.
5780
bce03d3d
AO
57812002-10-13 Alexandre Oliva <aoliva@redhat.com>
5782
5783 * elfxx-mips.c (mips_elf_calculate_relocation): Take
5784 save_addend argument. Don't apply the 32-bit mask to a
5785 GPREL32 value if it's to be used in another relocation. Don't
5786 use forced-check computation of local_p to decide whether to
5787 add gp0 to GPREL16 value. Don't use only the lowest 16 bits
5788 of the addend of a non-in-place GPREL16 relocation.
5789 (_bfd_mips_elf_relocate_section): Pass use_saved_addend_p to
5790 mips_elf_calculate_relocation().
5791
9b691193
SC
57922002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5793
5794 * elf32-m68hc11.c (m68hc11_elf_relax_section): Don't treat relocs
5795 with symbols in other sections if we relaxed something; the sections
5796 output offsets must be re-computed before.
5797
1f4c5b47
SC
57982002-10-12 Stephane Carrez <stcarrez@nerim.fr>
5799
5800 * elf32-m68hc11.c (m68hc11_elf_relax_section): Update symbols
5801 handling to use Elf_Internal_Sym.
5802 (m68hc11_elf_relax_delete_bytes): Likewise.
5803
5dc97655
KK
58042002-10-11 Kaz Kojima <kkojima@rr.iij4u.or.jp>
5805
5806 * elf32-sh.c (sh_elf_optimized_tls_reloc, sh_elf_mkobject,
5807 sh_elf_object_p, dtpoff_base): New functions.
5808 (sh_elf_howto_table): Add TLS relocs.
5809 (sh_reloc_map): Likewise.
5810 (sh_elf_info_to_howto): Support TLS relocs.
5811 (elf_sh_link_hash_entry): Add tls_type and tls_tpoff32.
5812 (sh_elf_hash_entry, sh_elf_tdata, sh_elf_local_got_tls_type):
5813 New macros.
5814 (sh_elf_obj_tdata): New.
5815 (elf_sh_link_hash_table): Add tls_ldm_got.
5816 (sh_elf_link_hash_table_create): Clear refcount of tls_ldm_got.
5817 (allocate_dynrelocs): Support TLS relocs.
5818 (sh_elf_size_dynamic_sections): Likewise.
5819 (sh_elf_relocate_section): Support TLS relocs. Don't try to find
5820 .rela.got section when found already. Return false after printing
5821 error about unresolvable relocation.
5822 (sh_elf_gc_sweep_hook): Support TLS relocs.
5823 (sh_elf_check_relocs): Likewise.
5824 (sh_elf_finish_dynamic_symbol): Likewise.
5825 (bfd_elf32_mkobject, elf_backend_object_p): Define for TLS case.
5826 * reloc.c: Add SH TLS relocs.
5827 * bfd-in2.h, libbfd.h: Regenerate.
5828
6a0735ef
AM
58292002-10-11 Daniel Jacobowitz <drow@mvista.com>
5830
5831 * Makefile.in: Regenerated.
5832
af39267e
DJ
58332002-10-11 Daniel Jacobowitz <drow@mvista.com>
5834
5835 * Makefile.am: Run dep-am.
6a0735ef 5836 (BFD_H_DEP): Add simple.c and linker.c.
af39267e
DJ
5837 (BFD32_LIBS): Add simple.lo.
5838 (BFD32_LIBS_CFILES): Add simple.c.
5839 * Makefile.in: Regenerated.
5840 * bfd-in2.h: Regenerated.
5841 * simple.c: New file.
5842
0be617ce
AM
58432002-10-11 Alan Modra <amodra@bigpond.net.au>
5844
14a793b2
AM
5845 * coff-arm.c (record_arm_to_thumb_glue): Avoid type-punned pointers.
5846 (record_thumb_to_arm_glue): Likewise.
5847 * ecoff.c (ecoff_link_add_externals): Likewise.
5848 * elf32-arm.h (record_arm_to_thumb_glue): Likewise.
5849 (record_thumb_to_arm_glue): Likewise.
5850 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
5851 * elf32-sh.c (sh_elf_create_dynamic_sections): Likewise.
5852 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
5853 * elf64-alpha.c (elf64_alpha_create_dynamic_sections): Likewise.
5854 * elf64-ppc.c (func_desc_adjust): Likewise.
5855 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
5856 (sh64_elf64_create_dynamic_sections): Likewise.
5857 * elflink.c (_bfd_elf_create_got_section): Likewise.
5858 (_bfd_elf_create_dynamic_sections): Likewise.
5859 (_bfd_elf_create_linker_section): Likewise.
5860 * elflink.h (elf_add_default_symbol): Likewise.
5861 (elf_link_create_dynamic_sections): Likewise.
5862 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
5863 * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Likewise.
5864 * elfxx-mips.c (mips_elf_create_got_section): Likewise.
5865 (_bfd_mips_elf_add_symbol_hook): Likewise.
5866 (_bfd_mips_elf_create_dynamic_sections): Likewise.
5867 * linker.c (generic_link_add_symbol_list): Likewise.
5868 * xcofflink.c (xcoff_link_add_symbols): Likewise.
5869
5870 * elfxx-ia64.c (oor_brl, oor_ip): Conditionally define.
5871
0be617ce 5872 * elf64-ppc.c (edit_opd): Only zero opd syms when function is
7f6a7663 5873 completely removed. Correct local sym adjustment.
0be617ce 5874
0a4ef3f4
SC
58752002-10-10 Stephen Clarke <stephen.clarke@superh.com>
5876
5877 * elf32-sh.c (elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
5878 Correct mistake in calculation of address of .got.
5879 * elf64-sh64.c (elf_sh64_pic_plt_entry_be,
5880 elf_sh64_pic_plt_entry_le): Likewise.
5881
efacd36e
SC
58822002-10-09 Richard Shann <richard.shann@superh.com>
5883 Stephen Clarke <stephen.clarke@superh.com>
5884
5885 * Makefile.am: Add entries for elf32-sh64-lin.c and
5886 elf64-sh64-lin.c. Regenerate.
5887 * Makefile.in: Regenerate.
9b5ecbd0 5888 * config.bfd: Change sh64eb-*-linux* and sh64-*-linux*
efacd36e
SC
5889 to use sh64 vectors rather than sh vectors.
5890 * configure.in: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5891 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5892 * configure: Regenerate.
5893 * elf32-sh64-lin.c: New file.
5894 * elf64-sh64-lin.c: New file.
5895 * targets.c: Add bfd_elf32_sh64lin_vec, bfd_elf32_sh64blin_vec,
5fe39cae
AM
5896 bfd_elf64_sh64lin_vec, bfd_elf64_sh64blin_vec.
5897
299bf759
L
58982002-10-08 H.J. Lu <hjl@gnu.org>
5899
5900 * elf32-i386.c (elf_i386_relocate_section): Re-arrange the
5901 IE->LE transition for R_386_TLS_IE.
5902
51020317
AM
59032002-10-08 Alan Modra <amodra@bigpond.net.au>
5904
5905 * elf64-ppc.c (edit_opd): Correct test for discarded sections.
5906
a8fcf378
NC
59072002-10-07 Mark Elbrecht <snowball3@softhome.net>
5908
51020317
AM
5909 * cofflink.c (mark_relocs): Don't mark relocations in excluded
5910 sections.
a8fcf378 5911
a16d5acb
AM
59122002-10-07 Alan Modra <amodra@bigpond.net.au>
5913
a6b511bd
AM
5914 * elflink.h (elf_link_input_bfd): Remove BFD_VERSION_DATE dependent
5915 code.
5916
a16d5acb
AM
5917 * elf64-ppc.c (ppc64_elf_build_stubs): Increment .glink indx.
5918
7c4a37eb
AM
59192002-10-06 Alan Modra <amodra@bigpond.net.au>
5920
5921 * opncls.c: Formatting.
5922 (_bfd_new_bfd): Use a smaller section hash table.
5923
7c4ca42d
AO
59242002-10-05 Alexandre Oliva <aoliva@redhat.com>
5925
5926 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Set the type
5927 of the other two relocations packed with a REL32 to NONE.
5928
4989d792
SC
59292002-10-02 Stephen Clarke <stephen.clarke@superh.com>
5930
5931 * elf32-sh.c (elf_sh_link_hash_entry): Add gotplt_refcount.
5932 (sh_elf_link_hash_newfunc): Initialize it.
5933 (allocate_dynrelocs): Transfer gotplt refs from plt.refcount
5934 to got.refcount for symbols that are forced local or when
5935 we have direct got refs.
5936 (sh_elf_gc_sweep_hook): Adjust gotplt_refcount. Use it
5937 to correctly adjust got.refcount and plt.refcount.
5938 (sh_elf_copy_indirect_symbol): Copy gotplt_refcount across.
5939 (sh_elf_check_relocs): Increment gotplt_refcount.
51020317 5940
7c445aa3
JJ
59412002-10-01 Jakub Jelinek <jakub@redhat.com>
5942
5943 * elf32-i386.c (elf_i386_relocate_section): Fix
5944 movl foo@indntpoff, %eax IE->LE transition.
5945
abcf1d52
JJ
59462002-10-01 Jakub Jelinek <jakub@redhat.com>
5947
5948 * elf64-x86-64.c (elf64_x86_64_relocate_section): Change TLSGD
5949 sequence and its transitions.
5950
a45bb67d
JJ
59512002-10-01 Jakub Jelinek <jakub@redhat.com>
5952
5953 * elf32-i386.c (elf_i386_relocate_section): Resolve R_386_TLS_LDO_32
5954 to st_value + addend in non-code sections.
5955 * elf64-x86-64.c (elf64_x86_64_relocate_section): Resolve
5956 R_X86_64_DTPOFF32 to st_value + addend in non-code sections.
5957
00707a0e 59582002-09-30 Gavin Romig-Koch <gavin@redhat.com>
51020317
AM
5959 Ken Raeburn <raeburn@cygnus.com>
5960 Aldy Hernandez <aldyh@redhat.com>
5961 Eric Christopher <echristo@redhat.com>
5962 Richard Sandiford <rsandifo@redhat.com>
00707a0e
RS
5963
5964 * archures.c (bfd_mach_mips4120, bfd_mach_mips5400): New.
5965 (bfd_mach_mips5500): New.
5966 * cpu-mips.c (I_mips4120, I_mips5400, I_mips5500): New.
5967 (arch_info_struct): Add corresponding entries here.
5968 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_4120,
5969 E_MIPS_MACH_5400 and E_MIPS_MACH_5500.
5970 (_bfd_mips_elf_final_write_processing): Handle bfd_mach_mips4120,
5971 bfd_mach_mips5400 and bfd_mach_mips5500.
5972 (_bfd_mips_elf_mach_extends_p): New function.
5973 (_bfd_mips_elf_merge_private_bfd_data): Use it to help merge
5974 the EF_MIPS_MACH flags.
5975 * bfd-in2.h: Regenerate.
5976
624f0b25
JT
59772002-09-28 Jason Thorpe <thorpej@wasabisystems.com>
5978
5979 * elf32-vax.c (elf_vax_size_dynamic_section): Don't strip
5980 .got sections.
5981
b89fe0ee
AM
59822002-09-28 Alan Modra <amodra@bigpond.net.au>
5983
5984 * elf.c (map_sections_to_segments): Correct test for start of
5985 writable section in the same page as end of read-only section.
5986
b29635ba
JT
59872002-09-27 Matt Thomas <matt@3am-software.com>
5988
5989 * elf32-vax.c (elf_vax_check_relocs): Remove unused
5990 local_got_refcounts usage. Remove allocation of got slot.
5991 (elf_vax_gc_sweep_hook): Remove unused local_got_refcounts usage.
5992 Remove de-allocation of got slot.
5993 (elf_vax_size_dynamic_section): Fix some indentation. Add hash
5994 traversal for elf_vax_instantiate_got_entries. Allow empty .got
5995 sections to be GC'ed.
5996 (elf_vax_instantiate_got_entries): New function.
5997 (elf_vax_relocate_section): Simplify R_VAX_GOT32 handling. Remove
5998 tests that are now handled by elf_vax_instantiate_got_entries.
5999 Assert GOT entry falls within .got section size. Remove redundant
6000 comparisions. Fix comments.
6001
bffbf940
JJ
60022002-09-27 Jakub Jelinek <jakub@redhat.com>
6003
6004 * reloc.c: Add x86-64 TLS relocs.
6005 * bfd-in2.h, libbfd.h: Rebuilt.
6006 * elf64-x86-64.c (x86_64_elf_howto): Fix size fields for 32-bit
6007 relocs. Add TLS relocs.
6008 (x86_64_reloc_map): Add TLS relocs.
6009 (elf64_x86_64_info_to_howto): Adjust for added TLS relocs.
6010 (struct elf64_x86_64_link_hash_entry): Add tls_type field.
6011 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE): Define.
6012 (elf64_x86_64_hash_entry): Define.
6013 (struct elf64_x86_64_obj_tdata): New.
6014 (elf64_x86_64_tdata, elf64_x86_64_local_got_tls_type): Define.
6015 (struct elf64_x86_64_link_hash_table): Add tls_ld_got.
6016 (link_hash_newfunc): Initialize tls_type.
6017 (elf64_x86_64_link_hash_table_create): Initialize tls_ld_got.
6018 (elf64_x86_64_copy_indirect_symbol): Swap tls_type if necessary.
6019 (elf64_x86_64_mkobject): New.
6020 (elf64_x86_64_elf_object_p): Allocate struct elf64_x86_64_obj_tdata.
6021 (elf64_x86_64_tls_transition): New.
6022 (elf64_x86_64_check_relocs): Add r_type variable and use it.
6023 Handle TLS relocs.
6024 (elf64_x86_64_gc_sweep_hook): Handle TLS relocs.
6025 (allocate_dynrelocs): Allocate GOT space for TLS relocs.
6026 (elf64_x86_64_size_dynamic_sections): Likewise.
6027 (dtpoff_base, tpoff): New.
6028 (elf64_x86_64_relocate_section): Handle TLS relocs.
6029 (elf64_x86_64_finish_dynamic_symbol): Only handle non-TLS GOT
6030 entries.
6031 (bfd_elf64_mkobject): Define.
6032
6033 * elf32-i386.c (elf_i386_check_relocs) [R_386_TLS_LE]: Set
6034 DF_STATIC_TLS if shared.
6035
14366460
TS
60362002-09-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6037
6038 * elfxx-mips.c (_bfd_mips_elf_fake_sections): Don't emit unneeded
6039 empty relocation sections.
6040
9f951329
AM
60412002-09-26 Alan Modra <amodra@bigpond.net.au>
6042
6043 * elf64-ppc.c (ppc_build_one_stub): Don't build glink stubs here.
6044 (ppc64_elf_build_stubs): Build them here instead.
6045
6b3ac709
JJ
60462002-09-24 Jakub Jelinek <jakub@redhat.com>
6047
6048 * elf32-sparc.c (elf32_sparc_relocate_section): Put R_SPARC_RELATIVE
6049 addend into r_addend, not *r_offset.
6050 (elf32_sparc_finish_dynamic_symbol): Likewise.
6051 * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Clear xword at
6052 R_SPARC_RELATIVE's r_offset.
6053
e2f6d277
NC
60542002-09-23 Nathan Tallent <eraxxon@alumni.rice.edu>
6055
6056 * dwarf2.c (decode_line_info): Update to correctly decode
6057 the (non-standard DWARF2) out-of-order address sequences
6058 generated by the Intel C++ 6.0 compiler for ia64-Linux.
6059
f3961b2b
DD
60602002-09-23 Mark Elbrecht <snowball3@softhome.net>
6061
6062 * config.bfd: For DJGPP targets, match with any cpu and any machine.
6063
ad34bc37
AM
60642002-09-23 Alan Modra <amodra@bigpond.net.au>
6065
6066 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Zero relocs
6067 for discarded FDEs. Remove redundant assignment.
6068 * elflink.h (elf_bfd_discard_info): Save edited relocs.
6069
82988bff
L
60702002-09-22 H.J. Lu <hjl@gnu.org>
6071
6072 * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Don't merge
6073 the relocation count between different .reloc sections.
6074
5ad8645c
AM
60752002-09-21 Alan Modra <amodra@bigpond.net.au>
6076
5f819128
AM
6077 * elf32-ppc.c (ppc_elf_relocate_section): Allow ".sbss.*" and
6078 ".sdata.*" for R_PPC_SDAREL16, ".sbss2*" and ".sdata2*" for
6079 R_PPC_EMB_SDA2REL. Similarly for R_PPC_EMB_SDA21 and
6080 R_PPC_EMB_RELSDA.
6081
5ad8645c
AM
6082 * elfcode.h (elf_slurp_reloc_table_from_section): Make "symcount"
6083 unsigned. Move "symcount" assignment out of loop.
6084 * Makefile.am: Run "make dep-am".
6085 * Makefile.in: Regenerate.
6086 * configure: Regenerate.
6087 * po/SRC-POTFILES.in: Regnerate.
6088
75936555
NC
60892002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6090
6091 * dwarf2.c (_bfd_dwarf2_find_nearest_line): If address length is
6092 zero, set it to 8 for (non-standard) 64-bit DWARF2 formats
6093 (e.g. IRIX64).
6094
2243deae
L
60952002-09-19 Jakub Jelinek <jakub@redhat.com>
6096
6097 * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Clear .got word
6098 even if generating R_PPC_RELATIVE reloc.
6099 (ppc_elf_relocate_section): Make sure relocation is performed
6100 if skip == -2. Clear memory at r_offset when creating dynamic
6101 relocation.
6102
37e55690
JJ
61032002-09-19 Jakub Jelinek <jakub@redhat.com>
6104
6105 * reloc.c (BFD_RELOC_386_TLS_TPOFF, BFD_RELOC_386_TLS_IE,
6106 BFD_RELOC_386_TLS_GOTIE): Add.
6107 * bfd-in2.h, libbfd.h: Rebuilt.
6108 * elf32-i386.c (elf_howto_table): Add R_386_TLS_TPOFF, R_386_TLS_IE
6109 and R_386_TLS_GOTIE.
6110 (elf_i386_reloc_type_lookup): Handle it.
6111 (struct elf_i386_link_hash_entry): Change tls_type type to unsigned
6112 char instead of enum, change GOT_* into defines.
6113 (GOT_TLS_IE_POS, GOT_TLS_IE_NEG, GOT_TLS_IE_BOTH): Define.
6114 (elf_i386_tls_transition): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6115 (elf_i386_check_relocs): Likewise. Avoid crash if local symbol is
6116 accessed both as normal and TLS symbol. Move R_386_TLS_LDM and
6117 R_386_PLT32 cases so that R_386_TLS_IE can fall through.
6118 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6119 (elf_i386_gc_sweep_hook): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6120 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6121 (allocate_dynrelocs): Allocate 2 .got and 2 .rel.got entries if
6122 tls_type is GOT_TLS_IE_BOTH.
6123 (elf_i386_size_dynamic_sections): Likewise.
6124 (elf_i386_relocate_section): Handle R_386_TLS_IE and R_386_TLS_GOTIE.
6125 Handle R_386_TLS_LE_32 and R_386_TLS_LE in shared libs.
6126 (elf_i386_finish_dynamic_symbol): Use tls_type & GOT_TLS_IE to catch
6127 all 4 GOT_TLS_* TLS types.
6128
8e67855b
NC
61292002-09-19 Nick Clifton <nickc@redhat.com>
6130
6131 * elflink.h (elf_fix_symbol_flags): When examining weak symbols,
6132 follow indirect links.
6133
1c59ba3f
NC
61342002-09-19 Nathan Tallent <eraxxon@alumni.rice.edu>
6135
6136 * ecoffswap.h (ecoff_swap_pdr_in) <isym, iline>: Update to
6137 correctly sign-extend 32-bit ECOFF null values (0xffffffff, -1)
6138 on 64 bit machines.
6139 (ecoff_swap_sym_in) <iss>: Likewise.
0e327d91
NC
6140 * ecoff.c (_bfd_ecoff_slurp_symbolic_info): Fix error reading
6141 ECOFF information: 'ioptMax' refers to the actual *size*
6142 of the optimization symtab, not the number of entries.
1c59ba3f 6143
9d7404b7
NC
61442002-09-19 Daniel Jacobowitz <drow@mvista.com>
6145
6146 * elf32-arm.h (elf32_arm_adjust_dynamic_symbol): Update
6147 ELF_LINK_HASH_NEEDS_PLT logic.
6148
05a487dc
DJ
61492002-09-18 Daniel Jacobowitz <drow@mvista.com>
6150
6151 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6152 correct relocation count.
6153
1f70368c
DJ
61542002-09-17 Daniel Jacobowitz <drow@mvista.com>
6155
6156 * bfd-in.h (bfd_get_dynamic_symcount): Define.
6157 * bfd.c (struct _bfd): Add dynsymcount.
6158 * bfd-in2.h: Regenerated.
6159 * elf.c (_bfd_elf_canonicalize_dynamic_symtab): Set
6160 abfd->dynsymcount.
6161 * elfcode.h (elf_slurp_reloc_table_from_section): Check
6162 for overflow.
6163
51020317 61642002-09-17 Stan Cox <scox@redhat.com>
a902ee94
SC
6165
6166 * elf64-mips.c (mips_elf64_be_swap_reloca_out): Handle type2 and type3.
6167 (mips_elf64_final_gp): Don't make up gp value.
6168 * elfn32-mips.c (mips_elf_final_gp): Likewise.
6169 * elfxx-mips.c (_bfd_mips_elf_final_link): Always create
6170 .MIPS.options/.options section.
6171
290062cc
DB
61722002-09-17 David O'Brien <obrien@FreeBSD.org>
6173
6174 * elf32-i386-fbsd.c: Always label using the EI_OSABI method.
6175 It is benign for FreeBSD < 4.1. Minor reformatting.
6176 * elf64-alpha-fbsd.c: Likewise.
6177
c5c1f40c
JJ
61782002-09-17 Jakub Jelinek <jakub@redhat.com>
6179
ca1eb0ba
JJ
6180 * elf32-i386.c (elf_i386_relocate_section) [R_386_TLS_TPOFF32]: Negate
6181 addend.
c5c1f40c 6182
562ace6b
AM
61832002-09-17 Alan Modra <amodra@bigpond.net.au>
6184
6185 * elf64-alpha.c (alpha_elf_size_info): Make static.
6186
5af6ead6
AM
61872002-09-17 Svein E. Seldal <Svein.Seldal@solidas.com>
6188
6189 * coff-tic4x.c: Add function declarations and ATTRIBUTE_UNUSED.
6190 * cpu-tic4x.c: Ditto.
6191
cb9512fc
TS
61922002-09-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6193
6194 * elf64-mips.c (define elf_backend_ignore_discarded_relocs): Remove
6195 duplicate define.
6196
4ada7262
DB
61972002-09-16 Bruno Haible <bruno@clisp.org>
6198
6199 * elf32-i386.c: Don't defined ELF_ARCH etc. if this file is included
6200 by a target variant implementation.
6201 * elf64-alpha.c: Likewise.
6202 * elf32-i386-fbsd.c: New file.
6203 * elf64-alpha-fbsd.c: New file.
6204 * targets.c: Support bfd_elf32_i386_freebsd_vec and
6205 bfd_elf64_alpha_freebsd_vec.
6206 * configure.in: Accept the vectors bfd_elf32_i386_freebsd_vec,
6207 bfd_elf64_alpha_freebsd_vec.
6208 * Makefile.am (BFD32_BACKENDS): Add elf32-i386-fbsd.lo.
6209 (BFD32_BACKENDS_CFILES): Add elf32-i386-fbsd.c.
6210 (BFD64_BACKENDS): Add elf64-alpha-fbsd.lo.
6211 (BFD64_BACKENDS_CFILES): Add elf64-alpha-fbsd.c.
6212 (elf32-i386-fbsd.lo, elf64-alpha-fbsd.lo): Add dependencies.
6213 * config.bfd: For FreeBSD targets, set targ_defvec to a FreeBSD
6214 specific targets. Define OLD_FREEBSD_ABI_LABEL if appropriate.
6215
6a30718d
JJ
62162002-09-12 Jakub Jelinek <jakub@redhat.com>
6217
6218 * elf32-i386.c (dtpoff_base, tpoff): Don't crash if tls_segment is
6219 NULL.
6220 (elf_i386_relocate_section): Return false after printing error about
6221 unresolvable relocation.
6222
6cf9e9fe
NC
62232002-09-12 Nick Clifton <nickc@redhat.com>
6224
6225 * elf32-arm.h (elf32_arm_final_link_relocate): Fix handling of
6226 R_ARM_THM_PC11.
6227
10f469bf
DJ
62282002-09-11 Jeffrey Law <law@redhat.com>
6229
6230 * elf32-h8300.c (elf32_h8_relax_section): Fix typo.
6231
dc43ada5
NC
62322002-09-11 Andrew Haley <aph@cambridge.redhat.com>
6233
6234 * elf.c (_bfd_elf_find_nearest_line): Check functionname_ptr and
6235 line_ptr before deciding we've found a symbol.
6236
e09f4395
NC
62372002-09-11 Nick Clifton <nickc@redhat.com>
6238
6239 * po/da.po: New Danish translation file.
6240 * configure.in (LINGUAS): Add 'da'.
6241 * configure: Regenerate.
6242
b3018b5f
NC
62432002-09-10 Michael Snyder <msnyder@redhat.com>
6244
6245 * irix-core.c (do_sections, do_sections64): New functions.
51020317 6246 (irix_core_core_file_p): Call new functions do_sections,
b3018b5f
NC
6247 do_sections64, depending on corefile (32-bit or 64-bit).
6248
2f21f25e
RH
62492002-09-09 Richard Henderson <rth@redhat.com>
6250
6251 * elfxx-ia64.c (elfNN_ia64_relax_section): Handle PCREL21M
6252 and PCREL21F like PCREL21B.
6253
28b94e7c
KB
62542002-09-04 Kevin Buettner <kevinb@redhat.com>
6255
51020317
AM
6256 * config.bfd (mips*-*-irix6*): Add new ABI vectors. Make n32 default
6257 vector.
28b94e7c 6258
5cec6941
NC
62592002-09-02 Nick Clifton <nickc@redhat.com>
6260
6261 * elf32-v850.c (v850_elf_final_link_relocate): Use helpful
6262 names instead of cryptically overloaded bfd_reloc error
6263 codes.
6264 (v850_elf_relocate_section): Likewise.
6265 (v850_elf_relax_section): Replace caching of external symbols
6266 with caching of internal symbols obtained from calling
6267 bfd_elf_get_elf_syms().
51020317 6268 Fixup problems with freeing cached allocated memory blocks.
5cec6941 6269
3b77b1d5
AM
62702002-09-02 Alan Modra <amodra@bigpond.net.au>
6271
638524b5
AM
6272 * cpu-pj.c (scan_mach, compatible, arch_info_struct): Remove.
6273 (bfd_pj_arch): Use bfd_default_scan.
6274 * cpu-v850.c (scan): Remove.
6275 (N): Use bfd_default_scan.
6276 * cpu-z8k.c (scan_mach): Remove.
6277 (arch_info_struct, bfd_z8k_arch): Reorganize so that the default is
6278 first. Use bfd_default_scan.
6279
250d94fd
AM
6280 * ecoff.c (_bfd_ecoff_set_arch_mach_hook): Don't use hard-coded
6281 bfd_mach constants.
6282 (ecoff_get_magic): Likewise.
6283 * elf32-v850.c (v850_elf_object_p): Likewise.
6284 (v850_elf_final_write_processing): Likewise.
6285 * mipsbsd.c (MY(set_arch_mach)): Likewise.
6286 (MY(write_object_contents)): Likewise.
6287 * coff64-rs6000.c (xcoff64_write_object_contents): Likewise.
6288 * coffcode.h (coff_write_object_contents): Likewise.
6289 (coff_set_arch_mach_hook): Add comment describing machine == 0.
6290 Remove unnecessary "machine" assignments.
6291 (coff_write_relocs): Test for the absolute section sym by testing
6292 section and flags.
6293
3b77b1d5
AM
6294 * aoutx.h (NAME(aout,machine_type)): Recognize bfd_mach_i386_i386
6295 and bfd_mach_i386_i386_intel_syntax.
250d94fd 6296 * pdp11.c (NAME(aout,machine_type)): Likewise.
3b77b1d5 6297
e5b45b83
DA
62982002-08-30 John David Anglin <dave@hiauly1.hia.nrc.ca>
6299
6300 * bfd-in.h (align_power): Cast constants to bfd_vma type.
6301 * bfd-in2.h (align_power): Likewise.
6302
37f45cf8
AM
63032002-08-30 Alan Modra <amodra@bigpond.net.au>
6304
6305 * Makefile.am: Run "make dep-am".
6306 * Makefile.in: Regenerate.
6307
6308 * cpu-avr.c (compatible): Don't use hard-coded mach constants.
6309 * cpu-powerpc.c (powerpc_compatible): Likewise.
6310 * cpu-rs6000.c (rs6000_compatible): Likewise.
6311
86aba9db
NC
63122002-08-28 Catherine Moore <clm@redhat.com>
6313
9b5ecbd0 6314 * elf32-v850.c (v850_elf_reloc_map): Add new relocs.
86aba9db
NC
6315 (v850-elf-reloc): Don't resolve pc relative relocs.
6316 (v850_elf_ignore_reloc): New routine.
6317 (v850_elf_final_link_relocate): Handle new relocs.
6318 (v850_elf_relax_delete_bytes ): New routine.
6319 (v850_elf_relax_section): New routine.
6320 (bfd_elf32_bfd_relax_section): Define.
6321 (HOWTO): New entries for new relocs.
6322 * reloc.c (BFD_RELOC_V850_LONGCALL): New reloc.
6323 (BFD_RELOC_V850_LONGJUMP): New reloc.
6324 (BFD_RELOC_V850_ALIGN): New reloc.
6325 * archures.c: Remove redundant v850ea architecture.
6326 * cpu-v850.c: Remove redundant v850ea support.
6327 * libbfd.h: Regenerate.
6328 * bfd-in2.h: Regenerated.
6329
026df7c5
NC
63302002-08-28 Svein E. Seldal <Svein.Seldal@solidas.com>
6331
6332 * config.bfd: Add tic4x-*-*coff* and c4x-*-*coff* target.
6333 * configure.in: Add tic4x_coff vector files.
6334 * configure: Regenerate.
6335 * Makefile.am: Add tic4x target.
6336 * Makefile.in: Regenerate.
6337
63382002-08-27 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
6339
6340 * archures.c: Add the BFD arch type tic4x.
6341 * bfd-in.h: Add BFD_IN_MEMORY flag.
6342 * coff-tic4x.c: New file.
6343 * coffswap.h (coff_swap_sym_out): Add preadjuster.
6344 * cpu-tic4x.c: New file.
6345 * targets.c: Added tic4x- in list of xvecs.
6346 * ticoff.h: New file.
6347 * bfd-in2.h: Regenerate.
6348
88f7bcd5
NC
63492002-08-27 Adam Nemet <anemet@lnxw.com>
6350
6351 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Set the last
6352 bit of DT_INIT and DT_FINI for Thumb functions.
6353
c8e48751
AM
63542002-08-26 Alan Modra <amodra@bigpond.net.au>
6355
6356 * coffcode.h (coff_set_arch_mach_hook): Handle W65MAGIC.
6357
2846975a
AM
63582002-08-26 Alan Modra <amodra@bigpond.net.au>
6359
6360 * aoutx.h (NAME(aout,reloc_type_lookup)): Handle BFD_RELOC_8.
6361
067653c5
AM
63622002-08-24 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6363
6364 * elf32-sh.c (sh_elf_copy_indirect_symbol): New.
6365 (create_got_section, allocate_dynrelocs, readonly_dynrelocs):
6366 Likewise.
6367 (struct elf_sh_pcrel_relocs_copied): Removed.
6368 (struct elf_sh_dyn_relocs): New.
6369 (struct elf_sh_link_hash_entry): Replace pcrel_relocs_copied
6370 field with dyn_relocs.
6371 (struct elf_sh_link_hash_table): Add short-cuts to get dynamic
6372 sections and sym_sec.
6373 (sh_elf_link_hash_newfunc): Clear dyn_relocs.
6374 (sh_elf_link_hash_table_create): Clear shorts-cuts and sym_sec.
6375 (sh_elf_create_dynamic_sections): Use create_got_section instead
6376 of _bfd_elf_create_got_section.
6377 (sh_elf_check_relocs): Likewise.
6378 (sh_elf_create_dynamic_sections): Use short-cuts to the dynamic
6379 sections.
6380 (sh_elf_adjust_dynamic_symbol, sh_elf_size_dynamic_sections,
6381 sh_elf_relocate_section, sh_elf_check_relocs,
6382 sh_elf_finish_dynamic_symbol, sh_elf_finish_dynamic_sections):
6383 Likewise.
6384 (sh_elf_adjust_dynamic_symbol): Handle nocopyreloc. Keep the
6385 dynamic relocations and avoiding the copy relocation when we
6386 didn't find any dynamic relocations in the section which has
6387 contents or is read-only.
6388 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
6389 (sh_elf_size_dynamic_sections): Don't reset the size of
6390 .rela.got section even if dynamic_sections_created flag is off.
6391 Don't use sh_elf_discard_copies. Scan all input bfd and use
6392 allocate_dynrelocs. Call readonly_dynrelocs to determine
6393 whether we need DT_TEXTREL.
6394 (sh_elf_adjust_dynamic_symbol): Use plt.refcount to determine
6395 whether the symbol was never referred to.
6396 (sh_elf_relocate_section): Use WILL_CALL_FINISH_DYNAMIC_SYMBOL.
6397 (sh_elf_gc_sweep_hook): Fill with the real sweep function.
6398 (sh_elf_check_relocs): Call create_got_section if the short-cut
6399 to .got is null. Increment reference counters only instead of
6400 allocating space on dynamic sections here. Don't conditionalize
6401 uninitialized got.offset value when marking the symbol as a
6402 global offset table entry. Keep relocations for symbols satisfied
6403 by a dynamic library to avoid copy relocations for the symbol.
6404 Set dynobj field of an elf hash table if needed.
6405 (sh_elf_finish_dynamic_sections): Handle null section pointer
6406 correctly.
6407 (elf_backend_copy_indirect_symbol): Defined.
6408 (elf_backend_can_refcount): Defined.
6409
7e326afc
NC
64102002-08-23 Nick Clifton <nickc@redhat.com>
6411
6412 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Undo
6413 previous change. Add comment explaining why.
6414
c8614e8e
AM
64152002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6416
6417 * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le): Copy
6418 contents of .got.plt[2] to tr0, not address of .got.plt.
6419 (sh_elf_finish_dynamic_symbol): Do not apply GOT_BIAS when
6420 patching absolute plt entry. For shmedia plt entry, set bottom bit
6421 of branch to plt0 as this is a branch to an shmedia instruction.
6422 * elf64-sh64.c (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le):
6423 Copy contents of .got.plt[2] to tr0, not address of .got.plt.
6424 (elf_sh64_plt_entry_be, elf_sh64_plt_entry_le): Use ptrel to
6425 branch to plt0.
6426 (sh64_elf64_finish_dynamic_symbol): Do not apply GOT_BIAS when
6427 patching absolute plt entry. For shmedia plt entry, branch to
6428 plt0 is now ptrel, so use relative offset. Set bottom bit of
6429 branch target as it is a branch to an shmedia instruction.
6430
3b587c71
AM
64312002-08-23 Stephen Clarke <stephen.clarke@superh.com>,
6432 Richard Shann <richard.shann@superh.com>
6433
6434 * elf32-sh.c (sh_elf_finish_dynamic_sections): Set LSB of DT_INIT
6435 value if .init is an SHmedia function. Similarly for DT_FINI.
6436 * elf64-sh64.c (sh64_elf64_finish_dynamic_sections): Likewise.
51020317 6437
957dcaa8
AM
64382002-08-23 Stephen Clarke <stephen.clarke@superh.com>
6439
3b587c71 6440 * elf32-sh.c (sh_elf_size_dynamic_sections): Zero initialize
957dcaa8 6441 dynamic section.
3b587c71 6442 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
957dcaa8 6443
a4263c47
NC
64442002-08-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6445
6446 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use a simple
51020317 6447 byte read when reading the return address register column.
a4263c47 6448
db4ed121
NC
64492002-08-22 Nick Clifton <nickc@redhat.com>
6450
6451 * config.bfd: Add powepc64-*-*bsd* target.
6452
ed71e111
NC
64532002-08-22 Graeme Peterson <gp@qnx.com>
6454
6455 * Makefile.am: Add entries for elf32-shqnx.c
6456 * Makefile.in: Regenerate.
6457 * config.bfd: Add support sh-*-nto* target.
6458 * configure.in: Add support for bfd_elf32_sh{l}qnx_vec.
6459 * configure: Regenerate.
6460 * elf32-qnx.h: Changed typo "elf_i386qnx_*" to "elf_qnx_*" .
6461 * elf32-sh.c: Do not include elf32-target.h if
6462 ELF32_SH_C_INCLUDED is defined.
6463 * elf32-shqnx.c: New file: Support for QNX.
6464 * targets.c: Add bfd_elf32_sh{l}qnx_vec.
6465
0ab72ee2
NC
64662002-08-22 Nick Clifton <nickc@redhat.com>
6467
75c83283
NC
6468 * po/tr.po: Updated Turkish translation.
6469
0ab72ee2
NC
6470 * syms.c (_bfd_generic_read_minisymbols): Set bfd_error if the
6471 symbols are not read.
6472
56780f18
AM
64732002-08-22 Alan Modra <amodra@bigpond.net.au>
6474
6475 * elf32-m68hc11.c: Formatting fixes.
6476 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6477 * elf32-m68hc12.c: Formatting fixes.
6478 (elf32_m68hc11_gc_mark_hook): Correct params. Remove unnecessary test.
6479
b48fa14c
AM
64802002-08-22 Alan Modra <amodra@bigpond.net.au>
6481
a7c71b0c
AM
6482 * coff-rs6000.c (rs6000coff_vec <object_flags>): Add SEC_CODE and
6483 SEC_DATA.
6484 (pmac_xcoff_vec): Likewise.
6485 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
6486 (aix5coff64_vec): Likewise.
6487
56780f18
AM
64882002-08-22 Alan Modra <amodra@bigpond.net.au>
6489
b48fa14c
AM
6490 * elf-bfd.h (struct elf_backend_data): Add struct elf_backend_data
6491 param to elf_backend_copy_indirect_symbol.
6492 (_bfd_elf_link_hash_copy_indirect): Likewise.
6493 * elflink.h (elf_add_default_symbol, elf_fix_symbol_flags): Adjust
6494 calls to copy_indirect_symbol.
6495 * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
6496 * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
6497 * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6498 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
6499 * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
6500 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
6501 * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
6502 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6503 * elfxx-mips.h (_bfd_mips_elf_copy_indirect_symbol): Likewise.
6504 * elf.c (_bfd_elf_link_hash_copy_indirect): Likewise. Properly
6505 test refcounts for "used" values.
6506
8c2ab17d
AM
65072002-08-21 John David Anglin <dave@hiauly1.hia.nrc.ca>
6508
6509 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Add PARAMS to
6510 argument declaration.
6511
d62b1198 65122002-08-19 Elena Zannoni <ezannoni@redhat.com>
51020317
AM
6513
6514 * archures.c (bfd_mach_ppc_e500): Added.
6515 * bfd-in2.h: Rebuilt.
d62b1198
EZ
6516 * cpu-powerpc.c (bfd_powerpc_archs): Added e500.
6517
9f88ba09
AM
65182002-08-19 Alan Modra <amodra@bigpond.net.au>
6519
6520 * elf32-m68hc12.c (elf_backend_can_gc_sections): False.
6521
df622259
AC
65222002-08-17 Andrew Cagney <ac131313@redhat.com>
6523
6524 * elf.c (bfd_elf_get_elf_syms): Change type of `esym' to
51020317 6525 `bfd_byte'.
df622259 6526
44c410de
SC
65272002-08-17 Stan Cox <scox@redhat.com>
6528
6529 * elfxx-mips.c (_bfd_mips_elf_modify_segment_map): Use the
6530 IRIX 6 segment layout for NEWABI.
6531
4972a8e9
SC
65322002-08-16 Stephen Clarke <stephen.clarke@superh.com>
6533
1049f94e 6534 * elf32-sh.c (sh_elf_gc_mark_hook): For sh64, skip indirect
4972a8e9 6535 symbols when looking for section referred to by a relocation.
1049f94e 6536 * elf64-sh.c (sh_elf64_gc_mark_hook): Likewise.
51020317 6537
c5cd6d62
AM
65382002-08-15 Alan Modra <amodra@bigpond.net.au>
6539
6540 * elf32-i370.c: Move reloc enum to include/elf/i370.h.
6541
0741c7be
HPN
65422002-08-15 Hans-Peter Nilsson <hp@axis.com>
6543
6544 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Add
6545 missing check for whether the symbol is referenced by DSO before
6546 unexporting it as an unneeded dynamic symbol.
6547
e8d5d179
L
65482002-08-14 H.J. Lu <hjl@gnu.org>
6549
6550 * libbfd.h: Regenerate.
6551
e9229007
L
65522002-08-14 H.J. Lu <hjl@gnu.org>
6553
6554 * config.bfd: Always add 64bit vectors to 32bit Linux/mips.
6555
1fd03b5a
SC
65562002-08-14 Stephane Carrez <stcarrez@nerim.fr>
6557
6558 * elf32-m68hc11.c (m68hc11_relax_group): New to relax group of
6559 instructions.
6560 (m68hc11_direct_relax): New to define table of relaxable instructions.
6561 (find_relaxable_insn): New, find a relaxable insn.
6562 (compare_reloc): New to compare two relocs.
6563 (m68hc11_elf_relax_section): New, relax text sections.
6564 (m68hc11_elf_relax_delete_bytes): New, delete bytes and adjust branchs.
6565 (elf32_m68hc11_check_relocs): New function for GC support.
6566 (elf32_m68hc11_relocate_section): New function for GC support.
6567 (bfd_elf32_bfd_relax_section): Define to support linker relaxation.
6568 (elf_backend_check_relocs): Likewise.
6569 (elf_backend_relocate_section): Likewise.
6570
c828c771
L
65712002-08-13 H.J. Lu <hjl@gnu.org>
6572
6573 * elflink.h (NAME(bfd_elf,size_dynamic_sections): Don't count
6574 definitions in shared objects when checking symbol with
6575 undefined version.
6576
9b701e44
SC
65772002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6578
6579 * elf32-m68hc11.c (elf32_m68hc11_gc_mark_hook): New for section GC.
6580 (elf32_m68hc11_gc_sweep_hook): Likewise.
6581 (elf_backend_gc_mark_hook): Define for GC section support.
6582 (elf_backend_gc_sweep_hook): Likewise.
6583 (elf_backend_can_gc_sections): Likewise.
6584
6585 * elf32-m68hc12.c: Likewise.
6586
96405e3c
SC
65872002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6588
6589 * elf32-m68hc11.c (_bfd_m68hc11_elf_print_private_bfd_data): New.
6590 (_bfd_m68hc11_elf_merge_private_bfd_data): New function.
6591 (_bfd_m68hc11_elf_set_private_flags): New function.
6592 Use them to set/check/print ELF flags specific to 68HC11.
6593
6594 * elf32-m68hc12.c (_bfd_m68hc12_elf_print_private_bfd_data): New.
6595 (_bfd_m68hc12_elf_merge_private_bfd_data): New function.
6596 (_bfd_m68hc12_elf_set_private_flags): New function.
6597 Use them to set/check/print ELF flags specific to 68HC12.
6598
dae78fb0
SC
65992002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6600
6601 * elf32-m68hc11.c (elf_m68hc11_howto_table): Add the new relocs;
6602 fix masks for PC-rel relocs.
6603 (m68hc11_elf_ignore_reloc): New function.
6604
6605 * elf32-m68hc12.c (m68hc12_elf_special_reloc): New to handle specific
6606 68HC12 banked addressing relocs.
6607 (m68hc12_phys_addr): New to compute physical address of banked memory.
6608 (m68hc12_phys_page): Likewise for page.
6609 (m68hc12_addr_is_banked): New to see if address is in banked area.
6610 (elf_m68hc12_howto_table): Add new relocs and rename to xx12.
6611
3dbfec86
SC
66122002-08-13 Stephane Carrez <stcarrez@nerim.fr>
6613
6614 * reloc.c (BFD_RELOC_M68HC11_RL_JUMP, BFD_RELOC_M68HC11_RL_GROUP,
6615 BFD_RELOC_M68HC11_LO16, BFD_RELOC_M68HC11_PAGE,
6616 BFD_RELOC_M68HC11_24): New relocs for 68HC11/68HC12.
6617 * bfd-in2.h: Regenerate.
6618
871da94f
L
66192002-08-12 H.J. Lu <hjl@gnu.org>
6620
6621 * elflink.h (elf_add_default_symbol): Preserve section across
6622 elf_merge_symbol.
6623
59bc061d
NC
66242002-08-09 Graeme Peterson <gp@qnx.com>
6625
51020317 6626 * Makefile.am: Add entries for elf32-ppcqnx.c, and add
59bc061d
NC
6627 elf32-qnx.h dependency to elfarmqnx-nabi.c and elf32-i386qnx.c.
6628 * Makefile.in: Regenerate.
6629 * config.bfd: Add support for powerpc{le}-*-nto targets.
6630 * configure.in: Add support for bfd_elf32_powerpc{le}qnx_vec.
6631 * configure: Regenerate.
6632 * elf32-i386qnx.c: Moved backend functions into a QNX specific
6633 common file "elf32-qnx.h", and now include that file.
6634 * elf32-qnx.h: New file: QNX specific common elf backend.
6635 * elf32-ppc.c: Do not include elf32-target.h if
6636 ELF32_PPC_C_INCLUDED is defined.
6637 * elf32-ppcqnx.c: New file: Support for QNX.
6638 * elfarmqnx-nabi.c: Include elf32-qnx.h for qnx elf backend.
6639 * targets.c: Add bfd_elf32_powerpc{le}qnx_vec.
6640
2b692c59
NC
66412002-08-09 Nick Clifton <nickc@redhat.com>
6642
6643 * po/sv.po: Updated Swedish translation.
6644
d0c7ff07
TS
66452002-08-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6646
6647 * elfxx-mips.c (mips_elf_global_got_index): Avoid segfault if
6648 g->global_gotsym is NULL.
6649
d8bbe778
L
66502002-08-08 H.J. Lu <hjl@gnu.org>
6651
c5cd6d62 6652 * elflink.h (elf_add_default_symbol): Don't warn if a definition
d8bbe778
L
6653 overrides an indirect versioned symbol.
6654
c366c25e
JJ
66552002-08-08 Jakub Jelinek <jakub@redhat.com>
6656
6657 * elf32-i386.c (elf_i386_relocate_section): Fill in proper addend
6658 for R_386_TLS_TPOFF32 relocs against symndx 0.
6659
31941635
L
66602002-08-07 H.J. Lu <hjl@gnu.org>
6661
6662 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Check symbol
6663 with undefined version if needed.
6664 (elf_link_assign_sym_version): Match a default symbol with a
6665 version without definition. No need to hide the default
6666 definition separately.
6667
0f3bd64f
AM
66682002-08-08 Alan Modra <amodra@bigpond.net.au>
6669
7330fb86
AM
6670 * elflink.h (elf_link_output_extsym): Don't output symbols from
6671 SEC_EXCLUDE sections.
6672
0f3bd64f
AM
6673 * aoutx.h (aout_link_write_symbols): Correct handling of warning syms.
6674
a4aa0fb7
AM
66752002-08-07 Alan Modra <amodra@bigpond.net.au>
6676
6677 * elf64-ppc.c (edit_opd): Arrange to drop symbols for discarded .opd
6678 entries.
6679
34ea4a36
TS
66802002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6681
6682 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Cast signedness
6683 mismatch.
6684
141ff970
TS
66852002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6686
6687 * elfxx-mips.c (ABI_64_P): Remove superfluous check.
6688
28458e7e
TS
66892002-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6690
6691 * elf32-mips.c (mips_reloc_map): Fix typo.
6692
0121a3da
AM
66932002-08-06 Alan Modra <amodra@bigpond.net.au>
6694
6695 * xcofflink.c (xcoff_write_global_symbol): Set n_scnum for abs_section.
6696
d006db6c
AM
66972002-08-06 Alan Modra <amodra@bigpond.net.au>
6698
6699 * elf64-ppc.c (ppc64_elf_howto_raw): Zero all src_mask entries.
6700
8ea80f08
AM
67012002-08-06 Alan Modra <amodra@bigpond.net.au>
6702
2a52da53
AM
6703 * libxcoff.h: Use PARAMS on function declarations.
6704 * coff-rs6000.c (xcoff_generate_rtinit): Simplify size calc.
6705 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
6706
8ea80f08
AM
6707 * coff-rs6000.c: (xcoff_rtype2howto): Don't place reloc address in
6708 addend.
6709 * coff64-rs6000.c: (xcoff64_rtype2howto): Likewise.
6710
cf9ab45b
AM
67112002-08-06 Alan Modra <amodra@bigpond.net.au>
6712
6713 * coff-rs6000.c: Formatting fixes.
6714 (xcoff_calculate_relocation): Use PARAMS in declaration.
6715 (xcoff_complain_overflow): Likewise.
6716 (xcoff_ppc_relocate_section): Use old-style function pointer call.
6717 (bfd_xcoff_backend_data): Remove useless comments.
6718 (rs6000coff_vec): Likewise.
6719 (bfd_pmac_xcoff_backend_data): Likewise.
6720 (pmac_xcoff_vec): Likewise.
8ea80f08 6721
cf9ab45b
AM
6722 * coff64-rs6000.c: Formatting fixes.
6723 (xcoff64_calculate_relocation): Use PARAMS in declaration.
6724 (xcoff64_ppc_relocate_section): Use old-style function pointer call.
6725 (bfd_xcoff_backend_data): Remove useless comments.
6726 (rs6000coff64_vec): Likewise.
6727 (bfd_xcoff_aix5_backend_data): Likewise.
6728 (aix5coff64_vec): Likewise.
6729
48bfecdd
AM
67302002-08-06 Alan Modra <amodra@bigpond.net.au>
6731
a78eab4e
AM
6732 * coff-rs6000.c (xcoff_howto_table): Revert some of last change to
6733 mask entries. Use complain_overflow_dont for R_REF.
6734 (xcoff_reloc_type_ba): Revert last change.
6735 (xcoff_reloc_type_br): Likewise.
6736 (xcoff_reloc_type_crel): Likewise.
6737 (xcoff_ppc_relocate_section): Likewise.
6738 * coff64-rs6000.c (xcoff64_reloc_type_br): Likewise.
6739 (xcoff64_ppc_relocate_section): Likewise.
6740 (xcoff64_howto_table): Revert some of last change to mask entries.
6741 Use complain_overflow_dont for R_REF.
6742
48bfecdd
AM
6743 * coff-rs6000.c (xcoff_howto_table): Fix src_mask entries. Make all
6744 relocs with bitsize == 16 have size = 1.
6745 (xcoff_reloc_type_ba): Correct src_mask and dst_mask adjustment.
6746 (xcoff_reloc_type_br): Likewise.
6747 (xcoff_reloc_type_crel): Likewise.
6748 (xcoff_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6749 * coff64-rs6000.c (xcoff64_reloc_type_br): Correct src_mask and
6750 dst_mask adjustment.
6751 (xcoff64_ppc_relocate_section): Set up src_mask and dst_mask correctly.
6752 (xcoff64_howto_table): Fix src_mask entries. Make all relocs with
6753 bitsize == 16 have size = 1.
6754
fd13ed0c
DC
67552002-08-01 Denis Chertykov <denisc@overta.ru>
6756
6757 * elf32-ip2k.c: Processor manufacturer changed to Ubicom.
6758 (struct misc): New field isymbuf. All free_* fields removed.
6759 (symbol_value): Pass in internal syms. No need to swap syms in.
6760 (ip2k_elf_relax_section): Use bfd_elf_get_elf_syms. Properly free
6761 possibly cached info.
6762 (tidyup_after_error): Removed.
6763 (ip2k_elf_relax_section_pass1): Don't use removed fields of struct
6764 misc. Use new field.
6765 (adjust_all_relocations): Use internal syms. No need to swap syms
6766 in and out.
6767 (add_page_insn): Don't use removed fields of struct misc.
6768
24a1ba0f
NC
67692002-08-01 Nick Clifton <nickc@redhat.com>
6770
6771 * elf32-arm.h: Revert previous delta.
6772
a6903459
NC
67732002-08-01 Nick Clifton <nickc@redhat.com>
6774
6775 * configure.in (AM_INIT_AUTOMAKE): Bump version number.
6776 * configure: Regenerate.
6777
39a2a3eb
L
67782002-07-31 H.J. Lu <hjl@gnu.org>
6779
6780 * config.bfd: Add x86-64 vector to Linux/i386 if 64bit BFD is
6781 selected.
6782
a0dfa6a8
L
67832002-07-31 H.J. Lu <hjl@gnu.org>
6784
6785 * config.bfd: Add n32 vectors to 32bit Linux/mips if 64bit BFD
6786 is selected.
6787
cd67d266
JJ
67882002-07-31 Jakub Jelinek <jakub@redhat.com>
6789
6790 * elf32-i386.c (elf_i386_copy_indirect_symbol): Swap tls_type
6791 if _bfd_elf_link_hash_copy_indirect will swap got.refcount.
6792
4eb6b71c
NC
67932002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6794
6795 * cpu-ns32k.c (_bfd_ns32k_put_immdeiate, _bfd_ns32k_get_immediate):
6796 There is no 8 byte relocation type for this architecture.
6797 (do_ns32k_reloc): Use bfd_vma instead of native types.
6798 (bfd_ns32k_put_immediate, _bfd_ns32k_relocate_contents) put_data
6799 returns void.
6800 (_bfd_ns32k_put_displacement): Don't check for overflow. We can
6801 rely on generic code to do that.
6802 * aout-ns32k.c (howto_table): Add appropriate overflow detection
6803 to all table entries.
6804 (_bfd_ns32k_relocate_contents): put_data returns void.
6805 * ns32k.h: (_bfd_ns32k_put_displacement, _bfd_ns32k_put_immediate)
6806 (_bfd_do_ns32k_reloc_contents): Fix prototypes. put data functions
6807 return void.
6808
f7c33884
NC
68092002-07-31 Ian Dall <ian@sibyl.beware.dropbear.id.au>
6810
6811 * aoutx.h (aout_link_check_ar_symbols): Whether to include an
6812 archive object is target dependant.
6813
8f64befb
NC
68142002-07-31 Adam Nemet <anemet@lnxw.com>
6815
6816 * elf32-arm.h (ARM_PLT_ENTRY_SIZE): Rename PLT_ENTRY_SIZE.
6817 (THUMB_PLT_ENTRY_SIZE): New macro.
6818 (PLT_ENTRY_SIZE): Return the appropriate *_PLT_ENTRY_SIZE.
6819 (elf32_arm_plt0_entry): Rename PLT_ENTRY_SIZE to
6820 ARM_PLT_ENTRY_SIZE.
6821 (elf32_arm_plt_entry): Likewise.
6822 (elf_backend_plt_header_size): Likewise.
6823 (elf32_thumb_plt0_entry): New global.
6824 (elf32_arm_finish_dynamic_sections): Use it. Put Thumb entries
6825 into .plt.thumb.
6826 (elf32_thumb_plt_entry): New global.
6827 (elf32_arm_finish_dynamic_symbol): Use it. Use .thumb.plt for
6828 Thumb entries. Set the bottom bit of the corresponding GOT entry
6829 for a Thumb PLT entry.
6830 (struct elf32_arm_plt_entry_info): New structure.
6831 (struct elf32_arm_link_hash_entry, plt_info): New member of this
6832 type.
6833 (elf32_arm_link_hash_newfunc): Initialize new member.
6834 (elf32_arm_final_link_relocate, R_ARM_THM_PC22 case): Handle
6835 relocations against the PLT.
6836 (elf32_arm_check_relocs, case R_ARM_PLT32 case): Set
6837 first_rel_type if this is the first time we encounter the symbol.
6838 (elf32_arm_check_relocs, case R_ARM_THM_PC22 case): New case.
6839 Determine if relocation needs a PLT entry. Set first_rel_type if
6840 this is the first time we encounter the symbol
6841 (elf32_arm_adjust_dynamic_symbol): Create PLT entries for Thumb
6842 functions as well.
6843 (elf32_arm_size_dynamic_sections): Handle .plt.thumb like .plt.
6844 (elf32_arm_create_dynamic_sections): New function. Create the
6845 .plt.thumb section.
6846 (elf_backend_create_dynamic_sections): Call it.
6847
47badb7b
NC
68482002-07-31 Nick Clifton <nickc@redhat.com>
6849
6850 * bfd.c (bfd_alt_mach_code): Rename parameter 'index' to
6851 'alternative' in order to avoid shadowing global symbol of the
6852 same name.
6853 * bfd-in2.h: Regenerate.
6854 * libbfd.h: Regenerate.
6855 * libcoff.h: Regenerate.
6856
8a397dad
TS
68572002-07-31 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6858
6859 * Makefile.am: Add n32 ABI support.
6860 * Makefile.in: Regenerate.
6861 * config.bfd: Add n32 vectors to mips64*-*-linux* targets. Treat 64
6862 bit vectors for mips*-*-linux targets as optional.
6863 * configure.in: Add n32 ABI vectors.
6864 * configure: Regenerate.
6865 * elf32-mips.c (mips_elf32_object_p): Reject n32 ABI files.
6866 * elfn32-mips.c: New file, n32 ABI support.
6867 * targets.c: Add n32 ABI vectors.
6868
7e392df6 68692002-07-30 Graeme Peterson <gp@qnx.com>
83e1617e 6870
7e392df6
NC
6871 * elfarmqnx-nabi.c: New file: Support for QNX.
6872 * config.bfd: Add support for arm-*-nto target.
6873 * configure.in: Add support for bfd_elf32_{big|little}armqnx_vec.
6874 * configure: Regenerate.
6875 * Makefile.am: Add entries for elfarmqnx-nabi.c.
6876 * Makefile.in: Regenerate.
6877 * elf32-arm.h (ELF_MAXPAGESIZE): Do not define if already defined.
6878 Do not define global function if ELFARM_NABI_C_INCLUDED is defined.
6879 * elfarm-nabi.c: Do not include elf32-arm.h if
6880 ELFARM_NABI_C_INCLUDED is defined.
6881 * targets.c: Add bfd_elf32_{big|little}armqnx_vec.
7330fb86 6882
7e392df6 68832002-07-30 Nick Clifton <nickc@redhat.com>
7330fb86 6884
83e1617e
NC
6885 * po/sv.po: Updated Swedish translation.
6886
704afa60
JJ
68872002-07-30 Jakub Jelinek <jakub@redhat.com>
6888
6889 * elf.c (elf_fake_sections): Fix up .tbss sh_size and sh_type.
6890
487e54f2
AM
68912002-07-30 Alan Modra <amodra@bigpond.net.au>
6892
6893 * aoutx.h (some_aout_object_p): Clean up tdata properly on error.
6894 * archive.c (bfd_generic_archive_p): Likewise.
6895 * coff-rs6000.c (_bfd_xcoff_archive_p): Likewise.
6896 (_bfd_xcoff_archive_p): Use bfd_scan_vma in place of strtol.
6897 * coff64-rs6000.c (xcoff64_slurp_armap): Likewise.
6898 (xcoff64_archive_p): Likewise.
6899 (xcoff64_openr_next_archived_file): Likewise.
6900 (xcoff64_archive_p): Clean up tdata properly on error.
6901 * coffgen.c (coff_real_object_p): Likewise.
6902 (coff_object_p): Release filehdr and opthdr.
6903 * ecoff.c (_bfd_ecoff_archive_p): Clean up tdata properly on error.
6904 * ieee.c (ieee_archive_p): Likewise.
6905 * ihex.c (ihex_object_p): Likewise.
6906 (ihex_mkobject): Always allocate tdata.
6907 * peicode.h (pe_ILF_object_p): Release bfd_alloc'd buffer on error.
6908 * srec.c (srec_mkobject): Always allocate tdata.
6909 (srec_object_p): Clean up tdata properly on error.
6910 (symbolsrec_object_p): Likewise.
6911 * versados.c (versados_object_p): Likewise.
6912 * vms-misc.c (_bfd_vms_get_record): Use bfd_malloc instead of malloc,
6913 and bfd_realloc instead of realloc.
6914 (add_new_contents): Use bfd_alloc instead of bfd_malloc for sections.
6915 * vms.c (vms_initialize): Always allocate tdata. Use bfd_alloc in
6916 place of bfd_malloc, simplifying error freeing. Free hash table too.
6917 (vms_object_p): Clean up tdata on error.
6918 (vms_mkobject): Don't complain on stderr if vms_initialize fails.
6919 (vms_close_and_cleanup): Adjust for bfd_alloc use.
6920
9d46020e
AM
69212002-07-30 Alan Modra <amodra@bigpond.net.au>
6922
6923 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set e_flags.
6924
fb39dac1
RS
69252002-07-26 Chris Demetriou <cgd@broadcom.com>
6926
6927 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Merge ASE
6928 flags into resulting BFD.
6929
7a624474
AM
69302002-07-26 Alan Modra <amodra@bigpond.net.au>
6931
6932 From John Reiser <jreiser@BitWagon.com>
6933 * elf32-i386.c (elf_i386_link_hash_table_create): Clear
6934 tls_ldm_got.refcount.
6935
a4382ec6
TS
69362002-07-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6937
6938 * elf64-mips.c: Update TODO comment.
6939 (mips_elf64_higher_reloc,mips_elf64_highest_reloc,
6940 mips_elf64_gprel16_reloca): Remove prototypes.
6941 (mips16_jump_reloc,mips16_gprel_reloc): Add functions.
6942 (UNUSED_RELOC): Replace by EMPTY_RELOC.
6943 (mips_elf64_howto_table_rel): Use special R_MIPS_HI16 handling. Remove
6944 wrong comments. Remove disfunctional support of R_MIPS_HIGHER and
6945 R_MIPS_HIGHEST.
6946 (mips_elf64_howto_table_rela): Fix handling of R_MIPS_GPREL16 and
6947 R_MIPS_GOT16. Remove wrong comments.
6948 (elf_mips16_jump_howto,elf_mips16_gprel_howto,
6949 elf_mips_gnu_vtinherit_howto,elf_mips_gnu_vtentry_howto): New, code
6950 from elf32-mips.c.
6951 (mips_elf64_hi16_reloc): Fix formatting.
6952 (mips_elf64_higher_reloc,mips_elf64_highest_reloc): Remove.
6953 (mips_elf64_got16_reloc): Fix formatting. Remove superfluous code.
6954 Better comment. Fall back to R_MIPS_GOT_DISP instead of abort().
6955 (mips_elf64_gprel16_reloc): Make static. Add check for
6956 partial_inplace.
6957 (mips_elf64_gprel16_reloca): Remove.
6958 (mips_elf64_literal_reloc): New function.
6959 (mips_elf64_gprel32_reloc): Fix formatting.
6960 (mips_elf64_shift6_reloc): Fix comment. Make static.
6961 (mips16_jump_reloc,mips16_gprel_reloc): New functions, code from
6962 elf32-mips.c.
6963 (elf_reloc_map,mips_reloc_map): New mapping table, similiar as in
6964 elf32-mips.c
6965 (bfd_elf64_bfd_reloc_type_lookup): Use the mapping table. Enable GNU
6966 specific relocations.
6967 (mips_elf64_rtype_to_howto): Enable GNU specific relocations.
6968 (mips_elf64_object_p): Invert logic to check for SGI-ish ABI.
6969 (ELF_MAXPAGESIZE): Add comment.
6970
219576a4
NC
69712002-07-25 Nick Clifton <nickc@redhat.com>
6972
6973 * po/sv.po: Updated Swedish translation.
6974 * po/es.po: Updated Spanish translation.
6975 * po/fr.po: Updated French translation.
6976
8c58d23b
AM
69772002-07-25 Alan Modra <amodra@bigpond.net.au>
6978
6979 * elf-bfd.h (_bfd_elf32_link_record_local_dynamic_symbol): Define
6980 as elf_link_record_local_dynamic_symbol.
6981 (_bfd_elf64_link_record_local_dynamic_symbol): Likewise.
6982 (elf_link_record_local_dynamic_symbol): Declare. Now returns int.
6983 * elflink.h (elf_link_record_local_dynamic_symbol): Move to..
6984 * elflink.c: .. here. Use bfd_elf_get_elf_syms. Check whether an
6985 attempt is made to record a symbol in a discarded section, and
6986 return `2' in that case.
6987
ff3063f5
NC
69882002-07-24 Nick Clifton <nickc@redhat.com>
6989
6990 * po/sv.po: Updated Swedish translation.
6991 * po/es.po: Updated Spanish translation.
6992
f0fe0e16
AM
69932002-07-23 Alan Modra <amodra@bigpond.net.au>
6994
c1fb5f8a
AM
6995 * po/SRC-POTFILES.in: Regenerate.
6996
f0fe0e16
AM
6997 * elf-hppa.h (elf_hppa_relocate_section): If relocatable, return
6998 immediately. Remove code handling relocatable linking.
6999 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7000 * elf32-cris.c (cris_elf_relocate_section): Likewise.
7001 * elf32-fr30.c (elf32_frv_relocate_section): Likewise.
de2d743e 7002 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
7003 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7004 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
7005 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7006 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7007 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7008 * elf32-vax.c (elf_vax_relocate_section): Likewise.
7009 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7010 * elf32-avr.c (elf_backend_rela_normal): Define.
7011 * elf32-cris.c: Likewise.
7012 * elf32-fr30.c: Likewise.
de2d743e 7013 * elf32-frv.c: Likewise.
f0fe0e16
AM
7014 * elf32-h8300.c: Likewise.
7015 * elf32-hppa.c: Likewise.
7016 * elf32-ip2k.c: Likewise.
7017 * elf32-sparc.c: Likewise.
7018 * elf32-v850.c: Likewise.
7019 * elf32-vax.c: Likewise.
7020 * elf64-hppa.c: Likewise.
7021 * elf64-sparc.c: Likewise.
7022 * elf32-fr30.c (elf32_frv_relocate_section): Edit comment.
de2d743e 7023 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
f0fe0e16
AM
7024 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7025 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
7026 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7027 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7028 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7029 * elf-m10200.c (USE_RELA): Don't define.
7030 * elf-m10300.c: Likewise.
de2d743e 7031 * elfarm-oabi.c: Likewise.
f0fe0e16
AM
7032 * elf32-i370.c: Likewise.
7033 * elf32-ip2k.c: Likewise.
7034 * elf32-m68k.c: Likewise.
7035 * elf32-mcore.c: Likewise.
7036 * elf32-ppc.c: Likewise.
7037 * elf32-s390.c: Likewise.
7038 * elf32-vax.c: Likewise.
7039 * elf64-ppc.c: Likewise.
7040 * elf64-s390.c: Likewise.
7041 * elf64-x86-64.c: Likewise.
7042 * elfxx-ia64.c: Likewise.
7043 * elf32-avr.c (USE_REL): Don't undef.
7044 * elf32-ip2k.c: Likewise.
7045
5e8d7549
NC
70462002-07-23 Nick Clifton <nickc@redhat.com>
7047
7048 * elf-bfd.h (struct elf_backend_data): Add new bitfield
7049 'want_p_paddr_set_to_zero'.
7050 * elfxx-target.h: Set default value for want_p_paddr_set_to_zero
7051 to false;
7052 * elfxx-ia64.c: Set want_p_paddr_set_zero for HPUX target.
7053 * elf.c (copy_private_bfd_data): Test want_p_paddr_set_zero.
7054
9e12c7db
NC
70552002-07-23 Gabor Keresztfalvi <keresztg@mail.com>
7056
7057 * nlmcode.h (nlm_swap_auxiliary_headers_out): Swapped the order of
7058 the MeSsAgEs and CoPyRiGhT tags to make >=NW4.x NLM loaders to
7059 show the Copyright string.
7060 Minor formatting tidy ups.
7061
0461a601
NC
70622002-07-23 Nick Clifton <nickc@redhat.com>
7063
ff3063f5
NC
7064 * po/fr.po: Updated French translation.
7065 * po/sv.po: Updated Swedish translation.
0461a601 7066
fad2542d
AM
70672002-07-23 Alan Modra <amodra@bigpond.net.au>
7068
7069 * elflink.h (elf_link_input_bfd): Don't change internal symbols
7070 when outputting relocs.
7071
c0647bfc
JT
70722002-07-20 Jason Thorpe <thorpej@wasabisystems.com>
7073
7074 * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Only insert
7075 DT_PLTGOT into the dynamic section if there is a PLT.
7076
d01414a5
TS
70772002-07-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7078
7079 * elfxx-mips.c (_bfd_mips_elf_discard_info): New function, code from
7080 elf32-mips.c.
7081 (_bfd_mips_elf_write_section): Likewise.
7082 * elfxx-mips.h (_bfd_mips_elf_discard_info): New prototype.
7083 (_bfd_mips_elf_write_section): Likewise.
7084 * elf32-mips.c (elf32_mips_discard_info): Move to elfxx-mips.c.
7085 (elf32_mips_write_section): Likewise.
7086 * elf64-mips.c (_bfd_mips_elf_ignore_discarded_relocs): Use it.
7087 (_bfd_mips_elf_write_section): Likewise.
7088
40c97fc6
AM
70892002-07-19 Alan Modra <amodra@bigpond.net.au>
7090
7091 * elfxx-ia64.c: (elfNN_ia64_modify_segment_map): Properly scan
7092 PT_IA_64_UNWIND segments for a given section.
7093
58378160
L
70942002-07-17 H.J. Lu <hjl@gnu.org>
7095
7096 * Makefile.am: Fix a typo.
7097 * Makefile.in: Regenerate.
7098
cf88bb9f
NC
70992002-07-15 Denis Chertykov <denisc@overta.ru>
7100 Frank Ch. Eigler <fche@redhat.com>
7101 Ben Elliston <bje@redhat.com>
7102 Alan Lehotsky <alehotsky@cygnus.com>
7103 John Healy <jhealy@redhat.com>
7104 Graham Stott <grahams@redhat.com>
7105 Jeff Johnston <jjohnstn@redhat.com>
7106
7107 * Makefile.am: Add support for ip2k.
7108 * Makefile.in: Regenerate.
7109 * doc/Makefile.in: Regenerate.
7110 * archures.c: Add support for ip2k.
7111 * config.bfd: Add support for ip2k.
7112 * configure.in: Add support for ip2k.
7113 * configure: Regenerate.
7114 * reloc.c: Add support for ip2k.
7115 * targets.c: Add support for ip2k.
7116 * bfd-in2.h: Regenerate.
7117 * libbfd.h: Regenerate.
7118 * cpu-ip2k.c: New file.
7119 * elf32-ip2k.c: New file.
7120
0dafd5f6
RE
71212002-07-17 Ian Rickards <irickard@arm.com>
7122
40c97fc6 7123 * dwarf2.c (concat_filename): If we can't establish the directory
0dafd5f6
RE
7124 just return the filename.
7125
36b08f12
AM
71262002-07-16 Moritz Jodeit <moritz@jodeit.org>
7127
7128 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Correct order of memset args.
7129
58821868
AM
71302002-07-16 Alan Modra <amodra@bigpond.net.au>
7131
7132 * elflink.h: Formatting fixes, tidy prototypes.
7133 (elf_link_assign_sym_version): Move common code out of loop.
7134
c89583f8
AM
71352002-07-16 Alan Modra <amodra@bigpond.net.au>
7136
7137 * elflink.h (elf_link_input_bfd): Don't call reloc_emitter when
7138 reloc section size is zero. Correct reloc output location.
7139
ba94744e
AM
71402002-07-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7141
7142 * elf-hppa.h (elf_hppa_reloc_final_type): Use R_PARISC_PCREL16F as
7143 the final type for the e_fsel selector when generating PA2.0W code.
7144 (elf_hppa_relocate_insn): Provide support for PA2.0W 16-bit format 1
7145 relocations.
7146
96a94295
L
71472002-07-14 H.J. Lu <hjl@gnu.org>
7148
7149 * elflink.h (elf_link_assign_sym_version): Hide the default
7150 definition if there is a hidden versioned definition.
7151
6849c52f
HPN
71522002-07-12 Hans-Peter Nilsson <hp@axis.com>
7153
7154 * elf32-cris.c (cris_elf_relocate_section): Drop nonsensical
7155 dynamic reference test in assertion when initializing GOT with
7156 static contents. Just assert that there are either no dynamic
7157 sections, the symbol is defined in the regular objects or that the
7158 symbol is undef weak. Tweak comment.
7159 (elf_cris_finish_dynamic_symbol): Emit .got reloc for a program
7160 only if the symbol isn't defined in the program and isn't undef
7161 weak.
7162 (elf_cris_adjust_dynamic_symbol): Simplify condition for getting
7163 rid of PLT entry: only do it if the symbol isn't defined in a DSO.
7164 When doing so, clear ELF_LINK_HASH_NEEDS_PLT. Tweak comments.
7165 (elf_cris_discard_excess_program_dynamics): Don't consider
7166 ELF_LINK_HASH_REF_DYNAMIC when omitting .got runtime relocs.
7167
239e1f3a
AM
71682002-07-11 Alan Modra <amodra@bigpond.net.au>
7169
7170 * elf32-i386.c (elf_i386_relocate_section): Don't complain about
7171 unresolved debugging relocs in dynamic applications.
7172 * elf32-s390.c (elf_s390_relocate_section): Likewise.
7173 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
7174 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
7175 * elf64-s390.c (elf_s390_relocate_section): Likewise.
7176 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
7177 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
7178
2f6d9989
AM
71792002-07-10 Alan Modra <amodra@bigpond.net.au>
7180
f5e87a1d
AM
7181 * elf64-ppc.c (ONES): Define.
7182 (ppc64_elf_howto_table): Use ONES here to avoid warnings. Fill in
7183 missing src_mask fields. Tweak R_PPC64_NONE, R_PPC64_COPY. Fill
7184 in missing dst_mask fields on R_PPC64_PLT32, R_PPC64_PLTREL32.
7185
2f6d9989
AM
7186 * elf64-ppc.c (ppc64_elf_get_symbol_info): Delete.
7187 (ppc64_elf_set_private_flags): Delete.
7188 (ppc64_elf_section_from_shdr): Delete.
7189 (ppc64_elf_merge_private_bfd_data): Remove flag checking/merging code.
7190 (ppc64_elf_fake_sections): Delete.
7191 (bfd_elf64_bfd_set_private_flags): Don't define.
7192 (bfd_elf64_get_symbol_info): Likewise.
7193 (elf_backend_section_from_shdr): Likewise.
7194 (elf_backend_fake_sections): Likewise.
7195
0594c12d
AM
71962002-07-10 Marco Walther <Marco.Walther@sun.com>
7197
7198 * elf.c: (assign_section_numbers) Set sh_entsize for .stab only
7199 when not already set.
7200 * elf64-sparc.c: (sparc64_elf_fake_sections): New function.
7201 (elf_backend_fake_sections): Define.
7202
699cb9b8
AM
72032002-07-10 Alan Modra <amodra@bigpond.net.au>
7204
7205 * merge.c (_bfd_merge_section): Remove redundant output_section check.
7206 Formatting.
7207 (_bfd_merge_sections): Don't set SEC_EXCLUDE on unused sections.
7208
0a4787a0
HPN
72092002-07-09 Hans-Peter Nilsson <hp@axis.com>
7210
7211 * elf32-cris.c (cris_elf_relocate_section): Move sanity-check for
7212 NULL sym_hashes to just before use.
7213 <case R_CRIS_32_GOTREL>: In test for local symbol, accept also
7214 symbol with non-default visibility.
7215 <case R_CRIS_32_GOTREL, case R_CRIS_32_PLT_GOTREL>: Ditto.
7216 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
7217 Ditto.
7218 (cris_elf_gc_sweep_hook): Only decrease h->plt.refcount for
7219 symbol with non-default visibility.
7220 (cris_elf_check_relocs): At tests for local symbol before
7221 increasing h->plt.refcount, also check for non-default
7222 visibility. Ditto when checking for local symbol to eliminate
7223 pc-relative runtime relocs.
7224
aecc8f8a
AM
72252002-07-08 Alan Modra <amodra@bigpond.net.au>
7226
7227 * elf.c: Formatting.
7228 (IS_SOLARIS_PT_INTERP): Add p_paddr and p_memsz checks.
7229 (INCLUDE_SECTION_IN_SEGMENT): Remove IS_SOLARIS_PT_INTERP.
7230 (copy_private_bfd_data): Set p_vaddr on broken Solaris PT_INTERP
7231 segments.
7232
e9168c1e
MM
72332002-07-07 Mark Mitchell <mark@codesourcery.com>
7234 Alan Modra <amodra@bigpond.net.au>
7235
7236 * cofflink.c (_bfd_coff_final_link): On PE COFF systems, take into
7237 account the impact of relocation count overflow when computing
7238 section offsets.
7239 * coffcode.h (coff_write_relocs): Use obj_pe when deciding whether
7240 or not to apply the PE COFF reloc overflow handling. Fix a
7241 fencepost error in deciding whether or not to use that technique.
7242
6cdc0ccc
AM
72432002-07-07 Alan Modra <amodra@bigpond.net.au>
7244
7245 * elf-bfd.h (struct elf_reloc_cookie): Remove locsym_shndx,
7246 change type of locsyms.
7247 (bfd_elf_get_elf_syms): Declare.
7248 * elf.c (bfd_elf_get_elf_syms): New function.
7249 (group_signature): Use bfd_elf_get_elf_syms.
7250 (bfd_section_from_r_symndx): Likewise.
7251 * elfcode.h (elf_slurp_symbol_table): Likewise.
7252 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7253 (elf_link_add_object_symbols): Likewise. Reorganise to increase
7254 locality of various data structures. Properly free internal relocs.
7255 (elf_bfd_final_link): Properly free internal relocs.
7256 (elf_link_check_versioned_symbol): Use bfd_elf_get_elf_syms.
7257 (elf_link_input_bfd): Likewise.
7258 (elf_gc_mark): Likewise. Properly free internal relocs.
7259 (elf_gc_sweep): Properly free internal relocs.
7260 (elf_reloc_symbol_deleted_p): No need to swap syms in.
7261 (elf_bfd_discard_info): Use bfd_elf_get_elf_syms. Properly free
7262 internal relocs.
7263 * elf-m10200.c (mn10200_elf_relax_section): Use bfd_elf_get_elf_syms.
7264 Properly free possibly cached info.
7265 (mn10200_elf_relax_delete_bytes): Remove symbol swapping code.
7266 (mn10200_elf_symbol_address_p): Pass in internal syms. Remove
7267 symbol swapping code.
7268 (mn10200_elf_get_relocated_section_contents): Use bfd_elf_get_elf_syms.
7269 Properly free possibly cached info.
7270 * elf-m10300.c (mn10300_elf_relax_section): As above for elf-m10200.c.
7271 (mn10300_elf_relax_delete_bytes): Likewise.
7272 (mn10300_elf_symbol_address_p): Likewise.
7273 (mn10300_elf_get_relocated_section_contents): Likewise.
7274 * elf32-h8300.c (elf32_h8_relax_section): As above for elf-m10200.c.
7275 (elf32_h8_relax_delete_bytes): Likewise.
7276 (elf32_h8_symbol_address_p): Likewise.
7277 (elf32_h8_get_relocated_section_contents): Likewise.
7278 * elf32-m32r.c (m32r_elf_relax_section): As above for elf-m10200.c.
7279 (m32r_elf_relax_delete_bytes): Likewise.
7280 (m32r_elf_get_relocated_section_contents): Likewise.
7281 * elf32-sh.c (sh_elf_reloc_loop): Free section contents using
7282 elf_section_data to determine whether cached.
7283 (sh_elf_relax_section): As above for elf-m10200.c.
7284 (sh_elf_relax_delete_bytes): Likewise.
7285 (sh_elf_get_relocated_section_contents): Likewise.
7286 * elf32-xstormy16.c (xstormy16_elf_relax_section): As above.
7287 * elf64-alpha.c (elf64_alpha_relax_section): As above. Also delay
7288 reading of local syms.
7289 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7290 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): As above.
7291 * elfxx-ia64.c (elfNN_ia64_relax_section): As above.
7292 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Properly free internal
7293 relocs.
7294 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Properly
7295 free internal relocs and section contents. Don't read symbols.
7296 * elf32-hppa.c (get_local_syms): Use bfd_elf_get_elf_syms.
7297 (elf32_hppa_size_stubs): Don't free local syms.
7298 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Delay
7299 reading of local syms. Use bfd_elf_get_elf_syms. Properly free
7300 possibly cached info.
7301 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7302 * elf64-hppa.c (elf64_hppa_check_relocs): Use bfd_elf_get_elf_syms.
7303 * elf64-ppc.c (struct ppc_link_hash_table): Delete bfd_count and
7304 all_local_syms.
7305 (get_local_syms): Delete function.
7306 (edit_opd): Use bfd_elf_get_elf_syms. Free on error exit. Cache
7307 on exit.
7308 (ppc64_elf_size_stubs): Use bfd_elf_get_elf_syms. Free/cache on exit.
7309
b3212001
JW
73102002-07-05 Jim Wilson <wilson@redhat.com>
7311
7312 * syms.c (decode_section_type): New.
7313 (bfd_decode_symclass): Call decode_section_type.
7314
894bb1ee
JJ
73152002-07-04 Jakub Jelinek <jakub@redhat.com>
7316
7317 * merge.c (_bfd_merged_section_offset): Avoid accessing byte before
7318 section content start.
7319 Reported by Michael Schumacher <mike@hightec-rt.com>.
7320
bc0ba537
AM
73212002-07-04 Alan Modra <amodra@bigpond.net.au>
7322
9b5ecbd0 7323 * section.c (_bfd_strip_section_from_output): Remove unnecessary
bc0ba537
AM
7324 link order code. Don't actually remove the output section here;
7325 Just set a flag for the linker to do so.
7326 * elflink.c (_bfd_elf_link_renumber_dynsyms): Test for removed
7327 sections when setting up output section dynsyms.
7328
797fc050
AM
73292002-07-04 Alan Modra <amodra@bigpond.net.au>
7330
7331 * elflink.h (elf_link_add_object_symbols): Revert 1999-09-02 hpux
7332 fudge.
7333 * elf.c (bfd_section_from_shdr): Work around broken hpux shared
7334 libs here instead.
7335
99881371
MS
73362002-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
7337
7338 * elf64-s390.c (create_got_section): Set .got section alignment to
7339 8 bytes.
7340 (elf_s390_check_relocs): Set .rela.dyn section alignment to 8 bytes.
7341
47d9a591
AM
73422002-07-02 Alan Modra <amodra@bigpond.net.au>
7343
7344 * elf.c (_bfd_elf_reloc_type_class): Fix comment grammar.
7345
179d3252
JT
73462002-07-01 Matt Thomas <matt@3am-software.com>
7347
7348 * elf32-vax.c (elf32_vax_print_private_bfd_data): Change EF_*
7349 to EF_VAX_*.
7350
4a14403c
TS
73512002-07-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7352
7353 * elfxx-mips.c (ABI_64_P): Fix comment.
7354 (MIPS_ELF_OPTIONS_SECTION_NAME,MIPS_ELF_STUB_SECTION_NAME): Use the
7355 new section names for N64 ABI.
7356 (mips_elf_output_extsym): No special _gp_disp handling for NewABI.
7357 (mips_elf_calculate_relocation): Code formatting.
7358 (mips_elf_create_dynamic_relocation): Likewise.
7359 (_bfd_mips_elf_fake_sections): IRIX6 needs this hack, too.
7360 (_bfd_mips_elf_size_dynamic_sections): Handle GOT_PAGE for any NewABI.
7361 (_bfd_mips_elf_relocate_section): No special handling for R_MIPS_64
7362 in any NewABI.
7363 (_bfd_mips_elf_finish_dynamic_symbol): No special _gp_disp handling
7364 for NewABI.
7365 (_bfd_mips_elf_modify_segment_map): Handle any N64 ABI.
7366 (_bfd_mips_elf_gc_sweep_hook): NewABI GOT relocs should be handled
7367 here, too.
7368
607c0e09
AS
73692002-07-01 Andreas Schwab <schwab@suse.de>
7370
7371 * elf64-x86-64.c (elf64_x86_64_relocate_section): Only convert
7372 R_X86_64_64 to R_X86_64_RELATIVE.
7373
ba26fd96
AM
73742002-07-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
7375
7376 * vaxbsd.c: New BFD backend for VAX BSD and Ultrix.
7377 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Add new backend.
7378 Run "make dep-am".
7379 * config.bfd (vax-*-bsd* | vax-*-ultrix*): Use vaxbsd_vec instead of
7380 host_aout_vec.
7381 * configure.in (vaxbsd_vec): Add.
7382 * targets.c (vaxbsd_vec): Add.
7383 * Makefile.in: Rebuild.
7384 * configure: Rebuild.
7385 * po/SRC-POTFILES.in: Rebuild.
7386
1e2f5b6e
AM
73872002-07-01 Alan Modra <amodra@bigpond.net.au>
7388
7389 * elflink.h (elf_gc_mark): Pass in the section whose relocs we are
7390 examining to gc_mark_hook, rather than the bfd.
7391 (elf_gc_sections): Adjust.
7392 * elf-bfd.h (struct elf_backend_data <gc_mark_hook>): Likewise.
7393 * elf-m10300.c (mn10300_elf_gc_mark_hook): Likewise.
7394 * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
7395 * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
7396 * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
7397 * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
7398 * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
7399 * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
7400 * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
7401 * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
7402 * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
7403 * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
7404 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
7405 * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
7406 * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
7407 * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
7408 * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
7409 * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
7410 * elf32-vax.c (elf_vax_gc_mark_hook): Likewise.
7411 * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
7412 * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
7413 * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
7414 * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
7415 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
7416 * elfxx-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
7417 * elfxx-mips.h (_bfd_mips_elf_gc_mark_hook): Likewise.
7418 * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
7419 * elf32-frv.c (elf32_frv_gc_mark_hook): Likewise. Also remove
7420 redundant local sym tests.
7421 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_entry.
7422 (link_hash_newfunc): Init is_entry.
7423 (ppc64_elf_copy_indirect_symbol): Copy is_entry.
7424 (ppc64_elf_link_hash_table_create): Init all_local_syms.
7425 (create_linkage_sections): Use bfd_make_section_anyway rather than
7426 bfd_make_section.
7427 (ppc64_elf_mark_entry_syms): New function.
7428 (ppc64_elf_check_relocs): Don't bother testing elf_bad_symtab. Set
7429 up opd entry to function section map.
7430 (ppc64_elf_gc_mark_hook): Special case opd section relocs, and
7431 relocs that reference the opd section.
7432 (edit_opd): New function.
7433 (ppc64_elf_size_dynamic_sections): Call get_local_syms and edit_opd.
7434 (ppc64_elf_setup_section_lists): Don't calculate htab->bfd_count here.
7435 (get_local_syms): Do so here. Exit if we already have local syms.
7436 Remove bogus comment imported from elf32-hppa.c. Don't attempt to
7437 read local syms on non-ELF input.
7438 (ppc64_elf_size_stubs): Call _bfd_elf64_link_read_relocs rather
7439 than duplicating it's function here. Adjust free of internal
7440 relocs to suit.
7441 (ppc64_elf_relocate_section): Adjust local syms in opd section.
7442 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Declare.
7443 * elf32-hppa.c (elf32_hppa_size_stubs): Call
7444 _bfd_elf32_link_read_relocs rather than duplicating it's function
7445 here. Adjust free of internal relocs to suit.
7446
1b71fb54
AJ
74472002-07-01 Andreas Jaeger <aj@suse.de>
7448
7449 * elf64-x86-64.c (elf64_x86_64_check_relocs): Certain relocations
7450 are not allowed in shared libs code, enforce -fPIC.
7451
8d28f606
HPN
74522002-06-29 Hans-Peter Nilsson <hp@bitrange.com>
7453
7454 * mmo.c (mmo_write_loc_chunk): Don't eliminate leading and
7455 trailing zero-sequences when there's previous left-over data.
7456
5ac81c74
JL
74572002-06-27 John David Anglin <dave@hiauly1.hia.nrc.ca>
7458
7459 * elf64-hppa.c (elf64_hppa_reloc_type_class): New function.
7460 (elf64_hppa_finish_dynamic_sections): Check other_rel_sec, dlt_rel_sec
7461 and opd_rel_sec in order for starting rela section. Check _raw_size.
7462 (elf_backend_reloc_type_class): Define.
7463
91a4d569
AM
74642002-06-27 Kevin Buettner <kevinb@redhat.com>
7465
7466 * dwarf2.c (decode_line_info): Handle older, non-standard, 64-bit
7467 DWARF2 formats.
7468
feee612b
AM
74692002-06-27 Alan Modra <amodra@bigpond.net.au>
7470
7471 * cpu-powerpc.c: Comment on ordering of arch_info.
7472 * elf32-ppc.c (ppc_elf_object_p): New function.
7473 (elf_backend_object_p): Define.
7474 * elf64-ppc.c (ppc64_elf_object_p): New function.
7475 (elf_backend_object_p): Define.
7476
a4e6cefc
JT
74772002-06-26 Jason Thorpe <thorpej@wasabisystems.com>
7478
7479 * configure.in (vax-*-netbsd*): Set COREFILE to netbsd-core.lo.
7480 * configure: Regenerate.
7481
dae2dd0d
NC
74822002-06-25 Jason Eckhardt <jle@rice.edu>
7483
7484 * dwarf2.c (decode_line_info): Check unit->addr_size
7485 to read in the proper number of prologue bytes.
7486
680f9d5c
NC
74872002-06-25 Nick Clifton <nickc@cambridge.redhat.com>
7488
7489 * config.bfd (powerpc-*-aix5*): Only create a selvecs for
7490 aix5coff64_vec if 64-bit bfd support has been enabled.
91a4d569
AM
7491 (powerpc64-*-aix5*): Only define if 64-bit bfd support has
7492 been enabled.
dae2dd0d 7493
680f9d5c
NC
7494 * targets.c (_bfd_target_vector[]): Only include
7495 aix5coff64_vec if 64-bit bfd support has been enabled.
7496
d4c88bbb
AM
74972002-06-25 Alan Modra <amodra@bigpond.net.au>
7498
7499 * elf64-ppc.c (ppc_add_stub): Replace strcpy/strncpy with memcpy.
7500 * elf32-hppa.c (hppa_add_stub): Likewise.
7501 * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
7502 * elflink.h (elf_add_default_symbol): Fix comment typo.
7503 (elf_add_default_symbol): Replace strcpy and strncpy with memcpy.
7504 (elf_link_add_object_symbols): Likewise.
7505 (elf_link_assign_sym_version): Likewise.
7506 * hash.c (bfd_hash_lookup): Likewise.
7507 * linker.c (_bfd_generic_link_add_one_symbol): Likewise.
7508 * section.c (bfd_get_unique_section_name): Likewise.
7509 * syms.c (_bfd_stab_section_find_nearest_line): Likewise.
7510 * elf.c (_bfd_elf_make_section_from_phdr): Likewise.
7511 (assign_section_numbers): Likewise.
7512 (_bfd_elfcore_make_pseudosection): Likewise.
7513 (elfcore_grok_lwpstatus): Likewise.
7514 (elfcore_grok_win32pstatus): Likewise.
7515 (elfcore_write_note): Constify input params. Use PTR instead of
7516 void *. Include terminating NUL in namesz. Correct padding.
7517 Support NULL "name" param. Use memcpy instead of strcpy.
7518 (elfcore_write_prpsinfo): Constify input params.
7519 (elfcore_write_prstatus): Likewise. Use PTR instead of void *.
7520 (elfcore_write_lwpstatus): Likewise.
7521 (elfcore_write_pstatus): Likewise.
7522 (elfcore_write_prfpreg): Likewise.
7523 (elfcore_write_prxfpreg): Likewise.
7524 * elf-bfd.h (elfcore_write_note): Update declaration.
7525 (elfcore_write_prpsinfo): Likewise.
7526 (elfcore_write_prstatus): Likewise.
7527 (elfcore_write_pstatus): Likewise.
7528 (elfcore_write_prfpreg): Likewise.
7529 (elfcore_write_prxfpreg): Likewise.
7530 (elfcore_write_lwpstatus): Likewise.
7531
b0ac09d2
NC
75322002-06-25 Jason Eckhardt <jle@rice.edu>
7533
7534 * ecoff.c (ecoff_set_symbol_info): Set BSF_FUNCTION for
7535 symbols of type stProc and stStaticProc.
7536
75372002-06-25 Nick Clifton <nickc@redhat.com>
7538
7539 * ecoff.c: VArious formatting fixes.
7540
021d6096
AM
75412002-06-25 Alan Modra <amodra@bigpond.net.au>
7542
7543 * coff-rs6000.c (xcoff_generate_rtinit): Fix typo.
7544
82e51918
AM
75452002-06-25 Alan Modra <amodra@bigpond.net.au>
7546
7547 * aout-adobe.c: Don't compare against "true" or "false.
7548 * aout-target.h: Likewise.
7549 * aoutx.h: Likewise.
7550 * archive.c: Likewise.
7551 * bout.c: Likewise.
7552 * cache.c: Likewise.
7553 * coff-a29k.c: Likewise.
7554 * coff-alpha.c: Likewise.
7555 * coff-i386.c: Likewise.
7556 * coff-mips.c: Likewise.
7557 * coff-or32.c: Likewise.
7558 * coff64-rs6000.c: Likewise.
7559 * coffcode.h: Likewise.
7560 * coffgen.c: Likewise.
7561 * cpu-ns32k.c: Likewise.
7562 * ecoff.c: Likewise.
7563 * ecofflink.c: Likewise.
7564 * elf.c: Likewise.
7565 * elf32-arm.h: Likewise.
7566 * elf32-cris.c: Likewise.
7567 * elf32-d30v.c: Likewise.
7568 * elf32-i386.c: Likewise.
7569 * elf32-mcore.c: Likewise.
7570 * elf32-ppc.c: Likewise.
7571 * elf32-sh.c: Likewise.
7572 * elf32-sh64.c: Likewise.
7573 * elf32-v850.c: Likewise.
7574 * elf64-alpha.c: Likewise.
7575 * elf64-sh64.c: Likewise.
7576 * elfcode.h: Likewise.
7577 * elfcore.h: Likewise.
7578 * elflink.h: Likewise.
7579 * elfxx-mips.c: Likewise.
7580 * i386os9k.c: Likewise.
7581 * ieee.c: Likewise.
7582 * libbfd.c: Likewise.
7583 * linker.c: Likewise.
7584 * mmo.c: Likewise.
7585 * nlm32-alpha.c: Likewise.
7586 * nlm32-i386.c: Likewise.
7587 * nlm32-ppc.c: Likewise.
7588 * nlm32-sparc.c: Likewise.
7589 * nlmcode.h: Likewise.
7590 * oasys.c: Likewise.
7591 * pdp11.c: Likewise.
7592 * peicode.h: Likewise.
7593 * reloc.c: Likewise.
7594 * som.c: Likewise.
7595 * srec.c: Likewise.
7596 * tekhex.c: Likewise.
7597 * vms.c: Likewise.
7598 * xcofflink.c: Likewise.
7599 * elf64-sparc.c: Edit comment to not use "== false".
7600
7601 * aoutf1.h: Don't use "? true : false".
7602 * ecoff.c: Likewise.
7603 * format.c: Likewise.
7604 * ieee.c: Likewise.
7605 * linker.c: Likewise.
7606 * mmo.c: Likewise.
7607 * oasys.c: Likewise.
7608
48fc70a2
AM
76092002-06-23 H.J. Lu <hjl@gnu.org>
7610
7611 * elflink.h (elf_link_add_archive_symbols): For the default
7612 version, check references with only one `@' first.
7613
47b7c2db
AM
76142002-06-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
7615
7616 * elf64-hppa.c (elf64_hppa_mark_milli_and_exported_functions): New
7617 function.
9b5ecbd0 7618 (allocate_global_data_dlt): Don't add millicode symbols to dynamic
47b7c2db
AM
7619 symbol table.
7620 (allocate_global_data_opd, allocate_dynrel_entries): Likewise.
7621 (elf64_hppa_size_dynamic_sections): Revise to use
7622 elf64_hppa_mark_milli_and_exported_functions.
7623 (elf64_hppa_finish_dynamic_symbol): Remove code to keep millicode
7624 symbols out of dynamic symbol table.
7625
f5d44ba0
AM
76262002-06-23 Alan Modra <amodra@bigpond.net.au>
7627
bb3fff1e
AM
7628 * Makefile.in: Regenerate.
7629 * libbfd.h: Regenerate.
7630 * bfd-in2.h: Regenerate.
7631 * configure: Regenerate.
7632 * po/SRC-POTFILES.in: Regenerate.
7633
f5d44ba0
AM
7634 * elflink.h: Comment typo fixes.
7635
76362002-06-23 H.J. Lu <hjl@gnu.org>
7637
7638 * elf-bfd.h (elf_link_loaded_list): New structure.
7639 (elf_link_hash_table): Add "loaded".
7640 * elf.c (_bfd_elf_link_hash_table_init): Initialize "loaded".
7641 * elflink.h (elf_link_check_versioned_symbol): New function.
7642 (elf_link_output_extsym): Call elf_link_check_versioned_symbol.
7643
cc36acdf
NC
76442002-06-19 Nick Clifton <nickc@cambridge.redhat.com>
7645
7646 * elflink.h (size_dynamic_sections): If the target does not
f5d44ba0 7647 support an ELF style hash table, return true, indicating that
cc36acdf
NC
7648 nothing needed to be done, rather than false, indicating that the
7649 section's size could not be computed.
7650
4e5ba5b7
DB
76512002-06-18 Dave Brolley <brolley@redhat.com>
7652
7653 From Catherine Moore, Michael Meissner, Dave Brolley:
7654 * po/SRC-POTFILES.in: Add cpu-frv.c and elf32-frv.c
7655 * targets.c: Support bfd_elf32_frv_vec.
7656 * reloc.c: Add FRV relocs.
7657 * configure.in: Add support for bfd-elf32-frv-vec.
7658 * config.bfd (targ_cpu): Add support for frv-*-elf.
7659 * archures.c: Add frv arch and machines.
7660 * Makefile.am (ALL_MACHINES): Add cpu-frv.lo.
7661 (ALL_MACHINES_CFILES): Add cpu-frv.c.
7662 (BFD32_BACKENDS): Add elf32-frv.lo.
7663 (BFD32_BACKENDS_CFILES): Add elf32-frv.c
7664 (cpu-frv.lo): New target.
7665 (elf32-frv.lo): New target.
7666 * cpu-frv.c: New file.
7667 * elf32-frv.c: New file.
7668
7ece0d85
JJ
76692002-06-18 Jakub Jelinek <jakub@redhat.com>
7670
7671 * elfcode.h (elf_object_p): Sanity check eh_shoff == 0 implies
7672 e_shnum == 0.
7673 Only read the first section header if e_shoff is non-zero.
7674 Don't consider e_shstrndx if there are no sections.
7675
57fb03ac
TR
76762002-06-17 Tom Rix <trix@redhat.com>
7677
7678 * elf32-d10v.c (elf_d10v_howto_table): Change R_D10V_10_PCREL_R,
f5d44ba0 7679 R_D10V_10_PCREL_L and R_D10V_18_PCREL to use
57fb03ac
TR
7680 complain_overflow_bitfield.
7681
341ca622
AM
76822002-06-17 Alan Modra <amodra@bigpond.net.au>
7683
767e34d1
AM
7684 * opncls.c (bfd_openr): Remove redundant bfd_set_error.
7685 (bfd_fdopenr): Likewise.
7686 (bfd_openstreamr): Likewise.
7687 (bfd_openw): Likewise.
7688
341ca622
AM
7689 * targets.c: Sort target vecs.
7690 (_bfd_target_vector): Add aix5coff64_vec, bfd_elf32_sh64_vec,
7691 bfd_elf32_sh64l_vec, bfd_elf32_sh64lnbsd_vec,
7692 bfd_elf32_sh64nbsd_vec, bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec,
7693 bfd_elf64_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec.
7694 * configure.in: Sort target vecs. Add m88kmach3_vec.
7695 * configure: Regenerate.
7696
dfbbae4c
HPN
76972002-06-16 Hans-Peter Nilsson <hp@bitrange.com>
7698
7699 * elf64-mmix.c (bpo_reloc_request_sort_fn): Use member
7700 bpo_reloc_no to break sort order ties, not address of items.
7701
d663e1cd
JL
77022002-06-16 John David Anglin <dave@hiauly1.hia.nrc.ca>
7703
7704 * elf-hppa.h (elf_hppa_final_link): Fix formatting in comment.
7705 Skip excluded sections in determing __gp value.
7706 (elf_hppa_final_link_relocate): Use the symbol's address in
7707 R_PARISC_FPTR64 relocations that don't need an opd entry.
7708 * elf64-hppa.c (allocate_dynrel_entries): Simplify code.
7709 (elf64_hppa_finalize_dynreloc): Likewise.
7710 (elf64_hppa_size_dynamic_sections): Move comments and fix typo.
7711 (elf64_hppa_finish_dynamic_symbol): Break up assert.
7712
a8295218
NC
77132002-06-14 Sergey Grigoriev <serge@leopold.Physik.Uni-Augsburg.DE>
7714
7715 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
7716 alignment for .bss, .data and .text sections so that sse and sse2
7717 code will work.
7718 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
7719
77202002-06013 J"orn Rennecke <joern.rennecke@superh.com>
5d9b5481
JR
7721
7722 config.bfd: Add support for sh[1234]l*-*-elf* | sh3el*-*-elf*,
7723 sh[1234]*-elf*.
7724
3db4b612
JL
77252002-06-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
7726
2cb69dd3
JL
7727 * elflink.h (elf_bfd_final_link): Improve error handling for missing
7728 dynamic sections.
7729
3db4b612
JL
7730 * elf64-hppa.c (allocate_global_data_opd): We don't need an opd entry
7731 for a symbol that has no output section.
7732 (allocate_dynrel_entries): Correct comment.
7733 (elf64_hppa_finalize_dynreloc): Likewise. Don't create an opd entry
7734 unless we want one.
7735 (elf64_hppa_finalize_opd): Prevent segfault if dyn_h is NULL.
7736 (elf64_hppa_finalize_dlt): Likewise. Prevent segfault for symbols
7737 with no section. Remove unnecessary parentheses.
7738
f3813499
TR
77392002-06-11 Tom Rix <trix@redhat.com>
7740
7741 * coffcode.h (coff_compute_section_file_positions): Add data
7742 section to AIX loader alignment check.
7743
f5d44ba0 7744 * coff-rs6000.c (_bfd_xcoff_mkobject): Set default text section
f3813499
TR
7745 alignment to 4 bytes.
7746 (_bfd_xcoff_copy_private_bfd_data): Use text and data alignment
7747 power accessor macro.
7748 (do_shared_object_padding): Remove invalid assertion.
7749
0ebaf185
RS
77502002-06-10 Richard Sandiford <rsandifo@redhat.com>
7751
7752 * section.c (_bfd_strip_section_from_output): Set SEC_EXCLUDE
7753 for removed output sections.
7754
ebe3e2d1
NC
77552002-06-10 Geoffrey Keating <geoffk@redhat.com>
7756
7757 * merge.c (merge_strings): Use htab_create_alloc with calloc, not
7758 htab_alloc.
7759 * elf-strtab.c (_bfd_elf_strtab_finalize): Likewise.
7760
0b14c2aa
L
77612002-06-08 H.J. Lu <hjl@gnu.org>
7762
7763 * elf.c (copy_private_bfd_data): Don't cast to bfd_size_type to
7764 work around a long long bug in gcc 2.96 on mips.
7765
3c2bfad6
JT
77662002-06-08 Jason Thorpe <thorpej@wasabisystems.com>
7767
7768 * Makefile.am (BFD32_BACKENDS): Add vax1knetbsd.lo.
7769 (BFD32_BACKENDS_CFILES): Add vax1knetbsd.c.
7770 Regenerate dependency lists.
7771 * Makefile.in: Regenerate.
7772 * config.bfd (vax-*-netbsdelf*, vax-*-netbsdaout*): Add
7773 vax1knetbsd_vec to targ_selvecs.
7774 * configure.in: Add vax1knetbsd_vec.
7775 * configure: Regenerate.
7776 * targets.c (_bfd_target_vector): Add vax1knetbsd_vec.
7777 * vax1knetbsd.c: New file.
7778 * vaxnetbsd.c: Update copyright years.
7779 (TARGET_PAGE_SIZE): Set to 0x1000.
7780 (DEFAULT_MID): Set to M_VAX4K_NETBSD.
7781
91149be3
JT
77822002-06-08 Matt Thomas <matt@3am-software.com>
7783
7784 * libaout.h (enum machine_type): Add M_VAX4K_NETBSD.
7785
21e15248
AM
77862002-06-08 Alan Modra <amodra@bigpond.net.au>
7787
7788 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): Make static.
7789
986b7daa
AM
77902002-06-08 Alan Modra <amodra@bigpond.net.au>
7791
e90b95f6
AM
7792 * Makefile.am: Run "make dep-am".
7793 * Makefile.in: Regenerate.
7794
3f9c735e
AM
7795 * armnetbsd.c: Replace CONST with const.
7796 * corefile.c: Likewise.
7797 * elf32-dlx.c: Likewise.
7798 * elf64-mips.c: Likewise.
7799 * mmo.c: Likewise.
7800 * ns32knetbsd.c: Likewise.
7801
986b7daa
AM
7802 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Check the hash
7803 table is elf64-sparc.
7804
5a659663
TS
78052002-06-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
7806
7807 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Simplify code.
7808 Fix RELA addends to get not shifted in the result. Don't do special
7809 handling of R_MIPS_64 for NewABI.
7810
9bab7074
AM
78112002-06-07 Alan Modra <amodra@bigpond.net.au>
7812
7813 * aoutx.h (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7814 (NAME(aout,slurp_reloc_table)): Likewise.
7815 * coff-mips.c (mips_relax_section): Use bfd_zalloc.
7816 * coff-rs6000.c (xcoff_write_armap_big): Use bfd_zmalloc.
7817 (xcoff_write_archive_contents_big): Likewise.
7818 (xcoff_generate_rtinit): Likewise.
7819 (xcoff_generate_rtinit): Likewise, and check error return.
7820 * coff64-rs6000.c (xcoff64_generate_rtinit): Likewise.
7821 * coffgen.c (coff_section_symbol): Use bfd_zalloc.
7822 (coff_get_normalized_symtab): Likewise.
7823 (coff_make_empty_symbol): Likewise.
7824 (bfd_coff_set_symbol_class): Likewise.
7825 * cofflink.c (coff_link_add_symbols): Likewise.
7826 * ecoff.c (_bfd_ecoff_make_empty_symbol): Likewise.
7827 * ecofflink.c (ecoff_write_shuffle): Use bfd_zmalloc.
7828 (bfd_ecoff_write_accumulated_debug): Likewise.
7829 * elf64-alpha.c (get_got_entry): Use bfd_zalloc.
7830 * i386linux.c (bfd_i386linux_size_dynamic_sections): Likewise.
7831 * i386lynx.c (NAME(lynx,slurp_reloc_table)): Use bfd_zmalloc.
7832 * ieee.c (do_with_relocs): Use bfd_zalloc.
7833 * m68klinux.c (bfd_m68klinux_size_dynamic_sections): Likewise.
7834 * pdp11.c (NAME(aout,slurp_symbol_table)): Use bfd_zmalloc.
7835 (NAME(aout,slurp_reloc_table)): Likewise.
7836 (NAME(aout,squirt_out_relocs)): Don't memset when zalloc'd.
7837 * reloc16.c (bfd_coff_reloc16_relax_section): Use bfd_zmalloc.
7838 * som.c (som_build_and_write_symbol_table): Likewise.
7839 (som_slurp_string_table): Likewise.
7840 (som_slurp_symbol_table): Likewise.
7841 (som_bfd_ar_write_symbol_stuff): Likewise.
7842 * sparclinux.c (bfd_sparclinux_size_dynamic_sections): Use bfd_zalloc.
7843 * sunos.c (bfd_sunos_size_dynamic_sections): Likewise.
7844 * tekhex.c (find_chunk): Likewise. Get rid of unused "sname".
7845 * vms-gsd.c (_bfd_vms_slurp_gsd): Use bfd_zmalloc.
7846 * xcofflink.c (xcoff_link_add_symbols): Use bfd_zalloc/bfd_zmalloc.
7847
1126897b
AM
78482002-06-07 Alan Modra <amodra@bigpond.net.au>
7849
7850 * elf-bfd.h (struct bfd_elf_section_data <group_name>): Replace with
7851 "group" union.
7852 (elf_group_name): Update.
7853 (elf_group_id): Define.
7854 (bfd_elf_set_group_contents): Declare.
7855 * elf.c (elf_fake_sections): Qualify use of elf_group_name.
7856 (set_group_contents): Rename to bfd_elf_set_group_contents. Remove
7857 ATTRIBUTE_UNUSED from failedptrarg. If elf_group_id is set, use
7858 that sym for the signature.
7859 (_bfd_elf_compute_section_file_positions): Don't call
7860 set_group_contents for "ld -r" case.
7861 (swap_out_syms): Use bfd_zalloc.
7862 * elflink.h (elf_link_add_archive_symbols): Likewise.
7863 (NAME(bfd_elf,size_dynamic_sections)): Likewise.
7864 (elf_bfd_final_link): Call bfd_elf_set_group_contents.
7865
3fad3c7c
AM
78662002-06-07 Alan Modra <amodra@bigpond.net.au>
7867
7868 * elf64-ppc.c (ppc64_elf_relocate_section): Allow unresolved
7869 relocs in opd for non-shared too.
7870
10f469bf 78712002-06-06 Jeffrey Law <law@redhat.com>
76f99c63
JL
7872
7873 * elf32-h8300.c (elf32_h8_relax_section): Ignore uninteresting
7874 relocations.
7875
7217313c
NC
78762002-06-06 Nick Clifton <nickc@cambridge.redhat.com>
7877
7878 * merge.c: Include libiberty.h.
7879 * elf-strtab.c: Include libiberty.h.
7880
6cb22815
AM
78812002-06-06 Elias Athanasopoulos <eathan@otenet.gr>
7882
7883 * peXXigen.c (pe_print_idata): Remove unused variable.
7884
1ed89aa9
NC
78852002-06-06 David Heine <dlheine@tensilica.com>
7886
7887 * elf.c (assign_file_positions_for_segments): Remove unallocated
7888 sections from the section to segment mapping for PT_LOAD segments.
7889 Update comment about empty loadable segments.
7890
644c4c80
RS
78912002-06-06 Richard Sandiford <rsandifo@redhat.com>
7892
7893 * stabs.c (_bfd_link_section_stabs): Check that the symbol offset
7894 is within the .stabstr section.
7895
f8ecb12b
AM
78962002-06-06 Alan Modra <amodra@bigpond.net.au>
7897
7898 * elf-bfd.h (struct elf_size_info <swap_symbol_in>): Function args
7899 are "const PTR", not "const PTR *".
7900 (bfd_elf32_swap_symbol_in): Likewise.
7901 (bfd_elf64_swap_symbol_in): Likewise.
7902 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR.
7903 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7904 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7905 (elf_link_add_object_symbols): Likewise.
7906 (elf_link_record_local_dynamic_symbol): Likewise.
7907 (elf_link_input_bfd): Likewise.
7908 (elf_gc_mark): Likewise.
7909 (elf_reloc_symbol_deleted_p): Likewise.
7910 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7911 (mn10200_elf_relax_delete_bytes): Likewise.
7912 (mn10200_elf_symbol_address_p): Likewise.
7913 (mn10200_elf_get_relocated_section_contents): Likewise.
7914 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7915 (mn10300_elf_relax_section): Likewise.
7916 (mn10300_elf_relax_delete_bytes): Likewise.
7917 (mn10300_elf_symbol_address_p): Likewise.
7918 (mn10300_elf_get_relocated_section_contents): Likewise.
7919 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7920 (elf32_h8_relax_delete_bytes): Likewise.
7921 (elf32_h8_symbol_address_p): Likewise.
7922 (elf32_h8_get_relocated_section_contents): Likewise.
7923 * elf32-hppa.c (get_local_syms): Likewise.
7924 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7925 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7926 * elf32-sh.c (sh_elf_relax_section): Likewise.
7927 (sh_elf_relax_delete_bytes): Likewise.
7928 (sh_elf_get_relocated_section_contents): Likewise.
7929 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7930 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7931 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7932 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7933 * elf64-ppc.c (get_local_syms): Likewise.
7934 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7935 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7936
1ed89aa9 79372002-06-05 J"orn Rennecke <joern.rennecke@superh.com>
7a33bc10
JR
7938
7939 * config.bfd (sh64l*-*-elf*, shl*-*-elf*): New configurations.
7940
73ff0d56
AM
79412002-06-05 Alan Modra <amodra@bigpond.net.au>
7942
9dce4196
AM
7943 * elf.c (group_signature): Swap in the whole symbol, and handle
7944 extracting section symbol names.
7945 (setup_group): Add comment.
7946 (set_group_contents): When called from objcopy or ld, arrange for
7947 section contents to be written. Write group member output section
7948 indices to allow objcopy to reorganize sections.
7949 (_bfd_elf_copy_private_section_data): Copy group info.
7950
73ff0d56
AM
7951 * elf-bfd.h (struct elf_size_info): Add swap_symbol_in field.
7952 (bfd_elf32_swap_symbol_in): Update prototype.
7953 (bfd_elf64_swap_symbol_in): Likewise.
7954 * elfcode.h (elf_swap_symbol_in): Change input args to const PTR *.
7955 (elf_slurp_symbol_table): Adjust call to elf_swap_symbol_in.
7956 * elflink.h (elf_link_is_defined_archive_symbol): Likewise.
7957 (elf_link_add_object_symbols): Likewise.
7958 (elf_link_record_local_dynamic_symbol): Likewise.
7959 (elf_link_input_bfd): Likewise.
7960 (elf_gc_mark): Likewise.
7961 (elf_reloc_symbol_deleted_p): Likewise.
7962 * elf-m10200.c (mn10200_elf_relax_section): Likewise.
7963 (mn10200_elf_relax_delete_bytes): Likewise.
7964 (mn10200_elf_symbol_address_p): Likewise.
7965 (mn10200_elf_get_relocated_section_contents): Likewise.
7966 * elf-m10300.c (mn10300_elf_relax_section): Likewise.
7967 (mn10300_elf_relax_section): Likewise.
7968 (mn10300_elf_relax_delete_bytes): Likewise.
7969 (mn10300_elf_symbol_address_p): Likewise.
7970 (mn10300_elf_get_relocated_section_contents): Likewise.
7971 * elf32-h8300.c (elf32_h8_relax_section): Likewise.
7972 (elf32_h8_relax_delete_bytes): Likewise.
7973 (elf32_h8_symbol_address_p): Likewise.
7974 (elf32_h8_get_relocated_section_contents): Likewise.
7975 * elf32-hppa.c (get_local_syms): Likewise.
7976 * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
7977 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Likewise.
7978 * elf32-sh.c (sh_elf_relax_section): Likewise.
7979 (sh_elf_relax_delete_bytes): Likewise.
7980 (sh_elf_get_relocated_section_contents): Likewise.
7981 * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
7982 * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
7983 * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
7984 * elf64-mmix.c (mmix_elf_relax_section): Likewise.
7985 * elf64-ppc.c (get_local_syms): Likewise.
7986 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
7987 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
7988 * elfcode.h (NAME(_bfd_elf,size_info)): Update initialiser.
7989 * elf64-alpha.c (alpha_elf_size_info): Likewise.
7990 * elf64-hppa.c (hppa64_elf_size_info): Likewise.
7991 * elf64-mips.c (mips_elf64_size_info): Likewise.
7992 * elf64-s390.c (s390_elf64_size_info): Likewise.
7993 * elf64-sparc.c (sparc64_elf_size_info): Likewise.
7994
53bfd6b4
MR
79952002-06-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7996
7997 * elf32-mips.c (elf32_mips_ignore_discarded_relocs): Move to...
7998 elfxx-mips.c (_bfd_mips_elf_ignore_discarded_relocs): ... here.
7999 elf64-mips.c (elf_backend_ignore_discarded_relocs): Use
8000 _bfd_mips_elf_ignore_discarded_relocs.
8001 elfxx-mips.h (_bfd_mips_elf_ignore_discarded_relocs): Declare.
8002
d4df96e6
L
80032002-06-05 H.J. Lu <hjl@gnu.org>
8004
8005 * elfxx-mips.c (mips_elf_calculate_relocation): Call
8006 _bfd_elf_rel_local_sym for STT_SECTION relocations against
8007 the SEC_MERGE section.
8008
e61463e1
AM
80092002-06-05 Alan Modra <amodra@bigpond.net.au>
8010
3cac74d0
AM
8011 * coff-alpha.c: Update copyright date.
8012 * coff-mips.c: Likewise.
8013 * xcoff-target.h: Likewise.
8014
e61463e1
AM
8015 * bfd-in.h: Remove "taken from the source" comment.
8016 * libbfd-in.h: Likewise.
8017 * libcoff-in.h: Likewise.
8018 * bfd-in2.h: Regenerate.
8019 * libbfd.h: Regenerate.
8020 * libcoff.h: Regenerate.
8021
8022 * elf.c (bfd_elf_discard_group): Return true.
8023 * elf-bfd.h (bfd_elf_discard_group): Declare.
8024 * bfd-in.h (bfd_elf_discard_group): Don't declare here.
8025 * section.c (bfd_discard_group): Rename to bfd_generic_discard_group.
8026 * bfd.c (bfd_discard_group): Define.
8027 * targets.c (struct bfd_target): Add _bfd_discard_group.
8028 (BFD_JUMP_TABLE_LINK): Here too.
8029 * libbfd-in.h (_bfd_nolink_bfd_discard_group): Define.
8030 * aout-adobe.c (aout_32_bfd_discard_group): Define.
8031 * aout-target.h (MY_bfd_discard_group): Define.
8032 * aout-tic30.c (MY_bfd_discard_group): Define.
8033 * binary.c (binary_bfd_discard_group): Define.
8034 * bout.c (b_out_bfd_discard_group): Define.
8035 * coff-alpha.c (_bfd_ecoff_bfd_discard_group): Define.
8036 * coffcode.h (coff_bfd_discard_group): Define.
8037 * coff-mips.c (_bfd_ecoff_bfd_discard_group): Define.
8038 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Define.
8039 * i386msdos.c (msdos_bfd_discard_group): Define.
8040 * i386os9k.c (os9k_bfd_discard_group): Define.
8041 * ieee.c (ieee_bfd_discard_group): Define.
8042 * ihex.c (ihex_bfd_discard_group): Define.
8043 * mmo.c (mmo_bfd_discard_group): Define.
8044 * nlm-target.h (nlm_bfd_discard_group): Define.
8045 * oasys.c (oasys_bfd_discard_group): Define.
8046 * ppcboot.c (ppcboot_bfd_discard_group): Define.
8047 * som.c (som_bfd_discard_group): Define.
8048 * srec.c (srec_bfd_discard_group): Define.
8049 * tekhex.c (tekhex_bfd_discard_group): Define.
8050 * versados.c (versados_bfd_discard_group): Define.
8051 * vms.c (vms_bfd_discard_group): Define.
8052 * xcoff-target.h (_bfd_xcoff_bfd_discard_group): Define.
8053 * coff64-rs6000.c (rs6000coff64_vec): Update initialiser.
8054 (aix5coff64_vec): Likewise.
8055 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Likewise.
8056
9cba27b2
JT
80572002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8058
8059 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-com.lo.
8060 (BFD32_BACKENDS_CFILES): Add elf32-sh64-com.c.
8061 (elf32-sh64-com.lo): New dependency list.
8062 * Makefile.in: Regenerate.
8063 * configure.in (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec)
8064 (bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec): Add
8065 elf32-sh64-com.lo.
8066 * configure: Regenerate.
8067 * elf32-sh64.c (sh64_address_in_cranges)
8068 (sh64_get_contents_type, sh64_address_is_shmedia): Move to...
8069 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb):
8070 (crange_bsearch_cmpl): Prepend _bfd_sh64_ to name and move to...
8071 * elf32-sh64-com.c: ...here. New file.
8072
8d2c33be
AM
80732002-06-04 Alan Modra <amodra@bigpond.net.au>
8074
8075 * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Remove
8076 ATTRIBUTE_UNUSED on used params.
8077 * elf32-vax.c (elf_vax_gc_mark_hook): Remove unnecessary checks
8078 before calling bfd_section_from_elf_index on local syms.
8079 * elf64-sh64.c (sh_elf64_gc_mark_hook): Likewise.
8080
5b0e55b6
JT
80812002-06-04 Jason Thorpe <thorpej@wasabisystems.com>
8082
8083 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64-nbsd.lo.
8084 (BFD32_BACKENDS_CFILES): Add elf32-sh64-nbsd.c.
8085 (BFD64_BACKENDS): Add elf64-sh64-nbsd.lo.
8086 (BFD64_BACKENDS_CFILES): Add elf64-sh64-nbsd.c.
8087 (elf32-sh64-nbsd.lo, elf64-sh64-nbsd.lo): New rules.
8088 * Makefile.in: Regenerate.
8089 * config.bfd (sh5le-*-netbsd*, sh5-*-netbsd*, sh64le-*-netbsd*)
8090 (sh64-*-netbsd*): New targets.
8091 * configure.in: Add bfd_elf32_sh64nbsd_vec, bfd_elf32_sh64lnbsd_vec,
8092 bfd_elf64_sh64nbsd_vec, and bfd_elf64_sh64lnbsd_vec.
8093 * configure: Regenerate.
8094 * elf32-sh64-nbsd.c: New file.
8095 * elf64-sh64-nbsd.c: New file.
8096 * targets.c: Add extern decls for bfd_elf32_sh64nbsd_vec,
8097 bfd_elf32_sh64lnbsd_vec, bfd_elf64_sh64nbsd_vec, and
8098 bfd_elf64_sh64lnbsd_vec.
8099
b885599b
AM
81002002-06-04 Alan Modra <amodra@bigpond.net.au>
8101
8102 * elf.c (setup_group): Set SEC_LINK_ONCE on GRP_COMDAT groups.
8103 (bfd_section_from_shdr): Likewise. Set section name of group
8104 sections from signature.
8105 (group_signature): Split out from setup_group. Ensure symbol table
8106 is available.
8107 (bfd_elf_discard_group): New function.
8108 (_bfd_elf_make_section_from_shdr): Don't set SEC_LINK_ONCE on
8109 .gnu.linkonce* sections if they are members of a group.
8110 (set_group_contents): Set GRP_COMDAT flag.
8111 * section.c (bfd_discard_group): New function.
8112 * bfd-in.h (bfd_elf_discard_group): Declare.
8113 * bfd-in2.h: Regenerate.
8114 * elf-bfd.h (struct bfd_elf_section_data): Add linkonce_p field.
8115 (elf_linkonce_p): Define.
8116
90937f86
AM
81172002-06-04 Alan Modra <amodra@bigpond.net.au>
8118
8119 * elf.c (bfd_section_from_shdr): Make "name" const.
8120 * elf-bfd.h (elf_backend_section_from_shdr): Likewise.
8121 * elf32-i370.c (i370_elf_section_from_shdr): Likewise.
8122 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
8123 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
8124 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
8125 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
8126 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
8127 * elf64-ppc.c (ppc64_elf_section_from_shdr): Likewise.
8128 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
8129 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
8130 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
8131
cf6fb9ce
MR
81322002-06-03 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
8133
8134 * elfxx-mips.c (ABI_64_P): Use backend's data to determine the
8135 ABI.
8136
cedb70c5
KH
81372002-06-02 Kazu Hirata <kazu@cs.umass.edu>
8138
8139 * elf32-arc.c: Fix formatting.
8140 * elf32-arm.h: Likewise.
8141 * elf32-cris.c: Likewise.
8142 * elf32-dlx.c: Likewise.
8143 * elf32-hppa.c: Likewise.
8144 * elf32-i386.c: Likewise.
8145 * elf32-i386qnx.c: Likewise.
8146 * elf32-or32.c: Likewise.
8147 * elf32-s390.c: Likewise.
8148 * elf32-sh64.c: Likewise.
8149 * elf32-vax.c: Likewise.
8150 * elf32-xstormy16.c: Likewise.
8151 * elf64-alpha.c: Likewise.
8152 * elf64-mmix.c: Likewise.
8153 * elf64-ppc.c: Likewise.
8154 * elf64-s390.c: Likewise.
8155 * elf64-sh64.c: Likewise.
8156 * elf64-x86-64.c: Likewise.
8157
048d873d
RH
81582002-06-02 Richard Henderson <rth@redhat.com>
8159
8160 * elf64-alpha.c (elf64_alpha_relocate_section): Don't dereference
8161 null when there are no got entries for a symbol.
8162 (elf64_alpha_relax_find_tls_segment): Rearrange to avoid
8163 uninitialized variable warning.
8164
4a67a098
RH
81652002-06-01 Richard Henderson <rth@redhat.com>
8166
8167 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Don't test for
8168 undefined symbols here.
8169 (elf64_alpha_relax_section): Do it here. Also test for not
8170 defined in the current module.
8171 (elf64_alpha_relocate_section_r): Split out of ...
8172 (elf64_alpha_relocate_section): ... here. Don't dereference
8173 NULL when looking up local got entries.
8174
f44f99a5
RH
81752002-06-01 Richard Henderson <rth@redhat.com>
8176
8177 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Reject undefined
8178 symbols from JSR relaxation.
8179 (elf64_alpha_size_plt_section_1): New.
8180 (elf64_alpha_calc_dynrel_sizes): Split out .rela.got bits ...
8181 (elf64_alpha_size_rela_got_1): ... here.
8182 (elf64_alpha_size_dynamic_sections): Split out .rela.got bits ...
8183 (elf64_alpha_size_rela_got_section): ... here.
8184 (elf64_alpha_size_plt_section): New.
8185 (elf64_alpha_relax_section): Call them.
8186 (elf64_alpha_size_got_sections): Remove output_bfd arg.
8187 (elf64_alpha_finish_dynamic_symbol): Check gotent use_count.
8188
9e756d64
RH
81892002-06-01 Richard Henderson <rth@redhat.com>
8190
8191 * elf64-alpha.c (alpha_get_dtprel_base, alpha_get_tprel_base): New.
8192 (elf64_alpha_relocate_section): Use them. Reject LE TLS relocs
8193 in shared libraries. Fix DTPRELHI and TPRELHI value.
8194 (INSN_ADDQ, INSN_RDUNIQ): New.
8195 (struct alpha_relax_info): Add symtab_hdr, tls_segment, first_gotent.
8196 (elf64_alpha_relax_with_lituse): Return boolean. Remove irelend
8197 argument. Reject dynamic symbols. Use LITUSE symbolic constants.
8198 (elf64_alpha_relax_got_load): Rename from relax_without_lituse.
8199 Handle GOTDTPREL and GOTTPREL relocations.
8200 (elf64_alpha_relax_gprelhilo): New.
8201 (elf64_alpha_relax_tls_get_addr): New.
8202 (elf64_alpha_relax_find_tls_segment): New.
8203 (elf64_alpha_relax_section): Handle TLS relocations.
8204 (ALPHA_ELF_LINK_HASH_TLS_IE): New.
8205 (elf64_alpha_check_relocs): Set it.
8206
c853d7f6
RH
82072002-06-01 Richard Henderson <rth@redhat.com>
8208
b646261c
RH
8209 * elf64-alpha.c (elf64_alpha_relax_section): Don't store computed gp.
8210
c853d7f6
RH
8211 * elf64-alpha.c (elf64_alpha_check_relocs): Fix typo on maybe_dynamic
8212 check; don't suppress dynamic relocs for non-allocated sections.
8213
d7e41a96
RH
8214 * elf64-alpha.c: Remove dead code.
8215
5f333394
AM
82162002-05-31 Alan Modra <amodra@bigpond.net.au>
8217
08e0ee05
AM
8218 * bfd-in2.h: Regenerate.
8219 * libbfd.h: Regenerate.
8220 * po/SRC-POTFILES.in: Regenerate.
8221
5f333394
AM
8222 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Don't allocate
8223 space for bss .plt.
8224
caf47ea6
AM
82252002-05-31 Graeme Peterson <gp@qnx.com>
8226
8227 * Makefile.am (BFD32_BACKENDS): Add elf32-i386qnx.lo.
8228 (BFD32_BACKENDS_CFILES): Add elf32-i386qnx.c.
8229 Run "make dep-am".
8230 * Makefile.in: Regenerate.
8231 * config.bfd: Add i[3456]86-*-nto-qnx* support.
8232 * configure.in: Add bfd_elf32_i386qnx_vec support.
8233 * configure: Regenerate.
8234 * elf-bfd.h (struct elf_backend_data): Add set_nonloadable_filepos,
8235 is_contained_by_filepos, and copy_private_bfd_data_p.
8236 * elf.c (assign_file_positions_for_segments): Call backend
8237 set_nonloadable_filepos. Fix non-K&R call to _bfd_error_handler.
8238 (IS_CONTAINED_BY_FILEPOS): Define.
8239 (INCLUDE_SECTION_IN_SEGMENT): Also test IS_CONTAINED_BY_FILEPOS.
8240 (copy_private_bfd_data): Use IS_CONTAINED_BY_FILEPOS. Typo fix.
8241 Fix non-K&R call to _bfd_error_handler.
8242 (_bfd_elf_copy_private_section_data): Use backend
8243 copy_private_bfd_data_p.
8244 * elf32-i386.c: Don't include elfxx-target.h when
8245 ELF32_I386_C_INCLUDED is defined.
8246 * elf32-i386qnx.c: New QNX elf backend file.
8247 * elfxx-target.h: Add elf_backend_set_nonloadable_filepos,
8248 elf_backend_is_contained_by_filepos, and
8249 elf_backend_do_copy_private_bfd_data.
8250 * targets.c: Add bfd_target bfd_elf32_i386qnx_vec.
8251
5bc56484
AM
82522002-05-31 Alan Modra <amodra@bigpond.net.au>
8253
8254 * elfarm-oabi.c (bfd_elf32_arm_add_glue_sections_to_bfd): Define.
8255 Move other similar defines to start of file.
8256
1b164155
TR
82572002-05-30 Tom Rix <trix@redhat.com>
8258
8259 * coff-rs6000.c (xcoff_rtype2howto): Handle 16 bit R_RBA.
8260 * coff64-rs6000.c (xcoff64_rtype2howto): Same.
8261
3765b1be
RH
82622002-05-30 Richard Henderson <rth@redhat.com>
8263
8264 * elf64-alpha.c (ALPHA_ELF_LINK_HASH_LU_TLSGD,
8265 ALPHA_ELF_LINK_HASH_LU_TLSLDM, ALPHA_ELF_LINK_HASH_LU_FUNC): New.
8266 (ALPHA_ELF_GOT_ENTRY_RELOCS_DONE): Remove.
8267 (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Remove.
8268 (struct alpha_elf_got_entry): Add reloc_type, reloc_done, reloc_xlated.
8269 (struct alpha_elf_obj_tdata): Rename total_got_entries and
8270 n_local_got_entries to total_got_size and local_got_size.
8271 (elf64_alpha_howto, elf64_alpha_reloc_map): Update for TLS relocs.
8272 (alpha_got_entry_size): New.
8273 (elf64_alpha_relax_with_lituse): Use it.
8274 (elf64_alpha_relax_without_lituse): Likewise.
8275 (MAX_GOT_SIZE): Rename from MAX_GOT_ENTRIES.
8276 (get_got_entry): New.
8277 (elf64_alpha_check_relocs): Handle TLS relocs. Reorganize.
8278 (elf64_alpha_adjust_dynamic_symbol): Test LU_FUNC as a mask.
8279 (elf64_alpha_merge_ind_symbols): Check gotent->reloc_type.
8280 (elf64_alpha_can_merge_gots, elf64_alpha_merge_gots): Likewise.
8281 (elf64_alpha_calc_got_offsets_for_symbol): Use alpha_got_entry_size.
8282 (elf64_alpha_calc_got_offsets): Likewise.
8283 (alpha_dynamic_entries_for_reloc): New.
8284 (elf64_alpha_calc_dynrel_sizes): Use it.
8285 (elf64_alpha_size_dynamic_sections): Likewise.
8286 (elf64_alpha_relocate_section): Handle TLS relocations.
8287 * reloc.c: Add Alpha TLS relocations.
8288 * bfd-in2.h, libbfd.h: Rebuild.
8289
5e226794
NC
82902002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8291
8292 * peXXigen.c (pe_print_idata): Remove double printed
8293 import table lines; add Bound-To comment.
8294
90ace9e9
JT
82952002-05-29 Matt Thomas <matt@3am-software.com>
8296
8297 * Makefile.am (BFD32_BACKENDS): Add elf32-vax.lo.
8298 (BFD32_BACKENDS_CFILES): Add elf32-vax.c.
8299 (elf32-vax.lo): New rule.
8300 * Makefile.in: Regenerate.
8301 * configure.in (bfd_elf32_vax_vec)
8302 (vaxnetbsd_vec): New vectors.
8303 * configure: Regenerate.
8304 * config.bfd (vax-*-netbsdelf*)
8305 (vax-*-netbsdaout*)
8306 (vax-*-netbsd*): New targets.
8307 * elf32-vax.c: New file.
8308 * reloc.c: Add VAX relocations.
8309 * bfd-in2.h: Regenerate.
8310 * targets.c (_bfd_target_vector): Add bfd_elf32_vax_vec.
8311
4a253e81
JT
83122002-05-29 Jason Thorpe <thorpej@wasabisystems.com>
8313
8314 * config.bfd (arm-*-netbsd*): Add bfd_elf32_littlearm_vec
8315 and bfd_elf32_bigarm_vec to targ_selvecs.
8316
6e7c73dd
CF
83172002-05-29 Ralf Habacker <ralf.habacker@freenet.de>
8318
8319 * peXXigen.c (pe_print_idata): Fix seg faults on printing import tables
8320 with auto-imported symbols.
8321
8afb0e02
NC
83222002-05-29 Adam Nemet <anemet@lnxw.com>
8323
8324 * elf32-arm.h (bfd_elf32_arm_get_bfd_for_interworking): Don't add glue
8325 sections only record bfd.
9bab7074 8326 (bfd_elf32_arm_add_glue_sections_to_bfd): New function.
8afb0e02 8327 * bfd-in.h (bfd_elf32_arm_add_glue_sections_to_bfd): Declare it.
9bab7074 8328 * bfd-in2.h: Regenerate.
8afb0e02 8329
a95653f5
NC
83302002-05-28 Nick Clifton <nickc@cambridge.redhat.com>
8331
8332 * syms.c (_bfd_stab_section_find_nearest_line): Move
8333 declaration and initialisation of saw_line and saw_func out of
8334 for loop.
8335
7cdc5bba
AM
83362002-05-29 Alan Modra <amodra@bigpond.net.au>
8337
8338 * elf64-ppc.c (ppc64_elf_get_symbol_info): New function.
8339 (bfd_elf64_get_symbol_info): Define.
8340 * elfxx-target.h (bfd_elfNN_get_symbol_info): Only define if undef.
8341
4c7aad1c
AM
83422002-05-29 Andrey Volkov <avolkov@transas.com>
8343
8344 * cpu-h8300.c: Make default h8300 machine first in machine list.
8345
d172d4ba
NC
83462002-05-28 Kuang Hwa Lin <kuang@sbcglobal.net>
8347
8348 * config.bfd: Added DLX configuraton.
8349 * Makefile.am: Added DLX configuraton.
8350 * configure.in: Added DLX configuraton.
8351 * archures.c: Add DLX architecure.
8352 * reloc.c: Add DLX relocs.
8353 * targets.c: Added DLX target vector.
8354 * configure: Regenerate.
8355 * Makefile.in: Regenreate.
8356 * bfd-in2.h: Regenreate.
8357 * elf32-dlx.c: New file: Support DLX target.
8358 * cpu-dlx.c: New file: Support DLX target.
8359
d1329ca3
AM
83602002-05-25 Alan Modra <amodra@bigpond.net.au>
8361
428d0de3
AM
8362 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Formatting.
8363
d1329ca3
AM
8364 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Revert last change.
8365 (ppc64_elf_check_relocs): Don't set up function descriptor symbol
8366 strings to point inside function code sym string.
8367 (func_desc_adjust): Likewise.
8368 (ppc64_elf_hide_symbol): Rewrite code to look up function code sym.
8369
3bab7989
ML
83702002-05-24 Michal Ludvig <mludvig@suse.cz>
8371
8372 * elf64-x86-64.c (elf64_x86_64_grok_prstatus): Added.
8373 (elf64_x86_64_grok_psinfo): Added.
8374
436e8db0
NC
83752002-05-24 TAMURA Kent <kent@netbsd.org>
8376
8377 * config.bfd: Add a target for i386-netbsdpe.
8378
ea1e4b0d
AM
83792002-05-24 Alan Modra <amodra@bigpond.net.au>
8380
8381 * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy is_func
8382 and is_func_descriptor.
8383 (func_desc_adjust): Hide function code sym in shared libs unless
8384 there is a matching exported function descriptor sym.
8385
13ae64f3
JJ
83862002-05-23 Jakub Jelinek <jakub@redhat.com>
8387
8388 * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_THREAD_LOCAL
8389 for symbols from SHF_TLS section.
8390 (_bfd_elf_print_private_bfd_data): Add PT_TLS.
8391 (elf_fake_sections): Set SHF_TLS for SEC_THREAD_LOCAL sections.
8392 (map_sections_to_segments): Build PT_TLS segment if necessary.
8393 (assign_file_positions_for_segments): Likewise.
8394 (get_program_header_size): Account for PT_TLS segment.
8395 (swap_out_syms): Set type of BSF_THREAD_LOCAL symbols and symbols from
8396 SEC_THREAD_LOCAL sections to STT_TLS.
8397 * reloc.c: Add 386 and IA-64 TLS relocs.
8398 * section.c (SEC_THREAD_LOCAL): Define.
8399 (SEC_CONSTRUCTOR_TEXT, SEC_CONSTRUCTOR_DATA, SEC_CONSTRUCTOR_BSS):
8400 Remove.
8401 * elflink.h (elf_link_add_object_symbols): Support .tcommon.
8402 (size_dynamic_sections): If DF_STATIC_TLS, set DF_FLAGS
8403 unconditionally.
8404 (struct elf_final_link_info): Add first_tls_sec.
8405 (elf_bfd_final_link): Set first_tls_sec.
8406 Compute elf_hash_table (info)->tls_segment.
8407 (elf_link_output_extsym): Handle STT_TLS symbols.
8408 (elf_link_input_bfd): Likewise.
8409 * syms.c (BSF_THREAD_LOCAL): Define.
8410 * bfd-in2.h: Rebuilt.
8411 * libbfd.h: Rebuilt.
8412 * elf32-i386.c (elf_i386_tls_transition, dtpoff_base, tpoff,
8413 elf_i386_mkobject, elf_i386_object_p): New functions.
8414 (elf_howto_table): Add TLS relocs.
8415 (elf_i386_reloc_type_lookup): Support TLS relocs.
8416 (elf_i386_info_to_howto_rel): Likewise.
8417 (struct elf_i386_link_hash_entry): Add tls_type.
8418 (struct elf_i386_obj_tdata): New.
8419 (elf_i386_hash_entry, elf_i386_tdata, elf_i386_local_got_tls_type):
8420 New macros.
8421 (struct elf_i386_link_hash_table): Add tls_ldm_got.
8422 (link_hash_newfunc): Clear tls_type.
8423 (elf_i386_check_relocs): Support TLS relocs.
8424 (elf_i386_gc_sweep_hook): Likewise.
8425 (allocate_dynrelocs): Likewise.
8426 (elf_i386_size_dynamic_sections): Likewise.
8427 (elf_i386_relocate_section): Likewise.
8428 (elf_i386_finish_dynamic_symbol): Likewise.
8429 (bfd_elf32_mkobject, elf_backend_object_p): Define.
8430 * elfxx-ia64.c (struct elfNN_ia64_dyn_sym_info): Add tprel_offset,
8431 dtpmod_offset, dtprel_offset, tprel_done, dtpmod_done, dtprel_done,
8432 want_tprel, want_dtpmod, want_dtprel.
8433 (elfNN_ia64_tprel_base, elfNN_ia64_dtprel_base): New functions.
8434 (ia64_howto_table): Add TLS relocs, rename R_IA64_LTOFF_TP22 to
8435 R_IA64_LTOFF_TPREL22.
8436 (elf_code_to_howto_index): Add TLS relocs.
8437 (elfNN_ia64_check_relocs): Support TLS relocs.
8438 (allocate_global_data_got): Account for TLS .got data.
8439 (allocate_dynrel_entries): Account for TLS dynamic relocations.
8440 (elfNN_ia64_install_value): Supprt TLS relocs.
8441 (set_got_entry): Support TLS relocs.
8442 (elfNN_ia64_relocate_section): Likewise.
8443
c62e1cc3
NC
84442002-05-23 Nick Clifton <nickc@cambridge.redhat.com>
8445
8446 * elf32-arm.h (elf32_arm_final_link_relocate): For the Thumb
8447 BLX reloc round the relocation up rather than down.
8448 * coff-arm.c (coff_arm_relocate_section): Likewise.
8449
c5a43a5d
L
84502002-05-21 H.J. Lu (hjl@gnu.org)
8451
8452 * linker.c (_bfd_generic_link_add_one_symbol): Allow multiple
8453 definition.
8454
afbe61cf
AM
84552002-05-22 Alan Modra <amodra@bigpond.net.au>
8456
8457 * elf64-ppc.c (ppc64_elf_size_stubs): Don't strip .branch_lt.
8458 (ppc64_elf_relocate_section): Handle unresolved relocs in opd.
8459
9c07fe7c
AM
84602002-05-22 Alan Modra <amodra@bigpond.net.au>
8461
8462 * elf64-ppc.c (ppc64_elf_relocate_section): Return false for
8463 unresolved relocs.
8464 (ppc64_elf_size_dynamic_sections): Check for splt NULL.
8465
21611032
TS
84662002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8467
c5cd6d62 8468 * bfd.c (bfd_get_arch_size): Remove bfd_set_error call for
21611032
TS
8469 non-ELF targets.
8470
41241523
TS
84712002-05-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8472
8473 * elf-bfd.h (elf_backend_emit_relocs): Change prototype to return
8474 an error value.
8475 * elflink.h (elf_link_output_relocs): Likewise. Improve error message.
8476 return with false on error.
8477 (elf_link_input_bfd): Check reloc_emitter return value.
8478
658f2588
JT
84792002-05-21 Jason Thorpe <thorpej@wasabisystems.com>
8480
8481 * config.bfd (armeb-*-netbsdelf*): New target.
8482
c862ae31
AM
84832002-05-20 Alan Modra <amodra@bigpond.net.au>
8484
8485 * elf64-ppc.c (ppc_build_one_stub): Point undefined function syms
8486 at the plt call stub.
8487
6dd14845
TS
84882002-05-19 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8489
8490 * cpu-mips.c (mips_compatible): Don't try to check machine
8491 compatibility.
8492
a58d9c34
TR
84932002-05-18 Tom Rix <trix@redhat.com>
8494
9b5ecbd0 8495 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_out): Fix C_FILE auxent.
a58d9c34 8496
ef60b7ff
AM
84972002-05-17 Alan Modra <amodra@bigpond.net.au>
8498
8499 * elf64-ppc.c (ppc64_elf_info_to_howto): Formatting.
8500 (ppc64_elf_relocate_section): Don't warn about reloc overflow when
8501 we've already warned about an undefined symbol. Report more
8502 detail on reloc errors.
8503
a703a6ea
AM
85042002-05-17 Alan Modra <amodra@bigpond.net.au>
8505
8506 * acinclude.m4 (AM_INSTALL_LIBBFD): New.
8507 * configure.in: Invoke AM_INSTALL_LIBBFD.
8508 * Makefile.am (install-data-local): Revert 2002-05-13. Move to..
8509 (install_libbfd): .. New target.
8510 (uninstall_libbfd): Likewise.
8511 (install-bfdlibLTLIBRARIES): Likewise.
8512 (uninstall-bfdlibLTLIBRARIES): Likewise.
8513 (bfdlibdir): New.
8514 (bfdincludedir): New.
8515 (lib_LTLIBRARIES): Rename to bfdlib_LTLIBRARIES.
8516 * aclocal.m4: Regenerate.
8517 * configure: Regenerate.
8518 * Makefile.in: Regenerate.
8519
2c13d98b
NC
85202002-05-17 Stuart Balfour <sbalfour@cisco.com>
8521
8522 * hash.c (bfd_hash_lookup): Remove computation of len from inside
8523 hash loop.
8524
629936c5
NC
85252002-05-16 Nick Clifton <nickc@cambridge.redhat.com>
8526
8527 * config.bfd: Add targets for sh64-linux (little endian and
8528 big endian).
8529
e4cf60a8
NC
85302002-05-15 Laurent Pinchart <laurent.pinchart@skynet.be>
8531
8532 * peXXigen.c (pe_print_idata): Do not assume that the first thunk
8533 is located in the same section as the import table. Instead
8534 check, and if necessary load the section containing the thunk.
8535
d1e66cd4
NC
85362002-05-15 Nick Clifton <nickc@cambridge.redhat.com>
8537
8538 * aix5ppc-core.c (xcoff64_core_p): Replace bfd_read with
ea1e4b0d
AM
8539 bfd_bread.
8540 (xcoff64_core_file_matches_executable_p): Replace bfd_read
8541 with bfd_bread.
d1e66cd4 8542
2d653fc7
AM
85432002-05-15 Alan Modra <amodra@bigpond.net.au>
8544
8545 * aix5ppc-core.c: Warning fixes.
8546 * aout-adobe.c (aout_32_bfd_link_just_syms): Define.
8547 * aout-target.h (MY_bfd_link_just_syms): Define.
8548 * aout-tic30.c (MY_bfd_link_just_syms): Define.
8549 * bfd.c (bfd_link_just_syms): Define.
8550 * binary.c (binary_bfd_link_just_syms): Define.
8551 * bout.c (b_out_bfd_link_just_syms): Define.
8552 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Update initializer.
8553 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
8554 * coffcode.h (coff_bfd_link_just_syms): Define.
8555 * elf-bfd.h (enum elf_link_info_type): Add ELF_INFO_TYPE_JUST_SYMS.
8556 (elf_discarded_section): Check for ELF_INFO_TYPE_JUST_SYMS.
8557 (_bfd_elf_link_just_syms): Declare.
8558 * elf.c (_bfd_elf_link_just_syms): New function.
8559 * elf-eh-frame.c (_bfd_elf_maybe_strip_eh_frame_hdr): Check that
8560 sections haven't already been discarded by the linker.
8561 * elflink.h (elf_link_add_object_symbols): Likewise for stab
8562 sections and SEC_MERGE sections.
8563 (elf_bfd_discard_info): Similarly here.
8564 * elfxx-target.h (bfd_elfNN_bfd_link_just_syms): Define.
8565 * i386msdos.c (msdos_bfd_link_just_syms): Define.
8566 * i386os9k.c (os9k_bfd_link_just_syms): Define.
8567 * ieee.c (ieee_bfd_link_just_syms): Define.
8568 * ihex.c (ihex_bfd_link_just_syms): Define.
8569 * libbfd-in.h (_bfd_nolink_bfd_link_just_syms): Define.
8570 (_bfd_generic_link_just_syms): Declare.
8571 * libecoff.h (_bfd_ecoff_bfd_link_just_syms): Define.
8572 * linker.c (_bfd_generic_link_just_syms): New function.
8573 * mmo.c (mmo_bfd_link_just_syms): Define.
8574 * nlm-target.h (nlm_bfd_link_just_syms): Define.
8575 * oasys.c (oasys_bfd_link_just_syms): Define.
8576 * ppcboot.c (ppcboot_bfd_link_just_syms): Define.
8577 * som.c (som_bfd_link_just_syms): Define.
8578 * srec.c (srec_bfd_link_just_syms): Define.
8579 * targets.c (struct bfd_target): Add _bfd_link_just_syms.
8580 (BFD_JUMP_TABLE_LINK): And here.
8581 * tekhex.c (tekhex_bfd_link_just_syms): Define.
8582 * versados.c (versados_bfd_link_just_syms): Define.
8583 * vms.c (vms_bfd_link_just_syms): Define.
8584 * libbfd.h: Regenerate.
8585 * bfd-in2.h: Regenerate.
8586
cb7394f2
TS
85872002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8588
8589 * elf32-mips.c: Remove superfluous definitions copied from
8590 elfxx-mips.c.
8591 (bfd_elf32_bigmips_vec,bfd_elf32_littlemips_vec): Use the
8592 SGIish vectors to check the special case.
8593 (mips_elf_hi16_reloc): Fix comment.
8594 (mips_elf_got16_reloc): Likewise.
8595 (_bfd_mips_elf32_gprel16_reloc): Likewise.
8596 (elf_reloc_map): Code cleanup.
8597 (mips_reloc_map): Add comment.
8598 (bfd_elf23_bfd_reloc_type_lookup): Code cleanup.
8599 (mips_elf32_rtype_to_howto): Likewise.
8600 (mips_elf32_discard_info): Likewise.
8601 (elf32_mips_irix_compat): Invert logic: Only SGIish vectors
8602 lead to IRIX compatibility now.
8603
8dc1a139
TS
86042002-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
8605
8606 * elfxx-mips.c: Call it IRIX, not Irix in comments.
8607
2051e1b5
JT
86082002-05-13 Jason Thorpe <thorpej@wasabisystems.com>
8609
8610 * config.bfd (shle-*-netbsdelf*): Add target which includes
8611 sh64 support.
8612
83954261
AM
86132002-05-13 David Edelsohn <edelsohn@gnu.org>
8614
8615 * configure.in: Revert 2002-04-07. Instead, auto-configure
8616 HAVE_ST_C_IMPL.
8617 * configure: Regenerate.
8618 * config.in: Regenerate.
8619 * rs6000-core.c (CNEW_IMPL): Guard use of c_impl with HAVE_ST_C_IMPL
8620 or AIX_5_CORE.
8621
a9bf1154
NC
86222002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
8623
8624 * configure.in (sparc*-*-openbsd*): Support sparc64-openbsd
8625 corefiles as well.2
8626 * configure: Regenerate.
8627
3129eb7a
AM
86282002-05-13 Alan Modra <amodra@bigpond.net.au>
8629
8630 * Makefile.am (install-data-local): Install headers to
8631 $(exec_prefix)/include.
8632 * Makefile.in: Regenerate.
8633
a9a32010
DJ
86342002-05-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
8635 Daniel Jacobowitz <drow@mvista.com>
8636
8637 * coff-sh.c (sh_reloc_map): Map to R_SH_IMM32 for non-PE. Don't
8638 map BFD_RELOC_RVA.
8639
86402002-05-11 Federico G. Schwindt <fgsch@olimpo.com.br>
690cc98b
NC
8641
8642 * config.bfd (alpha*-*-openbsd*, sparc64*-*-openbsd*,
8643 hppa*-*-openbsd*): New targets.
8644 * configure.in (alpha*-*-openbsd*): Set COREFILE.
8645 * configure: Regenerate.
8646
f1f0d9ab
TR
86472002-05-10 Tom Rix <trix@redhat.com>
8648
ea1e4b0d 8649 * coff64-rs6000.c (xcoff64_reloc_type_br): New function for
f1f0d9ab
TR
8650 xcoff64_ppc_relocate_section.
8651 * coff-rs6000.c : Extern common xcoff_reloc_type functions.
8652 * libxcoff.h: Common xcoff_reloc_type function declaration.
8653
c432ba1a
AM
86542002-05-10 Alan Modra <amodra@bigpond.net.au>
8655
16a10388 8656 * elf32-i386.c (elf_i386_relocate_section): Remove overflow checks
90937f86 8657 added in 2002-05-09 commit.
16a10388 8658
c432ba1a
AM
8659 * elf32-hppa.c (elf32_hppa_size_stubs): Revert part of 2002-05-04,
8660 don't look for stubs on all undefined syms.
8661
4a335f3d
AM
86622002-05-09 Alan Modra <amodra@bigpond.net.au>
8663
8fc39d5d
AM
8664 * elf64-ppc.c (RA_REGISTER_MASK, RA_REGISTER_SHIFT): Delete.
8665 (ppc64_elf_howto_raw <R_PPC64_RELATIVE>): Not pc_relative or
8666 pcrel_offset.
8667
4a335f3d
AM
8668 * elf32-i386.c (elf_howto_table): Comments.
8669 (elf_i386_relocate_section): Handle more relocs for relocatable
8670 linking and against SEC_MERGE sections.
8671
41fcb14e
AM
86722002-05-08 Alan Modra <amodra@bigpond.net.au>
8673
8674 * elf32-ppc.c (ppc_elf_create_got): New function.
8675 (ppc_elf_create_dynamic_sections): Call ppc_elf_create_got before
ea1e4b0d 8676 _bfd_elf_create_dynamic_sections. Correct .plt flags.
41fcb14e
AM
8677 (ppc_elf_check_relocs): Use ppc_elf_create_got in place of
8678 _bfd_elf_create_got_section.
8679
b491616a
AM
86802002-05-07 Alan Modra <amodra@bigpond.net.au>
8681
8682 * elf-bfd.h (struct elf_backend_data): Add rela_normal.
8683 * elfxx-target.h (elf_backend_rela_normal): Define.
8684 (elfNN_bed): Init rela_normal.
8685 * elflink.h (elf_link_input_bfd <emit_relocs>): Handle adjustment
8686 for section symbols here if rela_normal. Simplify abs section test.
8687 * elf-m10200.c (mn10200_elf_relocate_section): If relocatable,
8688 return immediately. Remove code handling relocatable linking.
8689 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
8690 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
8691 * elf32-i370.c (i370_elf_relocate_section): Likewise.
8692 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
8693 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
8694 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
8695 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
8696 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
8697 * elf32-s390.c (elf_s390_relocate_section): Likewise.
8698 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
8699 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
8700 * elf64-s390.c (elf_s390_relocate_section): Likewise.
8701 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
8702 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
8703 * elf32-arm.h (elf32_arm_relocate_section): Likewise #ifndef USE_REL.
8704 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
8705 * elf-m10200.c (elf_backend_rela_normal): Define.
8706 * elf-m10300.c (elf_backend_rela_normal): Define.
8707 * elf32-fr30.c (elf_backend_rela_normal): Define.
8708 * elf32-i370.c (elf_backend_rela_normal): Define.
8709 * elf32-i860.c (elf_backend_rela_normal): Define.
8710 * elf32-m68k.c (elf_backend_rela_normal): Define.
8711 * elf32-mcore.c (elf_backend_rela_normal): Define.
8712 * elf32-openrisc.c (elf_backend_rela_normal): Define.
8713 * elf32-ppc.c (elf_backend_rela_normal): Define.
8714 * elf32-s390.c (elf_backend_rela_normal): Define.
8715 * elf32-xstormy16.c (elf_backend_rela_normal): Define.
8716 * elf64-ppc.c (elf_backend_rela_normal): Define.
8717 * elf64-s390.c (elf_backend_rela_normal): Define.
8718 * elf64-x86-64.c (elf_backend_rela_normal): Define.
8719 * elfxx-ia64.c (elf_backend_rela_normal): Define.
8720 * elf32-arm.h (elf_backend_rela_normal): Define #ifndef USE_REL.
8721 * elf32-m32r.c (elf_backend_rela_normal): Likewise.
8722
df212a7e
NC
87232002-05-06 Nick Clifton <nickc@cambridge.redhat.com>
8724
8725 * elf32-arm.h (elf32_arm_final_link_relocate): Convert
8726 'reloc_signed_max' and 'reloc_signed_min' into half-word offsets.
8727
3decf53c
AM
87282002-05-06 Alan Modra <amodra@bigpond.net.au>
8729
8730 * elflink.h (elf_link_input_bfd <emit_relocs>): Adjust r_offset
8731 when not relocatable. Fix reloc_emitter call for K&R.
8732
f46c2da6
AM
87332002-05-04 Alan Modra <amodra@bigpond.net.au>
8734
8735 * elf64-ppc.c (ppc64_elf_relocate_section): Reinstate code
8736 reloading local sym addend mistakenly removed in 2002-05-01 change.
8737
8738 * dwarf2.c (struct line_head): Make prologue_length a bfd_vma.
8739 (read_abbrevs): Change "offset" param to bfd_vma.
8740 (parse_comp_unit): Change "version" and addr_size to unsigned ints.
8741 Change "abbrev_offset" to bfd_vma.
8742 (read_indirect_string): Use correct conversion chars in error
8743 message format string, cast bfd_vma's to unsigned long.
8744 (read_abbrevs): Likewise.
8745 (read_attribute_value): Likewise.
8746 (decode_line_info): Likewise.
8747 (scan_unit_for_functions): Likewise.
8748 (parse_comp_unit): Likewise.
8749
59862849
TR
87502002-05-04 Tom Rix <trix@redhat.com>
8751
8752 * coffswap.h (coff_swap_reloc_in): Remove XCOFF support.
8753 (coff_swap_reloc_out): Same.
8754 * coff-rs6000.c: (xcoff_swap_reloc_in): Moved from coffswap.h.
8755 (xcoff_swap_reloc_out): Same.
8756 (xcoff_rtype2howto): Renamed from _bfd_xcoff_rtype2howto. Special
8757 case some 16 bit relocs. Add reloc value to output.
8758 (xcoff_howto_table): Remove 64 bit R_POS, add 16 bit
ea1e4b0d 8759 R_RBR. Improve names.
59862849
TR
8760 (_bfd_xcoff_reloc_type_lookup): Adjust for removal of 64 bit R_POS.
8761 (bfd_xcoff_backend_data): Update with new reloc swap names.
8762 (bfd_pmac_xcoff_backend_data) : Same.
8763 * coff64-rs6000.c: (xcoff64_swap_reloc_in): Moved from coffswap.h.
8764 (xcoff64_swap_reloc_out): Same.
ea1e4b0d 8765 (xcoff64_rtype2howto): Special case some 16 bit relocs and 32 bit
59862849 8766 R_POS. Add reloc value to output.
ea1e4b0d
AM
8767 (xcoff64_howto_table): Move 64 bit R_POS to first entry. Add 16
8768 bit R_RBR. Improve names, masks.
59862849
TR
8769 (xcoff64_reloc_type_lookup): Adjust for move of 64 bit R_POS.
8770 (bfd_xcoff_backend_data): Update with new reloc swap names.
8771 (bfd_xcoff_aix5_backend_data) : Same.
8772
b4655ea9
AM
87732002-05-04 Alan Modra <amodra@bigpond.net.au>
8774
8775 * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add
8776 bfd_count top_index, input_list, all_local_syms.
8777 (elf32_hppa_setup_section_lists): New function, split from
8778 elf32_hppa_size_stubs.
8779 (elf32_hppa_next_input_section): Likewise.
8780 (group_sections): Likewise.
8781 (get_local_syms): Likewise.
8782 (elf32_hppa_size_stubs): Adjust for split out functions. Look for
8783 stubs on undefined syms too.
8784 (elf32_hppa_set_gp): Use bfd_link_hash* instead of elf_link_hash*.
8fc39d5d 8785 Only access htab elf fields when we have an elf hash table.
b4655ea9
AM
8786 * elf32-hppa.h (elf32_hppa_setup_section_lists): Declare.
8787 (elf32_hppa_next_input_section): Declare.
8788
301e3139
AM
87892002-05-04 Bob Byrnes <byrnes@curl.com>
8790
8791 * opncls.c (_bfd_new_bfd_contained_in): Check return value of
8792 _bfd_new_bfd.
8793
7c5fcef7
L
87942002-05-03 H.J. Lu (hjl@gnu.org)
8795
8796 * elfxx-mips.c (mips_elf_link_hash_entry): Add forced_local.
8797 (mips_elf_link_hash_newfunc): Initialize forced_local to false.
8798 (mips_elf_record_global_got_symbol): Call _bfd_mips_elf_hide_symbol
8799 to hide a global symbol.
8800 (_bfd_mips_elf_hide_symbol): Return if forced_local is true. Set
ea1e4b0d 8801 forced_local to true.
7c5fcef7 8802
84de6048
RH
88032002-05-02 Richard Henderson <rth@redhat.com>
8804
8805 * elf64-alpha.c (elf64_alpha_relocate_section): Force relative relocs
8806 vs SHN_UNDEF to zero.
8807
805fc799
AM
88082002-05-02 Alan Modra <amodra@bigpond.net.au>
8809
c061c2d8
AM
8810 * elf64-ppc.c (ppc64_elf_howto_raw <R_PPC64_SECTOFF>): Change to a
8811 16 bit reloc.
8812 <R_PPC64_SECTOFF_DS>: Likewise.
8813 (ppc64_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8814 SECTOFF reloc.
8815 * elf32-ppc.c (ppc_elf_howto_raw <R_PPC_SECTOFF>): Correct.
8816 (ppc_elf_reloc_type_lookup): Map from BFD_RELOC_16_BASEREL to
8817 SECTOFF reloc.
8818
805fc799
AM
8819 * elf64-ppc.c (ppc64_elf_addr16_ha_reloc): Delete.
8820 (ppc64_elf_ha_reloc): New function.
8821 (ppc64_elf_brtaken_reloc): New function.
8822 (ppc64_elf_sectoff_reloc): New function.
8823 (ppc64_elf_sectoff_ha_reloc): New function.
8824 (ppc64_elf_toc_reloc): New function.
8825 (ppc64_elf_toc_ha_reloc): New function.
8826 (ppc64_elf_toc64_reloc): New function.
8827 (ppc64_elf_unhandled_reloc): New function.
8828 (ppc64_elf_howto_raw): Use the above.
8829 <R_PPC64_RELATIVE>: Mark pc_relative, pcrel_offset.
8830 <R_PPC64_SECTOFF>: Not pc_relative or pcrel_offset. Fix dst_mask.
8831 <R_PPC64_SECTOFF_DS>: Likewise.
8832 (IS_ABSOLUTE_RELOC): Update.
8833 (struct ppc_link_hash_table): Add have_undefweak.
8834 (ppc64_elf_link_hash_table_create): Init.
8835 (func_desc_adjust): Set have_undefweak.
8836 (ppc64_elf_func_desc_adjust): Call func_desc_adjust earlier. Only
8837 add the .sfpr blr when have_undefweak.
8838 (ppc64_elf_setup_section_lists): Check hash table flavour.
8839 (ppc64_elf_next_input_section): Move output_section->owner test to
8840 ppc64elf.em.
8841 (ppc64_elf_set_toc): Rename to ppc64_elf_toc, remove info param
8842 and relocatable test. Return TOCstart and don't set elf_gp.
8843 (ppc64_elf_relocate_section): Correct BRTAKEN/BRNTAKEN branch
8844 offset calculation. Add assert on weak sym branch tweaks.
8845 * elf64-ppc.h (ppc64_elf_set_toc): Delete.
8846 (ppc64_elf_toc): Declare.
8847 (ppc64_elf_next_input_section): Update.
ea1e4b0d 8848
818c39a3
AM
88492002-05-01 Alan Modra <amodra@bigpond.net.au>
8850
8851 * syms.c (_bfd_stab_section_find_nearest_line): Don't bomb on NULL
8852 file_name.
8853
721956f4
AM
88542002-05-01 Alan Modra <amodra@bigpond.net.au>
8855
8856 * elf64-ppc.c (CROR_151515, CROR_313131): Define.
8857 (ppc64_elf_relocate_section): Use them. Don't look for plt calls
8858 on R_PPC64_ADDR24 relocs. Require a nop or no link reg on plt
8859 call branches. Correct undefined weak destination.
8860 (ppc64_elf_func_desc_adjust): Always create at least one blr in
8861 .sfpr, and correct case where either only savef* or restf* is
8862 needed.
8863
8864 Long branch stubs, multiple stub sections.
8865 * elf64-ppc.h (ppc64_elf_setup_section_lists): Declare.
8866 (ppc64_elf_next_input_section): Declare.
8867 * elf64-ppc.c: Move linker-only prototypes.
8868 (STUB_SUFFIX): Define.
8869 (enum ppc_stub_type): New.
8870 (struct ppc_stub_hash_entry): New.
8871 (struct ppc_branch_hash_entry): New.
8872 (struct ppc_link_hash_entry): Add stub_cache, oh.
8873 (struct ppc_link_hash_table): Add stub_hash_table etc. Remove
8874 sstub. Add sbrlt, srelbrlt, has_14bit_branch, stub_iteration.
8875 Rename plt_overflow to stub_error.
8876 (ppc_stub_hash_lookup): Define.
8877 (ppc_branch_hash_lookup): Define.
8878 (stub_hash_newfunc): New function.
8879 (branch_hash_newfunc): New function.
8880 (link_hash_newfunc): Init new fields.
8881 (ppc64_elf_link_hash_table_create): Likewise.
8882 (ppc64_elf_link_hash_table_free): New function.
8883 (ppc_stub_name): New function.
8884 (ppc_get_stub_entry): New function.
8885 (ppc_add_stub): New function.
8886 (create_linkage_sections): Use bfd_make_section_anyway. Create
8887 .branch_lt and .rela.branch_lt sections. Don't create .stub.
8888 (ppc64_elf_check_relocs): Set has_14bit_branch on R_PPC64_REL14*,
8889 and set up for plt call stubs. Link func and func desc syms.
8890 (ppc64_elf_gc_sweep_hook): Handle REL14* as per REL24.
8891 (func_desc_adjust): Avoid hash lookup when func desc sym available
8892 via shortcut, and set links when processing.
8893 (ppc64_elf_hide_symbol): Likewise.
8894 (allocate_dynrelocs): Don't allocate stub section here.
8895 (ppc64_elf_size_dynamic_sections): Handle sbrlt and srelbrlt.
8896 Remove sstub code.
8897 (ppc_type_of_stub): New function.
8898 (build_one_stub): Delete.
8899 (ppc_build_one_stub): New function.
8900 (ppc_size_one_stub): New function.
8901 (ppc64_elf_setup_section_lists): New function.
8902 (ppc64_elf_next_input_section): New function.
8903 (group_sections): New function.
8904 (get_local_syms): New function.
8905 (ppc64_elf_size_stubs): Rewrite.
8906 (ppc64_elf_build_stubs): Rewrite.
8907 (ppc64_elf_relocate_section): Look up stub entry for REL24
8908 relocs. Don't propagate REL14* to dynamic objects. Look for long
8909 branch stubs if REL14* or REL24 relocs won't reach.
8910 (bfd_elf64_bfd_link_hash_table_free): Define.
8911
09c2219b
MM
89122002-04-30 Mark Mitchell <mark@codesourcery.com>
8913
c5cd6d62 8914 * config.bfd: Add support for powerpc-*-windiss.
09c2219b 8915
07b678c0
TR
89162002-04-30 Tom Rix <trix@redhat.com>
8917
8918 * xcofflink.c (xcoff_link_add_symbols): Always copy undef C_EXT
8919 symbol names into the hash table.
8920
dbe341c6
TR
89212002-04-28 Tom Rix <trix@redhat.com>
8922
8923 * coff-rs6000.c (xcoff_calculate_relocation) : Function table for
ea1e4b0d 8924 calulating relocations.
dbe341c6 8925 (xcoff_complain_overflow) : Function table for relocation errors.
ea1e4b0d
AM
8926 (xcoff_ppc_relocate_section): Use relocation and complain function
8927 tables.
8928 (xcoff_complain_overflow_unsigned_func): New complain function.
dbe341c6
TR
8929 (xcoff_complain_overflow_signed_func): Same.
8930 (xcoff_complain_overflow_bitfield_func): Same.
8931 (xcoff_complain_overflow_dont_func): Same.
8932 (xcoff_reloc_type_crel): New recot function.
8933 (xcoff_reloc_type_br): Same.
8934 (xcoff_reloc_type_ba): Same.
8935 (xcoff_reloc_type_toc): Same.
8936 (xcoff_reloc_type_rel): Same.
8937 (xcoff_reloc_type_neg): Same.
8938 (xcoff_reloc_type_pos): Same.
8939 (xcoff_reloc_type_fail): Same.
8940 (xcoff_reloc_type_noop): Same.
8941 * libxcoff.h : Declare common parts for xcoff64.
8942 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Use relocation
ea1e4b0d 8943 and complain function tables.
dbe341c6 8944
985142a4
AM
89452002-04-28 Alan Modra <amodra@bigpond.net.au>
8946
8947 * elf64-x86-64.c (struct elf64_x86_64_dyn_relocs): Comment typo.
8948 * elf32-hppa.c (elf32_hppa_final_link): Formatting.
8949
eba91044
AM
89502002-04-26 Alan Modra <amodra@bigpond.net.au>
8951
e54fdaa5
AM
8952 * opncls.c (bfd_make_readable): Call bfd_section_list_clear.
8953 * xcofflink.c (xcoff_link_add_dynamic_symbols): Likewise.
8954
a50c1845
AM
8955 * elflink.h (elf_bfd_final_link): Ensure input bfd class is the
8956 same as the output before calling elf_link_input_bfd.
8957
eba91044
AM
8958 * coffcode.h (coff_compute_section_file_positions): Set
8959 section_tail after shuffling section list.
8960
3c25c5f6
NC
89612002-04-24 Christian Groessler <chris@groessler.org>
8962
8963 * coff-z8k.c (extra_case): Fix R_IMM32 relocations: The
8964 addresses are 23bit with a special layout, not plain 32bit
8965 values. Prevent relocation of immediate values.
8966
40d32fc6
CD
89672002-04-24 Chris G. Demetriou <cgd@broadcom.com>
8968
8969 * elfxx-mips.c (_bfd_mips_elf_print_private_bfd_data): If MDMX or
8970 MIPS-16 ASE flags are set, print something to indicate that.
8971
067fa4a6
AM
89722002-04-23 Alan Modra <amodra@bigpond.net.au>
8973
8974 * elf32-hppa.c (hppa_type_of_stub): Correct and simplify condition
8975 under which a plt call stub is used.
8976 (final_link_relocate): Similarly.
8977 (allocate_plt_static): Clear h-plabel except when plt entry is
8978 exclusively used for a plabel.
8979 (allocate_dynrelocs): Use the above to simplify plt sizing.
8980 (struct elf32_hppa_link_hash_table): Add has_22bit_branch.
8981 (elf32_hppa_link_hash_table_create): Init.
8982 (BL22_RP): Define.
8983 (hppa_build_one_stub): Use BL22_RP if has_22bit_branch.
8984 (elf32_hppa_check_relocs): Set has_22bit_branch.
8985
8986 * elf32-hppa.c (elf32_hppa_check_relocs): Remove debug message.
8987 (final_link_relocate): Likewise.
8988
af40ce3c
JJ
89892002-04-22 Jakub Jelinek <jakub@redhat.com>
8990
8991 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't build
8992 search table if some FDE is DW_EH_PE_aligned encoded either.
8993 (_bfd_elf_write_section_eh_frame): Handle terminating FDE specially.
8994
09ae86c2
JJ
89952002-04-22 Richard Smith <richard@ex-parrot.com>
8996 Jakub Jelinek <jakub@redhat.com>
8997
8998 * elf-eh-frame.c (struct eh_cie_fde): Add per_encoding_relative.
8999 (_bfd_elf_discard_section_eh_frame): Set it for CIEs with pcrel
9000 encoded personality.
9001 (_bfd_elf_write_section_eh_frame): Adjust pcrel encoded personality
9002 for CIE/FDE removal.
9003
deeb2cd7
TR
90042002-04-20 Tom Rix <trix@redhat.com>
9005
9006 * coff64-rs6000.c (_bfd_xcoff64_swap_aux_in): Fix C_FILE auxent.
9007
99dc0092
AM
90082002-04-20 Alan Modra <amodra@bigpond.net.au>
9009
aa3d5824
AM
9010 * archures.c (bfd_lookup_arch): Move the list order comment..
9011 (struct bfd_arch_info): ..to where it belongs.
9012 * bfd-in2.h: Regenerate.
9013
99dc0092
AM
9014 * archures.c (bfd_lookup_arch): Add comment on list order.
9015 (bfd_default_set_arch_mach): Use bfd_lookup_arch.
9016 * cpu-powerpc.c (bfd_powerpc_archs): Re-order so that the default
9017 is always at head of list.
9018
7831a775
NC
90192002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9020
9021 * coff-arm.c (coff_thumb_pcrel_12, coff_thumb_pcrel_9,
9022 insert_thumb_branch, record_thumb_to_arm_glue): Suppress
9023 definition of these functions for ARM_WINCE builds as they are
9024 not used.
ea1e4b0d 9025 (SWAP_IN_RELOC_OFFSET, SWAP_OUT_RELOC_OFFSET): Do not define
7831a775
NC
9026 for ARM_WINCE builds.
9027
90282002-04-18 Nick Clifton <nickc@cambridge.redhat.com>
9029
ea1e4b0d 9030 * coff-arm.c (bfd_arm_process_before_allocation):
7831a775
NC
9031
90322002-04-17 J"orn Rennecke <joern.rennecke@superh.com>
a44d7f9c
JR
9033
9034 * cpu-sh.c (scan_mach): Delete.
9035 (arch_info_struct): Replace scan_mach with bfd_default_scan.
9036 (bfd_sh_arch): Likewise.
9037
3d8dbe36
NC
90382002-04-16 Nick Clifton <nickc@cambridge.redhat.com>
9039
9040 * ihex.c (ihex_write_object_contents): Fix check for records
9041 crossing 64K boundaries.
9042
4ab82700
AM
90432002-04-16 Alan Modra <amodra@bigpond.net.au>
9044
9045 * elf32-m32r.c (m32r_elf_add_symbol_hook): Check the hash table
9046 type rather than just assuming entries are ELF.
9047 * elf32-sh64.c (sh64_elf_add_symbol_hook): Likewise.
9048 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Likewise.
9049 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Likewise.
9050 * elf64-mmix.c (mmix_elf_add_symbol_hook): Use bfd_link_hash_entry
9051 rather than elf_link_hash_entry.
9052
036fe0fe
RH
90532002-04-15 Richard Henderson <rth@redhat.com>
9054
9055 * elf32-mips.c (mips_elf32_object_p): Revert 0404 fragment: allow
9056 n32 binaries.
9057
c4f3d130
NC
90582002-04-15 Michael Snyder <msnyder@redhat.com>
9059
9060 * opncls.c (bfd_close): Write contents if writeable.
9061 Minor formatting tidy-ups.
9062
4ab82700 90632002-04-15 Alan Modra <amodra@bigpond.net.au>
27242387
AM
9064
9065 * elf32-ppc.c (ppc_elf_add_symbol_hook): Check the hash table type.
9066
0c04d169
MS
90672002-04-12 Michael Snyder <msnyder@redhat.com>
9068
9069 * bfd-in.h (bfd_get_section_lma): New access macro.
9070 Minor white-space fix-up.
9071
89d4966f
AM
90722002-04-12 Alan Modra <amodra@bigpond.net.au>
9073
9074 * elf.c (prep_headers): Don't zero EI_OSABI, EI_ABIVERSION or
9075 header pad.
9076
8d0da3c2
DD
90772002-04-09 DJ Delorie <dj@redhat.com>
9078
9079 * elfarm-nabi.c (elf32_arm_howto_table): Fix ABS16 masks.
9080
05793179
NC
90812002-04-09 Casper S. Hornstrup <chorns@users.sourceforge.net>
9082
9083 * coffcode.h (coff_read_word): New.
9084 (coff_compute_checksum): New.
9085 (coff_apply_checksum): New.
9086 (coff_write_object_contents): Call coff_apply_checksum () to
9087 apply checksum to PE image.
9088
46fe4e66
AM
90892002-04-08 Randolph Chung <tausq@debian.org>
9090
9091 * elf32-hppa.c (hppa_unwind_entry_compare): Move to elf-hppa.h.
9092 (elf32_hppa_final_link): Split out sorting logic to..
9093 * elf-hppa.h (elf_hppa_sort_unwind): ..here.
9094 (elf_hppa_final_link): Call elf_hppa_sort_unwind.
9095
3b5b409c
AC
90962002-04-07 Andrew Cagney <ac131313@redhat.com>
9097
9098 * configure.in: Add missing ``|'' to powerpc-*-aix4.[4-9]*
9099 pattern.
9100 * configure: Re-generate.
9101
ac7b6ceb
AC
91022002-04-07 Andrew Cagney <ac131313@redhat.com>
9103
9104 * configure.in: Only define AIX_CORE_DUMPX_CORE when AIX version
9105 is greater or equal to 4.3.3.
9106 * configure: Regenerate.
9107 Fix PR gdb/344.
9108
44aa49bb
HPN
91092002-04-05 Hans-Peter Nilsson <hp@axis.com>
9110
9111 * elf32-cris.c (cris_elf_howto_table) <R_CRIS_16_PCREL,
9112 R_CRIS_32_PCREL>: Fix typo in name.
9113 (cris_elf_check_relocs): Always create .rela.got here when
9114 R_CRIS_16_GOTPLT or R_CRIS_32_GOTPLT is seen.
9115 (elf_cris_adjust_gotplt_to_got): Don't create .rela.got here;
9116 assume it's created.
9117
e2d34d7d
DJ
91182002-04-04 Daniel Jacobowitz <drow@mvista.com>
9119
9120 * aout-adobe.c (aout_32_bfd_link_hash_table_free): Define.
9121 * aout-target.h (MY_bfd_link_hash_table_free): Conditionally
9122 define.
9123 * aout-tic30.c (MY_bfd_link_hash_table_free): Likewise.
9124 * bfd.c (bfd_link_hash_table_free): Define.
9125 * binary.c (binary_bfd_link_hash_table_free): Define.
9126 * bout.c (b_out_bfd_link_hash_table_free): Define.
9127 * coff-rs6000.c (rs6000coff_vec): Include
9128 _bfd_generic_link_hash_table_free.
9129 (pmac_xcoff_vec): Likewise.
9130 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
9131 (aix5coff64_vec): Likewise.
9132 * coffcode.h (coff_bfd_link_hash_table_free): Conditionally define.
9133 * elf-m10300.c (elf32_mn10300_link_hash_table_free): New function.
9134 (bfd_elf32_bfd_link_hash_table_free): Define.
9135 * elf32-hppa.c (elf32_hppa_link_hash_table_free): New function.
9136 (bfd_elf32_bfd_link_hash_table_free): Define.
9137 * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_free): Conditionally
9138 define.
9139 * i386msdos.c (msdos_bfd_link_hash_table_free): Define.
9140 * i386os9k.c (os9k_bfd_link_hash_table_free): Define.
9141 * ieee.c (ieee_bfd_link_hash_table_free): Define.
9142 * ihex.c (ihex_bfd_link_hash_table_free): Define.
9143 * libbfd-in.h (_bfd_nolink_bfd_link_hash_table_free): Define.
9144 (_bfd_generic_link_hash_table_free): Add prototype.
9145 * libcoff-in.h (_bfd_xcoff_bfd_link_hash_table_free): Add prototype.
9146 * libecoff.h (_bfd_ecoff_bfd_link_hash_table_free): Define.
9147 * linker.c (_bfd_generic_link_hash_table_free): New function.
9148 * mmo.c (mmo_bfd_link_hash_table_free): Define.
9149 * nlm-target.h (nlm_bfd_link_hash_table_free): Define.
9150 * oasys.c (oasys_bfd_link_hash_table_free): Define.
9151 * ppcboot.c (ppcboot_bfd_link_hash_table_free): Define.
9152 * som.c (som_bfd_link_hash_table_free): Define.
9153 * srec.c (srec_bfd_link_hash_table_free): Define.
9154 * tekhex.c (tekhex_bfd_link_hash_table_free): Define.
9155 * versados.c (versados_bfd_link_hash_table_free): Define.
9156 * vms.c (vms_bfd_link_hash_table_free): New function.
9157 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_free): New function.
9158
9159 * coff-arm.c (coff_arm_link_hash_table_create): Use bfd_malloc
9160 instead of bfd_alloc.
9161 * coff-h8300.c (h8300_coff_link_hash_table_create): Likewise.
9162 * coff-mcore.c (coff_mcore_link_hash_table_create): Likewise.
9163 * coff-ppc.c (ppc_coff_link_hash_table_create): Likewise.
9164 * cofflink.c (_bfd_coff_link_hash_table_create): Likewise.
9165 * ecoff.c (_bfd_ecoff_bfd_link_hash_table_create): Likewise.
9166 * elf-m10300.c (elf32_mn10300_link_hash_table_create): Likewise.
9167 * elf.c (_bfd_elf_link_hash_table_create): Likewise.
9168 * elf32-arm.h (elf32_arm_link_hash_table_create): Likewise.
9169 * elf32-cris.c (elf_cris_link_hash_table_create): Likewise.
9170 * elf32-hppa.c (elf32_hppa_link_hash_table_create): Likewise.
9171 * elf32-i386.c (elf_i386_link_hash_table_create): Likewise.
9172 * elf32-m68k.c (elf_m68k_link_hash_table_create): Likewise.
9173 * elf32-s390.c (elf_s390_link_hash_table_create): Likewise.
9174 * elf32-sh.c (sh_elf_link_hash_table_create): Likewise.
9175 * elf64-alpha.c (elf64_alpha_bfd_link_hash_table_create): Likewise.
9176 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
9177 * elf64-s390.c (elf_s390_link_hash_table_create): Likewise.
9178 * elf64-sh64.c (sh64_elf64_link_hash_table_create): Likewise.
9179 * elf64-sparc.c (sparc64_elf_bfd_link_hash_table_create): Likewise.
9180 * elf64-x86-64.c (elf64_x86_64_link_hash_table_create): Likewise.
9181 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
9182 * linker.c (_bfd_generic_link_hash_table_create): Likewise.
9183 * m68klinux.c (linux_link_hash_table_create): Likewise.
9184 * sparclinux.c (linux_link_hash_table_create): Likewise.
9185 * sunos.c (sunos_link_hash_table_create): Likewise.
9186 * xcofflink.c (_bfd_xcoff_bfd_link_hash_table_create): Likewise.
9187
9188 * targets.c: Add _bfd_link_hash_table_free to xvec.
9189
9190 * bfd-in2.h: Regenerate.
9191 * libbfd.h: Regenerate.
9192 * libcoff.h: Regenerate.
9193
830629ab
AM
91942002-04-04 Alan Modra <amodra@bigpond.net.au>
9195
9196 * dep-in.sed: Cope with absolute paths.
9197 * Makefile.am (dep.sed): Subst TOPDIR, and not INCDIR.
9198 Run "make dep-am".
9199 * Makefile.in: Regenerate.
9200 * coff-arm.c: Fix copyright date.
9201 * cpu-h8300.c: Likewise.
9202 * cpu-i370.c: Likewise.
9203 * cpu-s390.c: Likewise.
9204 * cpu-mips.c: Likewise.
9205 * po/SRC-POTFILES.in: Regenerate.
9206
c6e90b02
TS
92072002-04-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
9208
9209 * Makefile.am: Add elfxx-mips.c to the known backends.
9210 (elf32-mips.lo): remove dependency to coff/external.h.
9211 * Makefile.in: Regenerate.
9212 * configure.in: Add elfxx-mips.lo to all vectors using elf32-mips.lo
9213 Remove elf32-mips.lo from 64 bit vectors. Update dependencies
9214 accordingly.
9215 * configure: Regenerate.
9216 * elf-bfd.h: Move all MIPS ELF specific prototypes to elfxx-mips.h.
9217 (irix_compat_t): IRIX compatibility level, moved from elf32-mips.c.
9218 (elf_backend_mips_irix_compat, elf_backend_mips_rtype_to_howto): New
9219 MIPS specific backend functions.
9220 * elf32-mips.c: Moved most code to elfxx-mips.c.
9221 (mips_elf_hi16_reloc): Rename from _bfd_mips_elf_hi16_reloc and make
9222 static.
9223 (mips_elf_lo16_reloc): Likewise, was _bfd_mips_elf_lo16_reloc.
9224 (mips_elf_got16_reloc): Likewise, was _bfd_mips_elf_got16_reloc.
9225 (mips_elf_gprel32_reloc): Likewise, was _bfd_mips_elf_gprel32_reloc.
9226 (mips_elf32_rtype_to_howto): Rename from mips_rtype_to_howto. Changed
9227 interface to allow selection of the right REL or RELA howto table.
9228 (mips_elf32_object_p): Rename from _bfd_mips_elf_object_p and made
9229 static. Let it refuse n32 objects.
9230 (elf32_mips_grok_prstatus): Rename from _bfd_elf32_mips_grok_prstatus.
9231 (elf32_mips_grok_psinfo): Rename from _bfd_elf32_mips_grok_psinfo.
9232 (elf32_mips_discard_info): Rename from _bfd_elf32_mips_discard_info.
9233 (elf32_mips_ignore_discarded_relocs): Rename from
9234 _bfd_elf32_mips_ignore_discarded_relocs.
9235 (elf32_mips_write_section): Rename from _bfd_elf32_mips_write_section.
9236 (elf32_mips_irix_compat): New function, replaces IRIX_COMPAT.
9237 (elf_mips_howto_table_rela): Remove.
9238 * elf64-mips.c: Moved most code to elfxx-mips.c.
9239 (bfd_elf64_bfd_reloc_type_lookup): Make static.
9240 (mips_elf64_rtype_to_howto): New function.
9241 (mips_elf64_object_p): Likewise.
9242 (elf64_mips_irix_compat): Likewise.
9243 * elfxx-mips.c: New file containing common code merged together from
9244 elf32-mips.c and elf64-mips.c.
9245 * elfxx-mips.h: New file containing MIPS specific prototypes from
9246 elf-bfd.h.
9247 * elfxx-target.h: Add handling for elf_backend_mips_irix_compat and
9248 elf_backend_mips_rtype_to_howto.
9249
d8dce692
AM
92502002-04-04 Alan Modra <amodra@bigpond.net.au>
9251
9252 * srec.c (MAXCHUNK, Chunk): Revise comments.
9253 (srec_write_record): Correct buffer size.
9254 (srec_write_header): Do without intermediate buffer.
9255 (srec_write_section): Validate Chunk.
9256 (srec_write_terminator): Pass NULL instead of dummy buffer.
9257 (srec_write_symbols): Pass file and symbol names directly to
9258 bfd_bwrite so sprintf won't overflow buffer.
9259
b88a866a
JJ
92602002-04-03 Jakub Jelinek <jakub@redhat.com>
9261
9262 * elf32-sparc.c (elf32_sparc_relocate_section): Don't emit dynamic
9263 PC relative relocs against hidden symbols.
9264 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
9265
d7866f04
AM
92662002-04-03 Alan Modra <amodra@bigpond.net.au>
9267
9268 * elf.c (_bfd_elf_make_section_from_shdr): When setting section
9269 LMAs, loop over segments until p_vaddr and p_memsz specify an
9270 extent enclosing the section.
9271
9e81ee67
NC
92722002-04-02 Nick Clifton <nickc@cambridge.redhat.com>
9273
9274 * ihex.c (ihex_write_object_contents): Do not allow records to
9275 cross a 64K boundary - wrap if necessary.
9276
d2b64500
JT
92772002-04-01 Nathan Williams <nathanw@wasabisystems.com>
9278
9279 * elf.c (elfcore_netbsd_get_lwpid): Fix off-by-one error
9280 which caused the returned LWP ID to always be 0.
9281
e36f7d53
RH
92822002-04-01 Richard Henderson <rth@redhat.com>
9283
9284 * elf32-sparc.c (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9285 (elf32_sparc_relocate_section): Use it to figure out when to
9286 initialize .got entries.
9287 * elf64-sparc.c: Similarly.
9288
e92d460e
AM
92892002-03-28 Alan Modra <amodra@bigpond.net.au>
9290
9291 * linker.c (link_action): Ignore duplicate warning syms.
9292 (_bfd_generic_link_write_global_symbol): Follow warning symbol link.
9293 * elflink.h (elf_adjust_dynstr_offsets): Likewise.
9294 (elf_adjust_dynamic_symbol): Likewise.
9295 (elf_export_symbol): Likewise.
9296 (elf_link_find_version_dependencies): Likewise.
9297 (elf_link_assign_sym_version): Likewise.
9298 (elf_link_sec_merge_syms): Likewise.
9299 (elf_link_output_extsym): Likewise.
9300 (elf_gc_sweep_symbol): Likewise.
9301 (elf_gc_propagate_vtable_entries_used): Likewise.
9302 (elf_gc_smash_unused_vtentry_relocs): Likewise.
9303 (elf_gc_allocate_got_offsets): Likewise.
9304 (elf_collect_hash_codes): Likewise.
9305 * elflink.c (elf_link_renumber_hash_table_dynsyms): Likewise.
9306 * elf-hppa.h (elf_hppa_unmark_useless_dynamic_symbols): Likewise.
9307 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
9308 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Likewise.
9309 * elf32-arm.h (elf32_arm_discard_copies): Likewise.
9310 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Likewise.
9311 (elf_cris_discard_excess_dso_dynamics): Likewise.
9312 * elf32-hppa.c (clobber_millicode_symbols): Likewise.
9313 (mark_PIC_calls): Likewise.
9314 (allocate_plt_static): Likewise.
9315 (allocate_dynrelocs): Likewise.
9316 (readonly_dynrelocs): Likewise.
9317 * elf32-i386.c (allocate_dynrelocs): Likewise.
9318 (readonly_dynrelocs): Likewise.
9319 * elf32-i370.c (i370_elf_adjust_dynindx): Likewise.
9320 * elf32-m68k.c (elf_m68k_discard_copies): Likewise.
9321 * elf32-mips.c (mips_elf_output_extsym): Likewise.
9322 (mips_elf_sort_hash_table_f): Likewise.
9323 (mips_elf_check_mips16_stubs): Likewise.
9324 * elf32-s390.c (allocate_dynrelocs): Likewise.
9325 (readonly_dynrelocs): Likewise.
9326 * elf32-sh.c (sh_elf_discard_copies): Likewise.
9327 * elf32-xstormy16.c (xstormy16_relax_plt_check): Likewise.
9328 (xstormy16_relax_plt_realloc): Likewise.
9329 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Likewise.
9330 (elf64_alpha_output_extsym): Likewise.
9331 * elf64-hppa.c (elf64_hppa_mark_exported_functions): Likewise.
9332 * elf64-mips.c (mips_elf64_sort_hash_table_f): Likewise.
9333 (mips_elf64_check_mips16_stubs): Likewise.
9334 (mips_elf64_output_extsym): Likewise.
9335 * elf64-ppc.c (func_desc_adjust): Likewise.
9336 (allocate_dynrelocs): Likewise.
9337 (readonly_dynrelocs): Likewise.
9338 * elf64-s390.c (allocate_dynrelocs): Likewise.
9339 (readonly_dynrelocs): Likewise.
9340 * elf64-sh64.c (sh64_elf64_discard_copies): Likewise.
9341 * elf64-x86-64.c (allocate_dynrelocs): Likewise.
9342 (readonly_dynrelocs): Likewise.
9343 * elfxx-ia64.c (elfNN_ia64_global_dyn_sym_thunk): Likewise.
9344 * aoutx.h (aout_link_write_other_symbol): Likewise.
9345 * cofflink.c (_bfd_coff_write_task_globals): Likewise.
9346 (_bfd_coff_write_global_sym): Likewise.
9347 * i386linux.c (linux_tally_symbols): Likewise.
9348 * m68klinux.c (linux_tally_symbols): Likewise.
9349 * sparclinux.c (linux_tally_symbols): Likewise.
9350 * pdp11.c (aout_link_write_other_symbol): Likewise.
9351 * sunos.c (sunos_scan_dynamic_symbol): Likewise.
9352 * xcofflink.c (xcoff_build_ldsyms): Likewise.
9353 (xcoff_write_global_symbol): Likewise.
9354
9355 * cofflink.c (_bfd_coff_final_link): Formatting.
9356 * cpu-mips.c (mips_compatible): Make static, prototype.
9357 * elf32-i386.c (elf_i386_check_relocs): Formatting.
9358 * elf32-sh.c (sh_elf_size_dynamic_sections): Likewise.
9359 * elf64-alpha.c (elf64_alpha_output_extsym): Likewise.
9360 * elf64-mips.c (mips_elf64_sort_hash_table): Likewise.
9361 (mips_elf64_final_link): Likewise.
9362 * elflink.h (elf_link_find_version_dependencies): Remove duplicate
9363 prototype.
9364
2106126f
NC
93652002-03-27 Nick Clifton <nickc@cambridge.redhat.com>
9366
9367 * coff-arm.c (SWAP_IN_RELOC_OFFSET): Define.
9368 (SWAP_OUT_RELOC_OFFSET): Define.
9369
b99d1833
AM
93702002-03-27 Gregory Steuck <greg@nest.cx>
9371
9372 * elf.c (_bfd_elf_get_symtab_upper_bound): Leave space for
9373 terminating NULL if empty symbol table.
9374 (_bfd_elf_get_dynamic_symtab_upper_bound): Likewise.
9375
ad43ed4c
L
93762002-03-26 H.J. Lu (hjl@gnu.org)
9377
9378 * elflink.h (elf_link_input_bfd): Revert the last change since
9379 the gcc exception handling isn't fixed yet.
9380
3851fca4
L
93812002-03-26 H.J. Lu (hjl@gnu.org)
9382
9383 * elflink.h (elf_link_input_bfd): Complain about relocations
9384 against local symbols in discarded sections.
9385
b91afed7
AM
93862002-03-26 Alan Modra <amodra@bigpond.net.au>
9387
9388 * elflink.h (elf_gc_mark): Don't recurse into non-ELF sections.
9389
dba143ef
AM
93902002-03-23 Alan Modra <amodra@bigpond.net.au>
9391
9392 * elf.c (_bfd_elf_make_section_from_shdr): Don't set lma based on
9393 section file offset for !SEC_LOAD sections.
9394
ee29b9fb
RE
93952002-03-21 Richard Earnshaw <rearnsha@arm.com>
9396
830629ab
AM
9397 * elf32-arm.h (elf32_arm_final_link_relocate <case R_ARM_GOTOFF>,
9398 <case R_ARM_GOT>): Handle relocations to Thumb functions.
ee29b9fb 9399
54327882
AM
94002002-03-21 Alan Modra <amodra@bigpond.net.au>
9401
9402 * coff64-rs6000.c (_bfd_xcoff64_put_symbol_name): Prototype.
9403 Whitespace changes.
9404 * archive.c: Update copyright date.
9405 * bfd-in2.h: Regenerate.
9406 * libbfd.h: Regenerate.
9407 * Makefile.am: Run "make dep-am"
9408 * Makefile.in: Regenerate.
9409 * po/SRC-POTFILES.in: Regenerate.
9410
1ee24f27
DJ
94112002-03-20 Daniel Jacobowitz <drow@mvista.com>
9412
9413 * dwarf2.c (struct funcinfo): Move up.
9414 (lookup_address_in_function_table): New argument function_ptr.
9415 Set it.
9416 (lookup_address_in_line_table): New argument function. If function
9417 is non-NULL, use it to handle ``addr'' before the first line note of
9418 the function.
9419 (comp_unit_find_nearest_line): Update and swap calls to
9420 lookup_address_in_function_table and lookup_address_in_line_table.
9421 * syms.c (_bfd_stab_section_find_nearest_line): Use the first
9422 N_SLINE encountered if we see an N_FUN before any N_SLINE.
9423
51b9608c
TR
94242002-03-20 Tom Rix <trix@redhat.com>
9425
ea1e4b0d 9426 * coff-rs6000.c (_bfd_xcoff_stat_arch_elt): Renamed from
51b9608c 9427 _bfd_xcoff_generic_stat_arch_elt. Fix format check.
9b5ecbd0 9428 * coff64-rs6000.c : Use _bfd_xcoff_stat_arch_elt.
51b9608c 9429
789c90aa
TR
94302002-03-19 Tom Rix <trix@redhat.com>
9431
ea1e4b0d 9432 * xcofflink.c (_bfd_xcoff_bfd_link_add_symbols): Look through all
789c90aa
TR
9433 dynamic objects in archives.
9434
1da54d81
HPN
94352002-03-19 Hans-Peter Nilsson <hp@bitrange.com>
9436
9437 * elflink.h (NAME(bfd_elf,record_link_assignment)): Don't set
9438 STT_NOTYPE symbols to STT_OBJECT.
9439
7831a775 94402002-03-18 Jan Hubicka <jh@suse.cz>
beb43bb9
JH
9441
9442 * cpu-i386.c (bfd_x86_64_arch): Rename to "i386:x86-64"
9443
eb1e0e80
NC
94442002-03-18 Tom Rix <trix@redhat.com>
9445
9446 * aix5ppc.core.c : New file for AIX 5 64 bit core support.
9447 * bfd-in.h : Add bfd_xcoff_ar_archive_set_magic declaration.
9448 * coff-rs6000 (do_pad) : New function for archive padding.
9449 (do_copy) : New function for object file copying in archives.
9450 (do_shared_object_padding) : New function for padding shared
9451 objects to their text section alignment in archives.
9452 (bfd_xcoff_ar_achive_set_magic) : Stub.
9453 (xcoff_write_armap_big) : Use do_copy and do_pad.
9454 (xcoff_write_archive_contents_big) : Use do_shared_object_padding,
9455 do_copy and do_pad.
9456 * coff64-rs6000.c (xcoff64_write_ojbect_contents) : Use
ea1e4b0d 9457 bfd_xcoff_magic_number.
eb1e0e80
NC
9458 (xcoff64_bad_format_hook) : New function for _bfd_bad_format_hook
9459 fop.
9460 (xcoff_backend_data_r) : Use xcoff64_bad_format_hook.
9461 (bfd_xcoff_aix5_backend_data) : New Aix 5 backend data.
9462 (aix5coff64_vec) : New Aix 5 target aix5coff64-rs6000.
9463 * rs6000-core.c : Update copyright date.
ea1e4b0d 9464 * xcofflink.c (bfd_xcoff_size_dynamic_sections): Check for NULL
eb1e0e80
NC
9465 csectpp.
9466 * coffcode.h (coff_new_section_hook) : Use new accessor macros.
9467 (coff_set_arch_mach_hook) : Add Aix 5 U64_TOCMAGIC magic #.
9468 (coff_set_flags) : Use bfd_xcoff_magic_number.
9469 * libxcoff.h (bfd_xcoff_is_xcoff64): Add U64_TOCMAGIC.
9470 * configure.in : Add powerpc-*-aix5 and rs6000-*-aix5 support.
9471 * Makefile.am : Same.
9472 * config.bfd : Same.
9473 * targets.c : Same.
9474 * configure : Regnerate.
9475 * Makefile.in : Same.
9476 * bfd-in2.h : Same.
9477
a1c259a1
NC
94782002-03-18 Nick Clifton <nickc@cambridge.redhat.com>
9479
9480 * po/fr.po: Updated version.
9481
4dae1ae7
AM
94822002-03-18 Alan Modra <amodra@bigpond.net.au>
9483
9484 * libbfd.c (bfd_write_bigendian_4byte_int): Return true iff success.
9485 * libbfd.h: Regenerate.
9486 * archive.c (coff_write_armap): Pass on failures from
9487 bfd_write_bigendian_4byte_int.
9488
36b4f6e7
L
94892002-03-14 H.J. Lu <hjl@gnu.org>
9490
9491 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the BFD
9492 error to bfd_error_nonrepresentable_section for reinit_array
9493 section in DSO.
9494
a1aefc76
NC
94952002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9496
a181be0a
NC
9497 * coffcode.h (coff_slurp_symbol_table): When adding BSF_WEAK flag,
9498 OR it in rather than replacing previously selected flags.
9499
a1aefc76
NC
9500 * elfxx-target.h (TARGET_BIG_SYM): Set ar_max_namelen to 15.
9501 (TARGET_LITTLE_SYM): Set ar_max_namelen to 15.
9502
c119f9b8
AM
95032002-03-14 Alan Modra <amodra@bigpond.net.au>
9504
9505 * cpu-mips.c (mips_compatible): New. Don't check bits_per_word.
9506 (N): Use the above.
9507 * elflink.h (elf_bfd_final_link): Revert last change. Instead,
9508 ensure reloc size matches before calling elf_link_input_bfd.
9509 Add an assert to check reloc size when counting output relocs.
9510
c295a511
NC
95112002-03-14 Nick Clifton <nickc@cambridge.redhat.com>
9512
9513 * mmo.c (mmo_get_loc): Return NULL rather than false.
9514
9ce88e60
NC
95152002-03-13 Nick Clifton <nickc@cambridge.redhat.com>
9516
9517 * po/fr.po: Updated version.
9518
4ddafab0
AM
95192002-03-13 Alan Modra <amodra@bigpond.net.au>
9520
b74fa2cd
AM
9521 * archures.c (bfd_default_compatible): Test bits_per_word.
9522 * cpu-i386.c (i386_compatible): Remove. Replace occurrences with
9523 bfd_default_compatible.
9524 * cpu-i370.c (i370_compatible): Likewise.
9525 * cpu-sparc.c (sparc_compatible): Likewise.
9526 * cpu-h8300.c (compatible): Test in->arch == out->arch.
9527
40b829d4
AM
9528 * elflink.h: Formatting fixes.
9529 (elf_link_output_extsym): Merge undefined and undef weak cases.
9530
4ddafab0
AM
9531 * elflink.h (elf_bfd_final_link): Only call elf_link_input_bfd
9532 when word size of input matches output word size.
9533
dd53c801
AJ
95342002-03-12 Andreas Jaeger <aj@suse.de>
9535
9536 * cpu-i386.c (i386_compatible): New. Use it instead of
9537 bfd_default_compatible.
9538
aa066ac8
L
95392002-03-07 H.J. Lu (hjl@gnu.org)
9540
9541 * coff-sh.c (shcoff_reloc_map): Use bfd_reloc_code_real_type
9542 as the type for bfd_reloc_val.
9543
1bf42538
JL
95442002-03-05 John David Anglin <dave@hiauly1.hia.nrc.ca>
9545
9546 * elf-hppa.h (elf_hppa_is_dynamic_loader_symbol): New function.
9547 (elf_hppa_relocate_section): Ignore undefined dynamic loader symbols.
9548 (elf_hppa_final_link_relocate): Correct relocations for indirect
9549 references to local data through the DLT. Fix .opd creation for
9550 local symbols using R_PARISC_LTOFF_FPTR32 and R_PARISC_FPTR64
9551 relocations. Use e_lsel selector for R_PARISC_DLTIND21L,
9552 R_PARISC_LTOFF_FPTR21L and R_PARISC_LTOFF_TP21L as per
9553 "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9554 Similarly, use e_rsel for DLT and LTOFF 'R' relocations.
9555 * elf32-hppa.c (final_link_relocate): Revise relocation selectors
9556 as per "Processor-Specific ELF for PA_RISC, Version 1.43" document.
9557
86eaf01e
JJ
95582002-03-05 Jakub Jelinek <jakub@redhat.com>
9559
9560 * merge.c (_bfd_merge_sections): Don't segfault if there
9561 is nothing to merge due to GC.
9562
c44233aa
AM
95632002-03-05 Alan Modra <amodra@bigpond.net.au>
9564
039cc25f
AM
9565 * elf32-hppa.c (clobber_millicode_symbols): Remove hack to keep
9566 symbols that have been forced local.
9567
c44233aa
AM
9568 * elflink.h (elf_bfd_final_link): Call elf_link_output_extsym
9569 to output forced local syms for non-shared link.
9570 (elf_link_output_extsym): Tweak condition for calling backend
9571 adjust_dynamic_symbol so that previous behaviour is kept.
9572 Whitespace changes throughout file.
9573
25e27870
L
95742002-03-04 H.J. Lu <hjl@gnu.org>
9575
9576 * elf.c (bfd_section_from_shdr): Handle special sections,
9577 .init_array, .fini_array and .preinit_array.
9578 (elf_fake_sections): Likewise.
9579
9580 * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Create the
9581 DT entry only if the section is in output for .init_array,
9582 .fini_array and .preinit_array. Complain about .preinit_array
9583 section in DSO.
9584 (elf_bfd_final_link): Warn zero size for .init_array,
9585 .fini_array and .preinit_array sections.
9586
9587 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Remove
9588 SHT_INIT_ARRAY, SHT_FINI_ARRAY and SHT_PREINIT_ARRAY.
9589 (elfNN_ia64_fake_sections): Remove .init_array, .fini_array and
9590 .preinit_array.
9591
bb2a49f2
AM
95922002-03-04 Alan Modra <amodra@bigpond.net.au>
9593
9594 * configure.in (WIN32LIBADD): Don't eval PICFLAG assignment.
9595 * configure: Regenerate.
9596
38487e5e
TR
95972002-03-02 Tom Rix <trix@redhat.com>
9598
c44233aa
AM
9599 * coff64-rs6000.c (xcoff64_howto_table): Replace howto types with
9600 symbolic equiv.
38487e5e
TR
9601 * coff-rs6000.c (xcoff_howto_table): Same.
9602
30831527
RH
96032002-03-01 David Mosberger <davidm@hpl.hp.com>
9604
9605 * elflink.h (size_dynamic_sections): If section named
9606 ".preinit_array" exists, create DT_PREINIT_ARRAY and
9607 DT_PREINIT_ARRAYSZ entries in dynamic table. Analogously for
9608 ".init_array" and ".fini_array".
9609 (elf_bfd_final_link): Handle DT_PREINIT_ARRAYSZ, DT_INIT_ARRAYSZ,
9610 DT_FINI_ARRAYSZ, DT_PREINIT_ARRAY, DT_INIT_ARRAY, and
9611 DT_FINI_ARRAY.
9612
c8e5ddc8
AM
96132002-02-26 Andrew Macleod <amacleod@cygnus.com>
9614
9615 * elflink.h (elf_bfd_final_link): Don't crash on SHN_UNDEF local
9616 dynsyms.
9617
96e0dda4
AM
96182002-02-25 Alan Modra <amodra@bigpond.net.au>
9619
1c5b6bf8
AM
9620 * elf64-hppa.h: Update copyright date.
9621
96e0dda4
AM
9622 * elf64-ppc.c (ppc64_elf_check_relocs): Warning fix.
9623 (ppc64_elf_relocate_section): Don't generate power4 style branch
9624 hints for *_BRTAKEN and *_BRNTAKEN relocs.
9625
0fb19cbc
JJ
96262002-02-22 Jakub Jelinek <jakub@redhat.com>
9627
9628 * elf64-sh64.c (sh_elf64_relocate_section): Fix a typo from my
9629 last patch.
9630 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9631
c434dee6
AJ
96322002-02-21 Andreas Jaeger <aj@suse.de>
9633
9634 * elf64-x86-64.c: Major rework that introduces all recent changes
9635 to the x86-64 backend. Get a closer match to elf32-i386.
9636 (struct elf64_x86_64_dyn_relocs): Rename from
9637 elf64_x86_64_pcrel_relocs_copied, add additional fields. Change
9638 all users.
9639 (struct elf64_x86_64_link_hash_table): Add short cuts to some
9640 sections.
9641 (link_hash_newfunc): Rename from elf64_x86_64_link_hash_newfunc,
9642 remove casts, initialize new hash members.
9643 (create_got_section): New.
9644 (elf64_x86_64_create_dynamic_sections): New.
9645 (elf64_x86_64_copy_indirect_symbol): New.
9646 (elf64_x86_64_check_relocs): Don't allocate space for dynamic
9647 relocs, .got or .relgot here but do it in allocate_dynrelocs.
9648 Reference count possible .plt and .got entries. Don't test input
9649 section SEC_READONLY here to try to avoid copy relocs, and keep
9650 dyn_relocs regardless of ELF_LINK_NON_GOT_REF. Don't set
9651 DF_TEXTREL here. Delay setting of variables until needed. Cache
9652 pointer to "sreloc" section in elf_section_data. Tweak condition
9653 under which .got created. Report files with bad relocation
9654 section names.
9655 (elf64_x86_64_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
9656 Reference count possible .plt entries. Don't deallocate .got and
9657 .relgot space here.
9658 (elf64_x86_64_adjust_dynamic_symbol): Handle nocopyreloc. Don't
9659 do copy reloc processing for weakdefs. Remove redundant casts and
9660 aborts. Delay setting of vars until needed. Move creation of
9661 dynamic symbols and allocation of .plt and .rela.plt to
9662 allocate_dynrelocs. Replace BFD_ASSERT with abort.
9663 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): New.
9664 (allocate_dynrelocs): New.
9665 (readonly_dynrelocs): New.
9666 (elf64_x86_64_size_dynamic_sections): Call readonly_dynrelocs.
9667 Allocate space for dyn relocs. Replace BFD_ASSERT with abort.
9668 Zero out the dynamic allocated content space.
9669 (elf64_x86_64_discard_copies): Removed.
9670 (elf64_x86_64_relocate_section): Make use of dynamic section
9671 short-cuts. Localise vars, and delay setting. Better error
9672 reporting, replace BFD_ASSERT with abort. Check
9673 ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined in the
9674 regular object file and tread the weak definition as the normal
9675 one. Don't discard relocs for undefweak or undefined symbols and
9676 check !DEF_REGULAR as well as DEF_DYNAMIC in test for avoided copy
9677 relocs.
9678 (elf64_x86_64_finish_dynamic_symbol): Don't copy relocs for
9679 symbols that have been forced local. Use same test to decide if
9680 we can use a relative reloc for got as relocate_section. Expand
9681 SHN_UNDEF comment. Move expressions out of function calls.
9682 Replace BFD_ASSERT with abort.
9683 (bfd_elf64_bfd_final_link): Removed.
9684 (elf_backend_copy_indirect_symbol): Define.
9685
ff3a6ee3
TR
96862002-02-20 Tom Rix <trix@redhat.com>
9687
9688 * coff-rs6000.c (xcoff_howto_table): Add 16 bit R_BA.
9689 (_bfd_xcoff_reloc_type_lookup): Use it.
9690 * coff64-rs6000.c (xcoff64_howto_table): Same.
9691 (xcoff64_reloc_type_lookup): Same.
c434dee6 9692
a68d41fb
AM
96932002-02-20 Peter Schauer <pes@regent.e-technik.tu-muenchen.de>
9694
9b5ecbd0 9695 * osf-core.c (osf_core_vec): OSF/1 (Digital Unix) core files are
a68d41fb
AM
9696 little endian.
9697
befc3abb
MS
96982002-02-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
9699
9700 * archures.c (bfd_mach_s390_esa): Rename to bfd_mach_s390_31.
9701 (bfd_mach_s390_esame): Rename to bfd_mach_s390_64.
9702 * bfd-in2.h: Regenerate.
9703 * cpu-s390.c (arch_info_struct): Use renamed architecture defines.
9704 Replace architecture name "s390" with "s390:31-bit" and "s390:esame"
9705 with "s390:64-bit".
9706 * elf32-s390.c (elf_howto_table): Add 32 bit pc relative relocations.
9707 (elf_s390_reloc_type_lookup): Likewise.
9708 (elf_s390_check_relocs): Likewise.
9709 (elf_s390_gc_sweep_hook): Likewise.
9710 (elf_s390_relocate_section): Likewise.
9711 (elf_s390_object_p): Use renamed architecture define.
9712 * elf64-s390.c (elf_s390_object_p): Use renamed architecture define.
9713
6eeeec9b
FCE
97142002-02-19 Frank Ch. Eigler <fche@redhat.com>
9715
9716 * syms.c (stt[]): Sorted. Added .init/.fini -> "t" mapping.
9717
0bb2d96a
JJ
97182002-02-19 Jakub Jelinek <jakub@redhat.com>
9719
9720 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Enable
9721 absptr -> pcrel optimization for shared libs.
9722 Only create minimal .eh_frame_hdr if absptr FDE encoding in shared
9723 library cannot be converted to pcrel.
9724 (_bfd_elf_eh_frame_section_offset): Return -2 if making absptr
9725 relative.
9726 * elf32-i386.c (elf_i386_relocate_section): If
9727 _bfd_elf_section_offset returned -2, skip, but make sure the
9728 relocation is installed.
9729 * elf32-arm.h (elf32_arm_final_link_relocate): Likewise.
9730 * elf32-cris.c (cris_elf_relocate_section): Likewise.
9731 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
9732 * elf32-i370.c (i370_elf_relocate_section): Likewise.
9733 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
9734 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
9735 * elf32-s390.c (elf_s390_relocate_section): Likewise.
9736 * elf32-sh.c (sh_elf_relocate_section): Likewise.
9737 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
9738 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
9739 * elf64-s390.c (elf_s390_relocate_section): Likewise.
9740 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
9b5ecbd0 9741 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
0bb2d96a
JJ
9742 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
9743 * elf64-alpha.c (elf64_alpha_relocate_section): Handle
9744 _bfd_elf_section_offset returning -2 the same way as -1.
9745 * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
9746 * elf32-mips.c (mips_elf_create_dynamic_relocation): Add FIXME
9747 and BFD_ASSERT.
9748 * elf64-mips.c (mips_elf64_create_dynamic_relocation): Likewise.
9749
69f284c7
TR
97502002-02-18 Tom Rix <trix@redhat.com>
9751
9752 * xcofflink.c (bfd_xcoff_link_gernate_rtinit): Add -brtl support.
9753 (bfd_xcoff_size_dynamic_sections): Same.
9754 * bfd-in.h (bfd_xcoff_link_generate_rtinit): Same.
9755 (bfd_xcoff_size_dynamic_sections): Same.
9756 * coff-rs6000.c (xcoff_generate_rtinit): Same.
9757 * coff-rs646000.c (xcoff64_generate_rtinit): Same.
9758 * libxcoff.h (struct xcoff_backend_data_rec): Same.
9759 * xcofflink.c (xcoff_build_ldsyms, xcoff_link_add_symbols): Clean.
9760 * bfd-in2.h: Regenerate.
9761
82bd7b59
AM
97622002-02-18 Alan Modra <amodra@bigpond.net.au>
9763
9764 * elf64-ppc.c (STFD_FR0_0R1, LFD_FR0_0R1, BLR): Define.
9765 (struct ppc_link_hash_table): Add sfpr.
9766 (ppc64_elf_link_hash_table_create): Init it.
9767 (ppc64_elf_create_dynamic_sections): Split creation of .stub and
9768 .glink out to..
9769 (create_linkage_sections): ..here. Make .sfpr too.
9770 (ppc64_elf_check_relocs): Call create_linkage_sections, and set
9771 dynobj early.
9772 (MIN_SAVE_FPR, MAX_SAVE_FPR): Define.
9773 (ppc64_elf_func_desc_adjust): Look for missing ._savef* and
9774 ._restf* functions, and create as needed.
9775 (func_desc_adjust): Only force_local for shared libs.
9776
ef1355e8
NC
97772002-02-18 David O'Brien <obrien@FreeBSD.org>
9778
9779 * configure.in: Bump version number post 2.12 branching.
9780 * configure: Regenerate.
9781
dfa36a69
HPN
97822002-02-17 Hans-Peter Nilsson <hp@bitrange.com>
9783
9784 * mmo.c: Correct and improve comments.
9785 (mmo_write_chunk): Store trailing byte in bfd buffer; don't
9786 zero-pad. Use input to fill up non-empty bfd buffer.
9787 (mmo_flush_chunk): New function.
9788 (mmo_write_loc_chunk): Add parameter last_vmap, all callers
9789 changed. Don't emit location specifier if VMA is same as
9790 *LAST_VMAP after omitting leading zero contents. Call
9791 mmo_flush_chunk before emitting location specifier.
9792 (mmo_write_loc_chunk_list): Call mmo_flush_chunk when finished
9793 with mmo_write_loc_chunk calls.
9794 (mmo_internal_write_section): Call mmo_flush_chunk after
9795 mmo_write_chunk.
9796 (mmo_write_symbols_and_terminator): Move :Main to first position
9797 in symbol array. Add faked one if it does not exist if there are
9798 other symbols. Don't add it if there are no symbols at all. Move
9799 out test for value of :Main from symbol loop. Rename table
9800 fakemain to maintable and variable mainsym to fakemain.
9801
ccf00ab6
RH
98022002-02-15 Richard Henderson <rth@redhat.com>
9803
9804 * elf64-alpha.c (elf64_alpha_relocate_section) [BRSGP]: A target
9805 section with no got matches any got. Simplify error generaion.
9806
88eaccc2
AM
98072002-02-15 Alan Modra <amodra@bigpond.net.au>
9808
fd96f80f
AM
9809 Support arbitrary length fill patterns.
9810 * linker.c (bfd_new_link_order): Zero all fields with bfd_zalloc.
9811 (_bfd_default_link_order): Remove bfd_fill_link_order code.
9812 Call default_data_link_order.
9813 (default_fill_link_order): Delete.
9814 (default_data_link_order): New function.
9815 * elf32-mips.c (_bfd_mips_elf_final_link): Replace occurrences
9816 of bfd_fill_link_order with bfd_data_link_order.
9817 * elf64-alpha.c (elf64_alpha_final_link): Likewise.
9818 * elf64-mips.c (mips_elf64_final_link): Likewise.
9819
88eaccc2
AM
9820 * bfd.c (bfd_scan_vma): Clamp overflows to max bfd_vma value.
9821 Correct value returned in "end" for "0x<non-hex>".
9822
e2fd756b
NC
98232002-02-14 Nick Clifton <nickc@cambridge.redhat.com>
9824
9825 * cpu-arm.c (processors): Replace 'arch' field with 'mach'.
9826 (scan): Test against 'mach' field in info structure.
9827
edd29cf9
AM
98282002-02-14 Alan Modra <amodra@bigpond.net.au>
9829
9830 * elf.c (elf_fake_sections): Use SHT_NOBITS when SEC_NEVER_LOAD.
9831
1e30956e 98322002-02-14 Matt Fredette <fredette@netbsd.org>
76f57f3a
JT
9833
9834 * elf32-m68k.c (elf32_m68k_print_private_bfd_data): Recognize
9835 EF_M68000.
9836
bf36db18
NC
98372002-02-13 Nick Clifton <nickc@cambridge.redhat.com>
9838
9839 * elf.c (_bfd_elf_make_section_from_shdr): Do not insist on
edd29cf9
AM
9840 non-zero physical addresses when adjusting the LMAs of new
9841 sections.
bf36db18 9842
189c6563
AM
98432002-02-12 John David Anglin <dave@hiauly1.hia.nrc.ca>
9844
9845 * elf-hppa.h (elf_hppa_reloc_final_type): New function stripped
9846 from _bfd_elf_hppa_gen_reloc_type.
9847 (_bfd_elf_hppa_gen_reloc_type): Remove duplicate prototype.
9848 * elf32-hppa.h (elf32_hppa_reloc_final_type): Add protptype.
9849 * elf32-hppa.c: Include elf32-hppa.h before elf-hppa.h.
9850 * elf64-hppa.h (elf64_hppa_reloc_final_type): Add protptype.
9851
e948afaf
AO
98522002-02-12 Alexandre Oliva <aoliva@redhat.com>
9853
9854 * elf-m10300.c (mn10300_elf_relax_section): Skip section before
9855 loading its contents if there's nothing to do in it.
9856
19397422
AM
98572002-02-12 Alan Modra <amodra@bigpond.net.au>
9858
0ad3a73b
AM
9859 * elf64-ppc.c (ppc64_elf_size_stubs): Correct test for crossing
9860 64k boundary.
9861
19397422
AM
9862 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Add dynamic
9863 DT_PPC64_OPD and DT_PPC64_OPDSZ tags.
9864 (ppc64_elf_finish_dynamic_sections): Set values for them.
9865
51316059
MS
98662002-02-11 Michael Snyder <msnyder@redhat.com>
9867
9868 * elf-bfd.h (elfcore_write_lwpstatus): Add prototype.
9869 * elf.c (elfcore_grok_pstatus): Add prototype.
9870 (elfcore_grok_lwpstatus): Add prototype.
9871 (elfcore_write_lwpstatus): New function.
9872 (elfcore_write_pstatus): Fix typo, eliminate unnecessary memcpy.
9873
518313c3
AO
98742002-02-11 Alexandre Oliva <aoliva@redhat.com>
9875
9876 * elf32-sh.c: Added missing prototypes.
9877 * elf32-sh64.c: Likewise.
9878 (sh_elf_align_loads): Mark unused args as such.
9879 * elf64-sh64.c: Added missing prototypes.
9880 (struct elf_sh64_link_hash_entry): Fix typo.
9881 (sh_elf64_relocate_section): Fix info argument passed to
9882 _bfd_elf_section_offset.
9883
2c73f9d8
AM
98842002-02-11 Alan Modra <amodra@bigpond.net.au>
9885
9886 * Makefile.am: "make dep-am".
9887 * Makefile.in: Regenerate.
9888 * aclocal.m4: Regenerate.
9889 * config.in: Regenerate.
9890 * configure: Regenerate.
9891
d426c6b0
DJ
98922002-02-10 Daniel Jacobowitz <drow@mvista.com>
9893
9894 * coff-rs6000.c (xcoff_generate_rtinit): Silence uninitialized
9895 variable warnings.
9896 * elf32-sh.c (sh_elf_relax_section): Silence signed/unsigned
9897 comparison warning.
9898 * trad-core.c (trad_unix_core_file_p): Silence pointer/integer
9899 cast warnings for the common case.
9900
e58ee0cd
HPN
99012002-02-10 Hans-Peter Nilsson <hp@bitrange.com>
9902
9903 * config.bfd (sh-*-linux*, sh-*-elf* | sh-*-rtemself*): Add sh64
9904 vectors.
9905 (sh-*-netbsdelf*): New, to trump sh*-*-netbsdelf* and add sh64
9906 vectors.
9907
7793f4d0
RH
99082002-02-09 Richard Henderson <rth@redhat.com>
9909
9910 * elf64-alpha.c (elf64_alpha_howto): Add R_ALPHA_BRSGP.
9911 (elf64_alpha_reloc_map, elf64_alpha_check_relocs): Likewise.
9912 (elf64_alpha_relocate_section): Likewise.
9913 * reloc.c (BFD_RELOC_ALPHA_BRSGP): New.
9914 * bfd-in2.h, libbfd.h: Rebuild.
9915
7e799044
HPN
99162002-02-09 Hans-Peter Nilsson <hp@bitrange.com>
9917
9918 * elf64-mmix.c (_bfd_mmix_finalize_linker_allocated_gregs): Check
9919 that base-plus-offset reloc accounting is consistent.
9920 (mmix_elf_relax_section): Keep base-plus-offset reloc accounting
9921 up to date for undefined symbols.
9922
027d73eb
EC
99232002-02-08 Eric Christopher <echristo@redhat.com>
9924
9925 From Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
9926
9927 * elf32-mips.c (_bfd_mips_elf_fake_sections): Don't create .rela
9928 sections for the O32 ABI.
9929
517662d4
CD
99302002-02-08 Chris Demetriou <cgd@broadcom.com>
9931
9932 * elf32-arm.h: Fix formatting of _("...").
9933 * elf32-d10v.c: Likewise.
9934 * elf32-m68k.c: Likewise.
9935 * elf32-mips.c: Likewise.
9936
5e37cc46
NC
99372002-02-08 Ivan Guzvinec <ivang@opencores.org>
9938
9939 * coff-or32.c: Fix compile time warning messages.
9940
fbca6ad9
AO
99412002-02-08 Alexandre Oliva <aoliva@redhat.com>
9942
9943 Contribute sh64-elf.
9944 2002-01-23 Alexandre Oliva <aoliva@redhat.com>
9945 * reloc.c (R_SH_GOTPLT32, R_SH_GOT_LOW16, R_SH_GOT_MEDLOW16,
9946 R_SH_GOT_MEDHI16, R_SH_GOT_HI16, R_SH_GOTPLT_LOW16,
9947 R_SH_GOTPLT_MEDLOW16, R_SH_GOTPLT_MEDHI16, R_SH_GOTPLT_HI16,
9948 R_SH_PLT_LOW16, R_SH_PLT_MEDLOW16, R_SH_PLT_MEDHI16,
9949 R_SH_PLT_HI16, R_SH_GOTOFF_LOW16, R_SH_GOTOFF_MEDLOW16,
9950 R_SH_GOTOFF_MEDHI16, R_SH_GOTOFF_HI16, R_SH_GOTPC_LOW16,
9951 R_SH_GOTPC_MEDLOW16, R_SH_GOTPC_MEDHI16, R_SH_GOTPC_HI16,
9952 R_SH_GOT10BY4, R_SH_GOTPLT10BY4, R_SH_GOT10BY8, R_SH_GOTPLT10BY8,
9953 R_SH_COPY64, R_SH_GLOB_DAT64, R_SH_JMP_SLOT64, R_SH_RELATIVE64):
9954 New relocs.
9955 * libbfd.h, bfd-in2.h: Rebuilt.
9956 * elf32-sh.c (sh_elf_howto_table): Define new relocs.
9957 (sh_reloc_map): Map them.
9958 (PLT_ENTRY_SIZE, elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
9959 elf_sh_plt_entry_be, elf_sh_plt_entry_le, elf_sh_pic_plt_entry_be,
9960 elf_sh_pic_plt_entry_le, elf_sh_plt0_entry, elf_sh_plt_entry,
9961 elf_sh_pic_plt_entry, elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
9962 elf_sh_plt0_gotplt_offset, elf_sh_plt_temp_offset,
9963 elf_sh_plt_symbol_offset, elf_sh_plt_reloc_offset,
9964 movi_shori_putval) [INCLUDE_SHMEDIA]: New.
9965 (elf_sh_link_hash_entry) [INCLUDE_SHMEDIA]: Add
9966 datalabel_got_offset.
9967 (sh_elf_link_hash_newfunc): Initialize it.
9968 (sh_elf_relocate_section): Augment the scope of
9b5ecbd0 9969 seen_stt_datalabel. Introduce GOTPLT support. Extend GOTPC, PLT,
fbca6ad9
AO
9970 GOT and GOTOFF handling to new SHmedia relocation types. Support
9971 GOT_BIAS.
9972 (sh_elf_check_relocs): Likewise.
9973 (sh_elf_finish_dynamic_symbol) [TARGET_SHMEDIA]: Set up values in
9974 PLT entries using movi_shori_putval. Support GOT_BIAS.
9975 (sh_elf_finish_dynamic_sections): Likewise.
9976 * elf32-sh64.c (shmedia_prepare_reloc): Do not add addend to
9977 relocation, it's now done by the caller.
9978 (GOT_BIAS): New.
9979 * elf64-sh64.c (GOT_BIAS, PLT_ENTRY_SIZE, elf_sh64_sizeof_plt,
9980 elf_sh64_plt_plt0_offset, elf_sh64_plt0_gotplt_offset,
9981 elf_sh64_plt_temp_offset, elf_sh64_plt_symbol_offset,
9982 elf_sh64_plt_reloc_offset, ELF_DYNAMIC_INTERPRETER,
9983 elf_sh64_pcrel_relocs_copied, elf_sh64_link_hash_entry,
9984 elf_sh64_link_hash_table, sh64_elf64_link_hash_traverse,
9985 sh64_elf64_hash_table): New.
9986 (sh_elf64_howto_table): Introduce new relocs.
9987 (sh_elf64_info_to_howto): Accept new PIC relocs.
9988 (sh_elf64_relocate_section): Augment the scope of
9989 seen_stt_datalabel. Support new PIC relocs.
9990 (sh_elf64_check_relocs): Support new PIC relocs.
9991 (elf_sh64_plt0_entry_be, elf_sh64_plt0_entry_le,
9992 elf_sh64_plt_entry_be, elf_sh64_plt_entry_le,
9993 elf_sh64_pic_plt_entry_be, elf_sh64_pic_plt_entry_le,
9994 elf_sh64_plt0_entry, elf_sh64_plt_entry, elf_sh64_pic_plt_entry,
9995 sh64_elf64_link_hash_newfunc, sh64_elf64_link_hash_table_create,
9996 movi_shori_putval, movi_3shori_putval,
9997 sh64_elf64_create_dynamic_sections,
9998 sh64_elf64_adjust_dynamic_symbol, sh64_elf64_discard_copies,
9999 sh64_elf64_size_dynamic_sections,
10000 sh64_elf64_finish_dynamic_symbol,
10001 sh64_elf64_finish_dynamic_sections): New.
10002 (elf_backend_create_dynamic-sections,
10003 bfd_elf64_bfd_link_hash_table_create,
10004 elf_backend_adjust_dynamic_symbol,
10005 elf_backend_size_dynamic_sections,
10006 elf_backend_finish_dynamic_symbol,
10007 elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
10008 elf_backend_plt_readonly, elf_backend_want_plt_sym,
10009 elf_backend_got_header_size, elf_backend_plt_header_size):
10010 Define.
10011 2001-05-16 Alexandre Oliva <aoliva@redhat.com>
10012 * elf32-sh.c: Renumbered and renamed some SH5 relocations to
10013 match official numbers and names; moved unmaching ones to the
10014 range 0xf2-0xff.
10015 * elf32-sh64.c, elf64-sh64.c: Likewise.
9b5ecbd0 10016 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
10017 * elf32-sh.c (sh_elf_relax_section): Don't relax SHmedia
10018 sections.
9b5ecbd0 10019 2001-03-12 DJ Delorie <dj@redhat.com>
fbca6ad9
AO
10020 * elf32-sh64.c (shmedia_prepare_reloc): Validate relocs that must
10021 be aligned.
10022 * elf64-sh64.c (sh_elf64_relocate_section): Ditto.
9b5ecbd0 10023 2001-01-14 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10024 * elf32-sh64.c (bfd_elf32_bfd_copy_private_section_data): Define.
10025 (sh64_elf_fake_sections): Set type to SHT_SH5_CR_SORTED for a
10026 .cranges section with SEC_SORT_ENTRIES set.
10027 (sh64_backend_section_from_shdr): Set SEC_SORT_ENTRIES on an
10028 incoming sorted .cranges section.
10029 (sh64_bfd_elf_copy_private_section_data): New.
10030 (sh64_elf_final_write_processing): Only sort .cranges and modify
10031 start address if called by linker.
10032 2001-01-08 Ben Elliston <bje@redhat.com>
10033 * elf32-sh64.c (sh64_elf_final_write_processing): Activate
9b5ecbd0 10034 Hans-Peter Nilsson's set bit 0 patch from 2001-01-06.
fbca6ad9 10035 * elf64-sh64.c (sh64_elf64_final_write_processing): Ditto.
9b5ecbd0 10036 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10037 * elf64-sh64.c (sh_elf64_howto_table): No open brace at start of
10038 line. Add comments before all entries.
10039 <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct and clarify describing
10040 comment.
10041 (sh_elf64_reloc): Correct head comment.
10042 (sh_elf64_relocate_section): Correct spacing.
10043 <relocating for a local symbol>: Do not honour STO_SH5_ISA32;
10044 instead call reloc_dangerous callback.
10045 <case R_SH_SHMEDIA_CODE>: New case.
10046 (sh_elf64_gc_mark_hook): Correct spacing.
10047 (sh_elf64_check_relocs): Ditto.
10048 * elf32-sh64.c (shmedia_prepare_reloc) <case R_SH_SHMEDIA_CODE>:
10049 New case.
10050 * elf32-sh.c: Correct #endif comments for #ifndef-wrapped
10051 functions.
10052 (sh_elf_howto_table) <R_SH_PT_16, R_SH_SHMEDIA_CODE>: Correct,
10053 clarify describing comment. Add comments before all entries.
10054 (sh_elf_relocate_section) <relocating for a local symbol>: Do not
10055 honour STO_SH5_ISA32; instead call reloc_dangerous callback.
9b5ecbd0 10056 2001-01-06 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10057 Sort .cranges section in final link. Prepare to set bit 0 on
10058 entry address.
10059 * elf32-sh64.c (struct sh64_find_section_vma_data): New.
10060 (sh64_elf_link_output_symbol_hook): Fix typo in prototype.
10061 (sh64_elf_set_mach_from_flags): Set SEC_DEBUGGING on incoming
10062 .cranges section.
10063 (sh64_backend_section_from_shdr): New, to recognize
10064 SHT_SH5_CR_SORTED on incoming .cranges section.
10065 (elf_backend_section_from_shdr): Define.
10066 (sh64_elf_final_write_processing): Sort outgoing .cranges
10067 section. (New, temporarily disabled:) Set bit 0 on entry address
10068 according to ISA type.
10069 (sh64_find_section_for_address): New.
10070 (crange_qsort_cmpb, crange_qsort_cmpl, crange_bsearch_cmpb,
10071 crange_bsearch_cmpl): Move here from opcodes/sh64-dis.c.
10072 (sh64_address_in_cranges): Move here from opcodes/sh64-dis.c. Use
10073 bfd_malloc, not xmalloc.
10074 (sh64_get_contents_type): Move here from opcodes/sh64-dis.c. Make
10075 global.
10076 * elf32-sh64.c (sh64_elf64_final_write_processing): New, (but
10077 temporarily disabled) setting bit 0 on entry address.
10078 (elf_backend_final_write_processing): Define.
9b5ecbd0 10079 2001-01-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10080 * elf32-sh.c (sh_elf_howto_table) <R_SH_PT_16>: Adjust fields to
10081 be a proper relocation for PTA and PTB rather than a marker.
10082 <R_SH_IMMU5, R_SH_IMMS6, R_SH_IMMU6, R_SH_IMMS10, R_SH_IMMS10BY2,
10083 R_SH_IMMS10BY4, R_SH_IMMS10BY8, R_SH_IMMS16, R_SH_IMMU16,
10084 R_SH_IMM_LOW16, R_SH_IMM_LOW16_PCREL, R_SH_IMM_MEDLOW16,
10085 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16, R_SH_IMM_MEDHI16_PCREL,
10086 R_SH_IMM_HI16, R_SH_IMM_HI16_PCREL, R_SH_64, R_SH_64_PCREL>:
10087 Zero src_mask.
10088 * elf64-sh64.c: Ditto.
10089 (sh_elf64_relocate_section) <case R_SH_PT_16>: New case.
10090 * elf32-sh64.c: Include opcodes/sh64-opc.h
10091 (shmedia_prepare_reloc): Take a bfd_link_info pointer as first
10092 argument. Drop const qualifiers from "bfd *" and "bfd_byte *"
10093 parameters. No unused parameters. Caller changed.
10094 <case R_SH_PT_16>: New case.
10095 * Makefile.am (elf32-sh64.lo): Add dependency on sh64-opc.h.
10096 * Makefile.in: Regenerate.
9b5ecbd0 10097 2000-12-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10098 * elf64-sh64.c (sh64_elf64_fake_sections): Set SHF_SH5_ISA32 for
10099 all code sections.
10100 (sh_elf64_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10101 (sh64_elf_merge_private_data): Ditto.
10102 * elf32-sh64.c (sh64_elf_fake_sections): Use sh64_elf_section_data
10103 to access stored section flags.
10104 (sh64_elf_final_write_processing): Return immediately unless
10105 called by linker. Use sh64_elf_section_data (cranges) to get size
10106 of linker-generated cranges entries.
10107 (sh64_elf_copy_private_data): Add missing "return true".
10108 (sh64_elf_set_mach_from_flags): Change from EF_SH64 to EF_SH5.
10109 (sh_elf64_merge_private_data): Ditto.
9b5ecbd0 10110 2000-12-19 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10111 * elf64-sh64.c (sh64_elf64_fake_sections): New, copy of
10112 elf64-sh64.c:sh64_elf_fake_sections.
10113 (elf_backend_fake_sections): Define as sh64_elf64_fake_sections.
9b5ecbd0 10114 2000-12-18 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10115 * elf32-sh64.c (sh64_elf_copy_private_data_internal): Delete.
10116 (sh64_elf_final_write_processing): New.
10117 (elf_backend_final_write_processing): Define.
10118 (sh64_elf_fake_sections): Get header flags from tdata field.
10119 (sh64_elf_copy_private_data): Do not call
10120 sh64_elf_copy_private_data_internal, just copy e_flags field.
10121 (sh64_elf_merge_private_data): Do not call
10122 sh64_elf_copy_private_data_internal.
9b5ecbd0 10123 2000-12-12 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10124 Remove EF_SH64_ABI64, let ELF size make difference.
10125 Remove SH64-specific BFD section flag.
10126 * elf32-sh64.c (sh64_elf_fake_sections): Recognize section as
10127 containing SHmedia through elf_section_data (asect)->tdata
10128 non-zero, not using a BFD section flag.
10129 (sh64_elf_set_mach_from_flags): Don't recognize EF_SH64_ABI64.
10130 (sh64_elf_merge_private_data): Similar.
10131 (elf_backend_section_flags): Don't define.
10132 (sh64_elf_backend_section_flags): Delete.
10133 * elf64-sh64.c (sh_elf64_set_mach_from_flags): Recognize EF_SH64,
10134 not EF_SH64_ABI64.
10135 (sh_elf64_merge_private_data): Similar.
10136 * section.c (Section flags definitions): Don't define
10137 SEC_SH_ISA_SHMEDIA.
10138 (bfd-in2.h): Regenerate.
9b5ecbd0 10139 2000-12-09 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10140 Make DataLabel references work with partial linking.
10141 * elf32-sh64.c: Fix formatting.
10142 (sh64_elf_link_output_symbol_hook): New.
10143 (elf_backend_link_output_symbol_hook): Define to
10144 sh64_elf_link_output_symbol_hook.
10145 (sh64_elf_add_symbol_hook): Make DataLabel symbol just global
10146 undefined if partial linking. Adjust sanity check.
10147 * elf64-sh64.c (sh64_elf64_link_output_symbol_hook): New.
10148 (elf_backend_link_output_symbol_hook): Define to
10149 sh64_elf64_link_output_symbol_hook.
10150 (sh64_elf64_add_symbol_hook): Make DataLabel symbol just global
10151 undefined if partial linking. Adjust sanity check.
9b5ecbd0 10152 2000-12-07 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10153 Implement semantics for inter-file DataLabel references.
10154 * elf64-sh64.c (DATALABEL_SUFFIX): Define.
10155 (sh64_elf64_add_symbol_hook): New.
10156 (sh_elf64_relocate_section): If passing an indirect symbol with
10157 st_type STT_DATALABEL on the way to a symbol with st_other
10158 STO_SH5_ISA32, do not bitor 1 to the relocation.
10159 (elf_backend_add_symbol_hook): Define to
10160 sh64_elf64_add_symbol_hook.
10161 * elf64-sh32.c: Tweak comments.
10162 (DATALABEL_SUFFIX): Define.
10163 (sh64_elf_add_symbol_hook): New.
10164 (elf_backend_add_symbol_hook): Define to sh64_elf_add_symbol_hook.
10165 * elf32-sh.c (sh_elf_relocate_section): If passing an indirect
10166 symbol with st_type STT_DATALABEL on the way to a symbol with
10167 st_other STO_SH5_ISA32, do not bitor 1 to the relocation.
9b5ecbd0 10168 2000-12-05 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10169 Pass through STT_DATALABEL.
10170 * elf32-sh64.c (sh64_elf_get_symbol_type): New.
10171 (elf_backend_get_symbol_type): Define.
10172 * elf64-sh64.c (sh64_elf64_get_symbol_type): New.
10173 (elf_backend_get_symbol_type): Define.
9b5ecbd0 10174 2000-11-30 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10175 * elf32-sh64.c: Tweak comments.
10176 (sh64_elf_copy_private_data_internal): Add prototype.
10177 (bfd_elf32_bfd_set_private_flags): Define.
10178 (sh64_elf_copy_private_data_internal): Compare machine name, not
10179 textual BFD target name, to check whether to copy section flag
10180 SHF_SH5_ISA32.
10181 (sh64_elf_merge_private_data): Validize bfd_get_arch_size.
10182 Tweak section-contents-type-mismatch message.
10183 (shmedia_prepare_reloc): Add ATTRIBUTE_UNUSED markers.
10184 Validize reloc-types.
10185 * elf64-sh64.c: New file.
10186 * targets.c (bfd_elf64_sh64_vec, bfd_elf64_sh64l_vec): Declare.
10187 * Makefile.am (BFD64_BACKENDS): Add elf64-sh64.lo.
10188 (BFD64_BACKENDS_CFILES): Add elf64-sh64.c.
10189 Regenerate dependencies.
10190 * Makefile.in: Regenerate.
10191 * config.bfd (sh64-*-elf*): Add bfd_elf64_sh64_vec and
10192 bfd_elf64_sh64l_vec.
10193 * configure.in: Handle bfd_elf64_sh64_vec and
10194 bfd_elf64_sh64l_vec.
10195 * configure: Regenerate.
10196 * po/POTFILES.in: Regenerate.
10197 * po/bfd.pot: Regenerate.
9b5ecbd0 10198 2000-11-29 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10199 * elf32-sh64.c (sh64_elf_set_mach_from_flags): Do not recognize
10200 anything else but EF_SH64 and EF_SH64_ABI64.
10201 (sh64_elf_merge_private_data): Emit error for anything else but
10202 EF_SH64 and EF_SH64_ABI64.
10203 * config.bfd: Remove bfd_elf32_shblin_vec and bfd_elf32_shlin_vec
10204 from targ_selvecs.
10205 * configure.in: Add cofflink.lo to bfd_elf32_sh64_vec and
10206 bfd_elf32_sh64l_vec as a temporary measure.
10207 * configure: Regenerate.
9b5ecbd0 10208 2000-11-27 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10209 * cpu-sh.c (arch_info_struct): Include sh5 item
10210 unconditionalized.
10211 * config.bfd (sh64-*-elf*): Do not set targ_cflags.
10212 Add targ_selvecs bfd_elf32_sh_vec, bfd_elf32_shl_vec,
10213 bfd_elf32_shblin_vec and bfd_elf32_shlin_vec.
10214 * elf32-sh64.c: Tweak comments.
10215 (sh64_elf_set_mach_from_flags): Recognize all machine flags that
10216 are proper subsets of SH64 as bfd_mach_sh5. Add EF_SH64_ABI64.
10217 (sh64_elf_copy_private_data_internal): Wrap long line.
10218 (sh64_elf_merge_private_data): Rewrite to allow objects from
10219 SH64 subsets to be linked together.
10220 (INCLUDE_SHMEDIA): Define.
10221 * elf32-sh.c (sh_elf_relocate_section) <local symbol>:
10222 Parenthesize plus-expression inside or-expression.
10223 <global symbol>: Ditto.
10224 (sh_elf_set_mach_from_flags): Remove code refusing
10225 deleted EF_SH64_32BIT_ABI flag.
9b5ecbd0 10226 2000-11-26 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10227 * elf32-sh.c (sh_elf_howto_table) <R_SH_IMM_LOW16_PCREL,
10228 R_SH_IMM_MEDLOW16_PCREL, R_SH_IMM_MEDHI16_PCREL,
10229 R_SH_IMM_HI16_PCREL, R_SH_64_PCREL>: Set pcrel_offset to true.
10230 (sh_elf_relocate_section) <local symbol>: Or 1 in
10231 calculation of relocation if sym->st_other & STO_SH5_ISA32.
10232 <global symbol>: Ditto if h->other & STO_SH5_ISA32.
10233 * elf32-sh64.c (shmedia_prepare_reloc): Add rel->r_addend to
10234 relocation.
9b5ecbd0 10235 2000-11-24 Hans-Peter Nilsson <hpn@cygnus.com>
fbca6ad9
AO
10236 * Makefile.am (BFD32_BACKENDS): Add elf32-sh64.lo.
10237 (BFD32_BACKENDS_CFILES): Add elf32-sh64.c.
10238 Regenerate dependencies.
10239 * Makefile.in: Regenerate.
10240 * archures.c: Add bfd_mach_sh5.
10241 * config.bfd: Map targ_cpu sh* to bfd_sh_arch.
10242 Handle sh64-*-elf*. Set targ_cflags to -DINCLUDE_SHMEDIA.
10243 * configure.in: Handle bfd_elf32_sh64_vec and bfd_elf32_sh64l_vec.
10244 * configure: Regenerate.
10245 * reloc.c (BFD_RELOC_SH_SHMEDIA_CODE, BFD_RELOC_SH_IMMU5,
10246 BFD_RELOC_SH_IMMS6, BFD_RELOC_SH_IMMS6BY32, BFD_RELOC_SH_IMMU6,
10247 BFD_RELOC_SH_IMMS10, BFD_RELOC_SH_IMMS10BY2,
10248 BFD_RELOC_SH_IMMS10BY4, BFD_RELOC_SH_IMMS10BY8,
10249 BFD_RELOC_SH_IMMS16, BFD_RELOC_SH_IMMU16, BFD_RELOC_SH_IMM_LOW16,
10250 BFD_RELOC_SH_IMM_LOW16_PCREL, BFD_RELOC_SH_IMM_MEDLOW16,
10251 BFD_RELOC_SH_IMM_MEDLOW16_PCREL, BFD_RELOC_SH_IMM_MEDHI16,
10252 BFD_RELOC_SH_IMM_MEDHI16_PCREL, BFD_RELOC_SH_IMM_HI16,
10253 BFD_RELOC_SH_IMM_HI16_PCREL, BFD_RELOC_SH_PT_16): New relocations.
10254 * cpu-sh.c [INCLUDE_SHMEDIA] (arch_info_struct): Define and link
10255 in item for SH5.
10256 * elf32-sh.c [INCLUDE_SHMEDIA] (sh_elf_howto_table): Add howto items
10257 for SHmedia relocs.
10258 [INCLUDE_SHMEDIA] (sh_rel): Add mappings for SHmedia relocs.
10259 [INCLUDE_SHMEDIA] (sh_elf_relocate_section) [default]: Call
10260 shmedia_prepare_reloc, goto final_link_relocate if it returns
10261 non-zero, else fail as before.
10262 (sh_elf_set_mach_from_flags): Provide function only if not defined
10263 as macro. Do not recognize objects with EF_SH64_32BIT_ABI set.
10264 (sh_elf_set_private_flags): Provide function only if not defined
10265 as a macro.
10266 (sh_elf_copy_private_data): Similar.
10267 (sh_elf_merge_private_data): Similar.
10268 * section.c (SEC_SH_ISA_SHMEDIA): New.
10269 * targets.c (bfd_elf32_sh64_vec, bfd_elf32_sh64l_vec): Declare.
10270 * elf32-sh64.c: New file.
10271 * libbfd.h: Regenerate.
10272 * bfd-in2.h: Regenerate.
10273 * po/POTFILES.in: Regenerate.
10274 * po/bfd.pot: Regenerate.
10275 * bfd-in2.h: Regenerate.
10276 * libbfd.h: Regenerate.
10277
e108f470
DJ
102782002-02-07 Daniel Jacobowitz <drow@mvista.com>
10279
10280 * bfd-in.h: Update <stdbool.h> check to only see if <stdbool.h> has
10281 been included, not drag it in.
10282 * bfd-in2.h: Regenerate.
10283
259d18a3
L
102842002-02-06 H.J. Lu (hjl@gnu.org)
10285
10286 * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Update
10287 the mach and ISA fields if necessary.
10288
f13b834e
NC
102892002-02-06 Nick Clifton <nickc@cambridge.redhat.com>
10290
10291 * coffcode.h (coff_set_arch_mach_hook): Select the highest known
10292 ARM architecture when an F_ARM_5 flag is detected, since we cannot
10293 be sure exactly which architecture this represents.
10294
82f6addb
NC
102952002-02-05 Nick Clifton <nickc@redhat.com>
10296
10297 * po/tr.po: Updated translation.
10298
899f54f5
AM
102992002-02-05 Alan Modra <amodra@bigpond.net.au>
10300
10301 From Jimi X <jimix@watson.ibm.com>
10302 * archures (bfd_mach_ppc64): Define.
10303 (bfd_powerpc_arch): Rename to bfd_powerpc_archs.
10304 (bfd_powerpc_arch): Define.
10305 * bfd-in2.h: Regenerate.
10306 * cpu-powerpc.c (arch_info_struct): Rename to bfd_powerpc_archs.
10307 (bfd_powerpc_arch): Move to tail of bfd_powerpc_archs.
10308 (bfd_powerpc_archs): Add default powerpc64 arch.
10309
248866a8
AM
103102002-02-05 Alan Modra <amodra@bigpond.net.au>
10311
10312 * elf64-ppc.c (ppc64_elf_size_dynamic_sections): Check for relocs
10313 against section syms in readonly sections. Don't do the global
10314 sym check if we find one.
10315 * elf64-s390.c (elf_s390_size_dynamic_sections): Likewise.
10316 * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Likewise.
0a6958db 10317 * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
248866a8
AM
10318 * elf32-s390.c (elf_s390_size_dynamic_sections): Likewise.
10319 (elf_s390_grok_prstatus): Add missing prototype.
10320
4fa5c2a8
HPN
103212002-02-04 Hans-Peter Nilsson <hp@bitrange.com>
10322
10323 * elf64-mmix.c (mmix_dump_bpo_gregs): New function.
10324 (mmix_elf_check_common_relocs) <case R_MMIX_BASE_PLUS_OFFSET>:
10325 Call bfd_get_section_by_name only once. Initialize
10326 bpodata->n_bpo_relocs_this_section.
10327 (_bfd_mmix_prepare_linker_allocated_gregs): Remove comment
10328 referring to DSOs.
10329 (bpo_reloc_request_sort_fn): Don't use difference of values as
10330 return-value.
10331
537c972e
DB
103322002-02-02 David O'Brien <obrien@FreeBSD>
10333
10334 * configure.in: Tweak the FreeBSD 4.x recognition more. Only treat
10335 version 4.5 and later the same as 5-CURRENT.
10336 * configure: Re-generate.
10337
006336b8
JT
103382002-02-02 Jason Thorpe <thorpej@wasabisystems.com>
10339
10340 * config.bfd (hppa*-*-netbsd*): New target.
10341
6c571f00
PT
103422002-01-31 Philipp Thomas <pthomas@suse.de>
10343
19397422
AM
10344 * coff-arm.c (coff_arm_merge_private_bfd_data): Move ERROR
10345 to front of message. Unify messages with elf32-arm.h. Use
10346 commas where neccessary.
10347 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Use all upcase
10348 ERROR in messages. Unify messages with coff-arm.c. Correct
10349 VFP/FPA error message.
10350 (elf32_arm_print_private_bfd_data): Don't mark APCS-26 and
10351 APCS-32 for translation.
6c571f00 10352
930b4cb2
HPN
103532002-02-01 Hans-Peter Nilsson <hp@bitrange.com>
10354
10355 Perform on-demand global register allocation from
10356 R_MMIX_BASE_PLUS_OFFSET relocs.
10357 * elf64-mmix.c (struct bpo_reloc_section_info, struct
10358 bpo_reloc_request, struct bpo_greg_section_info): New.
10359 (mmix_elf_check_common_relocs, mmix_elf_gc_sweep_hook,
10360 bpo_reloc_request_sort_fn, mmix_elf_relax_section,
10361 _bfd_mmix_check_all_relocs,
10362 _bfd_mmix_prepare_linker_allocated_gregs,
10363 _bfd_mmix_finalize_linker_allocated_gregs): New functions.
10364 (elf_mmix_howto_table): Correct src_mask for most relocs.
10365 (mmix_elf_perform_relocation) <case R_MMIX_BASE_PLUS_OFFSET>: New
10366 case.
10367 (mmix_final_link_relocate) <case R_MMIX_BASE_PLUS_OFFSET>: New
10368 case. Fix typo in comment. New label do_mmix_reloc.
10369 (mmix_elf_check_relocs): Abuse bfd_link_info member base_file to
10370 store first object file with a base-plus-offset reloc. Call
10371 mmix_elf_check_common_relocs for the part common with mmo.
10372 (mmix_elf_final_link): Write out linker-allocated register
10373 contents section.
10374 (elf_backend_gc_sweep_hook): Define.
10375 (bfd_elf64_bfd_relax_section): Define.
10376
10377 * mmo.c: Don't include <ctype.h>
10378 (mmo_init): Correct init-once logic.
10379
3e36d993
TR
103802002-02-01 Tom Rix <trix@redhat.com>
10381
10382 * config.bfd: Conditionally support <aiaff> for pre AIX 4.3.
10383
ba323545
AM
103842002-02-01 Alan Modra <amodra@bigpond.net.au>
10385
10386 * Makefile.am: Run "make dep-am"
10387 * Makefile.in: Regenerate.
10388
012884d6
DB
103892002-01-31 David O'Brien <obrien@FreeBSD>
10390
10391 * configure.in: Recognize the differences in core files from FreeBSD
10392 4.{0,1} and later versions of 4.x. This treats 4.2+ the same as
10393 5-CURRENT.
10394 * configure: Regenerate.
10395
3b16e843
NC
103962002-01-31 Ivan Guzvinec <ivang@opencores.org>
10397
10398 * coff-or32.c: New file.
10399 * cpu-or32.c: New file.
10400 * elf32-or32.c: New file.
10401 * archures.c: Add support for or32.
10402 * targets.c: Add support for or32.
10403 * bfd-in2.h: Regenerate.
7dc0ab31 10404 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags,
3b16e843
NC
10405 coff_write_object_contents): Add support for or32.
10406 * config.bfd: Add target.
10407 * configure.in: Add support for or32.
10408 * configure: Regenerate.
10409 * Makefile.am: Add support for or32.
10410 * Makefile.in: Regenerate.
3b16e843
NC
10411 * po/SRC-POTFILES.in: Add or32 files.
10412 * po/bfd.pot: Regenerate.
7dc0ab31 10413
caf8ca8e
NC
104142002-01-31 Nick Clifton <nickc@cambridge.redhat.com>
10415 Don Lindsay <lindsayd@cisco.com>
10416
10417 * elf32-mips.c (mips_elf_calculate_relocation): Replace 'return
10418 false' with a return of a bfd_reloc_ error code.
10419
e5dfef09
HPN
104202002-01-31 Hans-Peter Nilsson <hp@axis.com>
10421
10422 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
10423 unexport unreferenced symbols when --export-dynamic. Call
10424 _bfd_elf_strtab_delref when unexporting.
10425
4e4770d0
DJ
104262002-01-30 Daniel Jacobowitz <drow@mvista.com>
10427
10428 * bfd-in.h: Include <stdbool.h> if it is available.
10429 * bfd-in2.h: Regenerated.
10430
e1fa50e7
AM
104312002-01-31 Alan Modra <amodra@bigpond.net.au>
10432
10433 * elf64-ppc.c (func_desc_adjust): STV_PROTECTED functions should
10434 not go via the plt.
10435
b5f79c76
NC
104362002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10437
b5f79c76
NC
10438 * archures.c: Tidy up formatting of embedded comments.
10439 * bfd.c: Tidy up formatting of embedded comments.
7dc0ab31 10440 * bfd-in.h: Fix formatting of comments.
b5f79c76
NC
10441 * reloc.c: Tidy up formatting of ordinary & embedded comments.
10442 * section.c: Tidy up formatting of embedded comments.
10443 * syms.c: Tidy up formatting of embedded comments.
10444 * targets.c: Tidy up formatting of embedded comments.
10445
10446 * bfd-in2.h: Regenerate.
10447
ca09e32b
NC
104482002-01-30 Nick Clifton <nickc@cambridge.redhat.com>
10449
10450 * vms-tir.c (cmd_name): New function.
10451 (tir_cmd_name): New function.
10452 (etir_sta, etir_sto, etir_opr, etir_stc): Use cmd_name().
10453 (tir_opr, tir_ctl, tir_cmd): use tir_cmd_name().
10454 Fix formatting.
7dc0ab31 10455
ca09e32b
NC
10456 * peXXigen.c (pe_print_idata): Rearrange message to aid in
10457 translation.
9b5ecbd0 10458 (pe_print_pdata): Rearrange message to aid in translation.
ca09e32b
NC
10459
10460 * libbfd.c (warn_deprecated): Rearrange error message to aid in
10461 translation.
10462
10463 * ihex.c (ihex_write_object_contents): Fix spelling typo.
10464
10465 * ieee.c (ieee_slurp_external_symbols): Remove spurious space.
10466
10467 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Rearrange error
10468 message to aid in translation.
10469
10470 * elf64-mmix.c (mmix_final_link_relocate): Rearrange error message
10471 to aid in translation.
10472
10473 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix typo.
10474
7dc0ab31 104752002-01-30 Philipp Thomas <pthomas@suse.de>
ae1a89b7
PT
10476
10477 * coff-arm.c, elf32-elf.h: Unify messages.
10478
05f64ac6
NC
104792002-01-30 Nick Clifton <nickc@redhat.com>
10480
10481 * po/sv.po: Updated translation.
10482
f5a3e38a
NC
104832002-01-30 Philipp Thomas <pthomas@suse.de>
10484
10485 * dwarf2.c (read_abbrev): Use full section name in error message.
10486 (decode_line_info): Likewise.
661a3fd4
NC
10487
10488 * elf.c (_bfd_elf_symbol_from_bfd_symbol): Don't translate debugging
10489 message.
10490
d926e03d
AM
104912002-01-30 Alan Modra <amodra@bigpond.net.au>
10492
10493 * elf64-ppc.c (func_desc_adjust): Only provide missing function
10494 descriptor symbols for undefined function code syms. Clear
10495 ELF_LINK_NON_ELF so that they can stay weak.
10496
030d18fb 104972002-01-29 Chris Demetriou <cgd@broadcom.com>
7dc0ab31 10498 Mitch Lichtenberg <mpl@broadcom.com>
030d18fb
CD
10499
10500 * bfd-in.h (bfd_mips_elf32_create_embedded_relocs): New prototype.
10501 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): New function
10502 to handle 32-bit ELF embedded reloc (ld --embedded-relocs)
10503 generation.
10504 * bfd-in2.h: Regenerate.
10505
fcc76bea
CD
105062002-01-29 Chris Demetriou <cgd@broadcom.com>
10507
10508 * elf32-mips.c: Add additional comments about HI16 relocation
10509 processing.
10510 (_bfd_mips_elf_hi16_reloc): Don't subtract address here for
10511 pc-relative relocations. (Reverts change made on 2001-10-31.)
10512 (_bfd_mips_elf_lo16_reloc): Subtract address of LO16 part here
10513 for pc-relative relocations.
10514 (mips_elf_calculate_relocation): Add a comment about a kludge
10515 in the R_MIPS_GNU_REL_HI16 handling.
10516 (_bfd_mips_elf_relocate_section): Implement that kludge;
10517 adjust pc-relative HI16 relocation for difference in HI16 and
10518 LO16 addresses, since it can't easily be done in
10519 mips_elf_calculate_relocation.
10520
f9cd9119
MS
105212002-01-29 Martin Schwidefsky <schwidefsky@de.ibm.com>
10522
10523 * elf32-i386 (elf_i386_adjust_dynamic_symbol): Do not replace PLT32
10524 relocations with PC32 relocations for undefined or weak symbols.
10525 * elf32-s390 (elf_i386_adjust_dynamic_symbol): Likewise.
10526 * elf64-s390x (elf_i386_adjust_dynamic_symbol): Likewise.
10527
702248bb
JT
105282002-01-28 Jason Thorpe <thorpej@wasabisystems.com>
10529
10530 * elfcore.h (elf_core_file_p): Improve comment for last change.
10531
4867be41
DJ
105322002-01-27 Daniel Jacobowitz <drow@mvista.com>
10533
10534 * configure: Regenerated.
10535
a94cef6a
JT
105362002-01-27 Jason Thorpe <thorpej@wasabisystems.com>
10537
10538 * elfcore.h (elf_core_file_p): Set the machine architecture
10539 before processing the program headers.
10540
7562a296
HPN
105412002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
10542
966abd70
HPN
10543 * configure.in <64-bit configuration>: If using gcc, check and
10544 emit error for egcs-1.1.2.
10545 * configure: Regenerate.
10546
e8eab623
NC
105472002-01-26 Egor Duda <deo@logos-m.ru>
10548
10549 * elf.c (elfcore_grok_win32pstatus): Copy only as much information
10550 as possible to avoid stack corruption.
10551
73896efb
RH
105522002-01-26 Richard Henderson <rth@redhat.com>
10553
10554 * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
10555 for non-allocated sections.
10556
105572002-01-25 Mark Kettenis <kettenis@gnu.org>
c106e334
MK
10558
10559 * elf.c (elfcore_write_prstatus): Make sure we pass the address of
10560 prstat.pr_reg even if it is a struct.
10561
73896efb 105622002-01-25 Steve Ellcey <sje@cup.hp.com>
254ed743 10563
c5cd6d62 10564 * elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
254ed743 10565
3d66c4f7
NC
105662002-01-25 Philipp Thomas <pthomas@suse.de>
10567
10568 * coffgen.c (coff_print_symbol): Don't mark info message
10569 for translation.
10570
9460ecda
NC
105712002-01-25 Nick Clifton <nickc@redhat.com>
10572
10573 * po/fr.po: Updated translation.
10574 * po/es.po: Updated translation.
10575
cc9ff76a
AM
105762002-01-25 Philipp Thomas <pthomas@suse.de>
10577
10578 * coff-alpha.c (alpha_relocate_section): Unify warning message
10579 for GP relative relocations without GP defined.
10580 * coff-mips.c (mips_relocate_section): Likewise.
10581
c68836a9
AM
105822002-01-25 Alan Modra <amodra@bigpond.net.au>
10583
10584 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
10585 unsigned overflow when new_offset < old_offset.
10586
e8eab623 105872002-01-24 Philipp Thomas <pthomas@suse.de>
391154e9
NC
10588
10589 * bfd.c (_bfd_abort): Fix typo.
10590
8ba89f17
RH
105912002-01-23 Richard Henderson <rth@redhat.com>
10592
10593 * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
10594 plt entries for undefweak symbols.
10595
c6953948
NC
105962002-01-23 Steve Ellcey <sje@cup.hp.com>
10597
c5cd6d62 10598 * targets.c (bfd_elf32_ia64_hpux_big_vec): Add to DEFAULT_VECTOR.
c6953948
NC
10599 (bfd_elf64_ia64_hpux_big_vec): Ditto.
10600 (bfd_elf32_h8300_vec): Ditto.
10601
41bd81ab
AM
106022002-01-23 Alan Modra <amodra@bigpond.net.au>
10603
10604 * elf64-ppc.c: Remove stale part of ABI comment.
10605 (NO_OPD_RELOCS): Define.
10606 (ppc64_elf_check_relocs): Use it.
10607 (ppc64_elf_relocate_section): Here too.
10608 (build_one_stub): Don't point function syms at the stub. Instead,
10609 hijack plt.offset.
10610 (ppc64_elf_relocate_section): Check whether REL24 relocs should
10611 really go to the stub. Make all dynamic relocs in opd against
10612 locals.
10613 (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
10614 plt.offset.
10615
f304919d
RH
106162002-01-22 Richard Henderson <rth@redhat.com>
10617
10618 * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
10619
c0ef99a7
AM
106202002-01-22 Alan Modra <amodra@bigpond.net.au>
10621
60ee0d4a
AM
10622 * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
10623 TOC_BASE_OFF adjustment.
10624
c0ef99a7
AM
10625 * Makefile.am: Run "make dep-am".
10626 * Makefile.in: Regenerate.
10627 * po/SRC-POTFILES.in: Regenerate.
10628
64328b46
AM
106292002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
10630
10631 * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
10632 host defines.
10633
59953665 106342002-01-21 Hans-Peter Nilsson <hp@axis.com>
58255df3
HPN
10635
10636 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
10637 Check for and emit error if sgot is NULL at this point.
10638
9596feea
JT
106392002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
10640
10641 * config.bfd (ia64*-*-netbsd*): New target.
10642
7b45c6e1
AM
106432002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
10644
10645 * som.c (som_write_space_strings): Comment typo fix.
10646
e5094212
AM
106472002-01-21 Alan Modra <amodra@bigpond.net.au>
10648
e86ce104
AM
10649 * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
10650 is_func_descriptor fields.
10651 (link_hash_newfunc): Init them.
10652 (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
10653 dot are candidates for plt entries. When processing .opd relocs,
10654 set function descriptor strings to point inside function code
10655 string, and set new ppc_link_hash_entry fields.
10656 (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
10657 (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
10658 function descriptors. It's now done in..
10659 (func_desc_adjust): New.
10660 (ppc64_elf_func_desc_adjust): New.
10661 (define elf_backend_always_size_sections): Define.
10662 (ppc64_elf_hide_symbol): New.
10663 (define elf_backend_hide_symbol): Define.
10664 (allocate_dynrelocs): Remove code looking up function descriptors
10665 as that has been done earlier.
10666 (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
10667 table.
10668 (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
10669 up function descriptor.
10670 (build_one_stub): Look up the function code sym. Check for
10671 invalid plt offsets.
10672 (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
10673 Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
10674
e5094212
AM
10675 * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
10676 boolean param.
10677 (_bfd_elf_link_hash_hide_symbol): Likewise.
10678 * elflink.h (elf_link_add_object_symbols): Adjust call to
10679 elf_backend_hide_symbol.
10680 (elf_fix_symbol_flags): Likewise.
10681 (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
10682 than bfd_alloc.
10683 * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
10684 Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
10685 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
10686 (clobber_millicode_symbols): Adjust to suit new hide_symbol.
10687 * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
10688 and adjust to suit.
10689 * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
10690 _bfd_elf_link_hash_hide_symbol rather than duplicating code.
10691 * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
10692
40b8271b
AM
106932002-01-18 Alan Modra <amodra@bigpond.net.au>
10694
10695 * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
10696 dynamic function descriptor symbol, not the associated function
10697 symbol.
10698
55baa95b
EC
106992002-01-17 Eric Christopher <echristo@redhat.com>
10700
10701 * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
10702
328577ad
NC
107032002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
10704
10705 * po/bfd.pot: Regenerate.
10706 * po/fr.po: Regenerate.
10707
af746e92
AM
107082002-01-17 Alan Modra <amodra@bigpond.net.au>
10709
10710 * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
10711 Remove "Elf_Internal_Shdr *" param.
10712 (_bfd_mips_elf_section_from_bfd_section): Ditto.
10713 * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
10714 * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
10715 * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
10716 * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
10717 * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
10718 * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
10719 function to override special sections. Remove hdr arg from
10720 backend call, and don't loop.
10721
175e9962
EC
107222002-01-16 Eric Christopher <echristo@redhat.com>
10723
10724 * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
10725 on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
10726 relocations requiring gp0 and gp.
10727
96a846ea
RE
107282002-01-16 Richard Earnshaw <rearnsha@arm.com>
10729
175e9962 10730 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
96a846ea
RE
10731 EF_ARM_VFP_FLOAT.
10732 (elf32_arm_print_private_bfd_data): Likewise.
10733
af3ae48d
NC
107342002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
10735
10736 * po/tr.po: Import new version.
10737
10ed1bba
AM
107382002-01-16 Alan Modra <amodra@bigpond.net.au>
10739
10740 * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
10741 (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
10742 (ORI_R0_R0_0): Correct.
10743
5d1634d7
AM
107442002-01-16 Alan Modra <amodra@bigpond.net.au>
10745
10746 * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
10747 when plt_not_loaded.
10748 * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
10749 clear .plt SEC_CODE here. Create .stub and correct .glink flags.
10750 (PLT_INITIAL_ENTRY_SIZE): Set to 24.
10751 (ppc64_elf_glink_code): Delete.
10752 (PPC64_ELF_GLINK_SIZE): Delete.
10753 (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
10754 BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
10755 ORI_R0_R0_0): Define.
10756 (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
10757 (struct ppc_link_hash_table): Add sstub and plt_overflow.
10758 (ppc64_elf_link_hash_table_create): Init them.
10759 (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
10760 Don't copy to shared lib.
10761 (ppc64_elf_check_relocs): Call bfd_set_error on errors.
10762 (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
10763 (allocate_dynrelocs <plt>): Don't change function sym here. Make
10764 room for .stub and .glink code.
10765 (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
10766 DT_PPC64_GLINK.
10767 (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
10768 bfd_elf64_bfd_final_link.
10769 (bfd_elf64_bfd_final_link): Don't define.
10770 (ppc64_elf_size_stubs): New.
10771 (build_plt_stub): New.
10772 (build_one_stub): New.
10773 (ppc64_elf_build_stubs): New.
10774 (ppc64_elf_relocate_section <toc relocs>): Remove assert.
10775 (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
10776 (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
10777 DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
10778 case output sections not separate. Adjust DT_RELASZ to not
10779 include plt relocs. Set reserved got entry. Set got and plt
10780 entry size.
10781 (elf_backend_got_header_size): Set to 8.
10782 * elf64-ppc.h: New file.
10783
c601ffdb
AM
107842002-01-16 Alan Modra <amodra@bigpond.net.au>
10785
10786 * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
10787 sections, use bfd_section_list_remove.
10788 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
10789 * elflink.h (elf_link_add_object_symbols): When removing all
10790 sections, use bfd_section_list_clear.
10791
8fb4cb7f
NC
107922002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10793
10794 * po/sv.po: New file: Swedish translation.
10795 * configure.in (ALL_LINGUAS): Add sv.
10796 * configure: Regenerate.
10797
d3c456e9
JJ
107982002-01-15 Jakub Jelinek <jakub@redhat.com>
10799
10800 * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
10801 * elf.c (merge_sections_remove_hook): New function.
10802 (_bfd_elf_merge_sections): Pass it as 3rd argument to
10803 _bfd_merge_sections.
10804 * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
10805 * libbfd.h: Rebuilt.
10806 * merge.c (_bfd_merge_sections): Add remove_hook argument.
10807 Call remove_hook if a SEC_EXCLUDE section is encountered.
10808
1f7fd478
NC
108092002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
10810
10811 * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
10812 (xstormy16_reloc_map): Initialise new field with correct howto
10813 table.
10814 (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
10815 howto entry.
10816
b87011e9
MS
108172002-01-10 Michael Snyder <msnyder@redhat.com>
10818
10819 * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
10820 (elfcore_write_pstatus): Use long instead of pid_t;
10821 * elf-bfd.h: Change prototypes to use long instead of pid_t;
10822
175e9962 108232002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
b4db1224
JT
10824
10825 * elf.c: Update copyright years.
10826 (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
10827 and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
10828
7c76fa91
MS
108292002-01-08 Michael Snyder <msnyder@redhat.com>
10830
10831 Add capability to write corefile note sections, for gdb.
10832 * elf.c (elfcore_write_note): New function.
10833 (elfcore_write_prpsinfo): New function.
10834 (elfcore_write_prstatus): New function.
10835 (elfcore_write_pstatus): New function.
10836 (elfcore_write_prfpreg): New function.
10837 (elfcore_write_prxfpreg): New function.
97996af6 10838 * elf-bfd.h: Add prototypes for above functions.
7c76fa91 10839
e1fddb6b
AO
108402002-01-08 Alexandre Oliva <aoliva@redhat.com>
10841
10842 * elf.c (elf_fake_sections): Propagate errors from
10843 elf_backend_fake_section.
10844
8d05742f
JT
108452002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
10846
10847 * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
10848 (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
10849 (elf32-sh-nbsd.lo): New rule.
10850 * Makefile.in: Regenerate.
10851 * config.bfd (sh*le-*-netbsdelf*): New target.
10852 (sh*-*-netbsdelf*): New target.
10853 * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
10854 (bfd_elf32_shnbsd_vec): New vector.
10855 (bfd_elf32_shlnbsd_vec): New vector.
10856 * configure: Regenerate.
10857 * elf32-sh-nbsd.c: New file.
10858 * targets.c: Update copyright years.
175e9962 10859 (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
8d05742f
JT
10860 bfd_elf32_shnbsd_vec.
10861
1dba4cb4
AH
108622002-01-07 Aldy Hernandez <aldyh@redhat.com>
10863
10864 * coff-rs6000.c (READ20): Use bfd_scan_vma.
10865
47b22aef
GK
108662002-01-07 Geoffrey Keating <geoffk@redhat.com>
10867
10868 * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
10869 of a symbol in a section that will be deleted.
10870
be2d1673
NC
108712002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
10872
10873 * po/es.po: New file: Spanish translation.
10874 * configure.in (ALL_LINGUAS): Add es.
10875 * configure: Regenerate.
10876
d9cf1b54
AM
108772002-01-06 Steve Ellcey <sje@cup.hp.com>
10878
10879 * elfxx-ia64.c (is_unwind_section_name): Add target vector as
10880 argument so we can handle HP-UX specially.
10881 (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
10882 (elfNN_hpux_backend_section_from_bfd_section): New for support
10883 of SHN_IA_64_ANSI_COMMON.
10884 (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
10885 (is_unwind_section_name): Add special HP-UX support.
10886 (elfNN_ia64_section_from_shdr): Add support for more sections.
10887 (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
10888 add support for more sections.
10889 (elfNN_ia64_additional_program_headers): Modify
10890 is_unwind_section_name call.
10891 (elfNN_ia64_modify_segment_map): Remove assumption that there is
10892 only one unwind section in segment.
10893
3f3c5c34
AM
108942002-01-06 Alan Modra <amodra@bigpond.net.au>
10895
10896 * syms.c (_bfd_generic_make_empty_symbol): New function.
10897 * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
10898 _bfd_generic_make_empty_symbol.
10899 * libbfd.h: Regenerate.
10900 * bfd-in2.h: Regenerate.
10901 * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
10902 (hppabsd_core_get_symtab_upper_bound): Don't define.
10903 (hppabsd_core_get_symtab): Likewise.
10904 (hppabsd_core_print_symbol): Likewise.
10905 (hppabsd_core_get_symbol_info): Likewise.
10906 (hppabsd_core_bfd_is_local_label_name): Likewise.
10907 (hppabsd_core_get_lineno): Likewise.
10908 (hppabsd_core_find_nearest_line): Likewise.
10909 (hppabsd_core_bfd_make_debug_symbol): Likewise.
10910 (hppabsd_core_read_minisymbols): Likewise.
10911 (hppabsd_core_minisymbol_to_symbol): Likewise.
10912 (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
10913 Formatting fixes.
10914 * hpux-core.c: Similarly.
10915 * irix-core.c: Similarly.
10916 * osf-core.c: Similarly.
10917 * sco5-core.c: Similarly.
10918 * binary.c (binary_make_empty_symbol): Remove function, define as
10919 _bfd_generic_make_empty_symbol.
10920 * ihex.c (ihex_make_empty_symbol): Likewise.
10921 * mmo.c (mmo_make_empty_symbol): Likewise.
10922 * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
10923 * srec.c (srec_make_empty_symbol): Likewise.
10924 * versados.c (versados_make_empty_symbol): Likewise.
10925 * vms.c (_bfd_vms_make_empty_symbol): Remove.
10926 (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
10927 * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
10928 rather than _bfd_vms_make_empty_symbol.
10929 * vms-misc.c (new_symbol): Likewise.
10930
3f0a7f7f
AM
109312002-01-05 Alan Modra <amodra@bigpond.net.au>
10932
9e7b37b3
AM
10933 * section.c (bfd_section_init): Remove unnecessary initialisations.
10934 (bfd_section_list_clear): New function.
10935 (bfd_section_list_remove, bfd_section_list_insert): New macros.
10936 (_bfd_strip_section_from_output): Use them.
10937 * coffcode.h (coff_set_alignment_hook): Likewise.
10938 * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
10939 * elf64-mips.c (mips_elf64_final_link): Likewise.
10940 * elf64-mmix.c (mmix_elf_final_link): Likewise.
10941 * sunos.c (sunos_add_dynamic_symbols): Likewise.
10942 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
10943 * bfd-in2.h: Regenerate.
10944
10945 * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
10946 rather than doing our own section handling. Clean up after errors
10947 with bfd_release and bfd_section_list_clear. Handle unexpected
10948 flags.
10949 * aoutf1.h (sunos4_core_file_p): Likewise.
10950 * aix386-core.c (aix386_core_file_p): Likewise.
10951 * cisco-core.c (cisco_core_file_validate): Likewise.
10952 * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
10953 * trad-core.c (trad_unix_core_file_p): Likewise.
10954
9b5ecbd0 10955 * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
9e7b37b3
AM
10956 with bfd_release and bfd_section_list_clear.
10957 * hpux-core.c (hpux_core_core_file_p): Likewise.
10958 * irix-core.c (irix_core_core_file_p): Likewise.
10959 * lynx-core.c (lynx_core_file_p): Likewise.
10960 * osf-core.c (osf_core_core_file_p): Likewise.
10961 * rs6000-core.c (rs6000coff_core_p): Likewise.
10962 * sco5-core.c (sco5_core_file_p): Likewise.
10963
3f0a7f7f
AM
10964 * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
10965 sign extension adjustments without conditionals.
10966
a3aa38ee
JJ
109672002-01-04 Jakub Jelinek <jakub@redhat.com>
10968
10969 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
10970 CIE at .eh_frame start is removed due to no FDEs referencing it.
10971
8a8b2d4b
AJ
109722002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
10973
10974 * config.bfd (x86_64-*-netbsd*): New target.
10975 * configure.in (x86_64-*-netbsd*): Set COREFILE
10976 to netbsd-core.lo.
10977 * configure: Regenerated.
10978
04b5af89
TR
109792002-01-03 Tom Rix <trix@redhat.com>
10980
10981 * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
10982 for recent bfd_make_section_anyway change.
10983
51c5503b
NC
109842002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
10985
10986 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
10987 R_ARM_THM_PC11 reloc.
10988
07f7c046
NC
109892002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10990
10991 * configure.in (LINGUAS): Add ja.
10992 * configure: Regenerate.
10993 * po/ja.po: Import from translation project's web site.
10994
5eefb65f
NC
109952002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
10996
10997 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
10998 messages to ease translation into other languages.
10999
39e90f10 11000For older changes see ChangeLog-0001
56882138
AM
11001\f
11002Local Variables:
11003mode: change-log
11004left-margin: 8
11005fill-column: 74
11006version-control: never
11007End:
This page took 0.733874 seconds and 4 git commands to generate.