]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - bfd/ChangeLog
* configure.in (--enable-secureplt): New.
[thirdparty/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
6ec7057a
RH
12005-05-29 Richard Henderson <rth@redhat.com>
2
3 * configure.in (--enable-secureplt): New.
4 * elf64-alpha.c (INSN_LDA, INSN_LDAH, INSN_LDQ, INSN_BR): New.
5 (INSN_SUBQ, INSN_S4SUBQ, INSN_JMP): New.
6 (INSN_A, INSN_AB, INSN_ABC, INSN_ABO, INSN_AD): New.
7 (elf64_alpha_use_secureplt): New.
8 (OLD_PLT_HEADER_SIZE, OLD_PLT_ENTRY_SIZE): New.
9 (NEW_PLT_HEADER_SIZE, NEW_PLT_ENTRY_SIZE): New.
10 (PLT_HEADER_SIZE, PLT_ENTRY_SIZE): Conditionalize on secureplt.
11 (ALPHA_ELF_LINK_HASH_PLT_LOC): Remove.
12 (struct alpha_elf_link_hash_entry): Add plt_offset.
13 (PLT_HEADER_WORD1, PLT_HEADER_WORD2, PLT_HEADER_WORD3): Remove.
14 (PLT_HEADER_WORD4, PLT_ENTRY_WORD1, PLT_ENTRY_WORD2): Remove.
15 (PLT_ENTRY_WORD3): Remove.
16 (elf64_alpha_create_dynamic_sections): If secureplt, set SEC_READONLY
17 on .plt and create .got.plt.
18 (elf64_alpha_output_extsym): Remove .plt frobbing for symbol values.
19 (get_got_entry): Initialize plt_offset.
20 (elf64_alpha_want_plt): New.
21 (elf64_alpha_check_relocs): Use it.
22 (elf64_alpha_adjust_dynamic_symbol): Likewise. Don't allocate
23 plt entries here.
24 (elf64_alpha_calc_got_offsets_for_symbol): Don't report internal
25 error as user error.
26 (elf64_alpha_size_plt_section_1): Allocate one plt entry per
27 got subsection.
28 (elf64_alpha_size_plt_section): Size .got.plt section.
29 (elf64_alpha_size_rela_got_1): Don't allocate relocations if
30 plt entries used.
31 (elf64_alpha_size_dynamic_sections): Call elf64_alpha_size_plt_section.
32 Add PLTRO DYNAMIC entry.
33 (elf64_alpha_finish_dynamic_symbol): Generate secureplt format.
34 (elf64_alpha_finish_dynamic_sections): Likewise.
35
3133ddbf
DJ
362005-05-28 David Daney <ddaney@avtrex.com>
37
38 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_sections): Move
39 calculation of DT_RELSZ to occur after all dynamic relocations
40 are created.
41
36527912
AJ
422005-05-28 Eli Zaretskii <eliz@gnu.org>
43
44 * configure.in: Add snprintf and vsnprintf to AC_CHECK_DECLS.
45 * config.in, configure: Regenerate.
46
1bc8074d 472005-05-26 Mark Kettenis <kettenis@gnu.org>
6ec7057a 48 Maciej W. Rozycki <macro@linux-mips.org>
1bc8074d
MR
49
50 * elfxx-mips.c (_bfd_mips_elf_section_processing): Warn and
51 stop processing of options if one of invalid size is
52 encountered.
53 (_bfd_mips_elf_section_from_shdr): Likewise.
54 (_bfd_mips_elf_fake_sections): Reset the type of empty special
55 sections.
56
75fed80d
RH
572005-05-26 Richard Henderson <rth@redhat.com>
58
36527912 59 * elf64-alpha.c (struct alpha_elf_link_hash_entry): Remove
75fed80d
RH
60 plt_old_section, plt_old_value.
61 (elf64_alpha_adjust_dynamic_symbol): Don't set it.
62 (elf64_alpha_size_plt_section_1): Don't use it.
63
24639c7d
JJ
642005-05-26 Jakub Jelinek <jakub@redhat.com>
65
66 * elfcode.h (elf_object_p): Fail if e_shoff != 0, e_shnum == 0 and
67 first shdr has sh_size == 0. Fail if e_shnum is large to cause
68 arithmetic overflow when allocating the i_shdr array.
69 Sanity check sh_link and sh_info fields. Fix e_shstrndx sanity check.
70
a7519a3c
RH
712005-05-25 Richard Henderson <rth@redhat.com>
72
73 * elf64-alpha.c: Update all function definitions to ISO C. Remove
74 all function prototypes; rearrange functions into def-use order.
75
308da68f
RH
762005-05-25 Richard Henderson <rth@redhat.com>
77
78 * elf64-alpha.c (elf64_alpha_merge_gots): Fix gotent iteration
79 in the presence of deleting elements.
80 (elf64_alpha_size_got_sections): Zero dead got section size.
81
4ab527b0
FF
822005-05-23 Fred Fish <fnf@specifixinc.com>
83
84 * dwarf2.c (struct dwarf2_debug): Add inliner_chain member.
85 (struct funcinfo): Add caller_func, caller_file, caller_line.
86 tag, and nesting_level members.
87 (lookup_address_in_function_table): Change first passed parameter
88 from "struct funcinfo *" to "struct comp_unit *".
89 (lookup_address_in_function_table): Dereference unit to find function
90 table.
91 (lookup_address_in_function_table): Traverse the function list to
92 create a chain of inlined functions back to the first non inlined
93 function.
94 (scan_unit_for_functions): Remember tag and nesting level. Handle
95 DW_AT_call_file and DW_AT_call_line.
96 (comp_unit_find_nearest_line): Adjust lookup_address_in_function_table
97 call to pass unit pointer instead of function table pointer. For
98 inlined functions, save pointer to the inliner chain.
99 (_bfd_dwarf2_find_nearest_line): Initialize inliner_chain to NULL.
100 (_bfd_dwarf2_find_inliner_info): New function that returns information
101 from the inliner chain after a call to bfd_find_nearest_line.
102
103 * bfd.c (bfd_find_inliner_info): Define using BFD_SEND.
104 * targets.c (BFD_JUMP_TABLE_SYMBOLS): Add entry for
105 NAME##_find_inliner_info.
106 (bfd_target): Add _bfd_find_inliner_info.
107 * bfd-in2.h: Regenerate.
108
109 * libbfd-in.h (_bfd_nosymbols_find_inliner_info): Define as
110 macro that always returns bfd_false.
111 (_bfd_dwarf2_find_inliner_info): Declare.
112 * libbfd.h: Regenerate.
36527912 113
4ab527b0
FF
114 * elf32-arm.c (elf32_arm_find_inliner_info): New function
115 that calls _bfd_dwarf2_find_inliner_info.
116 (bfd_elf32_find_inliner_info): Define to elf32_arm_find_inliner_info.
117
118 * elfxx-mips.c (_bfd_mips_elf_find_inliner_info): New function
119 that calls _bfd_dwarf2_find_inliner_info.
120 * elfxx-mips.h (_bfd_mips_elf_find_inliner_info): Declare.
121 * elfn32-mips.c (bfd_elf32_find_inliner_info): Define to
122 _bfd_mips_elf_find_inliner_info.
123 * elf64-mips.c (bfd_elf64_find_inliner_info): Ditto.
124 * elf32-mips.c (bfd_elf32_find_inliner_info): Ditto.
125
126 * elf.c (_bfd_elf_find_inliner_info): New function that calls
127 _bfd_dwarf2_find_inliner_info.
128 * elf-bfd.h (_bfd_elf_find_inliner_info): Declare.
129 * elfxx-target.h (bfd_elfNN_find_inliner_info): Define to
130 _bfd_elf_find_inliner_info.
131
132 * coffgen.c (coff_find_inliner_info): New function that
133 calls _bfd_dwarf2_find_inliner_info.
134 * libcoff-in.h (coff_find_inliner_info): Declare.
135 * libcoff.h: Regenerate.
136 * coff-rs6000.c (rs6000coff_vec): Add coff_find_inliner_info.
137 (pmac_xcoff_vec) Ditto.
138 * coff64-rs6000.c (rs6000coff64_vec): Ditto.
139 (aix5coff64_vec): Ditto.
36527912 140
4ab527b0
FF
141 * aout-target.h (MY_find_inliner_info): Define as
142 _bfd_nosymbols_find_inliner_info.
143 * aout-tic30.c (MY_find_inliner_info): Ditto.
144 * binary.c (binary_find_inliner_info): Ditto.
145 * i386msdos.c (msdos_find_inliner_info): Ditto.
146 * ihex.c (ihex_find_inliner_info): Ditto.
147 * libaout.h (aout_32_find_inliner_info): Ditto.
148 * libecoff.h (_bfd_ecoff_find_inliner_info): Ditto.
149 * mach-o.c (bfd_mach_o_find_inliner_info): Ditto.
150 * mmo.c (mmo_find_inliner_info): Ditto.
151 * nlm-target.h (nlm_find_inliner_info): Ditto.
152 * pef.c (bfd_pef_find_inliner_info): Ditto.
153 * ppcboot.c (ppcboot_find_inliner_info): Ditto.
154 * srec.c (srec_find_inliner_info): Ditto.
155 * tekhex.c (tekhex_find_inliner_info): Ditto.
156 * versados.c (versados_find_inliner_info): Ditto.
157 * xsym.c (bfd_sym_find_inliner_info): Ditto.
158
159 * ieee.c (ieee_find_inliner_info): New function that always
160 returns FALSE.
161 * oasys.c (oasys_find_inliner_info): Ditto.
162 * vms.c (vms_find_inliner_info): Ditto.
163
9edfd1af
AM
1642005-05-24 Alan Modra <amodra@bigpond.net.au>
165
166 * elf32-ppc.c (ppc_elf_check_relocs): For old gcc -fPIC code
167 force old plt layout.
168
3241278a
RH
1692005-05-22 Richard Henderson <rth@redhat.com>
170
171 * elf64-alpha.c (elf64_alpha_relax_section): Ignore non-allocated
172 sections.
173 (elf64_alpha_check_relocs): Likewise.
174 (elf64_alpha_relocate_section): Don't emit dynamic relocations to
175 non-allocated sections.
176
d6ad34f6
RH
1772005-05-22 Richard Henderson <rth@redhat.com>
178
36527912 179 * elf64-alpha.c (elf64_alpha_relax_with_lituse): Relax jsr to
d6ad34f6
RH
180 undefweak to use zero register. Call elf64_alpha_relax_got_load
181 if not all uses removed.
182 (elf64_alpha_relax_got_load): Relax undefweak to lda zero.
183 (elf64_alpha_relax_section): Handle undefweak symbols.
184 (elf64_alpha_calc_dynrel_sizes): Don't add relocs for undefweak.
185 (elf64_alpha_size_rela_got_1): Likewise.
186 (elf64_alpha_relocate_section): Likewise.
187
487c4353
RH
1882005-05-22 Richard Henderson <rth@redhat.com>
189
190 * elf64-alpha.c (elf64_alpha_relax_section): Only operate
191 on SEC_CODE sections.
192
a96afa0f
DA
1932005-05-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
194
195 * som.c (try_prev_fixup): Changed type of subspace_reloc_sizep to
196 unsigned int *.
197 (som_write_space_strings): Change type of tmp_space and p to char *.
198 (som_write_symbol_strings): Likewise. Also change type of comp to
199 char *comp[4].
200 (som_begin_writing): Change type of strings_size to unsigned int.
201 (som_finish_writing): Likewise.
202 (som_slurp_reloc_table): Change type of external_relocs to unsigned
203 char *.
204 * som.h (struct som_section_data_struct): Change type of reloc_stream
205 field to unsigned char *.
206
643796e3
DJ
2072005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
208
209 * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't eliminate
210 copy relocations for VxWorks.
211
4dc4a9a5
DJ
2122005-05-20 Daniel Jacobowitz <dan@codesourcery.com>
213
214 * bfd/elf32-ppc.c (struct ppc_elf_link_hash_entry): Add new field
215 has_sda_refs.
216 (ppc_elf_copy_indirect_symbol): Copy has_sda_refs.
217 (ppc_elf_check_relocs): Set has_sda_refs.
218 (ppc_elf_adjust_dynamic_symbol): Check has_sda_refs before eliminating
219 copy relocations. Use has_sda_refs to place variables in .sbss.
220 (ppc_elf_finish_dynamic_symbol): Use has_sda_refs to place variables in
221 .sbss.
222
dd1a320b
BW
2232005-05-20 Bob Wilson <bob.wilson@acm.org>
224
225 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Make sure that
226 xtensa_default_isa is initialized.
227
28e99bb6
AM
2282005-05-20 Alan Modra <amodra@bigpond.net.au>
229
230 * elf32-ppc.c (allocate_dynrelocs): Correct plt offset assigned
231 for second and subsequent list entries. Only allocate multiple
232 glink stubs when shared or pie.
233 (ppc_elf_finish_dynamic_symbol): Break out early when only one
234 glink stub is needed.
235
e3e71e27
ZW
2362005-05-19 Zack Weinberg <zack@codesourcery.com>
237
238 * Makefile.am: Have 'all' depend on 'info'.
239 * Makefile.in: Regenerate.
240
a6aa5195
AM
2412005-05-19 Alan Modra <amodra@bigpond.net.au>
242
243 * elf-bfd.h (struct elf_link_hash_table): Delete init_refcount and
244 init_offset. Add init_got_refcount, init_plt_refcount,
245 init_got_offset and init_plt_offset.
246 * elf.c (_bfd_elf_link_hash_newfunc): Adjust for above change.
247 (_bfd_elf_link_hash_hide_symbol): Likewise.
248 (_bfd_elf_link_hash_table_init): Likewise.
249 * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
250 * elf64-ppc.c (ppc64_elf_link_hash_table_create): Likewise.
251 * elflink.c (_bfd_elf_adjust_dynamic_symbol): Likewise.
252 (bfd_elf_size_dynamic_sections): Likewise.
253 * elf32-ppc.c (GLINK_PLTRESOLVE): Now 16 insns.
254 (LWZU_0_X_12, LWZ_0_4_30, LWZ_0_X_12, LWZ_11_X_11, LWZ_11_X_30,
255 LWZ_12_4_12, LWZ_12_8_30, LWZ_12_X_12, SUB_11_11_30): Delete.
256 (ADDIS_12_12, BCL_20_31, LWZU_0_12, LWZ_0_12, LWZ_11_11, LWZ_11_30,
257 LWZ_12_12, MFLR_0, MFLR_12, MTLR_0, SUB_11_11_12): Define.
258 (struct plt_entry): New.
259 (ppc_elf_link_hash_table_create): Set new init_plt fields.
260 (ppc_elf_copy_indirect_symbol): Handle merge of plt plist. Don't
261 use _bfd_elf_link_hash_copy_indirect.
262 (update_plt_info, find_plt_ent): New functions.
263 (ppc_elf_check_relocs): Handle R_PPC_PLTREL24 with non-zero addend
264 and adjust for use of plt list rather than refcount.
265 (ppc_elf_gc_sweep_hook): Likewise.
266 (ppc_elf_tls_optimize): Likewise.
267 (ppc_elf_adjust_dynamic_symbol): Likewise.
268 (allocate_dynrelocs): Likewise.
269 (ppc_elf_relax_section): Likewise.
270 (ppc_elf_relocate_section): Likewise. Adjust R_PPC_PLTREL24 addends
271 when performing a relocatable link.
272 (ppc_elf_finish_dynamic_symbol): Likewise. Write .glink stubs here..
273 (ppc_elf_finish_dynamic_sections): ..rather than here. Use new
274 pic resolver stub.
275
a49e53ed
AM
2762005-05-19 Alan Modra <amodra@bigpond.net.au>
277
278 * elf.c (assign_file_positions_for_segments): Use maximum of
279 maxpagesize and section alignment when adjusting initial
280 segment offset and section offsets.
281
cb1afa5c
ZW
2822005-05-18 Zack Weinberg <zack@codesourcery.com>
283
284 * elf32-arm.c: Make all #ifndef OLD_ARM_ABI blocks
285 unconditional.
286
13792e9d
L
2872005-05-18 H.J. Lu <hongjiu.lu@intel.com>
288
289 * elf.c (group_signature): Undo the last change. Check if the
290 symbol table section is correct.
291
c19d1205
ZW
2922005-05-17 Zack Weinberg <zack@codesourcery.com>
293
294 * elf32-arm.c: Wherever possible, use official reloc names
295 from AAELF.
296 (elf32_arm_howto_table, elf32_arm_tls_gd32_howto)
297 (elf32_arm_tls_ldo32_howto, elf32_arm_tls_ldm32_howto)
298 (elf32_arm_tls_le32_howto, elf32_arm_tls_ie32_howto)
299 (elf32_arm_vtinherit_howto, elf32_arm_vtentry_howto)
300 (elf32_arm_pc11_howto, elf32_arm_thm_pc9_howto, elf32_arm_got_prel)
301 (elf32_arm_r_howto): Replace with elf32_arm_howto_table_1,
302 elf32_arm_howto_table_2, and elf32_arm_howto_table_3.
303 Add many new relocations from AAELF.
304 (elf32_arm_howto_from_type): Update to match.
305 (elf32_arm_reloc_map): Add entries for R_ARM_THM_JUMP24,
306 R_ARM_THM_JUMP11, R_ARM_THM_JUMP19, R_ARM_THM_JUMP8,
307 R_ARM_THM_JUMP6, R_ARM_GNU_VTINHERIT, and R_ARM_GNU_VTENTRY.
308 (elf32_arm_reloc_type_lookup): Use elf32_arm_howto_from_type.
309 (elf32_arm_final_link_relocate): Add support for
310 R_ARM_THM_JUMP24, R_ARM_THM_JUMP19, R_ARM_THM_JUMP6. Remove
311 case entries redundant with default.
312
313 * reloc.c: Reorganize ARM relocations. Add Thumb
314 assembler-internal relocations BFD_RELOC_ARM_T32_OFFSET_U8,
315 BFD_RELOC_ARM_T32_OFFSET_IMM, BFD_RELOC_ARM_T32_IMMEDIATE.
316 Add visible relocations BFD_RELOC_THUMB_PCREL_BRANCH7,
317 BFD_RELOC_THUMB_BRANCH20, BFD_RELOC_THUMB_BRANCH25.
318 Delete unused relocations BFD_RELOC_ARM_GOT12, BFD_RELOC_ARM_COPY.
319 * bfd-in2.h, libbfd.h: Regenerate.
320
26ae6d5e
DJ
3212005-05-17 Daniel Jacobowitz <dan@codesourcery.com>
322
323 * elf.c (_bfd_elf_write_object_contents): Check for non-NULL
324 elf_shstrtab.
325 * format.c (bfd_check_format_matches): Set output_has_begun
326 for both_direction.
327 * section.c (bfd_set_section_contents): Use bfd_write_p. Remove
328 special case for both_direction.
329
5982e3c7
NC
3302005-05-17 Nick Clifton <nickc@redhat.com>
331
332 * elf.c (group_signature): Check for a group section which is
333 actually a (corrupt) symbol table section in disguise and prevent
334 an infinite loop from occurring.
335
fc3ab699
L
3362005-05-17 H.J. Lu <hongjiu.lu@intel.com>
337
338 * elfxx-ia64.c (elfNN_ia64_relax_brl): Undo the change made on
339 2005-02-16.
340
5e27d427
L
3412005-05-17 H.J. Lu <hongjiu.lu@intel.com>
342
343 * elfxx-ia64.c (elfNN_ia64_relax_br): Keep the original
344 predicate on slot 0 only if slot 0 isn't br.
345
75ff4589
L
3462005-05-17 H.J. Lu <hongjiu.lu@intel.com>
347
348 PR 797
349 * elf32-i386.c (elf_i386_size_dynamic_sections): Also remove
350 empty sdynbss section.
351 * elf64-x86-64.c (elf64_x86_64_size_dynamic_sections): Likewise.
352
8e0ed13f
NC
3532005-05-17 Tavis Ormandy <taviso@gentoo.org>
354
355 * elf.c (bfd_section_from_shdr): Add sanity check when parsing
356 dynamic sections.
357
7e8aeb9a
AM
3582005-05-17 Alan Modra <amodra@bigpond.net.au>
359
360 * elf32-ppc.c (LIS_11. LIS_12): Define.
361 (LWZU_0_X_12, LWZ_0_X_12, LWZ_12_4_12, LWZ_12_X_12): Define.
362 (ppc_elf_finish_dynamic_sections): Provide non-pic plt call stub
363 for --data-plt when building non-pie executables.
364
641bd093
NC
3652005-05-17 Nick Clifton <nickc@redhat.com>
366
10dbd1f3
NC
367 * elf32-arm.c (elf32_arm_final_link_relocate): Gracefully handle
368 the situation where a symbols's section is not known but a section
369 relative R_ARM_RELATIVE reloc has to be generated for the Symbian
370 OS.
371
641bd093
NC
372 * elf32-v850.c (v850_elf_relocate_section): Move code to test for
373 the presence of a symbol table to just before the symbol table is
374 actually used.
375
83b6bd86
L
3762005-05-16 H.J. Lu <hongjiu.lu@intel.com>
377
378 PR 834
379 * elfxx-ia64.c (elfNN_ia64_relax_br): New.
380 (elfNN_ia64_relax_section): Use it.
381
06084812
MK
3822005-05-14 Mark Kettenis <kettenis@gnu.org>
383
384 * elflink.c (bfd_elf_size_dynamic_sections): Use lbasename instead
385 of basename.
386
1fe44d79
AM
3872005-05-14 Alan Modra <amodra@bigpond.net.au>
388
389 * elf32-ppc.c (ppc_elf_size_dynamic_sections): Set DT_PPC_GOT,
390 not DT_PPC_GLINK.
391 (ppc_elf_finish_dynamic_sections): Likewise.
392
2db3311b
FF
3932005-05-13 Fred Fish <fnf@specifixinc.com>
394
395 * libbfd-in.h: Fix a comment typo, 'neaderst' -> 'nearest'
396 * libbfd.h: Rebuilt.
397
7db48a12
BW
3982005-05-13 Bob Wilson <bob.wilson@acm.org>
399
400 * elf32-xtensa.c (xtensa_get_property_section_name): Add missing
401 periods in linkonce_kind values.
402
8fe76924
L
4032005-05-12 H.J. Lu <hongjiu.lu@intel.com>
404
405 * elf32-i386.c (elf_i386_relocate_section): Allow R_386_GOTOFF
406 against protected function when building executable.
407
86b9da88
AM
4082005-05-12 Alan Modra <amodra@bigpond.net.au>
409
410 * elf32-ppc.c (LWZU_0_X_11): Delete.
411 (B, LWZ_11_X_11, LWZ_11_X_30, MTCTR_11): Define.
412 (ppc_elf_select_plt_layout): Set .got flags too. Formatting.
413 (ppc_elf_size_dynamic_sections): Allocate space for .glink branch
414 table.
415 (ppc_elf_finish_dynamic_symbol): Point .plt entries into the branch
416 table.
417 (ppc_elf_finish_dynamic_sections): Adjust DT_PPC_GLINK value.
418 Generate .glink branch table and updated stubs.
419
d7128ce4
AM
4202005-05-11 Alan Modra <amodra@bigpond.net.au>
421
422 * reloc.c (BFD_RELOC_HI16_PCREL): Define.
423 (BFD_RELOC_HI16_S_PCREL, BFD_RELOC_LO16_PCREL): Define.
424 * elf32-ppc.c (GLINK_PLTRESOLVE, GLINK_ENTRY_SIZE): Define.
425 (CROR_151515, CROR_313131): Delete.
426 (ADDIS_11_11, ADDI_11_11, SUB_11_11_30, ADD_0_11_11, ADD_11_0_11,
427 LWZ_0_4_30, MTCTR_0, LWZ_12_8_30, BCTR, ADDIS_11_30,
428 LWZU_0_X_11): Define.
429 (ppc_elf_howto_raw): Add R_PPC_REL16, R_PPC_REL16_LO, R_PPC_REL16_HI
430 and R_PPC_REL16_HA entries.
431 (ppc_elf_reloc_type_lookup): Convert new bfd reloc types.
432 (ppc_elf_addr16_ha_reloc): Also handle R_PPC_REL16_HA.
433 (struct ppc_elf_link_hash_table): Add glink, glink_pltresolve,
434 new_plt, and old_plt.
435 (ppc_elf_create_dynamic_sections): Create .glink section.
436 (ppc_elf_check_relocs): Set new_plt and old_plt.
437 (ppc_elf_select_plt_layout): New function.
438 (ppc_elf_tls_setup): Set plt output section elf type and flags.
439 (allocate_got): Handle differences between old and new got layout.
440 (allocate_dynrelocs): Likewise for plt.
441 (ppc_elf_size_dynamic_sections): Likewise. Allocate memory for
442 .glink. Don't allocate memory for old bss .plt. Emit DT_PPC_GLINK.
443 (ppc_elf_relax_section): Rename ppc_info to htab. Handle .glink
444 destination of R_PPC_PLTREL24 relocs.
445 (ppc_elf_relocate_section): Handle new relocs and changed destination
446 of R_PPC_PLTREL24.
447 (ppc_elf_finish_dynamic_symbol): Init new style plt and handle
448 differences in layout.
449 (ppc_elf_finish_dynamic_sections): Set DT_PPC_GLINK value. Don't
450 put a blrl in new got. Write glink contents.
451 * elf32-ppc.h (ppc_elf_select_plt_layout): Declare.
452 * libbfd.h: Regenerate.
453 * bfd-in2.h: Regenerate.
454
4c9b0de6
AS
4552005-05-11 Andreas Schwab <schwab@suse.de>
456
457 * elf32-i386.c (elf_i386_finish_dynamic_sections): Fix signedness
458 warning.
459
3d2b39cf
L
4602005-05-10 H.J. Lu <hongjiu.lu@intel.com>
461
462 * elf.c (_bfd_elf_make_section_from_shdr): Only check debug
463 section if SEC_ALLOC isn't set.
464
2ba49b59
KC
4652005-05-09 Kelley Cook <kcook@gcc.gnu.org>
466
467 * configure.in: Replace AC_COMPILE_CHECK_SIZEOF with AC_CHECK_SIZEOF.
468 * acinclude.m4: Don't sinclude accross.m4.
469 * config.in, configure, Makefile.in, doc/Makefile.in: Regenerate.
470
433817dd
AM
4712005-05-09 Alan Modra <amodra@bigpond.net.au>
472
473 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add has_dotsym.
474 (ppc64_elf_add_symbol_hook): Set has_dotsym.
475 (ppc64_elf_check_directives): Only process syms when has_dotsym.
476 (func_desc_adjust): Hide fake function descriptors when function
477 code entry is defined.
478 (adjust_opd_syms): Adjust for deleted_section becoming union field.
479
0560d0f7
AM
4802005-05-09 Alan Modra <amodra@bigpond.net.au>
481
482 * elfcode.h (elf_object_p): Add more sanity checks on elf header.
483
74cc7600
DK
4842005-05-08 Dave Korn <dave.korn@artimi.com>
485
486 * coff-tic80.c: Undefine _CONST after system headers to prevent
487 clash with tic80-specific definition in include/coff/tic80.h
488
cfca085c
L
4892005-05-08 H.J. Lu <hongjiu.lu@intel.com>
490
491 PR 939
492 * elflink.c (elf_link_output_extsym): Use output_bfd if
493 h->root.u.def.section is bfd_abs_section_ptr when reporting
494 error.
495
7f4d3958
L
4962005-05-07 H.J. Lu <hongjiu.lu@intel.com>
497
498 * elf-bfd.h (elf_backend_data): Update special_sections to
499 array of pointer to bfd_elf_special_section.
500 * elf.c (special_sections): Likewise.
501 * elf32-arm.c (elf32_arm_symbian_special_sections): Likewise.
502 * elf32-m32r.c (m32r_elf_special_sections): Likewise.
503 * elf32-m68hc11.c (elf32_m68hc11_special_sections): Likewise.
504 * elf32-m68hc12.c (elf32_m68hc12_special_sections): Likewise.
505 * elf32-mcore.c (mcore_elf_special_sections): Likewise.
506 * elf32-ppc.c (ppc_elf_special_sections): Likewise.
507 * elf32-sh64.c (sh64_elf_special_sections): Likewise.
508 * elf32-v850.c (v850_elf_special_sections): Likewise.
509 * elf32-xtensa.c (elf_xtensa_special_sections): Likewise.
510 * elf64-alpha.c (elf64_alpha_special_sections): Likewise.
511 * elf64-hppa.c (elf64_hppa_special_sections): Likewise.
512 * elf64-ppc.c (ppc64_elf_special_sections): Likewise.
513 * elf64-sh64.c (sh64_elf64_special_sections): Likewise.
514 * elfxx-ia64.c (elfNN_ia64_special_sections): Likewise.
515 * elfxx-mips.c (_bfd_mips_elf_special_sections): Likewise.
516 * elfxx-mips.h (_bfd_mips_elf_special_sections): Likewise.
517
518 * elf.c (get_special_section): Updated.
519
3b36f7e6
AM
5202005-05-07 Alan Modra <amodra@bigpond.net.au>
521
522 * elf-bfd.h (struct elf_backend_data): Remove got_symbol_offset.
523 * elfxx-target.h (elf_backend_got_symbol_offset): Delete.
524 * elflink.c (_bfd_elf_create_got_section): Use zero in place of
525 got_symbol_offset.
526 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Likewise.
527 * elf32-frv.c (_frv_create_got_section): Likewise.
528 * elf32-i370.c (i370_elf_finish_dynamic_sections): Delete ppc code.
529 (elf_backend_got_symbol_offset): Don't define.
530 * elf64-ppc.c (elf_backend_got_symbol_offset): Don't define.
531 * elf32-ppc.c (struct ppc_elf_link_hash_table): Add got_header_size
532 and got_gap.
533 (ppc_elf_create_got): Tidy.
534 (ppc_elf_create_dynamic_sections): Don't set SEC_IN_MEMORY for .plt.
535 (ppc_elf_check_relocs): Reduce string comparisons by using elf.hgot.
536 (ppc_elf_gc_sweep_hook): Likewise.
537 (ppc_elf_relocate_section): Likewise.
538 (ppc_elf_finish_dynamic_symbol): Likewise.
539 (allocate_got): New function.
540 (allocate_dynrelocs): Use allocate_got.
541 (ppc_elf_size_dynamic_sections): Likewise. Delay tlsld_got allocation
542 so that local got can refcount it. Set got_header_size.
543 (ppc_elf_relocate_section): Use value of elf.hgot rather than hard-
544 coded 4.
545 (ppc_elf_finish_dynamic_sections): Likewise.
546 (elf_backend_got_symbol_offset): Don't define.
547 (elf_backend_got_header_size): Ditto.
548
2e0fbf77
JW
5492005-05-05 Steve Ellcey <sje@cup.hp.com>
550
551 * configure.in (ACX_HEADER_STRING): New.
552 * configure: Regenerate.
553 * config.in: Regenerate.
554 * sysdep.h (STRING_WITH_STRINGS): Use.
555
6f140a15
L
5562005-05-05 H.J. Lu <hongjiu.lu@intel.com>
557
558 * elf.c (_bfd_elf_close_and_cleanup): Only call
559 _bfd_dwarf2_cleanup_debug_info on bfd_object.
560
01d9ad14
L
5612005-05-05 H.J. Lu <hongjiu.lu@intel.com>
562
563 * elflink.c (_bfd_elf_provide_section_bound_symbols): Use
564 "__bss_start" instead of "_edata" as fallback.
565
b36b76cb
L
5662005-05-05 H.J. Lu <hongjiu.lu@intel.com>
567
568 * bfd-in2.h: Regenerated.
569
eac338cf
PB
5702005-05-05 Paul Brook <paul@codesourcery.com>
571
572 * config.bfd: Use bfd_elf32_i386_vxworks_vec for i?86-*-vxworks.
573 * configure.in: Add bfd_elf32_i386_vxworks_vec. i386 targets need
574 elf-vxworks.lo.
575 * configure: Regenerate.
576 * Makefile.am (BFD32_BACKENDS): Add elf-vxworks.lo.
577 (BFD32_BACKENDS_CFILES): Add elf-vxworks.c.
578 (elf32-i386.lo): Depend on elf-vxworks.h.
579 (elf-vxworks.lo): New rule.
580 * Makefile.in: Regenerate.
581 * elf-bfd.h (elf_backend_data): Update type of
582 elf_backend_emit_relocs.
583 (_bfd_elf_link_output_relocs): Update prototype.
584 * elflink.c (_bfd_elf_link_output_relocs): Always use
585 bed->elf_backend_emit_relocs when outputting relocations.
586 * elfxx-target.h (elf_backend_emit_relocs): Default to
587 _bfd_elf_link_output_relocs.
588 * targets.c (bfd_elf32_i386_vxworks_vec): Declare.
589 (_bfd_target_vector): Add bfd_elf32_i386_vxworks_vec.
590 * elf32-i386.c: Add elf32-i386-vxworks target BFD.
591 (elf_i386_plt0_entry): Remove padding.
592 (elf_i386_pic_plt0_entry): Ditto.
593 (PLTRESOLVE_RELOCS_SHLIB, PLTRESOLVE_RELOCS): Define.
594 (PLT_NON_JUMP_SLOT_RELOCS): Define.
595 (elf_i386_link_hash_table): Add srelplt2, hgot, hplt, is_vxworks and
596 plt0_pad_byte fields.
597 (elf_i386_link_hash_table_create): Zero them.
598 (elf_i386_create_dynamic_sections): Create static relocation section.
599 (allocate_dynrelocs): Allocate space for static PLT relocations.
600 (elf_i386_size_dynamic_sections): Save shortcuts to PLT and GOT
601 symbols. Give PLT symbols function type. Don't strip PLT sections
d7128ce4 602 if we have exported symbols from them.
eac338cf
PB
603 (elf_i386_finish_dynamic_symbol): Fill in VxWorks PLT static
604 relocation section. Don't mark _GLOBAL_OFFSET_TABLE_ as absolute on
605 VxWorks.
606 (elf_i386_finish_dynamic_sections): Allow different pad bytes.
607 Add relocation for GOT location. Fill in PLT static relocations.
608 (elf_i386_vxworks_link_hash_table_create): New function.
609 (elf_i386_vxworks_link_output_symbol_hook): New function.
610 * elf-vxworks.h: New file.
611
3496cb2a
L
6122005-05-05 H.J. Lu <hongjiu.lu@intel.com>
613
614 * section.c (bfd_make_section_anyway_with_flags): New.
615 (bfd_make_section_anyway): Call bfd_make_section_anyway_with_flags,
616 (bfd_make_section_with_flags): New.
617 (bfd_make_section): Call bfd_make_section_with_flags.
618
619 * elf-m10300.c (_bfd_mn10300_elf_create_got_section): Call
620 bfd_make_section_with_flags/bfd_make_section_anyway_with_flags
621 instead of bfd_make_section/bfd_make_section and don't call
622 bfd_set_section_flags.
623 (mn10300_elf_check_relocs): Likewise.
624 (_bfd_mn10300_elf_create_dynamic_sections): Likewise.
625 * elf32-arm.c (create_got_section): Likewise.
626 (bfd_elf32_arm_add_glue_sections_to_bfd): Likewise.
627 (elf32_arm_check_relocs): Likewise.
628 * elf32-cris.c (cris_elf_check_relocs): Likewise.
629 * elf32-frv.c (elf32_frv_add_symbol_hook): Likewise.
630 (_frv_create_got_section): Likewise.
631 (elf32_frvfdpic_create_dynamic_sections): Likewise.
632 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Likewise.
633 (elf32_hppa_check_relocs): Likewise.
634 * elf32-i370.c (i370_elf_create_dynamic_sections): Likewise.
635 (i370_elf_check_relocs): Likewise.
636 * elf32-i386.c (create_got_section): Likewise.
637 (elf_i386_check_relocs): Likewise.
638 * elf32-m32r.c (m32r_elf_add_symbol_hook): Likewise.
639 (create_got_section): Likewise.
640 (m32r_elf_create_dynamic_sections): Likewise.
641 (m32r_elf_check_relocs): Likewise.
642 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
643 * elf32-ppc.c (ppc_elf_create_got): Likewise.
644 (ppc_elf_create_dynamic_sections): Likewise.
645 (ppc_elf_add_symbol_hook): Likewise.
646 (ppc_elf_check_relocs): Likewise.
647 * elf32-s390.c (create_got_section): Likewise.
648 (elf_s390_check_relocs): Likewise.
649 * elf32-sh.c (create_got_section): Likewise.
650 (sh_elf_create_dynamic_sections): Likewise.
651 (sh_elf_check_relocs): Likewise.
652 * elf32-vax.c (elf_vax_check_relocs): Likewise.
653 * elf32-xstormy16.c (xstormy16_elf_check_relocs): Likewise.
654 * elf32-xtensa.c (elf_xtensa_create_dynamic_sections): Likewise.
655 (add_extra_plt_sections): Likewise.
656 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
657 (elf64_alpha_create_got_section): Likewise.
658 (elf64_alpha_create_dynamic_sections): Likewise.
659 (elf64_alpha_check_relocs): Likewise.
660 * elf64-hppa.c (get_reloc_section): Likewise.
661 (get_opd): Likewise.
662 (get_plt): Likewise.
663 (get_dlt): Likewise.
664 (get_stub): Likewise.
665 (elf64_hppa_create_dynamic_sectionso): Likewise.
666 * elf64-mmix.c (mmix_elf_check_common_relocs): Likewise.
667 * elf64-ppc.c (create_linkage_sections): Likewise.
668 (ppc64_elf_check_relocs): Likewise.
669 * elf64-s390.c (create_got_section): Likewise.
670 (elf_s390_check_relocs): Likewise.
671 * elf64-sh64.c (sh_elf64_check_relocs): Likewise.
672 (sh64_elf64_create_dynamic_sections): Likewise.
673 * elf64-x86-64.c (create_got_section): Likewise.
674 (elf64_x86_64_check_relocs): Likewise.
675 * elflink.c (_bfd_elf_create_got_section): Likewise.
676 (_bfd_elf_link_create_dynamic_sections): Likewise.
677 (elf_link_add_object_symbols): Likewise.
678 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
679 (elfNN_ia64_create_dynamic_sections): Likewise.
680 (get_fptr): Likewise.
681 (get_pltoff): Likewise.
682 (get_reloc_section): Likewise.
683 (elfNN_ia64_object_p): Likewise.
684 * elfxx-mips.c (mips_elf_rel_dyn_section): Likewise.
685 (mips_elf_create_compact_rel_section): Likewise.
686 (mips_elf_create_got_section): Likewise.
687 (_bfd_mips_elf_create_dynamic_sections): Likewise.
688 * elfxx-sparc.c (create_got_section): Likewise.
689 (_bfd_sparc_elf_check_relocs): Likewise.
690
691 * elf.c (_bfd_elf_new_section_hook): Call _bfd_elf_get_sec_type_attr
692 on linker created sections.
693
59fef9e7
L
6942005-05-05 H.J. Lu <hongjiu.lu@intel.com>
695
696 PR 882
697 * elflink.c (_bfd_elf_link_assign_sym_version): Allow version
698 script on executable.
699
35330cce
NC
7002005-05-05 John Levon <levon@movementarian.org>
701
702 * dwarf2.c (read_abbrevs): If bfd_realloc fails, free currently
703 allocated memory before returning.
704 (decode_line_info): Likewise.
705 (_bfd_dwarf2_cleanup_debug_info): New function: Frees memory
706 allocated by functions in this file.
707 * elf-bfd.h (_bfd_dwarf2_cleanup_debug_info): Prototype.
6f140a15 708 * elf.c (_bfd_elf_close_and_cleanup): Call
35330cce
NC
709 _bfd_dwarf2_cleanup_debug_info.
710
4a2a2686
HPN
7112005-05-05 Hans-Peter Nilsson <hp@axis.com>
712
713 * Makefile.am (INCLUDES): Don't -D_GNU_SOURCE here.
714 * configure.in: Call AC_GNU_SOURCE here, after AC_PROG_CC.
715 * configure, config.in, Makefile.in: Regenerate.
716 * sysdep.h (stpcpy): Revert last change.
717
0baace35
HPN
7182005-05-05 Hans-Peter Nilsson <hp@axis.com>
719
720 * sysdep.h (stpcpy): Wrap declaration in parentheses.
721
5a260b66
L
7222005-05-04 H.J. Lu <hongjiu.lu@intel.com>
723
724 * elfxx-ia64.c (ARCH_SIZE): New.
725 (LOG_SECTION_ALIGN): Likewise.
726 (elfNN_ia64_create_dynamic_sections): Use LOG_SECTION_ALIGN to
727 align relocation sections.
728 (get_fptr): Likewise.
729 (get_reloc_section): Likewise.
730 (elfNN_ia64_tprel_base): Likewise.
731 (elfNN_ia64_check_relocs): Support 32bit relocations.
732 (allocate_global_fptr_got): Likewise.
733 (allocate_dynrel_entries): Likewise.
734 (set_got_entry): Likewise.
735 (set_pltoff_entry): Likewise.
736 (elfNN_ia64_relocate_section): Likewise.
737
7382005-05-04 H.J. Lu <hongjiu.lu@intel.com>
739
740 * configure.in: Add AC_CHECK_DECLS(stpcpy).
741 * configure: Regenerate.
742 * config.in: Likewise.
743
744 * sysdep.h (stpcpy): New.
745
3e110533
NC
7462005-05-04 Nick Clifton <nickc@redhat.com>
747
748 * Update the address and phone number of the FSF organization in
749 the GPL notices in the following files:
750 aix386-core.c, aix5ppc-core.c, aout-adobe.c, aout-arm.c,
751 aout-cris.c, aout-ns32k.c, aout-sparcle.c, aout-target.h,
752 aout-tic30.c, aout0.c, aout32.c, aout64.c, aoutf1.h, aoutx.h,
753 archive.c, archive64.c, archures.c, armnetbsd.c, bfd-in.h,
754 bfd-in2.h, bfd.c, bfdio.c, bfdwin.c, binary.c, bout.c, cache.c,
755 cf-i386lynx.c, cf-m68klynx.c, cf-sparclynx.c, cisco-core.c,
756 coff-a29k.c, coff-alpha.c, coff-apollo.c, coff-arm.c, coff-aux.c,
757 coff-go32.c, coff-h8300.c, coff-h8500.c, coff-i386.c, coff-i860.c,
758 coff-i960.c, coff-ia64.c, coff-m68k.c, coff-m88k.c, coff-maxq.c,
759 coff-mcore.c, coff-mips.c, coff-or32.c, coff-pmac.c, coff-ppc.c,
760 coff-rs6000.c, coff-sh.c, coff-sparc.c, coff-stgo32.c,
761 coff-svm68k.c, coff-tic30.c, coff-tic4x.c, coff-tic54x.c,
762 coff-tic80.c, coff-u68k.c, coff-w65.c, coff-we32k.c, coff-z8k.c,
763 coff64-rs6000.c, coffcode.h, coffgen.c, cofflink.c, coffswap.h,
764 corefile.c, cpu-a29k.c, cpu-alpha.c, cpu-arc.c, cpu-arm.c,
765 cpu-avr.c, cpu-cr16c.c, cpu-cris.c, cpu-crx.c, cpu-d10v.c,
766 cpu-d30v.c, cpu-dlx.c, cpu-fr30.c, cpu-frv.c, cpu-h8300.c,
767 cpu-h8500.c, cpu-hppa.c, cpu-i370.c, cpu-i386.c, cpu-i860.c,
768 cpu-i960.c, cpu-ia64-opc.c, cpu-ia64.c, cpu-ip2k.c, cpu-iq2000.c,
769 cpu-m10200.c, cpu-m10300.c, cpu-m32r.c, cpu-m68hc11.c,
770 cpu-m68hc12.c, cpu-m68k.c, cpu-m88k.c, cpu-maxq.c, cpu-mcore.c,
771 cpu-mips.c, cpu-mmix.c, cpu-msp430.c, cpu-ns32k.c, cpu-openrisc.c,
772 cpu-or32.c, cpu-pdp11.c, cpu-pj.c, cpu-powerpc.c, cpu-rs6000.c,
773 cpu-s390.c, cpu-sh.c, cpu-sparc.c, cpu-tic30.c, cpu-tic4x.c,
774 cpu-tic54x.c, cpu-tic80.c, cpu-v850.c, cpu-vax.c, cpu-w65.c,
775 cpu-we32k.c, cpu-xstormy16.c, cpu-xtensa.c, cpu-z8k.c, demo64.c,
776 dwarf1.c, dwarf2.c, ecoff.c, ecofflink.c, ecoffswap.h,
777 efi-app-ia32.c, efi-app-ia64.c, elf-bfd.h, elf-eh-frame.c,
778 elf-hppa.h, elf-m10200.c, elf-m10300.c, elf-strtab.c, elf.c,
779 elf32-am33lin.c, elf32-arc.c, elf32-arm.c, elf32-avr.c,
780 elf32-cr16c.c, elf32-cris.c, elf32-crx.c, elf32-d10v.c,
781 elf32-d30v.c, elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-gen.c,
782 elf32-h8300.c, elf32-hppa.c, elf32-hppa.h, elf32-i370.c,
783 elf32-i386.c, elf32-i860.c, elf32-i960.c, elf32-ip2k.c,
784 elf32-iq2000.c, elf32-m32r.c, elf32-m68hc11.c, elf32-m68hc12.c,
785 elf32-m68hc1x.c, elf32-m68hc1x.h, elf32-m68k.c, elf32-m88k.c,
786 elf32-mcore.c, elf32-mips.c, elf32-msp430.c, elf32-openrisc.c,
787 elf32-or32.c, elf32-pj.c, elf32-ppc.c, elf32-ppc.h, elf32-s390.c,
788 elf32-sh-symbian.c, elf32-sh.c, elf32-sh64-com.c, elf32-sh64.c,
789 elf32-sh64.h, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
790 elf32-xstormy16.c, elf32-xtensa.c, elf32.c, elf64-alpha.c,
791 elf64-gen.c, elf64-hppa.c, elf64-hppa.h, elf64-mips.c,
792 elf64-mmix.c, elf64-ppc.c, elf64-ppc.h, elf64-s390.c,
793 elf64-sh64.c, elf64-sparc.c, elf64-x86-64.c, elf64.c, elfcode.h,
794 elfcore.h, elflink.c, elfn32-mips.c, elfxx-ia64.c, elfxx-mips.c,
795 elfxx-mips.h, elfxx-sparc.c, elfxx-sparc.h, elfxx-target.h,
796 epoc-pe-arm.c, epoc-pei-arm.c, format.c, freebsd.h, gen-aout.c,
797 genlink.h, hash.c, host-aout.c, hp300bsd.c, hp300hpux.c,
798 hppabsd-core.c, hpux-core.c, i386aout.c, i386bsd.c, i386dynix.c,
799 i386freebsd.c, i386linux.c, i386lynx.c, i386mach3.c, i386msdos.c,
800 i386netbsd.c, i386os9k.c, ieee.c, ihex.c, init.c, irix-core.c,
801 libaout.h, libbfd-in.h, libbfd.c, libbfd.h, libcoff-in.h,
802 libcoff.h, libecoff.h, libhppa.h, libieee.h, libnlm.h, liboasys.h,
803 libpei.h, libxcoff.h, linker.c, lynx-core.c, m68k4knetbsd.c,
804 m68klinux.c, m68klynx.c, m68knetbsd.c, m88kmach3.c, m88kopenbsd.c,
805 mach-o-target.c, mach-o.c, mach-o.h, merge.c, mipsbsd.c, mmo.c,
806 netbsd-core.c, netbsd.h, newsos3.c, nlm-target.h, nlm.c,
807 nlm32-alpha.c, nlm32-i386.c, nlm32-ppc.c, nlm32-sparc.c, nlm32.c,
808 nlm64.c, nlmcode.h, nlmswap.h, ns32k.h, ns32knetbsd.c, oasys.c,
809 opncls.c, osf-core.c, pc532-mach.c, pdp11.c, pe-arm.c, pe-i386.c,
810 pe-mcore.c, pe-mips.c, pe-ppc.c, pe-sh.c, peXXigen.c,
811 pef-traceback.h, pef.c, pef.h, pei-arm.c, pei-i386.c, pei-mcore.c,
812 pei-mips.c, pei-ppc.c, pei-sh.c, peicode.h, ppcboot.c,
813 ptrace-core.c, reloc.c, reloc16.c, riscix.c, rs6000-core.c,
814 sco5-core.c, section.c, simple.c, som.c, som.h, sparclinux.c,
815 sparclynx.c, sparcnetbsd.c, srec.c, stab-syms.c, stabs.c, sunos.c,
816 syms.c, sysdep.h, targets.c, tekhex.c, ticoff.h, trad-core.c,
817 vax1knetbsd.c, vaxbsd.c, vaxnetbsd.c, versados.c, vms-gsd.c,
818 vms-hdr.c, vms-misc.c, vms-tir.c, vms.c, vms.h, xcoff-target.h,
819 xcofflink.c, xsym.c, xsym.h, xtensa-isa.c, xtensa-modules.c,
11d02c41 820 hosts/alphavms.h
3e110533 821
f652615e
L
8222005-05-04 H.J. Lu <hongjiu.lu@intel.com>
823
824 * bfd-in.h (_bfd_elf_provide_section_bound_symbols): New.
825 * bfd-in2.h: Regenerated.
826
827 * elflink.c (bfd_elf_set_symbol): New.
828 (_bfd_elf_provide_symbol): Call it.
829 (_bfd_elf_provide_section_bound_symbols): New.
830
c5e2cead
L
8312005-05-04 H.J. Lu <hongjiu.lu@intel.com>
832
833 * elflink.c (_bfd_elf_merge_symbol): Only skip weak definitions
834 at the end, if a strong definition has already been seen.
835
8423293d
AM
8362005-05-04 Alan Modra <amodra@bigpond.net.au>
837
838 * section.c (struct bfd_section): Replace link_order_head and
839 link_order_tail with map_head and map_tail union.
840 (STD_SECTION): Update.
841 (_bfd_strip_section_from_output): Delete.
842 * aoutx.h: Update throughout for above changes.
843 * coff-ppc.c: Likewise.
844 * cofflink.c: Likewise.
845 * ecoff.c: Likewise.
846 * elf-eh-frame.c: Likewise.
847 * elf-m10300.c: Likewise.
848 * elf.c: Likewise.
849 * elf32-arm.c: Likewise.
850 * elf32-cris.c: Likewise.
851 * elf32-hppa.c: Likewise.
852 * elf32-i386.c: Likewise.
853 * elf32-m32r.c: Likewise.
854 * elf32-m68hc1x.c: Likewise.
855 * elf32-m68k.c: Likewise.
856 * elf32-ppc.c: Likewise.
857 * elf32-s390.c: Likewise.
858 * elf32-sh.c: Likewise.
859 * elf32-vax.c: Likewise.
860 * elf32-xtensa.c: Likewise.
861 * elf64-alpha.c: Likewise.
862 * elf64-hppa.c: Likewise.
863 * elf64-ppc.c: Likewise.
864 * elf64-s390.c: Likewise.
865 * elf64-sh64.c: Likewise.
866 * elf64-x86-64.c: Likewise.
867 * elflink.c: Likewise.
868 * elfxx-ia64.c: Likewise.
869 * elfxx-mips.c: Likewise.
870 * elfxx-sparc.c: Likewise.
871 * linker.c: Likewise.
872 * merge.c: Likewise.
873 * pdp11.c: Likewise.
874 * xcofflink.c: Likewise.
875 * elflink.c (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Split
876 out from bfd_elf_size_dynamic_sections.
877 * bfd-in.h (bfd_boolean bfd_elf_size_dynsym_hash_dynstr): Declare.
878 * bfd-in2.h: Regenerate.
879
04dd1667
AM
8802005-05-04 Alan Modra <amodra@bigpond.net.au>
881
882 * section.c (bfd_section_list_remove): Don't clear s->next.
883 (bfd_section_list_append): Always init s->prev.
884 (bfd_section_list_prepend): Define.
885 (bfd_section_list_insert_after): Minor optimization.
886 (bfd_section_removed_from_list): Rewrite.
887 * elf.c (assign_section_numbers): Simplify list traversal now that
888 bfd_section_list_remove doesn't destroy removed section next ptr.
889 * sunos.c (sunos_add_dynamic_symbols): Likewise.
890 * elfxx-ia64.c (elfNN_ia64_object_p): Use bfd_section_list_prepend.
891 * xcofflink.c (_bfd_xcoff_bfd_final_link): Simplify list traversal.
892 * bfd-in2.h: Regenerate.
893
5daa8fe7
L
8942005-05-02 H.J. Lu <hongjiu.lu@intel.com>
895
896 * bfd.c (bfd): Remove section_tail and add section_last.
897 (bfd_preserve): Likewise.
898 (bfd_preserve_save): Likewise.
899 (bfd_preserve_restore): Likewise.
900 * opncls.c (_bfd_new_bfd): Likewise.
901
902 * coffcode.h (coff_compute_section_file_positions): Updated.
903 (coff_compute_section_file_positions): Likewise.
904 * elf.c (assign_section_numbers): Likewise.
905 * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
906 * elf64-mmix.c (mmix_elf_final_link): Likewise.
907 * elfxx-ia64.c (elfNN_ia64_object_p): Likewise.
908 * elfxx-mips.c (_bfd_mips_elf_link_hash_table_create): Likewise.
909 * sunos.c (sunos_add_dynamic_symbols): Likewise.
910 * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
911
912 * ecoff.c (bfd_debug_section): Initialize prev.
913
914 * section.c (bfd_section): Add prev.
915 (bfd_section_list_remove): Updated.
916 (bfd_section_list_append): New.
917 (bfd_section_list_insert_after): New.
918 (bfd_section_list_insert_before): New.
919 (bfd_section_list_insert): Removed.
920 (bfd_section_removed_from_list): Updated.
921 (STD_SECTION): Initialize prev.
922 (bfd_section_init): Updated.
923 (bfd_section_list_clear): Updated.
924
925 * bfd-in2.h: Regenerated.
926
a31501e9
L
9272005-05-02 H.J. Lu <hongjiu.lu@intel.com>
928
929 * elf.c (_bfd_elf_new_section_hook): Don't call
930 _bfd_elf_get_sec_type_attr on sections from input files.
931
d05da6a8
L
9322005-05-02 H.J. Lu <hongjiu.lu@intel.com>
933
934 * merge.c (sec_merge_init): Call bfd_hash_table_init_n with
935 hash table size 16699 instead of bfd_hash_table_init.
936
a67b080b
PB
9372005-05-01 Paul Brook <paul@codesourcery.com>
938
939 * elflink.c (_bfd_elf_merge_symbol): Skip weak definitions if a strong
940 definition has already been seen.
941
c6596c5e
PB
9422005-05-01 Paul Brook <paul@codesourcery.com>
943
944 * elf32-arm.c (bfd_elf32_arm_process_before_allocation): Treat
945 R_ARM_PLT32 the same as R_ARM_PC24.
946 (arm_add_to_rel): Ditto.
947
9a813b7a
DJ
9482005-04-29 Ralf Corsepius <ralf.corsepius@rtems.org>
949
950 * config.bfd: Add h8300*-*-rtemscoff.
951 Switch h8300*-*-rtems* to elf.
952
aa7eb06d
DJ
9532005-04-29 Daniel Jacobowitz <dan@codesourcery.com>
954
955 * aclocal.m4, Makefile.in: Regnerated.
956
fa0d1cab
PB
9572005-04-28 Paul Brook <paul@codesourcery.com>
958
959 Merge changes only applied to Makefile.in.
960 * Makefile.am (BFD32_BACKENDS): Add elfxx-sparc.lo
961 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
962 (elfxx-sparc.lo): New rule.
963 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
964 (elf64-sparc.lo): Likewise.
965
0291d291
NC
9662005-04-28 Julian Brown <julian@codesourcery.com>
967
968 * elflink.c (_bfd_elf_provide_symbol): Provide symbol for weak
969 import.
970
26c61ae5
L
9712005-04-27 H.J. Lu <hongjiu.lu@intel.com>
972
973 * elf-bfd.h (bfd_elf_sym_name): Also take "asection *".
974
975 * elf.c (bfd_elf_sym_name): Updated.
976 (group_signature): Likewise.
977 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
978 * elf64-ppc.c (ppc64_elf_edit_opd): Likewise.
979 (ppc64_elf_edit_toc): Likewise.
980 (ppc64_elf_relocate_section): Likewise.
981 * elfcode.h (elf_slurp_symbol_table): Likewise.
982 * elflink.c (elf_link_input_bfd): Likewise.
983
984 * elfxx-ia64.c (elfNN_ia64_relocate_section): Call
985 bfd_elf_sym_name to get local symbol name when reporting errors.
986
8c19749a
NC
9872005-04-27 Nick Clifton <nickc@redhat.com>
988
989 * elflink.c (elf_link_input_bfd): Handle the case where a badly
990 formatted input file results in a reloc which has no associated
991 global symbol.
992
8e5b6e16
JG
9932005-04-26 Jerome Guitton <guitton@gnat.com>
994
995 * bfd.m4 (BFD_NEED_DECLARATION): Restore.
996
e459dc7b
DM
9972005-04-25 David S. Miller <davem@davemloft.net>
998
999 * elfxx-sparc.c (sparc_elf_append_rela_64): Add BFD64 protection.
1000 (sparc_elf_r_info_64, _bfd_sparc_elf_finish_dynamic_symbol,
1001 sparc64_finish_dyn, _bfd_sparc_elf_finish_dynamic_sections):
1002 Likewise.
1003
6d633fd2
L
10042005-04-25 H.J. Lu <hongjiu.lu@intel.com>
1005
1006 PR 858
1007 * elflink.c (elf_link_input_bfd): Make non-debugging reference
1008 to discarded section an error.
1009
d34a2b1d
JG
10102005-04-21 Jerome Guitton <guitton@gnat.com>
1011
1012 * configure.in: Replace BFD_NEED_DECLARATION checks by the
1013 corresponding AC_CHECK_DECLS.
1014 * sysdep.h: Replace NEED_DECLARATION_* checks by the corresponding
1015 HAVE_DECL_*.
1016 * bfd.m4 (BFD_NEED_DECLARATION): Remove, obsolete.
1017 * configure: Regenerate.
1018 * config.in: Ditto.
1019
ff01938b
AS
10202005-04-21 Andreas Schwab <schwab@suse.de>
1021
c2e70a82
AS
1022 * elfxx-sparc.h (struct _bfd_sparc_elf_link_hash_table): Remove
1023 unsigned from type of dynamic_interpreter.
1024 * elfxx-sparc.c (_bfd_sparc_elf_link_hash_table_create): Remove
1025 casts again.
1026
ff01938b
AS
1027 * elf.c (assign_section_numbers): Fix comment.
1028
0858d3ec
JG
10292005-04-21 Jerome Guitton <guitton@gnat.com>
1030
1031 * som.c (som_bfd_print_private_bfd_data): Add explicit cast to long
1032 for struct som_exec_auxhdr fields.
1033
7920ce38
NC
10342005-04-21 Nick Clifton <nickc@redhat.com>
1035
1036 * aout-adobe.c: Convert to ISO C and fix formatting.
1037 * aout-arm.c: Convert to ISO C and fix formatting.
1038 * aout-cris.c: Convert to ISO C and fix formatting.
1039 * aout-ns32k.c: Convert to ISO C and fix formatting.
1040 * aout-tic30.c: Convert to ISO C and fix formatting.
1041 * coffcode.h: Convert to ISO C and fix formatting.
1042 * coffswap.h: Convert to ISO C and fix formatting.
1043 * i386aout.c: Convert to ISO C and fix formatting.
1044 * libaout.h: Convert to ISO C and fix formatting.
1045 * libcoff-in.h: Convert to ISO C and fix formatting.
1046 * libcoff.h: Convert to ISO C and fix formatting.
1047 * libecoff.h: Convert to ISO C and fix formatting.
1048 * libnlm.h: Convert to ISO C and fix formatting.
1049 * libpei.h: Convert to ISO C and fix formatting.
1050 * libxcoff.h: Convert to ISO C and fix formatting.
1051 * nlm-target.h: Convert to ISO C and fix formatting.
1052 * nlm.c: Convert to ISO C and fix formatting.
1053 * nlm32-alpha.c: Convert to ISO C and fix formatting.
1054 * nlm32-i386.c: Convert to ISO C and fix formatting.
1055 * nlm32-ppc.c: Convert to ISO C and fix formatting.
1056 * nlm32-sparc.c: Convert to ISO C and fix formatting.
1057 * nlmcode.h: Convert to ISO C and fix formatting.
1058 * nlmswap.h: Convert to ISO C and fix formatting.
1059 * pe-mips.c: Convert to ISO C and fix formatting.
1060 * peXXigen.c: Convert to ISO C and fix formatting.
1061 * peicode.h: Convert to ISO C and fix formatting.
1062 * vms-gsd.c: Convert to ISO C and fix formatting.
1063 * vms-hdr.c: Convert to ISO C and fix formatting.
1064 * vms-misc.c: Convert to ISO C and fix formatting.
1065 * vms-tir.c: Convert to ISO C and fix formatting.
1066 * vms.c: Convert to ISO C and fix formatting.
1067 * vms.h: Convert to ISO C and fix formatting.
1068
1069 * coffgen.c (coff_print_symbol): Restore correct formatting of
1070 output.
1071
e8be8da4
DM
10722005-04-20 David S. Miller <davem@davemloft.net>
1073
1074 * elfxx-sparc.c (sparc_elf_r_symndx_64): Fix compiler warning.
1075 (_bfd_sparc_elf_link_hash_table_create): Likewise.
1076 (allocate_dynrelocs): Likewise.
1077
ec7b76fe
JG
10782005-04-20 Jerome Guitton <guitton@gnat.com>
1079
1080 * configure.in: Fix the check for basename declaration. Add check
1081 for declarations of ftello, ftello64, fseeko, fseeko64.
1082 * configure: Regenerate.
1083 * config.in: Ditto.
1084 * sysdep.h: If needed, declare ftello, ftello64, fseeko, fseeko64.
1085
22b75d0a
DM
10862005-04-19 David S. Miller <davem@davemloft.net>
1087
1088 * elfxx-sparc.c: New file.
1089 * elfxx-sparc.h: New file.
1090 * Makefile.in (BFD32_BACKENDS): Add elfxx-sparc.lo
1091 (BFD32_BACKENDS_CFILES): Add elfxx-sparc.c
1092 (elfxx-sparc.lo): New rule.
1093 (elf32-sparc.lo): Add elfxx-sparc.h dependency.
1094 (elf64-sparc.lo): Likewise.
1095 * configure.in (bfd_elf32_sparc_vec): Add elfxx-sparc.lo
1096 (bfd_elf64_sparc_vec): Likewise.
1097 * configure: Regenerate.
1098 * elf32-sparc.c: Remove common code now in elfxx-sparc.c
1099 * elf64-sparc.c: Likewise, also use elf64_sparc_*() naming
1100 which is more consistent with elf32-sparc.c
1101
a008ac03
DJ
11022005-04-19 Daniel Jacobowitz <dan@codesourcery.com>
1103
1104 * elfxx-mips.c (struct mips_elf_link_hash_entry): Update comment.
1105 (mips_elf_create_local_got_entry): Check h->root.forced_local.
1106
c87b5a93
AM
11072005-04-19 Alan Modra <amodra@bigpond.net.au>
1108
1109 * elf32-ppc.c (ppc_elf_check_relocs): Don't bother with
1110 dynamic relocs in non-SEC_ALLOC sections.
1111 (ppc_elf_gc_sweep_hook): Likewise.
1112 (ppc_elf_relax_section): Likewise.
1113 (ppc_elf_relocate_section): Likewise.
1114
7cefacd3
NC
11152005-04-18 Nick Clifton <nickc@redhat.com>
1116
1117 * aix5ppc-core.c (xcoff64_core_p): Fix compile time warning
1118 assigning a value to return_value.
1119
278d8f37
L
11202005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1121
1122 PR 855
1123 * elf.c (_bfd_elf_copy_private_section_data): Don't copy linker
1124 created group data.
1125
20dbb49d
L
11262005-04-17 H.J. Lu <hongjiu.lu@intel.com>
1127
1128 PR 855
1129 * elf.c (setup_group): Properly handle zero group count.
1130
6a808a40
MK
11312005-04-17 Mark Kettenis <kettenis@gnu.org>
1132
1133 * som.c (hppa_som_reloc, som_mkobject, som_is_space)
1134 (som_is_subspace, compare_subspaces, som_compute_checksum)
1135 (som_build_and_write_symbol_table, som_slurp_symbol_table): New
1136 protoypes.
1137 (hppa_som_reloc, compare_syms, compare_subspaces)
1138 (som_print_symbol, som_get_section_contents)
1139 (som_set_section_contents): Remove space after 'void *'.
1140 (som_bfd_print_private_bfd_data): Use %lx to print longs.
1141 (som_bfd_merge_private_bfd_data)
1142 (som_bfd_copy_private_header_data, som_bfd_set_private_flags): New
1143 defines.
1144
33bfe774
JB
11452004-04-15 Julian Brown <julian@codesourcery.com>
1146
1147 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
1148 * bfd-in2.h: Regenerate.
1149 * elf32-arm.c (elf32_arm_link_hash_table): New field, 'use_blx'.
1150 (elf32_arm_link_hash_table_create): Initialise fix_v4bx, use_blx.
1151 (bfd_elf32_arm_set_target_relocs): Handle use_blx.
1152 (elf32_arm_final_link_relocate): Use Thumb BLX for R_ARM_THM_PC22
1153 relocations if requested to.
1154 (allocate_dynrelocs): Don't count size of omitted Thumb stubs based on
1155 use_blx rather than symbian_p.
1156 (elf32_arm_finish_dynamic_symbol): Don't output Thumb PLT stubs if
1157 use_blx is in effect.
1158 (elf32_arm_symbian_link_hash_table_create): Enable use_blx by default
1159 for SymbianOS.
1160
745c12f8
NC
11612005-04-15 Nick Clifton <nickc@redhat.com>
1162
1163 * coffgen.c (coff_print_symbol): Use fprintf_vma to print vma
1164 values.
1165
2e8b3a61
AM
11662005-04-15 Alan Modra <amodra@bigpond.net.au>
1167
1168 PR ld/815
1169 * elflink.c (elf_smash_syms): Clear undef.next if it's not being
1170 used as a list pointer.
1171
9e9b66a9
AM
11722005-04-14 Alan Modra <amodra@bigpond.net.au>
1173
1174 * Makefile.am (NO_WERROR): Define.
1175 * warning.m4: New file
1176 * acinclude.m4: Include warning.m4.
1177 * configure.in: Invoke AM_BINUTILS_WARNINGS.
1178 * Makefile.in: Regenerate.
1179 * configure: Regenerate.
1180
8699aa54
AM
11812005-04-14 Alan Modra <amodra@bigpond.net.au>
1182
92ceba1e
AM
1183 * merge.c (sec_merge_emit): Tidy. Check for bfd_zmalloc errors.
1184 Write trailing padding.
1185
8699aa54
AM
1186 * merge.c (merge_strings): Round up section size for alignment.
1187
40937810
JJ
11882005-04-14 David S. Miller <davem@davemloft.net>
1189
1190 Add TLS support for 64-bit Sparc ELF.
1191 * elf64-sparc.c (sparc64_elf_dyn_relocs,
1192 sparc64_elf_link_hash_entry, sparc64_elf_obj_tdata): New structs.
1193 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLD_GD, GOT_TLD_IE,
1194 sparc64_elf_hash_entry, sparc64_elf_tdata,
1195 sparc64_elf_local_got_tls_type): New defines.
1196 (sparc64_elf_mkobject): New function.
1197 (sparc64_elf_link_hash_table): Add members for dynamic linker
1198 sections PLT, RELPLT, DYNBSS, and RELBSS. Add tls_ldm_got
1199 uion to track TLS GOT references. Add sym_sec to cache
1200 mappings from local sym to section.
1201 (link_hash_newfunc): New function.
1202 (sparc64_elf_bfd_link_hash_table_create): Rename to
1203 sparc64_elf_link_hash_table_create for consistency.
1204 Pass link_hash_newfunc to _bfd_elf_link_hash_table_init.
1205 (sparc64_elf_create_dynamic_sections): Initialize new section
1206 members of sparc64_elf_link_hash_table. Only init srelbss
1207 if not-shared.
1208 (sparc64_elf_copy_indirect_symbol, sparc64_elf_tls_transition):
1209 New functions.
1210 (SPARC_NOP): Define.
1211 (sparc64_elf_build_plt, sparc64_elf_plt_entry_offset,
1212 sparc64_elf_plt_ptr_offset): Delete.
1213 (sparc64_plt_entry_build): New function to build PLT entries
1214 gradually instread of all at once at the end of linking.
1215 (sparc64_elf_check_relocs): Delete dynobj, sgot, and srelgot
1216 local vars. Get them from sparc64_elf_hash_table instead.
1217 Check early on if r_symndx is in bounds. Handle TLS transitions.
1218 Account for TLS GOT references and DF_STATIC_TLS, as needed.
1219 For TLS relocs, record the tls_type in either
1220 sparc64_elf_local_got_tls_type or sparc64_elf_hash_entry as
1221 appropriate. For R_SPARC_TLS_{GD,LDM}_CALL, emit a reference
1222 to the __tls_get_addr symbol. For PLT relocs, track references
1223 via h->plt.refcount. When R_SPARC_{PC10,PC22,PC_HH22,PC_HM10,
1224 PC_LM22} and h not-NULL, set h->non_got_ref. For global data
1225 symbol references, count the number of relocations needed for
1226 that symbol. For default switch case, don't error, this lets
1227 the TLS relocs not explicitly handled by this function get
1228 accepted.
1229 (sparc64_elf_gc_mark_hook, sparc64_gc_sweep_hook): New functions.
1230 (sparc64_elf_adjust_dynamic_symbol): Remove dynobj local var, get
1231 it from sparc64_elf_hash_table. Store the real PLT offset
1232 in h->plt.offset, and build PLT entries one at a time. Also
1233 get .dynbss section pointer from htab.
1234 (allocate_dynrelocs, readonly_dynrelocs,
1235 sparc64_omit_section_dynsym): New functions.
1236 (sparc64_elf_omit_section_dynsym): Use these new functions as
1237 helpers.
1238 (dtpoff_base, tpoff): New functions.
1239 (sparc64_elf_relocate_section): Kill dynobj, sgot, and splt
1240 locals, get them from sparc64_elf_hash_table. Handle TLS
1241 relocations and refcounting in main relocation loop.
1242 (sparc64_elf_finish_dynamic_symbol): Use
1243 sparc64_elf_link_hash_table. Build PLT entries as we see
1244 them. Handle TLS GOT relocations.
1245 (sparc64_elf_finish_dynamic_sections): Get sgot and dynobj
1246 from sparc64_elf_hash_table. Initialize only PLT header
1247 not all entries since we not build PLT entries one by one.
1248 (elf_backend_copy_indirect_symbol, bfd_elf64_mkobject,
1249 elf_backend_gc_mark_hook, elf_backend_gc_sweep_hook,
1250 elf_backend_can_gc_sections, elf_backend_can_refcount): Define.
1251
e75a280b
L
12522005-04-13 Daniel Jacobowitz <dan@codesourcery.com>
1253
1254 * elflink.c (elf_link_input_bfd): Update check for removed
1255 sections.
1256
ceae3e33
AM
12572005-04-12 Alan Modra <amodra@bigpond.net.au>
1258
1259 * Makefile.am: Run "make dep-am".
1260 * Makefile.in: Regenerate.
1261 * aclocal.m4: Regenerate.
1262 * libcoff.h: Regenerate.
1263
ab82c5b9
L
12642005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1265
1266 * linker.c (_bfd_generic_link_output_symbols): Also check if
1267 the output section of an input section has been removed from
1268 the output file.
1269
1270 * section.c (bfd_section_list_remove): Clear the next field
1271 of the removed section.
1272 (bfd_section_removed_from_list): New.
1273 * bfd-in2.h: Regenerated.
1274
bd695bcc
JJ
12752005-04-11 David S. Miller <davem@davemloft.net>
1276
1277 * elf32-sparc.c (elf32_sparc_relocate_section,
1278 R_SPARC_TLS_LDO_{HIX22,LOX10}): When not shared, transition to
1279 R_SPARC_TLS_LE_{HIX22,LOX10}.
1280 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_HIX22): Only
1281 xor relocation with 0xffffffff if R_SPARC_TLS_LE_HIX22.
1282 (elf32_sparc_relocate_section, R_SPARC_TLS_{LDO,LE}_LOX10): Only
1283 or 0x1c00 into relocation if R_SPARC_TLS_LE_HIX22.
1284
b5b2699c
L
12852005-04-11 H.J. Lu <hongjiu.lu@intel.com>
1286
1287 * coffcode.h (STRING_SIZE_SIZE): Updated to match libcoff-in.h.
1288
116c20d2 12892005-04-11 Nick Clifton <nickc@redhat.com>
d7128ce4 1290
116c20d2
NC
1291 * aout-target.h: Convert to ISO C.
1292 * aoutf1.h: Convert to ISO C.
1293 * aoutx.h: Convert to ISO C.
1294 * bout.c: Convert to ISO C.
1295 * dwarf1.c: Convert to ISO C.
1296 * ecoffswap.h: Convert to ISO C.
1297 * freebsd.h: Convert to ISO C.
1298 * genlink.h: Convert to ISO C.
1299 * ieee.c: Convert to ISO C.
1300 * ihex.c: Convert to ISO C.
1301 * libcoff-in.h: Convert to ISO C.
1302 * mach-o.c: Convert to ISO C.
1303 * mach-o.h: Convert to ISO C.
1304 * netbsd.h: Convert to ISO C.
1305 * ns32k.h: Convert to ISO C.
1306 * ns32knetbsd.c: Convert to ISO C.
1307 * oasys.c: Convert to ISO C.
1308 * pdp11.c: Convert to ISO C.
1309 * pef-traceback.h: Convert to ISO C.
1310 * pef.c: Convert to ISO C.
1311 * pef.h: Convert to ISO C.
1312 * riscix.c: Convert to ISO C.
1313 * som.c: Convert to ISO C.
1314 * som.h: Convert to ISO C.
1315 * srec.c: Convert to ISO C.
1316 * stabs.c: Convert to ISO C.
1317 * sunos.c: Convert to ISO C.
1318 * tekhex.c: Convert to ISO C.
1319 * versados.c: Convert to ISO C.
1320 * version.h: Convert to ISO C.
1321 * xcoff-target.h: Convert to ISO C.
1322 * xcofflink.c: Convert to ISO C.
1323 * xsym.c: Convert to ISO C.
1324 * xsym.h: Convert to ISO C.
1325
8f6277f5
PB
13262005-04-08 Paul Brook <paul@codesourcery.com>
1327
1328 * elf32-arm.c (ARM2THUMB_GLUE_SIZE): Rename...
1329 (ARM2THUMB_STATIC_GLUE_SIZE): ... to this.
1330 (ARM2THUMB_PIC_GLUE_SIZE): Define.
1331 (a2t1p_ldr_insn, a2t2p_add_pc_insn, a2t3p_bx_r12_insn): Add.
1332 (elf32_arm_to_thumb_stub): Create PIC stubs.
1333 (record_arm_to_thumb_glue): Use different stub size for relocatable
1334 images.
1335
8c1d1bb8
AM
13362005-04-05 Alan Modra <amodra@bigpond.net.au>
1337
1338 * elf64-ppc.c (dec_dynrel_count): New function split out from
1339 ppc64_elf_edit_toc, with additional code from ppc64_elf_edit_opd.
1340 (ppc64_elf_edit_toc, ppc64_elf_edit_opd): Use it.
1341 (ppc64_elf_tls_optimize): Likewise.
1342
8c101720
NC
13432005-04-05 Mark Kettenis <kettenis@gnu.org>
1344
1345 * netbsd-core.c (SPARC_WCOOKIE_OFFSET): Renamed from
1346 CORE_WCOOKIE_OFFSET.
1347 (SPARC64_WCOOKIE_OFFSET): New.
1348 (netbsd_core_file_p): Provide .wcookie section for OpenBSD/sparc64.
1349
429cc0ae
NC
13502005-04-05 Nick Clifton <nickc@redhat.com>
1351
1352 * po/rw.po: New translation: Kinyarwanda
1353 * configure.in (ALL_LINGUAS): Add rw
1354 * configure: Regenerate.
1355
cc2e31b9
RS
13562005-04-05 Richard Sandiford <rsandifo@redhat.com>
1357
1358 * elfxx-mips.c (MIPS_ELF_OPTIONS_SECTION_NAME_P): New macro.
1359 (_bfd_mips_elf_section_from_shdr): Use it to check for recognized
1360 SHT_MIPS_OPTIONS names. Allow all sections with unrecognised
1361 section flags.
1362 (_bfd_mips_elf_fake_sections): Use MIPS_ELF_OPTIONS_SECTION_NAME_P
1363 to check for SHT_MIPS_OPTIONS sections.
1364 (_bfd_mips_elf_set_section_contents): Likewise.
1365
8236346f
EC
13662005-04-04 Eric Christopher <echristo@redhat.com>
1367
1368 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents):
1369 Clean up gp handling code.
1370
7e4111ad
L
13712005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1372
1373 * elf.c (bfd_elf_set_group_contents): Ignore linker created
d7128ce4 1374 group section.
da9f89d4
L
1375 (assign_section_numbers): Accept link_info. Check SHT_GROUP
1376 sections for relocatable files only. Remove the linker created
1377 group sections.
1378 (_bfd_elf_compute_section_file_positions): Pass link_info to
1379 assign_section_numbers.
1380
1381 * elfxx-ia64.c (elfNN_ia64_object_p): New.
1382 (elf_backend_object_p): Defined.
7e4111ad 1383
96982dc9
L
13842005-04-04 H.J. Lu <hongjiu.lu@intel.com>
1385
1386 * elf-bfd.h (elf_section_data): Use (sec) instead of sec.
1387
a13afe8e
FF
13882005-04-03 Fred Fish <fnf@specifixinc.com>
1389
1390 * dwarf2.c (struct dwarf2_debug): Add dwarf_ranges_buffer and
1391 dwarf_ranges_size members.
1392 (struct comp_unit): Add base_address member.
1393 (struct funcinfo): Replace low/high members with an arange.
1394 (arange_add): Replace incoming "unit" parameter with "abfd" and
1395 "first_arange" pointers. Reorganize/rewrite function body.
1396 (decode_line_info): Change arange_add call to pass bfd and arange
1397 pointers.
1398 (lookup_address_in_line_info_table): Use arange list instead of
1399 individual low/high members. Walk function's arange list to find
1400 lowest PC in list, to test for overlapping functions.
1401 (read_debug_ranges): New function, reads the debug_ranges section.
1402 (lookup_address_in_function_table): Use arange list instead of
1403 individual low/high members. Rewrite to find smallest range that
1404 matches.
1405 (read_rangelist): Read a given rangelist from debug_ranges.
1406 (scan_unit_for_functions): Use arange list instead of individual
1407 low/high members. Handle a DW_AT_ranges attribute.
1408 (parse_comp_unit): Use arange list instead of individual low/high
1409 members. Save comp unit base address. Handle a DW_AT_ranges
1410 attribute.
1411
2796fd96
L
14122005-04-01 H.J. Lu <hongjiu.lu@intel.com>
1413
1414 * elf.c (assign_section_numbers): Really use the kept section.
1415
01b3c8ab
L
14162005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1417
1418 * elf-bfd.h (_bfd_elf_check_kept_section): New.
1419
1420 * elf.c (assign_section_numbers): When sh_link points to a
1421 discarded section, call _bfd_elf_check_kept_section to see if
1422 the kept section can be used. Otherwise reject sh_link
1423 pointing to discarded section.
1424
1425 * elflink.c (_bfd_elf_check_kept_section): New.
1426 (elf_link_input_bfd): Use it.
1427
35090471
AM
14282005-04-01 Alan Modra <amodra@bigpond.net.au>
1429
1430 * elf64-ppc.c (ppc64_elf_edit_toc): Account for dynamic relocs
1431 that we no longer need.
1432
7356fed5
AM
14332005-04-01 Alan Modra <amodra@bigpond.net.au>
1434
1435 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Return -1 on errors
1436 rather than 0.
77623a34 1437 (ppc64_elf_check_relocs): Remove unnecessary SEC_ALLOC check.
7356fed5 1438
28b13744
L
14392005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1440
1441 * elf.c (assign_section_numbers): Fix a typo.
1442
c93625e2
L
14432005-03-31 H.J. Lu <hongjiu.lu@intel.com>
1444
1445 * elflink.c (elf_link_input_bfd): Remove the extra `\n' in
1446 error message.
1447 (_bfd_elf_section_already_linked): Likewise.
1448
fddc4048
JG
14492005-03-31 Jerome Guitton <guitton@gnat.com>
1450
1451 * config.in: Regenerate.
1452
2e9ebff5
JG
14532005-03-31 Jerome Guitton <guitton@gnat.com>
1454
c93625e2
L
1455 * config.in (HAVE_DECL_BASENAME): New configure macro.
1456 * configure.in: Check for basename.
1457 * configure: Regenerate.
2e9ebff5 1458
05ea83ed
JB
14592005-03-30 Julian Brown <julian@codesourcery.com>
1460
1461 * bfd-in.h (bfd_is_arm_mapping_symbol_name): Rename from
1462 bfd_elf32_is_arm_mapping_symbol_name.
1463 * bfd-in2.h: Regenerate.
1464 * cpu-arm.c (bfd_is_arm_mapping_symbol_name): Rename from
1465 bfd_elf32_is_arm_mapping_symbol_name.
1466 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename
1467 bfd_elf32_is_arm_mapping_symbol_name to bfd_is_arm_mapping_symbol_name.
1468 (arm_elf_find_function): Likewise.
1469 (elf32_arm_output_symbol_hook): Likewise.
1470
9d2da7ca
JB
14712005-03-30 Julian Brown <julian@codesourcery.com>
1472
1473 * bfd-in.h (bfd_elf32_is_arm_mapping_symbol_name): Add prototype.
1474 * bfd-in2.h: Regenerate.
1475 * elf32-arm.c (elf32_arm_is_target_special_symbol): Rename call to
1476 bfd_elf32_is_arm_mapping_symbol_name.
1477 (elf32_arm_output_symbol_hook): Likewise.
1478 (arm_elf_find_function): Likewise, and include STT_NOTYPE in test for
1479 mapping symbols.
1480 (is_arm_mapping_symbol_name): Function moved from here...
1481 * cpu-arm.c (bfd_elf32_is_arm_mapping_symbol_name): ...to here, renamed
1482 and made global.
1483
efa9bda4
AL
14842005-03-29 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
1485
1486 * configure.in: Check for ffs decl and alphabetize.
1487 * config.in: Regenerate.
1488 * configure: Regenerate.
d7128ce4 1489 * sysdep.h [NEED_DECLARATION_FFS] (ffs): Prototype and alphabetize.
efa9bda4 1490
09a9d560
FF
14912005-03-29 Fred Fish <fnf@specifixinc.com>
1492
1493 * dwarf2.c (struct comp_unit): Fix typo.
1494 (scan_unit_for_functions): Remove unused local variable "name"
1495 and dead code that set it.
1496
ba93b8ac
DJ
14972005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1498 Phil Blundell <philb@gnu.org>
1499
1500 * bfd-in2.h, libbfd.h: Regenerated.
1501 * reloc.c: Add ARM TLS relocations.
1502 * elf32-arm.c (elf32_arm_howto_table): Add dynamic TLS
1503 relocations.
1504 (elf32_arm_tls_gd32_howto, elf32_arm_tls_ldo32_howto)
1505 (elf32_arm_tls_ldm32_howto, elf32_arm_tls_le32_howto)
1506 (elf32_arm_tls_ie32_howto): New.
1507 (elf32_arm_howto_from_type): Support TLS relocations.
1508 (elf32_arm_reloc_map): Likewise.
1509 (elf32_arm_reloc_type_lookup): Likewise.
1510 (TCB_SIZE): Define.
1511 (struct elf32_arm_obj_tdata): New.
1512 (elf32_arm_tdata, elf32_arm_local_got_tls_type): Define.
1513 (elf32_arm_mkobject): New function.
1514 (struct elf32_arm_relocs_copied): Add pc_count.
1515 (elf32_arm_hash_entry, GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD)
1516 (GOT_TLS_IE): Define.
1517 (struct elf32_arm_link_hash_table): Add tls_ldm_got.
1518 (elf32_arm_link_hash_newfunc): Initialize tls_type.
1519 (elf32_arm_copy_indirect_symbol): Copy pc_count and tls_type.
1520 (elf32_arm_link_hash_table_create): Initialize tls_ldm_got.
1521 (dtpoff_base, tpoff): New functions.
1522 (elf32_arm_final_link_relocate): Handle TLS relocations.
1523 (IS_ARM_TLS_RELOC): Define.
1524 (elf32_arm_relocate_section): Warn about TLS mismatches.
1525 (elf32_arm_gc_sweep_hook): Handle TLS relocations and pc_count.
1526 (elf32_arm_check_relocs): Detect invalid symbol indexes. Handle
1527 TLS relocations and pc_count.
1528 (elf32_arm_adjust_dynamic_symbol): Check non_got_ref.
1529 (allocate_dynrelocs): Handle TLS. Bind REL32 relocs to local
1530 calls.
1531 (elf32_arm_size_dynamic_sections): Handle TLS.
1532 (elf32_arm_finish_dynamic_symbol): Likewise.
1533 (bfd_elf32_mkobject): Define.
1534
71a976dd
DJ
15352005-03-29 Daniel Jacobowitz <dan@codesourcery.com>
1536
1537 * elf32-arm.c (elf32_arm_check_relocs): Increment count for all
1538 relocation types. Don't count relocations which will use a PLT.
1539
7e7353ed
JB
15402005-03-29 Joel Brobecker <brobecker@gnat.com>
1541
1542 * elf.c (elfcore_grok_nto_status): Print tid as long.
1543 (elfcore_grok_nto_regs): Likewise.
1544
166856d7
JB
15452005-03-29 Joel Brobecker <brobecker@gnat.com>
1546
40937810 1547 * irix-core.c: Remove some unnecessary prototypes.
166856d7 1548
40f85900
JB
15492005-03-28 Joel Brobecker <brobecker@adacore.com>
1550
1551 * irix-core.c: Convert to ISO C.
1552
aa2e06ba
JB
15532005-03-28 Joel Brobecker <brobecker@adacore.com>
1554
1555 * irix-core.c (do_sections): Replace + by | in expression.
1556 (irix_core_core_file_matches_executable_p): Add ATTRIBUTE_UNUSED
1557 to unused parameters to avoid a compiler warning.
1558
832bc186
MK
15592005-03-28 Mark Kettenis <kettenis@gnu.org>
1560
1561 * netbsd-core.c: Convert to ISO C. Fix formatting.
1562
82f0cfbd
EC
15632005-03-24 Eric Christopher <echristo@redhat.com>
1564
1565 * elfxx-mips.c: Revert previous patch.
1566
d7b9976f
NC
15672005-03-24 Nick Clifton <nickc@redhat.com>
1568
1569 * targets.c (_bfd_target_vector): Only include the
1570 bfd_elf32_ia64_hpux_big_vec vector when building a 64-bit BFD with
1571 all targets enabled.
1572
074d327a
NC
15732005-03-24 James E Wilson <wilson@specifixinc.com>
1574
1575 * Makefile.am (BFD32_BACKENDS): Delete elf32-ia64.lo.
1576 (BFD64_BACKENDS): Add elf32-ia64.lo.
1577 * Makefile.in: Regenerate.
1578
cc27e1dc
EC
15792005-03-23 Eric Christopher <echristo@redhat.com>
1580
1581 * elfxx-mips.c (MIPS_ELF_READONLY_SECTION): New.
1582 (mips_elf_calculate_relocation): Use. Define DF_TEXTREL
1583 after emitting relocation.
1584 (_bfd_mips_elf_adjust_dynamic_symbol): Ditto.
1585 (_bfd_mips_elf_check_relocs): Remove code to set DF_TEXTREL
1586 and readonly_reloc.
1587
ed84e695
NC
15882005-03-23 Mike Frysinger <vapier@gentoo.org>
1589 Nick Clifton <nickc@redhat.com>
1590
1591 * config.bfd: Accept any C library to accompany a GNU Linux
1592 implementation, not just the GNU C library.
1593 * configure.in: Likewise.
1594 * configure: Regenerate.
1595
81e1b023
L
15962005-03-22 H.J. Lu <hongjiu.lu@intel.com>
1597
1598 * bfd-in.h (_bfd_elf_provide_symbol): New.
1599 * bfd-in2.h: Regenerated.
1600
1601 * elf32-ppc.c (set_linker_sym): Moved to elflink.c.
1602 (ppc_elf_set_sdata_syms): Call _bfd_elf_provide_symbol instead
1603 of set_linker_sym.
1604
1605 * elflink.c (_bfd_elf_provide_symbol): New. Moved and renamed
1606 from elf32-ppc.c.
1607
672c2d7e
HPN
16082005-03-22 Hans-Peter Nilsson <hp@axis.com>
1609
1610 * hash.c (strtab_hash_newfunc): Fix typo in allocated size.
1611
1fbc7e7a
BW
16122005-03-22 Bob Wilson <bob.wilson@acm.org>
1613
1614 * xtensa-isa.c (xtensa_opcode_lookup, xtensa_state_lookup,
1615 xtensa_sysreg_lookup_name, xtensa_interface_lookup,
1616 xtensa_funcUnit_lookup): Skip bsearch call if count is zero.
1617 (xtensa_opcode_decode): Rearrange code.
1618
c8e7bf0d
NC
16192005-03-22 Nick Clifton <nickc@redhat.com>
1620
1621 * binary.c: Convert to ISO C90 formatting.
1622 * coff-arm.c: Convert to ISO C90 formatting.
1623 * coffgen.c: Convert to ISO C90 formatting.
1624 * elf32-gen.c: Convert to ISO C90 formatting.
1625 * elf64-gen.c: Convert to ISO C90 formatting.
1626 * hash.c: Convert to ISO C90 formatting.
1627 * ieee.c: Convert to ISO C90 formatting.
1628
28a094c2
DJ
16292005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1630
1631 * elf32-arm.c (elf32_arm_final_link_relocate): Don't fail for
1632 unresolved symbols in R_ARM_NONE relocations.
1633
0945cdfd
DJ
16342005-03-22 Daniel Jacobowitz <dan@codesourcery.com>
1635
1636 * elf32-arm.c (elf32_arm_final_link_relocate): Add
1637 UNRESOLVED_RELOC_P argument. Set it appropriately.
1638 (elf32_arm_relocate_section): Update call to
1639 elf32_arm_final_link_relocate. Don't clobber RELOCATION; use
1640 unresolved_reloc instead.
1641
11d2f718
AM
16422005-03-23 Alan Modra <amodra@bigpond.net.au>
1643
1644 * elflink.c (elf_link_add_object_symbols): Set SEC_EXCLUDE on
1645 .gnu.warning.* sections.
1646
76750a2f
AM
16472005-03-22 Alan Modra <amodra@bigpond.net.au>
1648
1649 * elf32-ppc.c (elf_linker_section_pointers_t): Remove
1650 written_address_p.
1651 (ppc_elf_create_linker_section): Don't try to reuse existing section.
1652 (elf_create_pointer_linker_section): Delete info parm. Don't make
1653 h dynamic. Don't set written_address_p.
1654 (ppc_elf_check_relocs): Adjust ppc_elf_create_linker_section calls.
1655 (bfd_put_ptr): Delete.
1656 (elf_finish_pointer_linker_section): Remove output_bfd and info parms.
1657 Always write section contents. Assert global sym is def_regular.
1658 Use offset bottom bit as a written flag.
1659 (ppc_elf_relocate_section): Adjust elf_finish_pointer_linker_section
1660 calls.
1661
f85f57ad
AM
16622005-03-22 Alan Modra <amodra@bigpond.net.au>
1663
1664 * elf32-ppc.c (ppc_elf_set_sdata_syms): New function, extracted from..
1665 (ppc_elf_set_sdata_syms): ..here. Expand comment. Set .sbss start
1666 and end syms.
1667
2dc773a0
NC
16682005-03-21 Nick Clifton <nickc@redhat.com>
1669
1670 * coff-arm.c (coff_link_hash_entry): Only define for non WINCE
1671 targets.
1672 (t2a1_bx_pc_insn): Likewise.
1673 (t2a2_noop_insn): Likewise.
1674 (t2a3_b_insn): Likewise.
1675 (t2a1_push_insn): Likewise.
1676 (t2a2_ldr_insn): Likewise.
1677 (t2a3_mov_insn): Likewise.
1678 (t2a4_bx_insn): Likewise.
1679 (t2a5_pop_insn): Likewise.
1680 (t2a6_bx_insn): Likewise.
1681 (coff_arm_relocate_section): Only declare the high_address
1682 variable for non WINCE targets.
1683
644285ef
AM
16842005-03-22 Alan Modra <amodra@bigpond.net.au>
1685
1686 * elf32-ppc.c (ppc_elf_add_symbol_hook): Make htab->sbss
1687 SEC_LINKER_CREATED. Attach to dynobj.
1688 (ppc_elf_size_dynamic_sections): Strip htab->sbss if zero size.
1689
c9a2f333
AM
16902005-03-21 Alan Modra <amodra@bigpond.net.au>
1691
1692 * elf32-ppc.c (struct elf_linker_section): Remove sym_hash and
1693 sym_offset. Add name, bss_name, sym_name, sym_val.
1694 (struct ppc_elf_link_hash_table): Remove sdata and sdata2 pointers.
1695 Add sdata array of elf_linker_section_t.
1696 (ppc_elf_link_hash_table_create): Set name, sym_name, and bss_name.
1697 (enum elf_linker_section_enum): Delete.
1698 (ppc_elf_create_linker_section): Rewrite. Don't create syms here.
1699 (ppc_elf_check_relocs): Delay ppc_elf_create_linker_section until
1700 the special sections are needed. Adjust htab->sdata refs.
1701 Ensure dynobj is set in sreloc code.
1702 (ppc_elf_size_dynamic_sections): Strip sdata sections.
1703 (ppc_elf_set_sdata_syms): New function.
1704 (elf_finish_pointer_linker_section): Use 0x8000 for sym_offset.
1705 (ppc_elf_relocate_section): Adjust references to htab->sdata. Use
1706 sym_val instead of sym_hash.
1707 * elf32-ppc.h (ppc_elf_set_sdata_syms): Declare.
1708
8853c3d3
AM
17092005-03-21 Alan Modra <amodra@bigpond.net.au>
1710
1711 * elf32-ppc.c (is_ppc_elf_target): Move to linker part of file.
1712 (ppc_elf_merge_private_bfd_data): Likewise.
1713
2bb04cf2
AM
17142005-03-21 Alan Modra <amodra@bigpond.net.au>
1715
1716 * elf32-ppc.c (struct elf_linker_section): Remove rel_section.
1717 (ppc_elf_create_linker_section): Don't create rel_section.
1718 (elf_create_pointer_linker_section): Don't size relocs.
1719 (elf_finish_pointer_linker_section): Remove relative_reloc parm.
1720 Don't generate relocs.
1721 (ppc_elf_relocate_section): Adjust calls to
1722 elf_finish_pointer_linker_section.
1723
d2663f46
AM
17242005-03-21 Alan Modra <amodra@bigpond.net.au>
1725
1726 * elf32-ppc.c (is_ppc_elf_target): New function.
1727 (ppc_elf_merge_private_bfd_data): Use it rather than just testing
1728 for bfd_target_elf_flavour. Do this test before endian check.
1729 (ppc_elf_add_symbol_hook): Use is_pcc_elf_target.
1730 (ppc_elf_size_dynamic_sections): Likewise.
1731
6dc132d9
L
17322005-03-20 H.J. Lu <hongjiu.lu@intel.com>
1733
1734 * elf-bfd.h (elf_backend_data): Add int to
1735 elf_backend_section_from_shdr.
1736 (bfd_elf_section_data): Update comment for this_idx.
1737 (_bfd_elf_make_section_from_shdr): Add int.
1738 * elfxx-mips.h (_bfd_mips_elf_section_from_shdr): Likewise.
1739
1740 * elf.c (_bfd_elf_make_section_from_shdr): Take section index
1741 and use it to set this_idx in bfd_elf_section_data.
1742 (bfd_section_from_shdr): Pass shindex to
1743 _bfd_elf_make_section_from_shdr.
1744 (_bfd_elf_section_from_bfd_section): Use this_idx in
1745 bfd_elf_section_data to find section index.
1746
1747 * elf32-arm.c (elf32_arm_section_from_shdr): Take section
1748 index and pass it to _bfd_elf_make_section_from_shdr.
1749 * elf32-i370.c(i370_elf_section_from_shdr): Likewise.
1750 * elf32-ppc.c (ppc_elf_section_from_shdr): Likewise.
1751 * elf32-sh64.c (sh64_backend_section_from_shdr): Likewise.
1752 * elf32-v850.c (v850_elf_section_from_shdr): Likewise.
1753 * elf64-alpha.c (elf64_alpha_section_from_shdr): Likewise.
1754 * elf64-hppa.c (elf64_hppa_section_from_shdr): Likewise.
1755 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): Likewise.
1756 * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Likewise.
1757 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Likewise.
1758
cabd4ccc
DS
17592005-03-19 Danny Smith <dannysmith@users.sourceforge.net>
1760 Ross Ridge <rridge@csclub.uwaterloo.ca>
1761
1762 * peicode.h (pe_ILF_build_a_bfd): Strip only one prefix
1763 character in IMPORT_NAME_UNDECORATE and IMPORT_NAME_NOPREFIX
1764 cases. Add comment.
1765
7451fd89
L
17662005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1767
1768 * elflink.c (elf_mark_used_section): Remove check for special
1769 sections.
1770
b4677f03
AS
17712005-03-18 Andreas Schwab <schwab@suse.de>
1772
1773 * elfxx-ia64.c (elfNN_ia64_install_value): Change type of insn
1774 from bfd_vma to ia64_insn, remove broken cast.
1775
238d258f
NC
17762005-03-18 C Jaiprakash <cjaiprakash@noida.hcltech.com>
1777
8853c3d3 1778 * elf32-m68k.c (elf_cfv4e_plt0_entry): plt entry for coldfire v4e.
238d258f
NC
1779 (elf_m68k_adjust_dynamic_symbol,elf_m68k_finish_dynamic_symbol,
1780 elf_m68k_finish_dynamic_sections): Use it.
1781
b294bdf8
MM
17822005-03-17 Paul Brook <paul@codesourcery.com>
1783 Dan Jacobowitz <dan@codesourcery.com>
1784 Mark Mitchell <mark@codesourcery.com>
1785
1786 * elf32-arm.c (elf32_arm_modify_segment_map): New function.
1787 (elf32_arm_additional_program_headers): Likewise.
1788 (elf_backend_modify_segment_map): Define.
1789 (elf_backend_additional_program_headers): Likewise.
1790 (elf32_arm_symbian_modify_segment_map): Use
1791 elf32_arm_modify_segment_map.
1792
257a4820
L
17932005-03-18 H.J. Lu <hongjiu.lu@intel.com>
1794
1795 * elflink.c (elf_mark_used_section): Check bfd_is_const_section
1796 for special sections.
1797
554220db
AM
17982005-03-18 Alan Modra <amodra@bigpond.net.au>
1799
1800 * elf-bfd.h (_bfd_elf_link_renumber_dynsyms): Delete.
1801 * elflink.c (_bfd_elf_link_renumber_dynsyms): Make static, add
1802 section_sym_count param, and return number of section symbols.
1803 (bfd_elf_size_dynamic_sections): Clear section symbol area of
1804 .dynsym contents. Don't bother calling swap_symbol_out on the
1805 first all-zero dynsym.
1806 (elf_mark_used_section): Formatting. Avoid twiddling flags in
1807 special sections like bfd_abs_section.
1808 (bfd_elf_gc_sections): Spelling fix.
1809
36868d45
NC
18102005-03-16 Fred Fish <fnf@specifixinc.com>
1811
1812 PR binutils/790
1813 * dwarf2.c (read_indirect_string): Fix apparent typo, check
1814 dwarf_str_buffer allocation, not dwarf_abbrev_buffer.
1815
57316bff
L
18162005-03-16 H.J. Lu <hongjiu.lu@intel.com>
1817
1818 * elflink.c (elf_mark_used_section): New.
1819 (bfd_elf_gc_sections): Call elf_gc_mark_section for
1820 non-relocatable link if we don't do GC.
1821
1ad12f97
NC
18222005-03-16 Nick Clifton <nickc@redhat.com>
1823 Ben Elliston <bje@au.ibm.com>
1824
569acd2c 1825 * configure.in (werror): New switch: Add -Werror to the
1ad12f97 1826 compiler command line. Enabled by default. Disable via
569acd2c 1827 --disable-werror.
1ad12f97
NC
1828 * configure: Regenerate.
1829
3b5d3310
NC
18302005-03-16 Nick Clifton <nickc@redhat.com>
1831
1832 * ecoff.c: Convert to ISO C90 formatting.
1833
25dbc73a
AM
18342005-03-16 Alan Modra <amodra@bigpond.net.au>
1835
1836 * elf32-ppc.c: Divide file into general and linker specific
1837 functions. Sort linker functions into roughly the order in which
1838 they are called by the ELF linker code.
1839
cb2d1ef2
AM
18402005-03-16 Alan Modra <amodra@bigpond.net.au>
1841
1842 * elf32-ppc.c (ppc_elf_create_linker_section): Set SEC_LINKER_CREATED
1843 on section. Correct comment, and add FIXME.
1844 (ppc_elf_additional_program_headers): Don't bump header count for
1845 interp. Test SEC_ALLOC, not SEC_LOAD, and don't test size.
1846 (ppc_elf_size_dynamic_sections): Don't strip sdata and sdata2, but
1847 do allocate memory if they need it.
1848
34723071
NC
18492005-03-15 Mikkel Krautz <krautz@gmail.com>
1850
1851 * config.bfd (x86_64-elf): Add target.
1852
729ae8d2
AM
18532005-03-15 Alan Modra <amodra@bigpond.net.au>
1854
1855 * po/es.po: Commit new Spanish translation.
1856
f0581930
L
18572005-03-14 H.J. Lu <hongjiu.lu@intel.com>
1858
1859 * elfxx-ia64.c (elfNN_ia64_relocate_section): Set symbo name
1860 for global symbol when reporting overflow.
1861
390c0e42
JJ
18622005-03-11 Jakub Jelinek <jakub@redhat.com>
1863
1864 * libbfd-in.h (_bfd_ar_spacepad): New prototype.
1865 * libbfd.h: Rebuilt.
1866 * archive.c (_bfd_ar_spacepad): New function.
1867 (_bfd_construct_extended_name_table, _bfd_write_archive_contents,
1868 bsd_write_armap, _bfd_archive_bsd_update_armap_timestamp,
1869 coff_write_armap): Use it.
1870 (bfd_ar_hdr_from_filesystem): Likewise. Fix HP-UX large
1871 uid/gid support.
1872 * archive64.c (bfd_elf64_archive_write_armap): Use _bfd_ar_spacepad.
1873
a2633f4e
MK
18742005-03-10 Mark Kettenis <kettenis@gnu.org>
1875
1876 * archive.c (_bfd_look_for_bfd_in_cache): Move declaration of
1877 has_table to the start of the function.
1878
109f7096
BE
18792005-03-10 Ben Elliston <bje@au.ibm.com>
1880
1881 * archive.c: Include hashtab.h.
1882 (struct ar_cache): Rename `arelt' to `arbfd' and remove `next'.
1883 (_bfd_look_for_bfd_in_cache): Reimplement using htab_find.
1884 (hash_file_ptr): New function.
1885 (eq_file_ptr): Likewise.
1886 (_bfd_add_bfd_to_archive_cache): Reimplement using a hash table.
1887 * libbfd-in.h: Include hashtab.h.
1888 (struct artdata): Change `cache' member type to htab_t.
1889 * libbfd.h: Rebuild.
1890
664fe1be
DJ
18912005-03-08 Daniel Jacobowitz <dan@codesourcery.com>
1892
1893 * configure.in: Bump version to 2.16.90.
1894 * configure: Regenerated.
1895
0709bb22
JJ
18962005-03-07 Jakub Jelinek <jakub@redhat.com>
1897
1898 * opncls.c (opncls_bread, opncls_bclose): Fix if pread resp.
1899 close is a function like macro in system headers.
1900
b18e2ae5
AM
19012005-03-07 Alan Modra <amodra@bigpond.net.au>
1902
1903 PR ld/778
1904 * elf32-hppa.c (elf32_hppa_create_dynamic_sections): Reinstate
1905 _GLOBAL_OFFSET_TABLE_ as a normal dynamic symbol.
1906
1f170678
AM
19072005-03-06 Alan Modra <amodra@bigpond.net.au>
1908
1909 * elf.c (elfcore_grok_win32pstatus): Warning fixes.
1910
06647dfd
AM
19112005-03-05 Alan Modra <amodra@bigpond.net.au>
1912
1913 * po/bfd.pot: Regenerate.
1914
93f3fa99
AM
19152005-03-05 Alan Modra <amodra@bigpond.net.au>
1916
1917 * elf64-ppc.c (update_plt_info): Don't mark new ABI call syms
1918 with is_func.
1919 (func_desc_adjust): Force dot-syms local in executables as well
1920 as shared libs.
1921
bbe506e8
TS
19222005-03-04 David Daney <ddaney@avtrex.com>
1923
1924 * elfxx-mips.c (mips_elf_calculate_relocation): Handle special
1925 '__gnu_local_gp' symbol used by gas -mno-shared.
1926
d27f5fa1
L
19272005-03-03 H.J. Lu <hongjiu.lu@intel.com>
1928
1929 * elf-bfd.h (elf_backend_data): Add "const char *" to
1930 elf_backend_section_from_phdr.
1931
1932 * elf.c (bfd_section_from_phdr): Pass "proc" to the
1933 elf_backend_section_from_phdr hook.
1934
0f20cc35
DJ
19352005-03-02 Daniel Jacobowitz <dan@codesourcery.com>
1936 Joseph Myers <joseph@codesourcery.com>
1937
1938 * elfxx-mips.c (struct mips_got_entry): Add tls_type.
1939 (struct mips_got_info): Add tls_gotno, tls_assigned_gotno,
1940 and tls_ldm_offset.
1941 (struct mips_elf_got_per_bfd_arg): Add global_count.
1942 (struct mips_elf_count_tls_arg): New.
1943 (struct mips_elf_hash_sort_data): Update comment for min_got_dynindx.
1944 (struct mips_elf_link_hash_entry): Add tls_type and tls_got_offset.
1945 (GOT_NORMAL, GOT_TLS_GD, GOT_TLS_LDM, GOT_TLS_IE)
1946 (GOT_TLS_OFFSET_DONE, GOT_TLS_DONE): Define.
1947 (TLS_RELOC_P): Define.
1948 (TP_OFFSET, DTP_OFFSET): Define.
1949 (dtprel_base, tprel_base): New functions.
1950 (mips_elf_link_hash_newfunc): Initialize tls_type.
1951 (mips_elf_got_entry_hash, mips_elf_got_entry_eq)
1952 (mips_elf_multi_got_entry_hash, mips_elf_multi_got_entry_eq): Handle
1953 TLS entries.
1954 (mips_tls_got_relocs, mips_elf_count_local_tls_relocs)
1955 (mips_elf_count_global_tls_entries, mips_elf_count_global_tls_relocs)
1956 (mips_elf_output_dynamic_relocation, mips_elf_initialize_tls_slots)
1957 (mips_tls_got_index): New functions.
1958 (mips_elf_local_got_index): Add new R_SYMNDX, H, and R_TYPE
1959 arguments. Pass them to mips_elf_create_local_got_entry. Use
1960 mips_tls_got_index.
1961 (mips_elf_global_got_index): Add new R_TYPE and INFO arguments.
1962 Handle TLS entries.
1963 (mips_elf_got_page, mips_elf_got16_entry): Update calls to
1964 mips_elf_create_local_got_entry.
1965 (mips_elf_create_local_got_entry): Add new R_SYMNDX, H, and R_TYPE
1966 arguments. Handle TLS entries.
1967 (mips_elf_sort_hash_table_f): Add non-TLS assertions.
1968 (mips_elf_record_local_got_symbol): Add new TLS_FLAG argument. Handle
1969 TLS entries.
1970 (mips_elf_record_global_got_symbol): Likewise.
1971 (mips_elf_make_got_per_bfd): Initialize new mips_got_info members.
1972 Count TLS entries.
1973 (mips_elf_merge_gots): Handle TLS entries when merging.
1974 (mips_elf_initialize_tls_index): New function.
1975 (mips_elf_set_global_got_offset): Handle TLS entries.
1976 (mips_elf_adjust_gp): Handle TLS.
1977 (mips_elf_multi_got): Remove redundant call to
1978 mips_elf_resolve_final_got_entries. Initialize global_count.
1979 Correct a comment. Initialize new TLS members of mips_got_info.
1980 Assign TLS GOT indexes for new GOTs.
1981 (mips_elf_create_got_section): Initialize new TLS members of
1982 mips_got_info.
1983 (mips_elf_calculate_relocation): Handle TLS relocs.
1984 (_bfd_mips_elf_check_relocs): Likewise. Update calls to changed
1985 functions.
1986 (_bfd_mips_elf_always_size_sections): Handle TLS.
1987 (_bfd_mips_elf_size_dynamic_sections): Likewise.
1988 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Update calls to
1989 changed functions.
1990 (_bfd_mips_elf_copy_indirect_symbol): Copy tls_type.
1991 (_bfd_mips_elf_hide_symbol): Handle TLS.
1992 * elfn32-mips.c (elf_mips_howto_table_rel, elf_mips_howto_table_rela)
1993 (mips_reloc_map): Add TLS relocs.
1994 * elf32-mips.c (elf_mips_howto_table_rel, mips_reloc_map): Likewise.
1995 * elf64-mips.c (mips_elf64_howto_table_rel)
1996 (mips_elf64_howto_table_rela, mips_reloc_map): Likewise.
1997 * reloc.c: Define new MIPS TLS relocations.
1998 * libbfd.h, bfd-in2.h: Regenerated.
1999
bb14f524
JB
20002005-03-02 Jan Beulich <jbeulich@novell.com>
2001
2002 * Makefile.am: Add dependency of cache.o on libiberty.h.
2003 * cache.c: Include libiberty.h.
2004 (bfd_open_file): Use unlink_if_ordinary instead of unlink.
2005
8c1acd09
ZW
20062005-03-01 Zack Weinberg <zack@codesourcery.com>
2007
2008 * elf.c (bfd_section_from_shdr <default case>): Call
2009 elf_backend_section_from_shdr hook unconditionally, and return
2010 what it returns.
2011 (bfd_section_from_phdr): Similarly, for elf_backend_section_from_phdr.
2012 * elfxx-target.h (elf_backend_section_from_shdr)
2013 (elf_backend_section_from_phdr): Default to
2014 _bfd_elf_make_section_from_shdr and _bfd_elf_make_section_from_phdr
2015 respectively.
2016
70bfecec
AM
20172005-03-01 Alan Modra <amodra@bigpond.net.au>
2018
a67a7b8b
AM
2019 * targets.h: Typo fix.
2020 * bfd-in2.h: Regenerate.
2021
70bfecec
AM
2022 * bout.c (b_out_write_object_contents): Don't use sizeof on host
2023 structs to size on-disk structures.
2024 (b_out_set_section_contents): Size the external struct, not the
2025 internal one for on-disk size.
2026 (b_out_sizeof_headers): Likewise.
2027
ceb1f1ef
AM
20282005-03-01 Alan Modra <amodra@bigpond.net.au>
2029
2030 * elf64-ppc.c (ppc64_elf_size_stubs): Override defined dot-sym
2031 entry points with the func descriptor as well as undefweak.
2032
f67e617a
NC
20332005-02-28 Ross Ridge <rridge@csclub.uwaterloo.ca>
2034
2035 * peicode.h (pe_ILF_build_a_bfd): Do not assume that an @ will be
2036 present when IMPORT_NAME_UNDOECRATE is used.
2037
af44c138
L
20382005-02-28 H.J. Lu <hongjiu.lu@intel.com>
2039
2040 PR 757
2041 * elf-bfd.h (_bfd_elf_merge_symbol): Add a pointer to unsigned
2042 int.
2043
2044 * elf32-sh-symbian.c (sh_symbian_relocate_section): Pass NULL
2045 to _bfd_elf_merge_symbol.
2046
2047 * elflink.c (_bfd_elf_merge_symbol): Use the pointer to
2048 unsigned int to return the alignment of the old common symbol
2049 in the dynamic object.
2050 (_bfd_elf_add_default_symbol): Pass NULL to
2051 _bfd_elf_merge_symbol.
2052 (elf_link_add_object_symbols): Pass &old_alignment to
2053 _bfd_elf_merge_symbol. Get the alignment of the new common
2054 symbol in the dynamic object.
2055
10adf131
BE
20562005-02-24 Ben Elliston <bje@au.ibm.com>
2057
2058 * coffcode.h (coff_sym_filepos): Remove GNU960 conditional code.
2059 * format.c (bfd_check_format_matches): Likewise.
2060 * archive.c (BFD_GNU960_ARMAG): Likewise.
2061 (bfd_generic_archive_p): Likewise.
2062 (_bfd_write_archive_contents): Likewise.
2063
60b779bf
L
20642005-02-24 H.J. Lu <hongjiu.lu@intel.com>
2065
2066 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.95.
2067 * configure: Regenerate.
2068
1f02cbd9
JB
20692005-02-24 Julian Brown <julian@sirius.codesourcery.com>
2070
2071 * elflink.c (elf_link_add_object_symbols): Force symbols in discarded
2072 COMDAT group sections to have default visibility.
2073
f60ca5e3
AM
20742005-02-24 Alan Modra <amodra@bigpond.net.au>
2075
2076 * coffcode.h (coff_print_aux): Warning fix.
2077 * elf-m10300.c (mn10300_elf_relax_section): Use section->id
2078 instead of section pointer to identify.
2079 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise. Allocate
2080 the correct size buffer for local sym mangling too.
2081 (h8300_bfd_link_add_symbols): Likewise.
2082 * elf32-sh-symbian.c (sh_symbian_process_embedded_commands): Fix
2083 warning.
2084 * elf32-sh64.c (shmedia_prepare_reloc): Use %B and %p in error message
2085 * elf32-xtensa.c (literal_value_hash): Warning fix.
2086 * versados.c (process_otr): Warning fix.
2087 (versados_canonicalize_reloc): Likewise.
2088 * vms-gsd.c (_bfd_vms_slurp_gsd): Warning fix.
2089 * vms.c (fill_section_ptr): Warning fix.
2090
9a5d8e72
L
20912005-02-23 H.J. Lu <hongjiu.lu@intel.com>
2092
2093 * coff-tic54x.c (SWAP_OUT_RELOC_EXTRA): Defined.
2094 * coff-tic80.c (SWAP_OUT_RELOC_EXTRA): Likewise.
2095
4b6c0f2f
NC
20962005-02-23 Nick Clifton <nickc@redhat.com>
2097
abc0f8d0
NC
2098 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Initialise
2099 the relvaddr field of the Elf32_crinfo structure.
2100
9b69b847
NC
2101 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Initialise
2102 variables that are passed by reference to
2103 m68hc11_get_relocation_value in case that function does not
2104 initialise them.
2105
90e868ac
NC
2106 * elf32-cr16c.c (cr16c_elf_final_link_relocate): Remove duplicated
2107 return statements and replace with a single return at the end of
2108 the function. This helps pacify the flow analysis code in gcc 4.0.
2109
4b6c0f2f
NC
2110 * elf.c (_bfd_elf_compute_section_file_positions): Initialise
2111 strtab to avoid compile time warning.
2112
c3e8c140
BE
21132005-02-23 Ben Elliston <bje@au.ibm.com>
2114
2115 * opncls.c (bfd_zalloc): Document this function.
2116
ebe372c1
L
21172005-02-21 H.J. Lu <hongjiu.lu@intel.com>
2118
2119 * coffcode.h (sec_to_styp_flags): Replaced SEC_CLINK with
2120 SEC_TIC54X_CLINK. Replace SEC_BLOCK with SEC_TIC54X_BLOCK.
2121 Replace SEC_SHARED with SEC_COFF_SHARED.
2122 (styp_to_sec_flags): Likewise.
2123
2124 * elfxx-target.h (TARGET_BIG_SYM): Remove SEC_ARCH_BIT_0.
2125 (TARGET_LITTLE_SYM): Likewise.
2126
2127 * section.c (SEC_ARCH_BIT_0): Removed.
2128 (SEC_LINK_DUPLICATES_SAME_CONTENTS): Defined with
2129 SEC_LINK_DUPLICATES_ONE_ONLY and SEC_LINK_DUPLICATES_SAME_SIZE.
2130 (SEC_SHARED): Renamed to ...
2131 (SEC_COFF_SHARED): This.
2132 (SEC_BLOCK): Renamed to ...
2133 (SEC_TIC54X_BLOCK): This.
2134 (SEC_CLINK): Renamed to ...
2135 (SEC_TIC54X_CLINK): This.
2136 (SEC_XXX): Rearranged. Move SEC_COFF_SHARED_LIBRARY,
2137 SEC_COFF_SHARED, SEC_TIC54X_BLOCK and SEC_TIC54X_CLINK to the
2138 end.
2139 * bfd-in2.h: Regenerated.
2140
26bf4e33
FF
21412005-02-21 Fred Fish <fnf@specifixinc.com>
2142
2143 * dwarf2.c (find_abstract_instance_name): Call recursively
2144 to handle a DW_AT_specification.
2145
e6daada3
TS
21462005-02-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
2147
2148 * elfxx-mips.c (ecoff_swap_rpdr_out, mips_elf_output_extsym,
2149 mips_elf_create_dynamic_relocation,
2150 _bfd_mips_elf_size_dynamic_sections, _bfd_mips_elf_final_link):
2151 Remove #if 0'd code.
2152
d25604af
AM
21532005-02-21 Alan Modra <amodra@bigpond.net.au>
2154
2155 * Makefile.am: Run "make dep-am"
2156 * Makefile.in: Regenerate.
2157
fedf8d51
AM
21582005-02-21 Alan Modra <amodra@bigpond.net.au>
2159
2160 * coffgen.c (bfd_coff_get_comdat_section): Check that
2161 coff_section_data isn't NULL.
2162
f075ee0c
AM
21632005-02-21 Alan Modra <amodra@bigpond.net.au>
2164
2165 * bfd-in.h (bfd_elf_bfd_from_remote_memory): Warning fix.
2166 * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Likewise.
2167 * coff-rs6000.c (xcoff_write_armap_big): Warning fixes. Remove
2168 useless assignments.
2169 (xcoff_write_archive_contents_big): Likewise.
2170 (_bfd_xcoff_put_ldsymbol_name): Likewise.
2171 * coff64-rs6000.c (_bfd_xcoff64_put_ldsymbol_name): Likewise.
2172 * coffgen.c (coff_write_symbols): Make "written" a bfd_vma.
2173 * cofflink.c (process_embedded_commands): Warning fixes.
2174 * cpu-arm.c: Delete unnecessary prototypes. Convert to C90.
2175 Warning fixes.
2176 * dwarf2.c: Warning fixes.
2177 * elf-bfd.h: Likewise.
2178 * elf-eh-frame.c: Likewise.
2179 * elf-strtab.c: Likewise.
2180 * elf.c: Likewise.
2181 * elf32-m68k.c: Likewise.
2182 * elf32-ppc.c: Likewise.
2183 * elf32-sh-symbian.c: Likewise.
2184 * elf32-sh.c: Delete unnecessary prototypes. Warning fixes.
2185 * elf64-sh64.c: Likewise.
2186 * peicode.h: Likewise.
2187 * elf64-mmix.c: Warning fixes.
2188 * elfcode.h: Likewise.
2189 * elfxx-mips.c: Likewise.
2190 * libbfd-in.h: Likewise.
2191 * libbfd.c: Likewise.
2192 * mach-o.c: Likewise.
2193 * merge.c: Likewise.
2194 * mmo.c: Likewise.
2195 * opncls.c: Likewise.
2196 * pef.c: Likewise.
2197 * srec.c: Likewise.
2198 * vms-hdr.c: Likewise.
2199 * vms-tir.c: Likewise.
2200 * xtensa-isa.c: Likewise.
2201 * xtensa-modules.c: Likewise.
2202 * xsym.c: Likewise.
2203 (pstrcmp): Use correct choice of string lengths. Fix return value.
2204 (bfd_sym_module_name): Correct string length.
2205 * bfd-in2.h: Regenerate.
2206 * libbfd.h: Regenerate.
2207
68320ddb
AO
22082005-02-17 Alexandre Oliva <aoliva@redhat.com>
2209
2210 * elf32-frv.c (elf32_frv_relocate_section): Remove warning from
fedf8d51 2211 uninitialized check_segment[1] in TLSMOFF case.
68320ddb
AO
2212 Reported by Alan Modra.
2213 (elf32_frv_relocate_section): Improve errors and warnings.
2214
1808e341
AM
22152005-02-17 Alan Modra <amodra@bigpond.net.au>
2216
2217 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Fix warning.
2218
5ff625e9
AM
22192005-02-16 Alan Modra <amodra@bigpond.net.au>
2220
2221 * coff-arm.c (coff_arm_is_local_label_name): Warning fix.
2222 * elf32-frv.c (frvfdpic_relocs_info_hash): Likewise.
2223 * pef.c (bfd_pef_scan): Don't ignore return value of
2224 bfd_pef_scan_start_address.
7e3102a7
AM
2225 * mach-o.c (bfd_mach_o_scan): Don't ignore return value of
2226 bfd_mach_o_scan_start_address.
2227 * elfxx-ia64.c (elfNN_ia64_relax_brl): Rewrite for 32-bit bfd_vma.
2228 * elfxx-mips.c: Remove unnecessary prototypes.
2229 (sort_dynamic_relocs_64): Abort if not BFD64.
5ff625e9 2230
92b7a70f
AM
22312005-02-16 Alan Modra <amodra@bigpond.net.au>
2232
2233 * elf64-ppc.c (ppc64_elf_edit_toc): Skip toc if size is zero.
2234 Skip toc reloc adjust if reloc_count is zero.
2235
d6f16593 22362005-02-15 Nigel Stephens <nigel@mips.com>
fedf8d51 2237 Maciej W. Rozycki <macro@mips.com>
d6f16593
MR
2238
2239 * elf32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2240 reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2241 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2242 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2243 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2244 dst_mask.
2245 (mips16_gprel_reloc): Remove bit shuffling; call
2246 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2247 and _bfd_mips16_elf_reloc_shuffle() instead.
2248 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2249 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2250 relocs.
2251 (mips_elf32_rtype_to_howto): Fetch MIPS16 howtos from
2252 elf_mips16_howto_table_rel.
2253 * elf64-mips.c (mips16_elf64_howto_table_rel): New array for
2254 MIPS16 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16
2255 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2256 (elf_mips16_jump_howto): Move into mips16_elf64_howto_table_rel.
2257 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2258 dst_mask.
2259 (mips16_elf64_howto_table_rela): New array for MIPS16 RELA
2260 reloc howtos. Add R_MIPS16_26, R_MIPS16_GPREL, R_MIPS16_HI16 and
2261 R_MIPS16_LO16 relocs and R_MIPS16_GOT16 and R_MIPS16_CALL16
2262 placeholders.
2263 (mips16_gprel_reloc): Remove bit shuffling; call
2264 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2265 and _bfd_mips16_elf_reloc_shuffle() instead.
2266 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2267 (bfd_elf64_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2268 relocs.
2269 (mips_elf64_rtype_to_howto): Fetch MIPS16 howtos from
2270 mips16_elf64_howto_table_rela or mips16_elf64_howto_table_rel.
2271 * elfn32-mips.c (elf_mips16_howto_table_rel): New array for MIPS16
2272 REL reloc howtos. Add R_MIPS16_HI16 and R_MIPS16_LO16 relocs and
2273 R_MIPS16_GOT16 and R_MIPS16_CALL16 placeholders.
2274 (elf_mips16_jump_howto): Move into elf_mips16_howto_table_rel.
2275 (elf_mips16_gprel_howto): Likewise. Redefine src_mask and
2276 dst_mask.
2277 (mips16_gprel_reloc): Remove bit shuffling; call
2278 _bfd_mips16_elf_reloc_unshuffle(), _bfd_mips_elf_gprel16_with_gp()
2279 and _bfd_mips16_elf_reloc_shuffle() instead.
2280 (mips16_reloc_map): New reloc map for MIPS16 relocs.
2281 (bfd_elf32_bfd_reloc_type_lookup): Use mips16_reloc_map for MIPS16
2282 relocs.
2283 (mips_elf_n32_rtype_to_howto): Fetch MIPS16 howtos from
2284 elf_mips16_howto_table_rela or elf_mips16_howto_table_rel.
2285 * elfxx-mips.c (_bfd_mips16_elf_reloc_unshuffle): New function to
2286 handle bit shuffling for MIPS16 relocs.
2287 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2288 (_bfd_mips_elf_lo16_reloc): Use _bfd_mips16_elf_reloc_unshuffle()
2289 and _bfd_mips16_elf_reloc_shuffle().
2290 (_bfd_mips_elf_generic_reloc): Likewise.
2291 (mips_elf_calculate_relocation): Likewise. Handle R_MIPS16_HI16
2292 and R_MIPS16_LO16.
2293 (mips_elf_obtain_contents): Remove bit shuffling.
2294 (mips_elf_perform_relocation): Likewise; call
2295 _bfd_mips16_elf_reloc_unshuffle() and _bfd_mips16_elf_reloc_shuffle()
2296 instead.
2297 (_bfd_mips_elf_relocate_section): Likewise. Handle R_MIPS16_HI16
2298 and R_MIPS16_LO16.
2299 * elfxx-mips.h (_bfd_mips16_elf_reloc_unshuffle): Declare.
2300 (_bfd_mips16_elf_reloc_shuffle): Likewise.
2301 * reloc.c (BFD_RELOC_MIPS16_HI16): New reloc.
2302 (BFD_RELOC_MIPS16_HI16_S): Likewise.
2303 (BFD_RELOC_MIPS16_LO16): Likewise.
2304 * bfd-in2.h: Regenerate.
2305 * libbfd.h: Regenerate.
2306
0ca3e455
JB
23072005-02-15 Jan Beulich <jbeulich@novell.com>
2308
2309 * elfxx-ia64.c (ia64_howto_table): Correct strings for
2310 R_IA64_DTPMOD64[LM]SB.
2311
c5509b92
L
23122005-02-14 H.J. Lu <hongjiu.lu@intel.com>
2313
2314 * elfxx-ia64.c (elfNN_ia64_relax_section): Allow relax
2315 backward branch in the same section.
2316 (elfNN_ia64_relocate_section): Inform users that the input
2317 section is too big to relax br instruction when overflow
2318 happens to R_IA64_PCREL21B, R_IA64_PCREL21BI, R_IA64_PCREL21M
2319 and R_IA64_PCREL21F.
2320
5cba516c
NC
23212005-02-14 Orjan Friberg <orjanf@axis.com>
2322
2323 * elfcore.h (elf_core_file_p): Move the call to
2324 elf_backend_object_p to allow the correct machine to be set before
2325 processing the program headers.
2326
b59a68e1
NC
23272005-02-14 Nick Clifton <nickc@redhat.com>
2328
2329 PR binutils/716
2330 * peicode.h (pe_bfd_copy_private_bfd_data): Copy the large address
2331 aware flag from the input bfd to the output bfd.
2332
254f0426
MR
23332005-02-11 Maciej W. Rozycki <macro@mips.com>
2334
2335 * elf32-mips.c (_bfd_mips_elf32_gprel16_reloc): Reject
2336 R_MIPS_LITERAL relocations for external symbols.
2337 * elf64-mips.c (mips_elf64_literal_reloc): Likewise.
2338 * elfn32-mips.c (mips_elf_literal_reloc): Likewise.
2339
e91cdea7
L
23402005-02-11 H.J. Lu <hongjiu.lu@intel.com>
2341
2342 * bfd-in2.h: Rebuilt.
2343
67687978
PB
23442005-02-11 Paul Brook <paul@codesourcery.com>
2345
2346 * elf-bfd.h (struct elf_link_hash_table): Add
2347 is_relocatable_executable.
2348 * elf.c (_bfd_elf_link_hash_table_init): Initialize it.
2349 * elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
2350 symbols in relocatable executables.
2351 (bfd_elf_record_link_assignment): Create dynamic section symbols in
2352 relocatable executables.
2353 (_bfd_elf_link_renumber_dynsyms): Ditto.
2354 (bfd_elf_final_link): Ditto.
2355 * elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
2356 relocations into relocatable executables.
2357 (elf32_arm_check_relocs): Crate dynamic sections for relocatable
2358 executables. Also copy absolute relocations.
2359 (elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
2360 in relocatable executables.
2361 (allocate_dynrelocs): Copy relocations for relocatable executables.
2362 Output dynamic symbols for symbols defined in linker scripts.
2363
ca724bf2
NC
23642005-02-11 Nick Clifton <nickc@redhat.com>
2365
4b74b983
NC
2366 * libbfd.c (read_signed_leb128): Use an unsigned type for 'shift'
2367 to avoid a compile time warning.
2368
ca724bf2
NC
2369 * coff-alpha.c (alpha_adjust_reloc_in): Remove redundant test from
2370 BFD_ASSERT.
2371
3e25964f
NC
2372 * coff-tic4x.c (coff_rtype_to_howto): Move definition before
2373 inclusion of coffcode.h so that it is actually picked up.
2374
cb7a88a4
NC
2375 * coffcode.h (coff_std_swap_table): Add an unused attribute in
2376 case it is not used.
2377
596c83ec
NC
2378 * elf32-ip2k.c (ip2k_call_opcode, IS_CALL_OPCODE): Remove unused
2379 structure and macro.
2380
6c408f53
NC
2381 * elf32-iq2000.c (iq2000_reloc_map): Remove unused structure and
2382 array.
2383
d5b2f13b
NC
2384 * elf32-m32r.c (m32r_reloc_map_old): Use #ifdef USE_M32R_OLD_RELOC
2385 to protect the declaration of this array.
2386
169a6afd
NC
2387 * xsym.c (bfd_sym_parse_contained_variables_table_entry_v32):
2388 Avoid call to memcpy with a size of 0.
2389
2917689a
AM
23902005-02-12 Alan Modra <amodra@bigpond.net.au>
2391
2392 * elf64-ppc.c (toc_adjusting_stub_needed): Return true for
2393 old-style branches to undefined dot-symbols which will be
2394 satisfied by a plt call.
2395
40d16e0b
AM
23962005-02-11 Alan Modra <amodra@bigpond.net.au>
2397
2398 * elf64-ppc.c (move_plt_plist): New function, extracted from..
2399 (ppc64_elf_copy_indirect_symbol): ..here.
2400 (func_desc_adjust): Use move_plt_plist.
2401
e37c699c
PB
24022005-02-10 Paul Brook <paul@codesourcery.com>
2403
2404 * elf32-arm.c (elf32_arm_final_link_relocate): Handle R_ARM_THM_PC9.
2405
6fa3860b
PB
24062005-02-10 Paul Brook <paul@codesourcery.com>
2407
2408 * elflink.c (bfd_elf_record_link_assignment): Make hidden and internal
2409 symbols local.
2410 (elf_link_renumber_hash_table_dynsyms): Ignore local symbols.
2411 (elf_link_renumber_local_hash_table_dynsyms): New function.
2412 (_bfd_elf_link_renumber_dynsyms): Number local dynamic symbols.
2413
d457dcf6
JJ
24142005-02-10 Jakub Jelinek <jakub@redhat.com>
2415
2416 * bfd-in.h (BFD_LINKER_CREATED): Define.
2417 * bfd-in2.h: Rebuilt.
2418 * elflink.c (bfd_elf_size_dynamic_sections): Disregard
2419 BFD_LINKER_CREATED bfds when determining input bfds without
2420 .note.GNU-stack section.
2421
7f05722e
MR
24222005-02-10 Maciej W. Rozycki <macro@mips.com>
2423
2424 * elf64-mips.c (mips16_gprel_reloc): Update a comment.
2425 * elfn32-mips.c (mips16_gprel_reloc): Keep R_MIPS16_GPREL
2426 relocations against external symbols unchanged.
2427
ccf5f610
PB
24282005-02-08 Paul Brook <paul@codesourcery.com>
2429
2430 * elflink.c (elf_link_input_bfd): Ignore symbols from null input
2431 sections.
2432
370a0e1b
HPN
24332005-02-08 Hans-Peter Nilsson <hp@axis.com>
2434
2435 * elflink.c (elf_link_add_object_symbols): Don't add "warning: "
2436 prefix here.
2437
99277196
MR
24382005-02-07 Maciej W. Rozycki <macro@mips.com>
2439
2440 * elf64-mips.c: Fix formatting throughout.
2441
6422fbef
MR
24422005-02-07 Maciej W. Rozycki <macro@mips.com>
2443
2444 * elfn32-mips.c (elf_mips_howto_table_rela): Fix a comment typo.
2445
303e4c21
AO
24462005-02-07 Alexandre Oliva <aoliva@redhat.com>
2447
2448 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove special handling for
2449 *ABS*/*UND* sections.
2450 (elf32_frv_relocate_section): Move zero-addend-required error...
2451 (_frv_emit_got_relocs_plt_entries): ... here. Report error for
2452 missing needed TLS section.
2453
c3864421
HPN
24542005-02-07 Hans-Peter Nilsson <hp@axis.com>
2455
2456 * aoutx.h (NAME(aout,find_nearest_line)): Correct case for N_SO
2457 being the last symbol.
9f400ee9
HPN
2458 (aout_link_add_symbols): Just return TRUE if a warning
2459 symbol was last.
c3864421 2460
765f2ef6
MR
24612005-02-07 Maciej W. Rozycki <macro@mips.com>
2462
2463 * elf32-mips.c (mips_elf_gprel32_reloc): Reject
2464 R_MIPS_GPREL32 relocations against external symbols.
2465 * elf64-mips.c (mips_elf64_gprel32_reloc): Replace an incorrect
2466 comment.
2467
1b3a8575
AM
24682005-02-07 Alan Modra <amodra@bigpond.net.au>
2469
2470 * elf-bfd.h (elf_string_from_elf_strtab): Delete macro.
2471 * elf.c (bfd_elf_string_from_elf_section): Expand occurrence of
2472 elf_string_from_elf_strtab.
2473 (_bfd_elf_setup_group_pointers, bfd_section_from_shdr): Likewise.
2474 (bfd_section_from_shdr): For SHT_SYMTAB, load SHT_SYMTAB_SHNDX too
2475 if it exists. Don't do the reverse for SHT_SYMTAB_SHNDX. For
2476 SHT_STRTAB, check whether the strtab is for symtab or dynsymtab by
2477 looking at cached symtab info first, before iterating over headers.
2478 For SHT_REL and SHT_RELA, load dynsymtab if needed.
2479 * elfcode.h (elf_object_p): Don't load section header stringtab
2480 specially.
2481
90f487df
L
24822005-02-06 H.J. Lu <hongjiu.lu@intel.com>
2483
2484 * elf32-i386.c (elf_i386_relocate_section): Disallow R_386_GOTOFF
2485 against protected function when building shared library.
2486
2487 PR 584
2488 * elf64-x86-64.c (is_32bit_relative_branch): New.
2489 (elf64_x86_64_relocate_section): Alllow R_X86_64_PC32 on a
2490 protected function symbol when building shared library for
2491 32bit relative branch instruction.
2492
c4f68ce3
AM
24932005-02-06 Alan Modra <amodra@bigpond.net.au>
2494
2495 * elf64-ppc.c (add_symbol_adjust): Don't create fake descriptor
2496 syms when doing a relocatable link.
2497 (ppc64_elf_gc_mark_hook): Check that syms are defined before looking
2498 at u.def.section.
2499 (ppc64_elf_tls_setup): Likewise.
2500 (ppc64_elf_edit_opd): Don't use an undefined func desc sym.
2501
908b32fc
AM
25022005-02-04 Alan Modra <amodra@bigpond.net.au>
2503
2504 * elf64-ppc.c (struct ppc_link_hash_entry): Add "fake".
2505 (link_hash_newfunc): Clear all locals using memset.
2506 (make_fdh): Remove flags param. Always create fake func desc
2507 weak. Link the descriptor with the code entry sym.
2508 (ppc64_elf_archive_symbol_lookup): Don't return fake syms.
2509 (add_symbol_adjust): Adjust make_fdh call.
2510 (func_desc_adjust): Likewise. Twiddle any pre-existing fake
2511 descriptor to strong undefined if code entry is strong.
2512
4ea42fb7
AM
25132005-02-04 Alan Modra <amodra@bigpond.net.au>
2514
2515 * elflink.c (bfd_elf_record_link_assignment): Do "provide" symbol
2516 lookup here. Set to new before calling bfd_link_repair_undef_list.
2517 (elf_smash_syms): Check that u.undef.weak isn't the not_needed bfd.
2518
10d86c8a
AM
25192005-02-03 Alan Modra <amodra@bigpond.net.au>
2520
2521 * linker.c (_bfd_link_hash_newfunc): Set all local fields.
2522
11f25ea6
AM
25232005-02-03 Alan Modra <amodra@bigpond.net.au>
2524
2525 * linker.c (_bfd_generic_link_add_one_symbol): Set u.undef.weak.
2526 * elflink.c (elf_smash_syms): Restore symbols that were undefweak
2527 before the as-needed lib was loaded. Abort on unexpected refs.
2528
4f40114d
AM
25292005-02-02 Alan Modra <amodra@bigpond.net.au>
2530
ec13b3bb
AM
2531 * elflink.c (elf_smash_syms): Expand comments.
2532 (elf_link_add_object_symbols): Only call elf_smash_syms for
2533 as-needed dynamic objects.
2534
4f40114d
AM
2535 * elfxx-ia64.c (elfNN_ia64_new_elf_hash_entry): Don't clear
2536 everything, just the field specific to ia64.
336549c1 2537 * elf64-hppa.c (elf64_hppa_new_dyn_hash_entry): Likewise.
4f40114d 2538
bb700d78
AM
25392005-02-01 Alan Modra <amodra@bigpond.net.au>
2540
2541 * elf64-ppc.c (func_desc_adjust): Move code creating func desc sym to..
2542 (make_fdh): ..here. New function. Don't set BSF_OBJECT for
2543 undefined syms.
2544 (struct add_symbol_adjust_data): New.
2545 (add_symbol_adjust): Make an undefweak func desc for old ABI
2546 objects to link with --as-needed shared libs. Return fail status.
2547 Don't adjust old ABI func entry sym to weak if func desc syms
2548 isn't defined.
2549 (ppc64_elf_check_directives): Adjust call to add_symbol_adjust,
2550 and return status.
2551
1ffd1c2f
HPN
25522005-02-01 Hans-Peter Nilsson <hp@axis.com>
2553
2554 * cpu-cris.c (get_compatible): Rearrange disabled code and comment
2555 for clarity.
2556
77cfaee6
AM
25572005-02-01 Alan Modra <amodra@bigpond.net.au>
2558
2559 * elf64-ppc.c (ppc64_elf_check_directives): Move undefs list fixup..
2560 * linker.c (bfd_link_repair_undef_list): ..to new function, but don't
2561 remove anything but new and undefweak.
2562 * elflink.c (_bfd_elf_link_create_dynamic_sections): Override any
2563 existing _DYNAMIC.
2564 (_bfd_elf_create_dynamic_sections): Formatting.
2565 (bfd_elf_record_link_assignment): Call bfd_link_repair_undef_list.
2566 (_bfd_elf_merge_symbol): Don't handle as-needed syms here.
2567 (struct elf_smash_data): New.
2568 (elf_smash_syms): New function.
2569 (elf_link_add_object_symbols): Call elf_smash_syms. Don't add
2570 unneeded dynamic objects to loaded list.
2571 (elf_link_output_extsym): Don't handle as-needed here. Strip
2572 bfd_link_hash_new symbols.
2573 * elf32-cris.c (elf_cris_discard_excess_program_dynamics): Don't
2574 delref when dynindx is already -1.
2575 * elf64-alpha.c (elf64_alpha_output_extsym): Strip bfd_link_hash_new
2576 symbols.
2577 * elfxx-mips.c (mips_elf_output_extsym): Likewise.
2578
b15c48d1
BE
25792005-02-01 Ben Elliston <bje@au.ibm.com>
2580
2581 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Redefine.
2582
0983f4eb 25832005-02-01 Ben Elliston <bje@au.ibm.com>
0e71e495
BE
2584
2585 * aout-arm.c, aout-target.h, aoutx.h, archive.c, armnetbsd.c,
2586 bfd-in.h, bfdio.c, coff-alpha.c, coff-arm.c, coff-h8300.c,
2587 coff-i860.c, coff-mcore.c, coff-or32.c, coff-ppc.c, coff-sh.c,
2588 coff-sparc.c, coffcode.h, coffgen.c, cofflink.c, cpu-cris.c,
2589 cpu-h8500.c, cpu-ns32k.c, ecoff.c, ecofflink.c, elf.c,
2590 elf32-dlx.c, elf32-fr30.c, elf32-frv.c, elf32-hppa.c,
2591 elf32-i860.c, elf32-ip2k.c, elf32-m32r.c, elf32-sh.c,
2592 elf32-v850.c, elf64-mips.c, elf64-sparc.c, elflink.c,
2593 i386aout.c, i386msdos.c, i386os9k.c, ieee.c, mach-o.c,
2594 nlm32-sparc.c, oasys.c, opncls.c, pdp11.c, pe-mips.c, peXXigen.c,
2595 pef.c, peicode.h, reloc.c, riscix.c, section.c, simple.c, som.c,
11d02c41 2596 sparclynx.c, targets.c, vms-misc.c, vms-tir.c, xsym.c,
0e71e495
BE
2597 hosts/delta68.h, hosts/vaxbsd.h: Remove #if 0'd code
2598 throughout. Similarly, collapse #if 1'd code.
2599
26002005-02-01 Ben Elliston <bje@au.ibm.com>
2601
0983f4eb
BE
2602 * elf-bfd.h (bfd_elf_discard_group): Remove.
2603 * elf.c (bfd_elf_discard_group): Likewise.
2604 * elfxx-target.h (bfd_elfNN_bfd_discard_group): Remove macro.
2605
8c946ed5
RS
26062005-01-31 Richard Sandiford <rsandifo@redhat.com>
2607
2608 * elf-bfd.h (elf_backend_data): Add elf_backend_eh_frame_address_size.
2609 (_bfd_elf_eh_frame_address_size): Declare.
2610 * elfxx-target.h (elf_backend_eh_frame_address_size): Define a default.
2611 (elfNN_bed): Initialize elf_backend_eh_frame_address_size.
2612 * elfxx-mips.h (_bfd_mips_elf_eh_frame_address_size): Declare.
2613 (elf_backend_eh_frame_address_size): Define.
2614 * elfxx-mips.c (_bfd_mips_elf_eh_frame_address_size): New function.
2615 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Get the address
2616 size from the new backend hook.
2617 (_bfd_elf_write_section_eh_frame): Likewise.
2618 (_bfd_elf_eh_frame_address_size): New function.
2619
c46f8c51
AC
26202005-01-31 Andrew Cagney <cagney@gnu.org>
2621
2622 * configure: Regenerate to track ../gettext.m4.
2623
5cd3778d
MM
26242005-01-31 Mark Mitchell <mark@codesourcery.com>
2625
2626 * elf32-arm.c (elf32_arm_symbian_special_sections): Do not set
2627 SHF_WRITE for .init_array, .fini_array, and .preinit_array.
ec13b3bb 2628
d6486796
NC
26292005-01-31 Nick Clifton <nickc@redhat.com>
2630
2631 * confg.bfd: Make targets scheduled for obsoletion (m68k-lynxos,
2632 sparc-lynxos, vax-vms) be obsolete.
2633
b1342370
DJ
26342005-01-28 Daniel Jacobowitz <dan@codesourcery.com>
2635
2636 * elf-bfd.h (struct elf_backend_data): Add minpagesize.
2637 * elf32-arm.c (ELF_MINPAGESIZE): Define.
2638 * elf32-ppc.c (ELF_MINPAGESIZE): Define.
2639 * elfcode.h (elf_object_p): Use minpagesize instead of
2640 maxpagesize.
2641 * elfxx-target.h (ELF_MINPAGESIZE): Default to ELF_MAXPAGESIZE.
2642 (elfNN_bed): Include ELF_MINPAGESIZE.
2643
319850b4
JB
26442005-01-28 Julian Brown <julian@codesourcery.com>
2645
2646 * bin-in.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2647 * bin-in2.h (bfd_elf32_arm_set_target_relocs): Update prototype.
2648 * elf32-arm.c (elf32_arm_link_hash_table): Add fix_v4bx flag.
2649 (bfd_elf32_arm_set_target_relocs): Add formal parameter fix_v4bx for
ec13b3bb 2650 passing flag value from ld. Set flag value in global hash table entry.
319850b4 2651 (elf32_arm_final_link_relocate): Add code to implement R_ARM_V4BX
ec13b3bb 2652 relocation.
319850b4 2653
a53bf506
AC
26542005-01-27 Andrew Cagney <cagney@gnu.org>
2655
2656 * configure: Regenerate to track ../gettext.m4 change.
2657
dc4c9c19
MM
26582005-01-25 Mark Mitchell <mark@codesourcery.com>
2659
2660 * elf32-arm.c (elf_backend_default_use_rela_p): Define to zero for
ec13b3bb 2661 SymbianOS.
dc4c9c19 2662
90219bd0
AO
26632005-01-25 Alexandre Oliva <aoliva@redhat.com>
2664
2665 2004-12-10 Alexandre Oliva <aoliva@redhat.com>
2666 * elf32-frv.c (elf32_frv_relocate_section): Force local binding
2667 for TLSMOFF.
2668 * reloc.c: Add R_FRV_TLSMOFF.
2669 * elf32-frv.c (elf32_frv_howto_table): Likewise.
2670 (frv_reloc_map, frv_reloc_type_lookup): Map it.
2671 (elf32_frv_relocate_section): Handle it.
2672 (elf32_frv_check_relocs): Likewise.
2673 * libbfd.h, bfd-in2.h: Rebuilt.
2674 2004-11-26 Alexandre Oliva <aoliva@redhat.com>
2675 * elf32-frv.c (_frvfdpic_emit_got_relocs_plt_entries): Don't crash
2676 when given an undefweak TLS symbol. Fix constant TLS PLT entries
2677 such that they return the constant in gr9.
2678 (_frvfdpic_relax_tls_entries): Don't crash for undefweak TLS
2679 symbols.
2680 (_frvfdpic_size_got_plt): Set _cooked_size of dynamic sections.
2681 too, such that they shrink on relaxation.
2682 (elf32_frvfdpic_finish_dynamic_sections): Check __ROFIXUP_END__ as
2683 marking the position right past the _GLOBAL_OFFSET_TABLE_ value.
2684 (_frvfdpic_assign_plt_entries): Shrink constant TLS PLT entries
2685 if we can guarantee the use of 16-bit constants.
2686 2004-11-10 Alexandre Oliva <aoliva@redhat.com>
2687 Introduce TLS support for FR-V FDPIC.
2688 * reloc.c: Add TLS relocations.
2689 * elf32-frv.c (elf32_frv_howto_table): Add TLS relocations.
2690 (elf32_frv_rel_tlsdesc_value_howto): New.
2691 (elf32_frv_rel_tlsoff_howto): New.
2692 (frv_reloc_map): Add new mappings.
2693 (struct frvfdpic_elf_link_hash_table): Add pointer to summary
2694 reloc information.
2695 (frvfdpic_dynamic_got_plt_info): New.
2696 (frvfdpic_plt_tls_ret_offset): New.
2697 (ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE): Move earlier.
2698 (struct _frvfdpic_dynamic_got_info): Likewise. Add TLS members.
2699 (struct _frvfdpic_dynamic_got_plt_info): Likewise.
2700 (FRVFDPIC_SYM_LOCAL): Regard symbols defined in the absolute
2701 section as local.
2702 (struct frvfdpic_relocs_info): Add TLS fields.
2703 (frvfdpic_relocs_info_hash): Warning clean up.
2704 (frvfdpic_relocs_info_find): Initialize tlsplt_entry.
2705 (frvfdpic_pic_merge_early_relocs_info): Merge TLS fields.
2706 (FRVFDPIC_TLS_BIAS): Define.
2707 (tls_biased_base): New.
2708 (_frvfdpic_emit_got_relocs_plt_entries): Deal with TLS
2709 relocations.
2710 (frv_reloc_type_lookup): Likewise.
2711 (frvfdpic_info_to_howto_rel): Likewise.
2712 (elf32_frv_relocate_section): Likewise.
2713 (_frv_create_got_section): Create the PLT section here.
2714 (elf32_frvfdpic_create_dynamic_sections): Not here.
2715 (_frvfdpic_count_nontls_entries): Move out of...
2716 (_frvfdpic_count_got_plt_entries): ... here.
2717 (_frvfdpic_count_tls_entries): Likewise. Add TLS support.
2718 (_frvfdpic_count_relocs_fixups): Likewise. Add relaxation
2719 support.
2720 (_frvfdpic_relax_tls_entries): New.
2721 (_frvfdpic_compute_got_alloc_data): Add TLS support.
2722 (_frvfdpic_get_tlsdesc_entry): New.
2723 (_frvfdpic_assign_got_entries): Add TLS support.
2724 (_frvfdpic_assign_plt_entries): Likewise.
2725 (_frvfdpic_reset_got_plt_entries): New.
2726 (_frvfdpic_size_got_plt): Move out of...
2727 (elf32_frvfdpic_size_dynamic_sections): ... here.
2728 (_frvfdpic_relax_got_plt_entries): New.
2729 (elf32_frvfdpic_relax_section): New.
2730 (elf32_frvfdpic_finish_dynamic_sections): Add TLS sanity check.
2731 (elf32_frv_check_relocs): Add TLS support.
2732 (bfd_elf32_bfd_relax_section): Define for FDPIC.
2733 * libbfd.h, bfd-in2.h: Rebuilt.
2734
8615f3f2
AM
27352005-01-25 Alan Modra <amodra@bigpond.net.au>
2736
2737 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound): Only include
2738 loadable reloc sections.
2739 (_bfd_elf_canonicalize_dynamic_reloc): Likewise.
2740 (_bfd_elf_get_synthetic_symtab): Return 0 if no dynamic syms.
2741
7e9f0867
AM
27422005-01-25 Alan Modra <amodra@bigpond.net.au>
2743
2744 * elflink.c (elf_link_add_object_symbols): Don't create link dynamic
2745 sections immediately when linking shared libs. Instead, wait until
2746 we know a lib is needed.
2747 (_bfd_elf_link_create_dynstrtab): Extract from..
2748 (_bfd_elf_link_create_dynamic_sections_): ..here.
2749 (elf_add_dt_needed_tag): Call _bfd_elf_link_create_dynstrtab and
2750 _bfd_elf_link_create_dynamic_sections. Add abfd param. Allow
2751 for non-existent .dynamic.
2752 (elf_link_output_extsym): Don't complain about undefined symbols
2753 in as-needed dynamic libs that aren't actually linked.
2754
45181ed1
AC
27552005-01-24 Andrew Cagney <cagney@gnu.org>
2756
2757 * configure: Regenerate, ../gettext.m4 was updated.
2758
753e3eb6
BE
27592005-01-21 Ben Elliston <bje@au.ibm.com>
2760
2761 * aout-encap.c: Remove unused file.
2762
1c16dfa5
L
27632005-01-19 H.J. Lu <hongjiu.lu@intel.com>
2764
2765 PR 679
2766 * elflink.c (_bfd_elf_dynamic_symbol_p): Only protected
2767 non-function symbols are local.
2768 (_bfd_elf_symbol_refs_local_p): Likewise.
2769
1449d79b
AM
27702005-01-18 Alan Modra <amodra@bigpond.net.au>
2771
2772 * bfd.c (bfd_link_just_syms): Add abfd param.
2773 * bfd-in2.h: Regenerate.
2774
dcf507a6
RS
27752005-01-17 Richard Sandiford <rsandifo@redhat.com>
2776
2777 * elf-eh-frame.c (skip_cfa_op, skip_non_nops): New functions.
2778 (_bfd_elf_discard_section_eh_frame): Use them to interpret the CFA
2779 instructions. If the amount of padding is known, reduce the size
2780 of the CIE or FDE by that amount.
2781
2c42be65
RS
27822005-01-17 Richard Sandiford <rsandifo@redhat.com>
2783
2784 * elf-bfd.h (struct cie): Use bfd_vmas for code_align, ra_column and
2785 augmentation_size. Use bfd_signed_vmas for data_align.
2786 * elf-eh-frame.c (read_uleb128, read_sleb128): Delete in favor of...
2787 (read_byte, skip_leb128, read_uleb128, read_sleb128): ...these new
2788 functions. Don't read past the end of the enclosing CIE or FDE.
2789 (skip_bytes): New utility function.
2790 (_bfd_elf_discard_section_eh_frame): Use new functions, adding more
2791 sanity checking.
2792 (_bfd_elf_write_section_eh_frame): Use new functions.
2793
acfe5567
RS
27942005-01-17 Richard Sandiford <rsandifo@redhat.com>
2795
2796 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use an
2797 assert-style REQUIRE() macro to handle sanity checks.
2798
c0c28ab8
L
27992005-01-17 H.J. Lu <hongjiu.lu@intel.com>
2800
2801 * dwarf2.c (dwarf2_debug): Move info_ptr_unit to ...
2802 (comp_unit): Here.
2803 (read_unsigned_leb128): Removed.
2804 (read_signed_leb128): Removed.
2805 (find_abstract_instance_name): Updated.
2806 (parse_comp_unit): Accept info_ptr_unit.
2807 (_bfd_dwarf2_find_nearest_line): Set info_ptr_unit for each
2808 comp unit and pass it to parse_comp_unit.
2809
2810 * elf-eh-frame.c (read_unsigned_leb128): Moved to ...
2811 (read_signed_leb128): Moved to ...
2812 * libbfd.c: Here.
2813
2814 * libbfd-in.h (read_unsigned_leb128): New prototype.
2815 (read_signed_leb128): Likewise.
2816 * libbfd.h: Regenerated.
2817
e38bc3b5
NC
28182005-01-17 Andrew Stubbs <andrew.stubbs@st.com>
2819 Nick Clifton <nickc@redhat.com>
2820
2821 * cpu-sh.c (bfd_to_arch_table): Change arch_sh1_up to arch_sh_up,
2822 arch__sh4_nofp_up to arch_sh4_nofpu_up and arch_sh4a_nofp_up to
2823 arch_sh4a_nofpu_up in order to match the external names and make the
2824 testsuite's job easier.
2825 * archuires.c: Rename bfd_mach_sh2a_fake? to more meaningful
2826 names.
2827 * bfd-in2.h: Regenerate.
2828
8fb84ecc
AC
28292005-01-15 Andrew Cagney <cagney@gnu.org>
2830
2831 * bfd.m4: New file.
2832 * acinclude.m4: Move BFD_NEED_DECLARATION,
2833 BFD_HAVE_SYS_PROCFS_TYPE and BFD_HAVE_SYS_PROCFS_TYPE_MEMBER to
2834 the new file bfd.m4. Include ../bfd/bfd.m4.
2835 * configure: Re-generate.
8615f3f2 2836
b4a38de6
AM
28372005-01-12 Alan Modra <amodra@bigpond.net.au>
2838
2839 * elf32-ppc.c (ppc_elf_howto_raw): Delete RELAX32* entries.
2840 (ppc_elf_relax_section): Use PLT variants of RELAX32 relocs for
2841 reaching PLT.
2842 (ppc_elf_relocate_section): Handle R_PPC_RELAX32_PLT and
2843 R_PPC_RELAX32PC_PLT.
2844
3eb128b2
AM
28452005-01-11 Alan Modra <amodra@bigpond.net.au>
2846
2847 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Follow indirect and warning
2848 symbols.
2849 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
2850 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
2851 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
2852 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
2853 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
2854 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
2855 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Likewise.
2856 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
2857 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
2858 * elf32-sparc.c (elf32_sparc_gc_sweep_hook): Likewise.
2859 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
2860 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
2861 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
2862 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
2863
264a1fe0
AM
28642005-01-11 Alan Modra <amodra@bigpond.net.au>
2865
2866 * elf32-ppc.c (ppc_elf_create_dynamic_sections): Correct
2867 .dynsbss flags.
2868
5c4504f7
NC
28692005-01-10 Inderpreet Singh <inderpreetb@noida.hcltech.com>
2870
2871 * archures.c: Define bfd_mach_maxq10 and bfd_mach_maxq20.
2872 * bfd-in2.h: Regenerate.
2873 * coffcode.h (coff_set_arch_mach_hook, coff_set_flags): Add code
2874 to support these new machine values.
2875 * cpu-maxq.c (bfd_maxq10_arch): New architecture definition for
2876 the maxq10.
2877 (bfd_maxq_arch): Update values for the maxq20.
2878
669460c7
EB
28792005-01-10 Eric Botcazou <ebotcazou@libertysurf.fr>
2880
2881 * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): When linking a
2882 non-shared object, do not reserve space in .plt and .rela.plt for
2883 regular symbols neither defined nor referenced in shared objects.
2884
a51a7930
EB
28852005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2886
01aac484
EB
2887 * elf32-sparc.c (elf32_sparc_link_hash_table_create): Use bfd_zmalloc
2888 to zero the structure.
2889 (create_got_section): Use BFD_ASSERT instead of abort.
a51a7930
EB
2890 * elf64-sparc.c (struct sparc64_elf_link_hash_table): New 'sgot' and
2891 'srelgot' fields.
2892 (create_got_section): New function.
2893 (sparc64_elf_create_dynamic_sections): Likewise.
2894 (sparc64_elf_check_relocs): Invoke create_got_section instead of
2895 _bfd_elf_create_got_section. Use the sgot and srelgot shortcuts.
2896 (sparc64_elf_size_dynamic_sections): Use the srelgot shortcut.
2897 (sparc64_elf_relocate_section): Use the sgot and srelgot shortcuts.
2898 (sparc64_elf_finish_dynamic_symbol): Likewise.
2899 (sparc64_elf_finish_dynamic_sections): Use the sgot shortcut.
2900 (elf_backend_create_dynamic_sections): Define to
2901 sparc64_elf_create_dynamic_sections.
2902
151e5294
EB
29032005-01-09 Eric Botcazou <ebotcazou@libertysurf.fr>
2904
2905 * elf32-sparc.c (elf32_sparc_omit_section_dynsym): New function.
2906 (elf_backend_omit_section_dynsym): Define to it.
2907 * elf64-sparc.c (sparc64_elf_omit_section_dynsym): New function.
2908 (elf_backend_omit_section_dynsym): Define to it.
2909
6f79b219
JJ
29102005-01-07 Jakub Jelinek <jakub@redhat.com>
2911
2912 * bfd/elf.c (INCLUDE_SECTION_IN_SEGMENT): Don't put empty sections into
2913 PT_DYNAMIC segment, unless .dynamic.
2914
4e7fd91e
PB
29152005-01-06 Paul Brook <paul@codesourcery.com>
2916
2917 * config.bfd: Add entry for arm-*-vxworks and arm-*-windiss.
2918 * configure.in: Add bfd_elf32_{big,little}arm_vxworks_vec.
2919 * configure: Regenerate.
2920 * elf32-arm.c: Add VxWorks target bfd.
2921 (USE_REL): Remove.
2922 (elf32_arm_link_hash_table): Add use_rel.
2923 (elf32_arm_link_hash_table_create, elf32_arm_final_link_relocate,
2924 elf32_arm_relocate_section): Replace USE_REL with runtime check.
2925 Correct offset calculation for RELA case.
2926 (elf_backend_may_use_rel_p, elf_backend_may_use_rela_p,
2927 elf_backend_default_use_rela_p, elf_backend_rela_normal): Define.
2928 (elf32_arm_vxworks_link_hash_table_create): New function.
2929 * targets.c (bfd_elf32_bigarm_vxworks_vec): Add declaration.
2930 (bfd_elf32_littlearm_vxworks_vec): Ditto.
2931 (_bfd_target_vector): Add bfd_elf32_{big,little}arm_vxworks_vec.
2932
4c52953f
AM
29332005-01-06 Alan Modra <amodra@bigpond.net.au>
2934
2935 * elf64-ppc.c (struct ppc_link_hash_table): Add no_multi_toc and
2936 multi_toc_needed.
2937 (has_toc_reloc, makes_toc_func_call, call_check_in_progress): Define.
2938 (ppc64_elf_check_relocs): Update references to has_gp_reloc.
2939 (ppc64_elf_setup_section_lists): Add no_multi_toc parm, set htab bit.
2940 (ppc64_elf_next_toc_section): Heed no_multi_toc.
2941 (ppc64_elf_reinit_toc): Set multi_toc_needed.
2942 (toc_adjusting_stub_needed): Rewrite.
2943 (ppc64_elf_next_input_section): Use multi_toc_needed to shortcut
2944 toc tests. Adjust for toc_adjusting_stub_needed changes.
2945 (ppc64_elf_size_stubs): Update references to has_gp_reloc.
2946 * elf64-ppc.h (ppc64_elf_setup_section_lists): Update prototype.
2947 * section.c: Expand comment on backend bits.
2948 * bfd-in2.h: Regenerate.
2949 * libbfd.h: Regenerate.
2950
f03d65b4
AM
29512005-01-06 Alan Modra <amodra@bigpond.net.au>
2952
2953 * elf64-ppc.c (ppc64_elf_size_stubs): When determining need for
2954 toc adjusting stub, do not test source section flags.
2955
8af139b3
EB
29562005-01-05 Eric Botcazou <ebotcazou@libertysurf.fr>
2957
2958 * elf64-sparc.c (sparc64_elf_relocate_section): Ignore overflows
2959 from STABS debugging sections again.
2960
06f22d7e
FF
29612005-01-05 Fred Fish <fnf@specifixinc.com>
2962
2963 * dwarf2.c (struct dwarf2_debug): Add info_ptr_unit member.
2964 (find_abstract_instance_name): New function.
2965 (scan_unit_for_functions): Handle DW_TAG_inlined_subroutine.
2966 (scan_unit_for_functions): Handle DW_AT_abstract_origin.
2967 (_bfd_dwarf2_find_nearest_line): Initialize info_ptr_unit.
2968
83a358aa
PB
29692004-12-31 Paul Brook <paul@copdesourcery.com>
2970
2971 * elf32-arm.c (elf32_arm_symbian_plt_entry): Fix comment typo.
2972
b996922c
AM
29732004-12-31 Alan Modra <amodra@bigpond.net.au>
2974
2975 * reloc.c (BFD_RELOC_AVR_LDI, BFD_RELOC_AVR_6, BFD_RELOC_AVR_6_ADIW):
2976 Commit missing changes from 2004-12-22.
2977 * bfd-in2.h: Regenerate.
2978
17a83432
TL
29792004-12-23 Tomer Levi <Tomer.Levi@nsc.com>
2980
2981 * elf32-crx.c (elf32_crx_relax_section): Support 'bcop' relaxation.
2982
d69f560c
KW
29832004-12-21 Kris Warkentin <kewarken@qnx.com>
2984
2985 * elf.c (elfcore_grok_nto_gregs): Change name to elfcore_grok_nto_regs.
2986 Add 'base' argument for constructing register sections. Reformat.
2987 (elfcore_grok_nto_note): Call elfcore_grok_nto_regs for both
2988 gp and fp regs. Reformat.
4c52953f 2989
750bce0e
NC
29902004-12-22 Klaus Rudolph <lts-rudolph@gmx.de>
2991
2992 * reloc.c: Add new relocs R_AVR_LDI, R_AVR_6, R_AVR_6_ADIW.
2993 * bfd-in2.h: Regenerate.
2994 * elf32-avr.c (elf_avr_nowto_table): Add the new relocs.
2995 (avr_reloc_map): Likewise.
2996 (avr_final_link_relocate): Likewise.
2997
a5db907e
AM
29982004-12-22 Alan Modra <amodra@bigpond.net.au>
2999
3000 * elflink.c (_bfd_elf_merge_symbol): Treat old definitions from
3001 as-needed dynamic libs as undefined.
3002 (elf_link_add_object_symbols): Remove DYN_AS_NEEDED from as-needed
3003 libs when finding they are needed.
3004
8860955f
AM
30052004-12-20 Alan Modra <amodra@bigpond.net.au>
3006
3007 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add opd_relocs.
3008 (opd_entry_value): Use opd_relocs if available.
3009 (ppc64_elf_relocate_section): Don't set reloc_done. Instead
3010 copy .opd relocations to opd_relocs.
3011 (ppc64_elf_edit_toc): Set rel_hdr.sh_size after editing relocs.
3012
1e50d24d
RS
30132004-12-16 Richard Sandiford <rsandifo@redhat.com>
3014
3015 * reloc.c (BFD_RELOC_V850_LO16_SPLIT_OFFSET): New bfd_reloc_code_type.
3016 * elf32-v850.c (v850_elf_howto_table): Add entry for
3017 R_V850_LO16_SPLIT_OFFSET.
3018 (v850_elf_reloc_map): Map it to BFD_RELOC_V850_LO16_SPLIT_OFFSET.
3019 (v850_elf_perform_lo16_relocation): New function, extracted from...
3020 (v850_elf_perform_relocation): ...here. Use it to handle
3021 R_V850_LO16_SPLIT_OFFSET.
3022 (v850_elf_check_relocs, v850_elf_final_link_relocate): Handle
3023 R_V850_LO16_SPLIT_OFFSET.
3024 * libbfd.h, bfd-in2.h: Regenerate.
3025
2fbd2a87
NC
30262004-12-14 P.J. Darcy <darcypj@us.ibm.com>
3027
3028 * config.bfd: Add s390x-ibm-tpf support.
3029
06302770
TL
30302004-12-14 Tomer Levi <Tomer.Levi@nsc.com>
3031
8860955f 3032 * elf32-crx.c (elf32_crx_relax_delete_bytes): Add 'struct bfd_link_info *'
06302770
TL
3033 to prototype, to make hash info available.
3034 Prevent wrapped symbols from being adjusted twice.
3035
c314987d
RS
30362004-12-14 Richard Sandiford <rsandifo@redhat.com>
3037
3038 * elfxx-mips.c (mips_elf_calculate_relocation): Don't report an
3039 overflow for calls to undefined weak symbols.
3040
5c799c07
AM
30412004-12-11 Alan Modra <amodra@bigpond.net.au>
3042
3043 * elfcode.h (elf_slurp_symbol_table): Use bfd_elf_sym_name so that
3044 canonical sections syms have a name.
3045
645ea6a9
AM
30462004-12-11 Alan Modra <amodra@bigpond.net.au>
3047
3048 * elf64-ppc.c (opd_entry_value): Don't use cached relocs if they
3049 have been adjusted for output.
3050 (ppc64_elf_relocate_section): Mark sections with reloc_done.
3051
0e2cfdce
AM
30522004-12-10 Alan Modra <amodra@bigpond.net.au>
3053
be8dd2ca
AM
3054 * elf.c (bfd_elf_sym_name): Rename from bfd_elf_local_sym_name and
3055 add symtab_hdr param.
0e2cfdce
AM
3056 (group_signature): Update calls.
3057 * elf-bfd.h (bfd_elf_sym_name): Update.
3058 * elf32-ppc.c (ppc_elf_relocate_section): Update.
8860955f
AM
3059 * elf64-ppc.c (ppc64_elf_edit_opd, ppc64_elf_edit_toc): Update.
3060 (ppc64_elf_relocate_section): Update.
0e2cfdce
AM
3061 * elflink.c (elf_link_input_bfd): Update.
3062
138f35cc
JJ
30632004-12-10 Jakub Jelinek <jakub@redhat.com>
3064
3065 * elf.c (bfd_elf_local_sym_name): Avoid crashes with invalid
3066 st_shndx on STT_SECTION sections.
3067
f9cfae62
DJ
30682004-12-09 Daniel Jacobowitz <dan@codesourcery.com>
3069
3070 * elfcode.h (elf_slurp_reloc_table_from_section): Don't canonicalize
3071 ELF section symbols.
3072
0d2e43ed
ILT
30732004-12-09 Ian Lance Taylor <ian@wasabisystems.com>
3074
1367d393
ILT
3075 * elfxx-mips.c (mips_elf_calculate_relocation): For R_MIPS_JALR,
3076 return a real value, unless it is a PLT symbol.
3077 (mips_elf_perform_relocation): On the RM9000, turn a jal into a
3078 bal if possible.
3079
74f79d8d
ILT
3080 * elfn32-mips.c (elf_mips_howto_table_rela): Change dst_mask of
3081 R_MIPS_JALR entry to 0.
3082
0d2e43ed
ILT
3083 * archures.c: Define bfd_mach_mips9000.
3084 * elfxx-mips.c (_bfd_elf_mips_mach): Handle E_MIPS_MACH_9000.
3085 (mips_set_isa_flags): Handle bfd_mach_mips9000.
3086 * cpu-mips.c (I_mips9000): Define.
3087 (arch_info_struct): Add case for bfd_mach_mips9000.
3088 * aoutx.h (NAME(aout,machine_type)): Handle bfd_mach_mips9000.
3089 * bfd-in2.h: Regenerate.
3090
728b2f21
ILT
30912004-12-08 Ian Lance Taylor <ian@wasabisystems.com>
3092
3093 * elfxx-mips.c (mips_elf_calculate_relocation): Test for R_MIPS_26
3094 overflow.
3095
45ab555d
BE
30962004-12-07 Ben Elliston <bje@gnu.org>
3097
3098 * netbsd-core.c (netbsd_core_file_p): Make `i' unsigned.
3099
1511ddaf
DJ
31002004-12-06 Daniel Jacobowitz <dan@debian.org>
3101
3102 Suggested by Fergal Daly <fergal@esatclear.ie>:
3103 * simple.c (simple_dummy_multiple_definition): New function.
3104 (bfd_simple_get_relocated_section_contents): Use it.
3105
31062004-12-03 Jan Beulich <jbeulich@novell.com>
57426232
JB
3107
3108 * elf.c (elf_find_function): Don't use the last file symbol ever,
3109 seen, but the last one seen prior to the symbol being reported.
3110 Don't report a filename at all for global symbols when that might
3111 be ambiguous/wrong.
3112
94a3258f
PB
31132004-12-01 Paul Brook <paul@codesourcery.com>
3114
3115 * elf32-arm.c (elf32_arm_copy_private_bfd_data): Set EI_OSABI.
3116 (elf32_arm_post_process_headers): Set EI_OSABI depending on ABI
3117 version.
3118
529fcb95
PB
31192004-12-01 Paul Brook <paul@codesourcery.com>
3120
3121 * elflink.c (elf_link_add_object_symbols): Make symbols from discarded
3122 sections undefined.
3123
dea514f5
PB
31242004-11-30 Paul Brook <paul@codesourcery.com>
3125
3126 * elf32-arm.c (struct elf32_arm_link_hash_table): Remove
3127 no_pipeline_knowledge
3128 (elf32_arm_link_hash_table_create): Ditto.
3129 (bfd_elf32_arm_process_before_allocation): Ditto.
3130 (elf32_arm_final_link_relocate): Ditto. Remove oabi relocation
3131 handling.
3132 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
3133 prototype.
3134 * bfd-in2.h: Regenerate.
3135
edfc032f
AM
31362004-11-30 Randolph Chung <tausq@debian.org>
3137
3138 * elf32-hppa.c (elf32_hppa_grok_prstatus): New function.
3139 (elf32_hppa_grok_psinfo): New function.
3140 (elf_backend_grok_prstatus): Define.
3141 (elf_backend_grok_psinfo): Define.
3142
0be9069d
L
31432004-11-24 H.J. Lu <hongjiu.lu@intel.com>
3144
3145 PR 574:
3146 * elfcode.h (elf_slurp_symbol_table): Handle STT_TLS.
3147
47cc2cf5
PB
31482004-11-24 Paul Brook <paul@codesourcery.com>
3149
3150 * elf.c (assign_section_numbers): Number SHT_GROUP sections first.
3151
0beaef2b
PB
31522004-11-24 Paul Brook <paul@codesourcery.com>
3153
3154 * elf32-arm.c (elf32_arm_swap_symbol_in): New function.
3155 (elf32_arm_swap_symbol_out): New function.
3156 (elf32_arm_size_info): Add.
3157 (elf_backend_size_info): Define.
3158
3dd2fcf0
DA
31592004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3160
3161 * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
3162 make_bfd_asection.
3163
de52dba4
AM
31642004-11-19 Alan Modra <amodra@bigpond.net.au>
3165
3166 * elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
3167 * elf32-iq2000.c (iq2000_reloc_type_lookup): C90 function decl.
3168 * nlmcode.h (nlm_write_object_contents): Warning fix.
3169
288f74fa
BW
31702004-11-18 Bob Wilson <bob.wilson@acm.org>
3171
3172 * elf32-xtensa.c (ebb_propose_action): Fix argument order.
3173
b7693d02
DJ
31742004-11-17 Daniel Jacobowitz <dan@codesourcery.com>
3175
3176 * elf32-arm.c (PLT_THUMB_STUB_SIZE): Define.
3177 (elf32_arm_plt_thumb_stub): New.
3178 (struct elf32_arm_link_hash_entry): Add plt_thumb_refcount
3179 and plt_got_offset.
3180 (elf32_arm_link_hash_traverse): Fix typo.
3181 (elf32_arm_link_hash_table): Add obfd.
3182 (elf32_arm_link_hash_newfunc): Initialize new fields.
3183 (elf32_arm_copy_indirect_symbol): Copy plt_thumb_refcount.
3184 (elf32_arm_link_hash_table_create): Initialize obfd.
3185 (record_arm_to_thumb_glue): Mark the glue as a local ARM function.
3186 (record_thumb_to_arm_glue): Mark the glue as a local Thumb function.
3187 (bfd_elf32_arm_get_bfd_for_interworking): Verify that the
3188 interworking BFD is not dynamic.
3189 (bfd_elf32_arm_process_before_allocation): Handle R_ARM_PLT32. Do
3190 not emit glue for PLT references.
3191 (elf32_arm_final_link_relocate): Handle Thumb functions. Do not
3192 emit glue for PLT references. Support the Thumb PLT prefix.
3193 (elf32_arm_gc_sweep_hook): Handle R_ARM_THM_PC22 and
3194 plt_thumb_refcount.
3195 (elf32_arm_check_relocs): Likewise.
3196 (elf32_arm_adjust_dynamic_symbol): Handle Thumb functions and
3197 plt_thumb_refcount.
3198 (allocate_dynrelocs): Handle Thumb PLT references.
3199 (elf32_arm_finish_dynamic_symbol): Likewise.
3200 (elf32_arm_symbol_processing): New function.
3201 (elf_backend_symbol_processing): Define.
3202
353057a5
RS
32032004-11-16 Richard Sandiford <rsandifo@redhat.com>
3204
3205 * elf-bfd.h (eh_cie_fde): Add new fields: add_augmentation_size and
3206 add_fde_encoding. Remove need_relative.
3207 * elf-eh-frame.c (extra_augmentation_string_bytes)
3208 (extra_augmentation_data_bytes, size_of_output_cie_fde): New functions.
3209 (_bfd_elf_discard_section_eh_frame): Consider changing the FDE encoding
3210 in cases where the CIE has no existing 'R' augmentation. Use
3211 size_of_output_cie_fde when assigning offsets. Use the final offset
3212 as the new section size.
3213 (_bfd_elf_eh_frame_section_offset): Remove need_relative handling.
3214 Account for any extra augmentation bytes in the returned offset.
3215 (_bfd_elf_write_section_eh_frame): Rework so that the entries are
3216 moved before being modified. Pad growing entries with DW_CFA_nops.
3217 Add 'z' and 'R' augmentations as directed by add_augmentation_size
3218 and add_fde_encoding.
3219
b32d3aa2
MM
32202004-11-15 Mark Mitchell <mark@codesourcery.com>
3221
3222 * elf32-arm.c (elf32_arm_relocate_section): Use
3223 arm_real_reloc_type.
3224
5d41f0b6
RS
32252004-11-16 Richard Sandiford <rsandifo@redhat.com>
3226
3227 * elfxx-mips.c (mips_elf_create_dynamic_relocation): Return early
3228 for discard relocations; don't add an R_MIPS_NONE to the main body
3229 of .rel.dyn.
3230
fc0e6df6
PB
32312004-11-04 Paul Brook <paul@codesourcery.com>
3232
3233 * elf-bfd.h (_bfd_elf_slurp_version_tables): Update prototype.
3234 * elf.c (_bfd_elf_print_private_bfd_data): Pass extra argument.
3235 (_bfd_elf_slurp_version_tables): Add extra argument. Create extra
3236 default version definition for unversioned symbols.
3237 * elfcode.h (elf_slurp_symbol_table): Pass extra argument.
3238 * elflink.c (elf_link_add_object_symbols): Pass extra argument to
3239 _bfd_elf_slurp_version_tables. Set default version for unversioned
3240 imported symbols.
3241
b23e50e2
PB
32422004-11-15 Paul Brook <paul@codesourcery.com>
3243
3244 * elflink.c (elf_link_add_object_symbols): Don't assume version
3245 indices are consecutive.
3246
f4a6705c
RS
32472004-11-14 Richard Sandiford <rsandifo@redhat.com>
3248
3249 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Deal with
3250 composite relocations against the personality data.
3251
ee06dc07
PB
32522004-11-13 Paul Brook <paul@codesourcery.com>
3253
3254 * bfd/elf32-arm.c (elf32_arm_final_link_relocate): Resolve
3255 R_ARM_PREL31 relocations to PLT entries.
3256 (elf32_arm_relocate_section, elf32_arm_gc_sweep_hook): Ditto.
3257 (elf32_arm_check_relocs): Ditto.
3258
a1ace8d8
BW
32592004-11-12 Bob Wilson <bob.wilson@acm.org>
3260
3261 * xtensa-isa.c (xtensa_interface_class_id): New.
3262
e4115460
BW
32632004-11-11 Bob Wilson <bob.wilson@acm.org>
3264
3265 * elf32-xtensa.c (property_table_compare): Remove assertion about
3266 entries with the same address and non-zero size.
3267 (xtensa_read_table_entries): Report such entries as errors.
3268
6366ff1e
MM
32692004-11-11 Mark Mitchell <mark@codesourcery.com>
3270
3271 * elf32-arm.c (elf32_arm_final_link_relocate): Correct logic for
3272 R_ARM_RELATIVE on Symbian OS.
3273
b34af79c
MM
32742004-11-09 Mark Mitchell <mark@codesourcery.com>
3275
e6dc21b6
MM
3276 * som.c (som_bfd_print_private_bfd_data): New function.
3277 (som_object_setup): Save the auxiliary header. Don't assume that
3278 zero is an invalid entry point for a shared library.
3279 (som_object_p): Allocate the auxiliary header on the heap.
3280
b34af79c
MM
3281 * elf32-arm.c (elf32_arm_begin_write_processing): Do not use a K&R
3282 declaration.
3283 (elf32_arm_symbian_modify_segment_map): Likewise.
3284
08d1f311
DJ
32852004-11-09 Daniel Jacobowitz <dan@debian.org>
3286
3287 From David Poole <daveml@mbuf.com>:
3288 * elf32-arm.c (elf32_arm_readonly_dynrelocs): New function.
3289 (elf32_arm_size_dynamic_sections): Call it.
3290
0306b3bf
AM
32912004-11-09 Alan Modra <amodra@bigpond.net.au>
3292
3293 * Makefile.am (SOURCE_HFILES): Remove elf32-arm.h.
3294 (ALL_MACHINES_CFILES): Fix typo.
3295 * Makefile.in: Regenerate.
3296 * po/SRC-POTFILES.in: Regenerate.
3297
a16385dc
MM
32982004-11-08 Mark Mitchell <mark@codesourcery.com>
3299
3300 * elf32-arm.c (elf32_arm_final_link_relocate): When generating an
3301 R_ARM_RELATIVE relocation for Symbian OS, mention the section
3302 symbol in the relocation.
3303
0306b3bf
AM
33042004-11-08 Inderpreet Singh <inderpreetb@nioda.hcltech.com>
3305 Vineet Sharma <vineets@noida.hcltech.com>
7499d566
NC
3306
3307 * coff-maxq.c: New File.
0306b3bf
AM
3308 * cpu-maxq.c: New File.
3309 * coffcode.h: Likewise.
3310 * config.bfd: Likewise.
3311 * configure.in (maxqcoff_vec): New target vector.
7499d566
NC
3312 * Makefile.am: Add support for maxq target.
3313 * configure.in: Likewise.
0306b3bf
AM
3314 * archures.c:. Likewise.
3315 * targets.c: Likewise.
3316 * bfd_in2.h : Regenerated.
7499d566
NC
3317 * Makefile.in: Regenerated.
3318 * configure: Regenerated.
3319 * doc/Makefile.in: Regenerated.
3320
977cdf5a
NC
33212004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
3322
3323 * coff-i386.c (coff_i386_reloc): Fix weak symbols.
3324 * cofflink.c (_bfd_coff_link_input_bfd): Don't process
3325 C_NT_WEAK aux entries.
3326 (_bfd_coff_generic_relocate_section): Handle undefined
3327 aliases.
3328
9dfe8738
AS
33292004-11-07 Andreas Schwab <schwab@suse.de>
3330
3331 * elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
3332 SYMBOL_CALLS_LOCAL and check for undefweak symbols with
3333 non-default visibility.
3334
c3c76620
MM
33352004-11-01 Mark Mitchell <mark@codesourcery.com>
3336
3337 * elf32-arm.c (elf32_arm_symbian_begin_write_processing): Clear
0306b3bf 3338 D_PAGED.
c3c76620
MM
3339 (elf32_arm_symbian_modify_segment_map): Don't
3340 reset includes_filehdr and includes_phdrs here.
3341
7f266840
DJ
33422004-11-04 Daniel Jacobowitz <dan@debian.org>
3343
3344 * Makefile.am (BFD32_BACKENDS, BFD32_BACKENDS_CFILES): Replace
3345 elfarm-nabi with elf32-arm. Remove elfarm-oabi.
3346 (elf32-arm.lo): Replace elfarm-nabi.lo rule. Remove elf32-arm.h
3347 dependency.
3348 * config.bfd: Move arm-*-oabi* and thumb-*-oabi* from obsolete list
3349 to a new removed list. Remove normal configuration stanzas.
3350 * configure.in: (bfd_elf32_bigarm_vec, bfd_elf32_bigarm_symbian_vec)
3351 (bfd_elf32_littlearm_symbian_vec, bfd_elf32_littlearm_vec): Replace
3352 elfarm-nabi.lo with elf32-arm.lo.
3353 (bfd_elf32_bigarm_oabi_vec, bfd_elf32_littlearm_oabi_vec): Remove.
3354 * elf32-arm.c: Renamed from elfarm-nabi.c. Inline elf32-arm.h.
3355 * elf32-arm.h: Remove.
3356 * elfarm-oabi.c: Remove.
3357 * targets.c (_bfd_target_vector): Remove bfd_elf32_bigarm_oabi_vec
3358 and bfd_elf32_littlearm_oabi_vec.
3359 * aclocal.m4, Makefile.in, configure, doc/Makefile.in: Regenerated.
3360
bac23f82
HPN
33612004-11-04 Hans-Peter Nilsson <hp@axis.com>
3362
3363 * config.bfd: Support crisv32-*-* like cris-*-*.
3364 * archures.c (bfd_mach_cris_v0_v10, bfd_mach_cris_v32)
3365 (bfd_mach_cris_v10_v32): New macros.
3366 * cpu-cris.c: Tweak formatting.
3367 (get_compatible): New function.
3368 (N): New macro.
3369 (bfd_cris_arch_compat_v10_v32, bfd_cris_arch_v32): New
3370 bfd_arch_info_type:s.
3371 (bfd_cris_arch): Use bfd_mach_cris_v0_v10 for member mach,
3372 get_compatible for member compatible and link bfd_cris_arch_v32 as
3373 next.
3374 * elf32-cris.c (cris_elf_pcrel_reloc)
3375 (cris_elf_set_mach_from_flags): New functions.
3376 (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL>
3377 <R_CRIS_32_PCREL>: Use cris_elf_pcrel_reloc.
3378 (cris_elf_grok_prstatus, cris_elf_grok_psinfo): Give correct
3379 numbers for bfd_mach_cris_v32.
3380 (PLT_ENTRY_SIZE_V32): New macro.
3381 (elf_cris_plt0_entry): Drop last comma in initializer.
3382 (elf_cris_plt0_entry_v32, elf_cris_plt_entry_v32)
3383 (elf_cris_pic_plt0_entry_v32, elf_cris_pic_plt_entry_v32): New
3384 PLT initializers.
3385 (cris_elf_relocate_section): Change all "%B(%A)" messages to
3386 "%B, section %A".
3387 (elf_cris_finish_dynamic_symbol): Do V32-specific PLT entries.
3388 (elf_cris_finish_dynamic_sections): Similar.
3389 (elf_cris_adjust_dynamic_symbol): Similar.
3390 (cris_elf_check_relocs): Change all "%B(%A)" messages to "%B,
3391 section %A".
3392 <switch with PIC relocs>: Emit error and return FALSE for
3393 bfd_mach_cris_v10_v32.
3394 <case R_CRIS_8_PCREL, case R_CRIS_16_PCREL, case R_CRIS_32_PCREL>:
3395 Emit warning when generating textrel reloc.
3396 (cris_elf_object_p): Call cris_elf_set_mach_from_flags.
3397 (cris_elf_final_write_processing): Set flags according to mach.
3398 (cris_elf_print_private_bfd_data): Display
3399 EF_CRIS_VARIANT_COMMON_V10_V32 and EF_CRIS_VARIANT_V32.
3400 (cris_elf_merge_private_bfd_data): Drop variables old_flags,
3401 new_flags. Don't call cris_elf_final_write_processing. Don't
3402 look at the actual elf header flags at all; use
3403 bfd_get_symbol_leading_char to check ibfd, obfd. Trap difference
3404 in bfd_get_mach for ibfd and obfd and handle merging of compatible
3405 objects.
3406 (bfd_elf32_bfd_copy_private_bfd_data): Define.
3407 * reloc.c (BFD_RELOC_CRIS_SIGNED_8, BFD_RELOC_CRIS_UNSIGNED_8)
3408 (BFD_RELOC_CRIS_SIGNED_16, BFD_RELOC_CRIS_UNSIGNED_16)
3409 (BFD_RELOC_CRIS_LAPCQ_OFFSET): New relocs.
3410 * bfd-in2.h, libbfd.h: Regenerate.
3411
c5614fa4
AM
34122004-11-04 Alan Modra <amodra@bigpond.net.au>
3413
3414 * elf64-ppc.h (ppc64_elf_edit_toc): Declare.
3415 * elf64-ppc.c (struct ppc_link_hash_entry <adjust_done>): Update
3416 comment.
3417 (struct adjust_toc_info): New.
3418 (adjust_toc_syms, ppc64_elf_edit_toc): New functions.
3419
0ebdbb83
BW
34202004-11-03 Bob Wilson <bob.wilson@acm.org>
3421
3422 * elf.c (assign_file_positions_for_segments): Set next_file_pos even
3423 if there are no segments.
3424
675b2ace
DJ
34252004-11-02 Daniel Jacobowitz <dan@debian.org>
3426
3427 * config.bfd: Mark arm-*-oabi and thumb-*-oabi as obsolete.
3428
58852c27
NC
34292004-11-02 Nick Clifton <nickc@redhat.com>
3430
3431 * elf32-iq2000.c: Convert to ISO C90 formatting.
3432
e6857c0c
HPN
34332004-11-02 Hans-Peter Nilsson <hp@axis.com>
3434
20288ed6 3435 * elflink.c (_bfd_elf_create_got_section): Hide _GLOBAL_OFFSET_TABLE_.
e6857c0c 3436
bf718458
L
34372004-10-28 H.J. Lu <hongjiu.lu@intel.com>
3438
3439 * elfxx-ia64.c (elfNN_ia64_relocate_section): Handle weak
3440 undefined symbols for R_IA64_SECREL32MSB, R_IA64_SECREL32LSB,
3441 R_IA64_SECREL64MSB and R_IA64_SECREL64LSB.
3442
044ad7e3
KK
34432004-10-28 Kaz Kojima <kkojima@rr.iij4u.or.jp>
3444
3445 * elf32-sh.c (tpoff): Take alignment into account.
3446
d5cb4bb8
NC
34472004-10-28 Nick Clifton <nickc@redhat.com>
3448
3449 * elf32-iq2000.c (iq2000_elf_relocate_section): Do nothing when
0d48eab6 3450 performing a relocatable link.
d5cb4bb8
NC
3451 (iq2000_elf_object_p): Do not set elf_bad_symtab. This is only
3452 for MIPS ports under Irix.
3453
5b5bb741
PB
34542004-10-27 Richard Earnshaw <rearnsha@arm.com>
3455
3456 * elf32-arm.h (bfd_elf32_arm_process_before_allocation): Handle
3457 R_ARM_CALL and R_ARM_JUMP24 as aliases of R_ARM_PC24.
3458 (elf32_arm_final_link_relocate): Ditto.
3459 (arm_add_to_rel, elf32_arm_relocate_section): Ditto.
3460 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto
3461 (elf32_arm_adjust_dynamic_symbol): Ditto.
3462 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_CALL and
3463 R_ARM_JUMP32. Move R_ARM_R{REL32,ABS32,PC24,BASE}...
3464 (elf32_arm_r_howto): ... To here.
3465 (elf32_arm_howto_from_type): Use elf32_arm_r_howto.
3466
97ecf322
L
34672004-10-26 H.J. Lu <hongjiu.lu@intel.com>
3468
3469 PR 475
3470 * elfxx-ia64.c (elfNN_ia64_relocate_section): Correct
3471 R_IA64_SECREL32MSB, R_IA64_SECREL32LSB, R_IA64_SECREL64MSB
3472 and R_IA64_SECREL64LSB.
3473
3e3b46e5
PB
34742004-10-26 Paul Brook <paul@codesourcery.com>
3475
3476 * elflink.c (elf_finalize_dynstr): Skip shared aux structure.
3477 (bfd_elf_size_dynamic_sections): Create default version definition.
3478 (elf_link_output_extsym): Adjust for default symbol version.
3479
aa69fe43
HPN
34802004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3481
278b4623
HPN
3482 * mmo.c: Adjust to ISO C.
3483
aa69fe43
HPN
3484 * mmo.c (mmo_write_section_description): New function broken out
3485 of mmo_internal_write_section.
3486 (mmo_internal_write_section): For each of .text and .data, call
3487 mmo_write_section_description before outputting contents if it has
3488 nontrivially deducible vma or contents.
3489 (mmo_has_leading_or_trailing_zero_tetra_p): New function.
3490 (mmo_canonicalize_symtab): Adjust absolute symbols to .data
3491 symbols if found within the .data address range.
3492
ed040321
DJ
34932004-10-24 Daniel Jacobowitz <dan@debian.org>
3494
3495 * opncls.c (bfd_close): Return TRUE for BFD_IN_MEMORY.
3496
830866af
HPN
34972004-10-24 Hans-Peter Nilsson <hp@bitrange.com>
3498
3499 * mmo.c (File Layout): Correct place of misplaced blurb about
3500 special data.
3501
5f417ca3
MK
35022004-10-22 Mark Kettenis <kettenis@gnu.org>
3503
3504 * config.bfd: Add mips64*-*-openbsd.
3505
823fc61f
BW
35062004-10-21 Bob Wilson <bob.wilson@acm.org>
3507
3508 * elf32-xtensa.c (ebb_propose_action): Put declarations before
3509 statements.
3510
8697aafb
L
35112004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3512
3513 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.94.
3514 * configure: Regenerate.
3515
dfeffb9f
L
35162004-10-21 H.J. Lu <hongjiu.lu@intel.com>
3517
3518 PR 463
3519 * aoutx.h (aout_link_input_section_std): Pass proper hash entry
3520 to linker reloc_overflow callback.
3521 (aout_link_input_section_ext): Likewise.
3522 (aout_link_reloc_link_order): Likewise.
3523 * coff-a29k.c (coff_a29k_relocate_section): Likewise.
3524 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents):
3525 Likewise.
3526 (alpha_relocate_section): Likewise.
3527 * coff-arm.c (coff_arm_relocate_section): Likewise.
3528 * coff-h8300.c (h8300_reloc16_extra_cases): Likewise.
3529 * coff-h8500.c (extra_case): Likewise.
3530 * coff-i960.c (coff_i960_relocate_section): Likewise.
3531 * coff-mcore.c (coff_mcore_relocate_section): Likewise.
3532 * coff-mips.c (mips_relocate_section): Likewise.
3533 * coff-or32.c (coff_or32_relocate_section): Likewise.
3534 * coff-ppc.c (coff_ppc_relocate_section): Likewise.
3535 * coff-rs6000.c (xcoff_ppc_relocate_section): Likewise.
3536 * coff-sh.c (sh_relocate_section): Likewise.
3537 * coff-tic80.c (coff_tic80_relocate_section): Likewise.
3538 * coff-w65.c (w65_reloc16_extra_cases): Likewise.
3539 * coff-z8k.c (extra_case): Likewise.
3540 * coff64-rs6000.c (xcoff64_ppc_relocate_section): Likewise.
3541 * cofflink.c (_bfd_coff_reloc_link_order): Likewise.
3542 (_bfd_coff_generic_relocate_section): Likewise.
3543 * ecoff.c (ecoff_reloc_link_order): Likewise.
3544 * elf-hppa.h (elf_hppa_relocate_section): Likewise.
3545 * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
3546 * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
3547 * elf32-arm.h (elf32_arm_relocate_section): Likewise.
3548 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
3549 * elf32-cr16c.c (elf32_cr16c_relocate_section): Likewise.
3550 * elf32-cris.c (cris_elf_relocate_section): Likewise.
3551 * elf32-crx.c (elf32_crx_relocate_section): Likewise.
3552 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
3553 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
3554 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
3555 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
3556 * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
3557 * elf32-i370.c (i370_elf_relocate_section): Likewise.
3558 * elf32-i386.c (elf_i386_relocate_section): Likewise.
3559 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
3560 * elf32-ip2k.c (ip2k_elf_relocate_section): Likewise.
3561 * elf32-iq2000.c (iq2000_elf_relocate_section): Likewise.
3562 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
3563 * elf32-m68hc1x.c (elf32_m68hc11_relocate_section): Likewise.
3564 * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
3565 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
3566 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
3567 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
3568 * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
3569 * elf32-s390.c (elf_s390_relocate_section): Likewise.
3570 * elf32-sh.c (sh_elf_relocate_section): Likewise.
3571 * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
3572 * elf32-v850.c (v850_elf_relocate_section): Likewise.
3573 * elf32-vax.c (elf_vax_relocate_section): Likewise.
3574 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
3575 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
3576 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
3577 * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
3578 * elf64-s390.c (elf_s390_relocate_section): Likewise.
3579 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
3580 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
3581 * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
3582 * elflink.c (elf_reloc_link_order): Likewise.
3583 * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
3584 * elfxx-mips.c (_bfd_mips_elf_relocate_section): Likewise.
3585 (_bfd_elf_mips_get_relocated_section_contents): Likewise.
3586 * linker.c (_bfd_generic_reloc_link_order): Likewise.
3587 * pdp11.c (pdp11_aout_link_input_section): Likewise.
3588 (aout_link_reloc_link_order): Likewise.
3589 * reloc.c (bfd_generic_get_relocated_section_contents):
3590 Likewise.
3591 * xcofflink.c (xcoff_reloc_link_order): Likewise.
3592 * simple.c (simple_dummy_reloc_overflow): Updated.
3593
1715e0e3
AS
35942004-10-20 Andreas Schwab <schwab@suse.de>
3595
3596 * elf32-m68k.c (elf_m68k_plt_sym_val): New function.
3597 (elf_backend_plt_sym_val): Define.
3598
db3d41a8
DS
35992004-10-19 Danny Smith <dannysmith@users.sourceforege.net>
3600
3601 * config.bfd: Set targ_underscore=yes for PE COFF targets
3602
4b85d634
AM
36032004-10-19 Alan Modra <amodra@bigpond.net.au>
3604
3605 * elf64-ppc.c (opd_entry_value): Handle --just-symbols objects.
3606 (ppc64_elf_edit_opd): Likewise.
3607
6df4d94c
MM
36082004-10-18 Mark Mitchell <mark@codesourcery.com>
3609
3610 * elfarm-nabi.c (ELF_DYNAMIC_SEC_FLAGS): Add comment.
3611 * elflink.c (_bfd_elf_create_dynamic_sections): For a loaded PLT,
3612 set SEC_ALLOC and SEC_LOAD.
3613
00d962d1
NC
36142004-10-18 Nick Clifton <nickc@redhat.com>
3615
3616 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Compute
3617 'name' for relocs against both local and global symbols.
3618
b58f81ae
DJ
36192004-10-16 Daniel Jacobowitz <dan@debian.org>
3620
3621 * bfd-in2.h: Regenerate.
3622 * bfd.c (struct bfd): Add no_export.
3623 * elflink.c (elf_link_add_object_symbols): Handle no_export.
3624
7d3f158f
AM
36252004-10-15 Alan Modra <amodra@bigpond.net.au>
3626
3627 * config.bfd: Whitespace cleanup.
3628 * Makefile.am: Run "make dep-am"
3629 * Makefile.in: Regenerate.
3630
6d2cd210
JJ
36312004-10-15 Jakub Jelinek <jakub@redhat.com>
3632
3633 * elflink.c (struct already_linked_section): Removed.
3634 (try_match_symbols_in_sections, already_linked): Removed.
3635 (_bfd_elf_section_already_linked): Skip ^\.gnu\.linkonce\.[^.]*\.
3636 prefix of section names when finding already_linked_table
3637 chain. Compare section names. Instead of calling already_linked,
3638 do it inline and only for sections in the same already_linked_list.
3639
92e4ec35
AM
36402004-10-15 Alan Modra <amodra@bigpond.net.au>
3641
3642 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Add "info"
3643 parameter. If called after _bfd_elf_write_section_eh_frame,
3644 don't allow a -2 return unless need_* bit is already set, and
3645 handle offsets adjusted for output_offset.
3646 * elf-bfd.h (_bfd_elf_eh_frame_section_offset): Update prototype.
3647 * elf.c (_bfd_elf_section_offset): Update call.
3648
7bf6dede
L
36492004-10-13 H.J. Lu <hongjiu.lu@intel.com>
3650
3651 PR 440
3652 * coffcode.h (coff_compute_section_file_positions): Cast to
3653 bfd_vma when computing page alignment.
3654
c0042f5d
MM
36552004-10-13 Mark Mitchell <mark@codesourcery.com>
3656
3657 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
3658 offsets, not VMAs, for DT_VERSYM, DT_VERDEF, DT_VERNEED.
3659
2a1b9a48
MM
36602004-10-12 Mark Mitchell <mark@codesourcery.com>
3661
3662 * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Make .rel.plt
3663 relocations use a virtual address, not a section offset.
3664
b08b5071
BW
36652004-10-12 Bob Wilson <bob.wilson@acm.org>
3666
3667 * elf32-xtensa.c (elf_xtensa_get_private_bfd_flags): Delete.
3668 (narrow_instruction, widen_instruction): Remove unnecessary calls to
3669 xtensa_format_encode.
3670 (ebb_propose_action): Inline call to ebb_add_proposed_action.
3671 (ebb_add_proposed_action): Delete.
3672
7fa3d080
BW
36732004-10-12 Bob Wilson <bob.wilson@acm.org>
3674
3675 * elf32-xtensa.c: Use ISO C90 formatting.
3676
3656d5e3
PB
36772004-10-12 Paul Brook <paul@codesourcery.com>
3678
3679 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Rephrase error
3680 message.
3681
8cb51566
PB
36822004-10-12 Paul Brook <paul@codesourcery.com>
3683
3684 * elf32-arm.h: Support EABI version 4 objects.
3685
1abc8597
AM
36862004-10-12 Alan Modra <amodra@bigpond.net.au>
3687
3688 PR 325
3689 * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Place last in chain.
3690 Don't mark as default.
3691 (bfd_x86_64_arch): Don't mark as default.
3692
9e66c942
AM
36932004-10-12 Alan Modra <amodra@bigpond.net.au>
3694
3695 * elflink.c (enum action_discarded): New.
3696 (elf_section_complain_discarded): Delete.
3697 (elf_action_discarded): New function subsuming the above and also
3698 controlling reloc behaviour.
1abc8597 3699 (elf_link_input_bfd): Use it.
9e66c942 3700
7f1204bb
JJ
37012004-10-11 Jakub Jelinek <jakub@redhat.com>
3702
3703 * elf.c (bfd_section_from_shdr): Handle SHT_GNU_LIBLIST.
3704 (special_sections): Add .gnu.liblist and .gnu.conflict.
3705 (assign_section_numbers): Handle SHT_GNU_LIBLIST.
3706
87e5235d
AM
37072004-10-11 Alan Modra <amodra@bigpond.net.au>
3708
3709 PR 233
3710 * elflink.c (elf_link_input_bfd): Try harder to support
3711 relocations against symbols in removed linkonce sections.
3712
2ad770c3
AM
37132004-10-11 Alan Modra <amodra@bigpond.net.au>
3714
029446c4
AM
3715 * elflink.c (elf_link_input_bfd): Revert PR 354 change.
3716
2ad770c3
AM
3717 PR 354
3718 * elflink.c (elf_link_input_bfd): Check that relocs in SEC_ALLOC
3719 sections do not reference symbols in non-SEC_ALLOC sections.
3720
1da212d6
AM
37212004-10-11 Alan Modra <amodra@bigpond.net.au>
3722
3723 PR 437
3724 * elflink.c (elf_link_sort_relocs): Don't bomb on unusual sections.
3725 (_bfd_elf_link_omit_section_dynsym): Formatting.
3726
f12123c0
AM
37272004-10-10 Alan Modra <amodra@bigpond.net.au>
3728
3729 * libbfd-in.h (BFD_ASSERT, BFD_FAIL): Wrap macro body in do while.
3730 * libbfd.h: Regnerate.
3731 * elf32-cris.c: Add missing semicolon to BFD_ASSERTs.
3732 * elf32-frv.c: Likewise.
3733 * elf32-m32r.c: Likewise.
3734 * elf32-ppc.c: Likewise.
3735 * elf64-hppa.c: Likewise.
3736 * elfxx-ia64.c: Likewise.
3737 * opncls.c: Likewise.
3738
fda3ecf2
AM
37392004-10-10 Alan Modra <amodra@bigpond.net.au>
3740
3472e2e9
AM
3741 * elf-bfd.h (struct eh_frame_hdr_info): Add offsets_adjusted.
3742 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Adjust
3743 offsets stored in struct eh_cie_fde entries before doing other
3744 work.
3745
fda3ecf2
AM
3746 * elf-bfd.h (struct eh_cie_fde): Add cie_inf, remove sec.
3747 (struct eh_frame_hdr_info): Add last_cie_inf, remove last_cie_offset.
3748 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete code
3749 setting offsets for removed CIEs. Don't set "sec", instead set
3750 cie_inf for FDEs. Keep a pointer to last struct eh_cie_fde for a
3751 CIE in hdr_info. Only set make_relative and make_lsda_relative
3752 for CIEs. Use pointers rather than array indices.
3753 (_bfd_elf_eh_frame_section_offset): Test/set make_relative,
3754 make_lsda_relative, need_* on cie_inf for FDEs.
3755 (_bfd_elf_write_section_eh_frame): Adjust offset and new_offset for
3756 section output_offset. Delete cie_offset, instead use cie_inf
3757 pointer to CIE entry. Use need_relative and need_lsda_relative on
3758 CIE entry for FDEs. Use pointers rather than array indices.
3759
7db6994f
AM
37602004-10-09 Alan Modra <amodra@bigpond.net.au>
3761
3762 * coff-rs6000.c (rs6000coff_vec): Add initializer for
3763 bfd_is_target_special_symbol.
3764 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
3765 * som.c (som_bfd_is_target_special_symbol): Define.
3766
3c9458e9
NC
37672004-10-08 Nick Clifton <nickc@redhat.com>
3768
3769 * configure.in: (AM_INIT_AUTOMAKE): Set version to 2.15.93.
3770 * configure: Regenerate.
3771 * bfd-in2.h: Regenerate.
3772 * syms.c (bfd_is_target_special_symbol): New interface function.
3773 Returns true when a symbol should be considered to be special.
7db6994f 3774 * targets.c (bfd_target): Include bfd_is_target_special_symbol in
3c9458e9
NC
3775 the symbol jump table.
3776 * elf32-arm.h (elf32_arm_is_target_special_symbol): New function.
3777 Return true iff the symbol is a mapping symbol.
3778 (bfd_elf32_bfd_is_target_special_symbol): Define.
3779 * elfxx-target.h: Provide a default definition for
3780 bfd_is_target_special_symbol.
3781 * aout-target.h: Likewise.
3782 * aout-tic30.c: Likewise.
873d03ee 3783 * binary.c: Likewise.
3c9458e9
NC
3784 * coffcode.h: Likewise.
3785 * i386msdos.c: Likewise.
3786 * ieee.c: Likewise.
873d03ee 3787 * ihex.c: Likewise.
3c9458e9
NC
3788 * libaout.h: Likewise.
3789 * libbfd-in.h: Likewise
3790 * libecoff.h: Likewise.
3791 * mach-o.c: Likewise.
3792 * mmo.c: Likewise.
3793 * nlm-target.h: Likewise.
3794 * oasys.c: Likewise.
3795 * pef.c: Likewise.
3796 * ppcboot.c: Likewise.
3797 * srec.c: Likewise.
3798 * tekhex.c: Likewise.
3799 * versados.c: Likewise.
3800 * vms.c: Likewise.
3801 * xcoff-target.h: Likewise.
3802 * xsym.c: Likewise.
3803 * libbfd.h: Regenerate.
3804
d2b2c203
DJ
38052004-10-08 Daniel Jacobowitz <dan@debian.org>
3806
3807 * config.bfd: Include 64-bit support for i[3-7]86-*-solaris2*.
3808 * elf64-x86-64.c (elf64_x86_64_section_from_shdr): New function.
3809 (elf_backend_section_from_shdr): Define.
3810
864274b0
AM
38112004-10-08 Alan Modra <amodra@bigpond.net.au>
3812
3813 * syms.c (bfd_is_local_label): Return false for file symbols.
3814
43cd72b9 38152004-10-07 Bob Wilson <bob.wilson@acm.org>
85a5ac80 3816 David Heine <dlheine@tensilica.com>
43cd72b9
BW
3817
3818 * elf32-xtensa.c (elf32xtensa_size_opt): New global variable.
3819 (xtensa_default_isa): Global variable moved here from xtensa-isa.c.
3820 (elf32xtensa_no_literal_movement): New global variable.
3821 (elf_howto_table): Add entries for new relocations.
3822 (elf_xtensa_reloc_type_lookup): Handle new relocations.
3823 (property_table_compare): When addresses are equal, compare sizes and
3824 various property flags.
3825 (property_table_matches): New.
3826 (xtensa_read_table_entries): Extend to read new property tables. Add
3827 output_addr parameter to indicate that output addresses should be used.
3828 Use bfd_get_section_limit.
3829 (elf_xtensa_find_property_entry): New.
3830 (elf_xtensa_in_literal_pool): Use elf_xtensa_find_property_entry.
3831 (elf_xtensa_check_relocs): Handle new relocations.
3832 (elf_xtensa_do_reloc): Use bfd_get_section_limit. Handle new
3833 relocations. Use new xtensa-isa.h functions.
3834 (build_encoding_error_message): Remove encode_result parameter. Add
3835 new target_address parameter used to detect alignment errors.
3836 (elf_xtensa_relocate_section): Use bfd_get_section_limit. Clean up
3837 error handling. Use new is_operand_relocation function.
3838 (elf_xtensa_combine_prop_entries, elf_xtensa_merge_private_bfd_data):
3839 Use underbar macro for error messages. Formatting.
3840 (get_const16_opcode): New.
3841 (get_l32r_opcode): Add a separate flag for initialization.
3842 (get_relocation_opnd): Operand number is no longer explicit in the
3843 relocation. Change to decode the opcode and analyze its operands.
3844 (get_relocation_slot): New.
3845 (get_relocation_opcode): Add bfd parameter. Use bfd_get_section_limit.
3846 Use new xtensa-isa.h functions to handle multislot instructions.
3847 (is_l32r_relocation): Add bfd parameter. Use is_operand_relocation.
3848 (get_asm_simplify_size, is_alt_relocation, is_operand_relocation,
3849 insn_decode_len, insn_decode_opcode, check_branch_target_aligned,
3850 check_loop_aligned, check_branch_target_aligned_address, narrowable,
3851 widenable, narrow_instruction, widen_instruction, op_single_fmt_table,
3852 get_single_format, init_op_single_format_table): New.
3853 (elf_xtensa_do_asm_simplify): Add error_message parameter and use it
3854 instead of calling _bfd_error_handler. Use new xtensa-isa.h functions.
3855 (contract_asm_expansion): Add error_message parameter and pass it to
3856 elf_xtensa_do_asm_simplify. Replace use of R_XTENSA_OP0 relocation
3857 with R_XTENSA_SLOT0_OP.
3858 (get_expanded_call_opcode): Extend to handle either L32R or CONST16
3859 instructions. Use new xtensa-isa.h functions.
3860 (r_reloc struct): Add new virtual_offset field.
3861 (r_reloc_init): Add contents and content_length parameters. Set
3862 virtual_offset field to zero. Add contents to target_offset field for
3863 partial_inplace relocations.
3864 (r_reloc_is_defined): Check for null.
3865 (print_r_reloc): New debug function.
3866 (source_reloc struct): Replace xtensa_operand field with pair of the
3867 opcode and the operand position. Add is_abs_literal field.
3868 (init_source_reloc): Specify operand by opcode/position pair. Set
3869 is_abs_literal field.
3870 (source_reloc_compare): When target_offsets are equal, compare other
3871 fields to make sorting predictable.
3872 (literal_value struct): Add is_abs_literal field.
3873 (value_map_hash_table struct): Add has_last_loc and last_loc fields.
3874 (init_literal_value): New.
3875 (is_same_value): Replace with ...
3876 (literal_value_equal): ... this function. Add comparisons of
3877 virtual_offset and is_abs_literal fields.
3878 (value_map_hash_table_init): Use bfd_zmalloc. Check for allocation
3879 failure. Initialize has_last_loc field.
3880 (value_map_hash_table_delete): New.
3881 (hash_literal_value): Rename to ...
3882 (literal_value_hash): ... this. Include is_abs_literal flag and
3883 virtual_offset field in the hash value.
3884 (get_cached_value): Rename to ...
3885 (value_map_get_cached_value): ... this. Update calls to
3886 literal_value_hash and literal_value_equal.
3887 (add_value_map): Check for allocation failure. Update calls to
3888 value_map_get_cached_value and literal_value_hash.
3889 (text_action, text_action_list, text_action_t): New types.
3890 (find_fill_action, compute_removed_action_diff, adjust_fill_action,
3891 text_action_add, text_action_add_literal, offset_with_removed_text,
3892 offset_with_removed_text_before_fill, find_insn_action,
3893 print_action_list, print_removed_literals): New.
3894 (offset_with_removed_literals): Delete.
3895 (xtensa_relax_info struct): Add is_relaxable_asm_section, action_list,
3896 fix_array, fix_array_count, allocated_relocs, relocs_count, and
3897 allocated_relocs_count fields.
3898 (init_xtensa_relax_info): Initialize new fields.
3899 (reloc_bfd_fix struct): Add new translated field.
3900 (reloc_bfd_fix_init): Add translated parameter and use it to set the
3901 translated field.
3902 (fix_compare, cache_fix_array): New.
3903 (get_bfd_fix): Remove fix_list parameter and get all relax_info for the
3904 section via get_xtensa_relax_info. Use cache_fix_array to set up
3905 sorted fix_array and use bsearch instead of linear search.
3906 (section_cache_t): New struct.
3907 (init_section_cache, section_cache_section, clear_section_cache): New.
3908 (ebb_t, ebb_target_enum, proposed_action, ebb_constraint): New types.
3909 (init_ebb_constraint, free_ebb_constraint, init_ebb, extend_ebb_bounds,
3910 extend_ebb_bounds_forward, extend_ebb_bounds_backward,
3911 insn_block_decodable_len, ebb_propose_action, ebb_add_proposed_action):
3912 New.
3913 (retrieve_contents): Use bfd_get_section_limit.
3914 (elf_xtensa_relax_section): Add relocations_analyzed flag. Update call
3915 to compute_removed_literals. Free value_map_hash_table when no longer
3916 needed.
3917 (analyze_relocations): Check is_relaxable_asm_section flag. Call
3918 compute_text_actions for all sections.
3919 (find_relaxable_sections): Mark sections as relaxable if they contain
3920 ASM_EXPAND relocations that can be optimized. Adjust r_reloc_init
3921 call. Increment relax_info src_count field only for appropriate
3922 relocation types. Remove is_literal_section check.
3923 (collect_source_relocs): Use bfd_get_section_limit. Adjust calls to
3924 r_reloc_init and find_associated_l32r_irel. Check
3925 is_relaxable_asm_section flag. Handle L32R instructions with absolute
3926 literals. Pass is_abs_literal flag to init_source_reloc.
3927 (is_resolvable_asm_expansion): Use bfd_get_section_limit. Check for
3928 CONST16 instructions. Adjust calls to r_reloc_init and
fda3ecf2 3929 pcrel_reloc_fits. Handle weak symbols conservatively.
43cd72b9
BW
3930 (find_associated_l32r_irel): Add bfd parameter and pass it to
3931 is_l32r_relocation.
3932 (compute_text_actions, compute_ebb_proposed_actions,
3933 compute_ebb_actions, check_section_ebb_pcrels_fit,
3934 check_section_ebb_reduces, text_action_add_proposed,
3935 compute_fill_extra_space): New.
3936 (remove_literals): Replace with ...
3937 (compute_removed_literals): ... this function. Call
3938 init_section_cache. Use bfd_get_section_limit. Sort internal_relocs.
3939 Call xtensa_read_table_entries to get the property table. Skip
3940 relocations other than R_XTENSA_32 and R_XTENSA_PLT. Use new
3941 is_removable_literal, remove_dead_literal, and
fda3ecf2 3942 identify_literal_placement functions.
43cd72b9
BW
3943 (get_irel_at_offset): Rewrite to use bsearch on sorted relocations
3944 instead of linear search.
3945 (is_removable_literal, remove_dead_literal,
3946 identify_literal_placement): New.
3947 (relocations_reach): Update check for literal not referenced by any
3948 PC-relative relocations. Adjust call to pcrel_reloc_fits.
3949 (coalesce_shared_literal, move_shared_literal): New.
3950 (relax_section): Use bfd_get_section_limit. Call
3951 translate_section_fixes. Update calls to r_reloc_init and
3952 offset_with_removed_text. Check new is_relaxable_asm_section flag.
3953 Add call to pin_internal_relocs. Add special handling for
3954 R_XTENSA_ASM_SIMPLIFY and R_XTENSA_DIFF* relocs. Use virtual_offset
3955 info to calculate new addend_displacement variable. Replace code for
3956 deleting literals with more general code to perform the actions
3957 determined by the action_list for the section.
3958 (translate_section_fixes, translate_reloc_bfd_fix): New.
3959 (translate_reloc): Check new is_relaxable_asm_section flag. Call
3960 find_removed_literal only if is_operand_relocation. Update call to
3961 offset_with_removed_text. Use new target_offset and removed_bytes
3962 variables.
3963 (move_literal): New.
3964 (relax_property_section): Use bfd_get_section_limit. Set new
3965 is_full_prop_section flag and handle new property tables. Update calls
3966 to r_reloc_init and offset_with_removed_text. Check
3967 is_relaxable_asm_section flag. Handle expansion of zero-sized
3968 unreachable entries, with use of offset_with_removed_text_before_fill.
3969 For relocatable links, combine entries only for literal tables.
3970 (relax_section_symbols): Check is_relaxable_asm_section flag. Update
3971 calls to offset_with_removed_text. Translate st_size field for
3972 function symbols.
3973 (do_fix_for_relocatable_link): Change to return bfd_boolean to indicate
3974 failure. Add contents parameter. Update call to get_bfd_fix. Update
3975 call to r_reloc_init. Call _bfd_error_handler and return FALSE for
3976 R_XTENSA_ASM_EXPAND relocs.
3977 (do_fix_for_final_link): Add input_bfd and contents parameters. Update
3978 call to get_bfd_fix. Include offset from contents for partial_inplace
3979 relocations.
3980 (is_reloc_sym_weak): New.
3981 (pcrel_reloc_fits): Use new xtensa-isa.h functions.
3982 (prop_sec_len): New.
3983 (xtensa_is_property_section): Handle new property sections.
3984 (is_literal_section): Delete.
3985 (internal_reloc_compare): When r_offset matches, compare r_info and
3986 r_addend to make sorting predictable.
3987 (internal_reloc_matches): New.
3988 (xtensa_get_property_section_name): Handle new property sections.
3989 (xtensa_get_property_predef_flags): New.
3990 (xtensa_callback_required_dependence): Use bfd_get_section_limit.
3991 Update calls to xtensa_isa_init, is_l32r_relocation, and r_reloc_init.
3992 * xtensa-isa.c (xtensa_default_isa): Moved to elf32-xtensa.c.
3993 (xtisa_errno, xtisa_error_msg): New variables.
3994 (xtensa_isa_errno, xtensa_isa_error_msg): New.
3995 (xtensa_insnbuf_alloc): Add error handling.
3996 (xtensa_insnbuf_to_chars): Add num_chars parameter. Update to
3997 use xtensa_format_decode. Add error handling.
3998 (xtensa_insnbuf_from_chars): Add num_chars parameter. Decode the
3999 instruction length to find the number of bytes to copy.
4000 (xtensa_isa_init): Add error handling. Replace calls to
4001 xtensa_load_isa and xtensa_extend_isa with code to initialize lookup
4002 tables in the xtensa_modules structure.
4003 (xtensa_check_isa_config, xtensa_add_isa, xtensa_load_isa,
4004 xtensa_extend_isa): Delete.
4005 (xtensa_isa_free): Change to only free lookup tables.
4006 (opname_lookup_compare): Replace with ...
4007 (xtensa_isa_name_compare): ... this function. Use strcasecmp.
4008 (xtensa_insn_maxlength): Rename to ...
4009 (xtensa_isa_maxlength): ... this.
4010 (xtensa_insn_length): Delete.
4011 (xtensa_insn_length_from_first_byte): Replace with ...
4012 (xtensa_isa_length_from_chars): ... this function.
4013 (xtensa_num_opcodes): Rename to ...
4014 (xtensa_isa_num_opcodes): ... this.
4015 (xtensa_isa_num_pipe_stages, xtensa_isa_num_formats,
4016 xtensa_isa_num_regfiles, xtensa_isa_num_stages,
4017 xtensa_isa_num_sysregs, xtensa_isa_num_interfaces,
4018 xtensa_isa_num_funcUnits, xtensa_format_name, xtensa_format_lookup,
4019 xtensa_format_decode, xtensa_format_encode, xtensa_format_length,
4020 xtensa_format_num_slots, xtensa_format_slot_nop_opcode,
4021 xtensa_format_get_slot, xtensa_format_set_slot): New functions.
4022 (xtensa_opcode_lookup): Add error handling.
4023 (xtensa_decode_insn): Replace with ...
4024 (xtensa_opcode_decode): ... this function, with new format and
4025 slot parameters. Add error handling.
4026 (xtensa_encode_insn): Replace with ...
4027 (xtensa_opcode_encode): ... this function, which does the encoding via
4028 one of the entries in the "encode_fns" array. Add error handling.
4029 (xtensa_opcode_name): Add error handling.
4030 (xtensa_opcode_is_branch, xtensa_opcode_is_jump, xtensa_opcode_is_loop,
4031 xtensa_opcode_is_call): New.
4032 (xtensa_num_operands): Replace with ...
4033 (xtensa_opcode_num_operands): ... this function. Add error handling.
4034 (xtensa_opcode_num_stateOperands,
4035 xtensa_opcode_num_interfaceOperands, xtensa_opcode_num_funcUnit_uses,
4036 xtensa_opcode_funcUnit_use, xtensa_operand_name,
4037 xtensa_operand_is_visible): New.
4038 (xtensa_get_operand, xtensa_operand_kind): Delete.
4039 (xtensa_operand_inout): Add error handling and special-case for
4040 "sout" operands.
4041 (xtensa_operand_get_field, xtensa_operand_set_field): Rewritten to
4042 operate on one slot of an instruction. Added error handling.
4043 (xtensa_operand_encode): Handle default operands with no encoding
4044 functions. Check for success by comparing against decoded value.
4045 Add error handling.
4046 (xtensa_operand_decode): Handle default operands. Return decoded value
4047 through argument pointer. Add error handling.
4048 (xtensa_operand_is_register, xtensa_operand_regfile,
4049 xtensa_operand_num_regs, xtensa_operand_is_known_reg): New.
4050 (xtensa_operand_isPCRelative): Rename to ...
4051 (xtensa_operand_is_PCrelative): ... this. Add error handling.
4052 (xtensa_operand_do_reloc, xtensa_operand_undo_reloc): Return value
4053 through argument pointer. Add error handling.
4054 (xtensa_stateOperand_state, xtensa_stateOperand_inout,
4055 xtensa_interfaceOperand_interface, xtensa_regfile_lookup,
4056 xtensa_regfile_lookup_shortname, xtensa_regfile_name,
4057 xtensa_regfile_shortname, xtensa_regfile_view_parent,
4058 xtensa_regfile_num_bits, xtensa_regfile_num_entries,
4059 xtensa_state_lookup, xtensa_state_name, xtensa_state_num_bits,
4060 xtensa_state_is_exported, xtensa_sysreg_lookup,
4061 xtensa_sysreg_lookup_name, xtensa_sysreg_name, xtensa_sysreg_number,
4062 xtensa_sysreg_is_user, xtensa_interface_lookup, xtensa_interface_name,
4063 xtensa_interface_num_bits, xtensa_interface_inout,
4064 xtensa_interface_has_side_effect, xtensa_funcUnit_lookup,
4065 xtensa_funcUnit_name, xtensa_funcUnit_num_copies): New.
4066 * xtensa-modules.c: Rewrite to use new data structures.
4067 * reloc.c (BFD_RELOC_XTENSA_DIFF8, BFD_RELOC_XTENSA_DIFF16,
4068 BFD_RELOC_XTENSA_DIFF32, BFD_RELOC_XTENSA_SLOT0_OP,
4069 BFD_RELOC_XTENSA_SLOT1_OP, BFD_RELOC_XTENSA_SLOT2_OP,
4070 BFD_RELOC_XTENSA_SLOT3_OP, BFD_RELOC_XTENSA_SLOT4_OP,
4071 BFD_RELOC_XTENSA_SLOT5_OP, BFD_RELOC_XTENSA_SLOT6_OP,
4072 BFD_RELOC_XTENSA_SLOT7_OP, BFD_RELOC_XTENSA_SLOT8_OP,
4073 BFD_RELOC_XTENSA_SLOT9_OP, BFD_RELOC_XTENSA_SLOT10_OP,
4074 BFD_RELOC_XTENSA_SLOT11_OP, BFD_RELOC_XTENSA_SLOT12_OP,
4075 BFD_RELOC_XTENSA_SLOT13_OP, BFD_RELOC_XTENSA_SLOT14_OP,
4076 BFD_RELOC_XTENSA_SLOT0_ALT, BFD_RELOC_XTENSA_SLOT1_ALT,
4077 BFD_RELOC_XTENSA_SLOT2_ALT, BFD_RELOC_XTENSA_SLOT3_ALT,
4078 BFD_RELOC_XTENSA_SLOT4_ALT, BFD_RELOC_XTENSA_SLOT5_ALT,
4079 BFD_RELOC_XTENSA_SLOT6_ALT, BFD_RELOC_XTENSA_SLOT7_ALT,
4080 BFD_RELOC_XTENSA_SLOT8_ALT, BFD_RELOC_XTENSA_SLOT9_ALT,
4081 BFD_RELOC_XTENSA_SLOT10_ALT, BFD_RELOC_XTENSA_SLOT11_ALT,
4082 BFD_RELOC_XTENSA_SLOT12_ALT, BFD_RELOC_XTENSA_SLOT13_ALT,
4083 BFD_RELOC_XTENSA_SLOT14_ALT): Add new relocations.
4084 * Makefile.am (xtensa-isa.lo, xtensa-modules.lo): Update dependencies.
4085 * Makefile.in: Regenerate.
4086 * bfd-in2.h: Likewise.
4087 * libbfd.h: Likewise.
4088
99022dfb
RS
40892004-10-07 Richard Sandiford <rsandifo@redhat.com>
4090
4091 * elf64-mips.c (mips_elf64_write_rel): Use STN_UNDEF for relocs
4092 against the absolute section.
4093 (mips_elf64_write_rela): Likewise.
4094
b67ae299
NC
40952004-10-07 Jan Beulich <jbeulich@novell.com>
4096
4097 * elf.c (elf_find_function): Don't generally check for matching
4098 section, just for non-file symbols. Remove redunant comparison
4099 for the latter.
4100 * elf32-arm.h (arm_elf_find_function): Likewise.
4101
8fdd7217
NC
41022004-10-07 Jeff Baker <jbaker@qnx.com>
4103
4104 * elflink.c (_bfd_elf_add_dynamic_entry): Add code to warn if
4105 adding a DT_TEXTREL to a shared object and --warn-shared-textrel
4106 was specified.
4107
073a2dc3
RM
41082004-10-04 Roland McGrath <roland@redhat.com>
4109
4110 * hash.c (bfd_hash_set_default_size): Use const for table.
4111 Use size_t instead of int for variable compared to sizeof results.
4112
7785be14
AM
41132004-10-05 Alan Modra <amodra@bigpond.net.au>
4114
4115 PR 425
4116 * syms.c (_bfd_stab_section_find_nearest_line): Ignore R_*_NONE relocs.
4117
40a18ebd
NC
41182004-10-01 Paul Brook <paul@codesourcery.com>
4119
4120 * elf32-arm.h (elf32_arm_fake_sections,
4121 is_arm_elf_unwind_section_name, elf32_arm_section_from_shdr): New
4122 functions.
4123 (elf_backend_fake_sections, elf_backend_section_from_shdr): Define.
4124
8935b81f
AM
41252004-10-01 Alan Modra <amodra@bigpond.net.au>
4126
4127 * elf-bfd.h (struct eh_cie_fde): Add need_relative and
4128 need_lsda_relative.
4129 * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Set
4130 need_relative or need_lsda_relative if we are processing an
4131 offset for a reloc on a FDE initial loc or LSDA field
4132 respectively.
4133 (_bfd_elf_write_section_eh_frame): Test need_relative and
4134 need_lsda_relative in place of corresponding make_* field
4135 when deciding to use pc-relative encodings.
4136
eeac373a
PB
41372004-09-30 Paul Brook <paul@codesourcery.com>
4138
4139 * elf32-arm.h (bfd_elf32_arm_set_target_relocs): Handle "abs"
4140 target2 relocation type.
4141
7479dfd4
L
41422004-09-30 H.J. Lu <hongjiu.lu@intel.com>
4143
4144 PR 414
4145 * elflink.c (_bfd_elf_merge_symbol): Check TLS symbol.
4146
0dd132b6
NC
41472004-09-30 Paul Brook <paul@codesourcery.com>
4148
4149 * reloc.c: Add BFD_RELOC_ARM_SMI.
4150 * bfd-in2.h: Regenerate.
4151 * libbfd.h: Ditto.
4152
1ba54ee0
AM
41532004-09-24 Alan Modra <amodra@bigpond.net.au>
4154
4155 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add output section
4156 vma and output offset to address.
4157 * simple.c (simple_save_output_info): Only set output section
4158 and offset for debug sections, or those not already set up by
4159 the linker.
4160 (bfd_simple_get_relocated_section_contents): Update comment.
4161
5efb6261
AM
41622004-09-24 Alan Modra <amodra@bigpond.net.au>
4163
4164 * elf.c (IS_LOADED): Delete.
4165 (assign_file_positions_for_segments): Just test SEC_LOAD instead.
4166 Restore SEC_HAS_CONTENTS test to the one place it was used prior
4167 to 2004-09-22.
4168
fca870e4
AM
41692004-09-23 Alan Modra <amodra@bigpond.net.au>
4170
4171 PR gas/396
4172 * elf32-sparc.c (elf32_sparc_final_write_processing): Handle
4173 bfd_mach_sparc_sparclet and bfd_mach_sparc_sparclite. Remove
4174 redundant assignment of EM_SPARC.
4175
c86696a3
BF
41762004-09-22 Brian Ford <ford@vss.fsi.com>
4177
4178 * pei-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Enable 16 byte
4179 alignment for .rdata sections so sse[2] code works with gcc >= 3.3.3
4180 constants.
4181 * pe-i386.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
4182
73adb214
AM
41832004-09-22 Alan Modra <amodra@bigpond.net.au>
4184
4185 * elf32-ppc.c (ppc_elf_modify_segment_map): Delete.
4186 (elf_backend_modify_segment_map): Don't define.
4187
b301b248
AM
41882004-09-22 Alan Modra <amodra@bigpond.net.au>
4189
4190 * elf.c (IS_LOADED): Define.
4191 (assign_file_positions_for_segments): Don't round up file offset of
4192 PT_LOAD segments containing no SEC_LOAD sections, instead round down.
4193 Delete code handling link script adjustment of lma. Do the adjust
4194 in later code handling similar ajustments. Remove dead code error
4195 check. Warn if section lma would require a negative offset
4196 adjustment. Tweak lma adjustment to use p_filesz rather than p_memsz.
4197 Use p_vaddr + p_memsz inside section loop in place of voff. Don't
4198 update voff in section loop. Change voff in segment loop to be an
4199 adjustment on top of "off". Set sec->filepos and update "off" later.
4200 Test for loadable sections consistently using IS_LOADED. Similarly,
073a2dc3 4201 test for alloc-only sections other than .tbss consistently.
b301b248
AM
4202 Don't bother checking SEC_ALLOC in PT_LOAD segments. Remove FIXME.
4203 Tidy PT_NOTE handling. Use %B and %A in error messages.
4204 (assign_file_positions_except_relocs): Use %B in error message.
4205
3f85e526
L
42062004-09-17 H.J. Lu <hongjiu.lu@intel.com>
4207
4208 * Makefile.am (AUTOMAKE_OPTIONS): Require 1.9.
4209 (CONFIG_STATUS_DEPENDENCIES): New.
4210 (Makefile): Removed.
4211 (config.status): Likewise.
4212 * Makefile.in: Regenerated.
4213
eb043451
PB
42142004-09-17 Paul Brook <paul@codesourcery.com>
4215
4216 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add prototype.
4217 (bfd_elf32_arm_process_before_allocation): Update prototype.
4218 * bfd-in2.h: Regenerate.
4219 * bfd/elf32-arm.h (elf32_arm_link_hash_table): Add target2_reloc.
4220 (elf32_arm_link_hash_table_create): Set it.
4221 (bfd_elf32_arm_process_before_allocation): Remove target1_is_rel.
4222 (bfd_elf32_arm_set_target_relocs): New function.
4223 (arm_real_reloc_type): New function.
4224 (elf32_arm_final_link_relocate): Use it. Handle R_ARM_PREL31 and
4225 R_ARM_GOT_PREL. Remove R_ARM_TARGET1.
4226 (elf32_arm_gc_sweep_hook): Ditto.
4227 (elf32_arm_check_relocs): Ditto.
4228 (elf32_arm_relocate_section): Handle R_ARM_GOT_PREL.
4229 * elfarm-nabi.c (elf32_arm_howto_table): Add R_ARM_PREL31 and
4230 R_ARM_GOT_TARGET2.
4231 (elf32_arm_got_prel): New variable.
4232 (elf32_arm_howto_from_type): New function.
4233 (elf32_arm_info_to_howto): Use it.
4234 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_PREL31 and
4235 BFD_RELOC_ARM_TARGET2.
4236 * libbfd.h: Regenerate.
4237 * reloc.c: Add BFD_RELOC_ARM_TARGET2 and BFD_RELOC_ARM_PREL31.
4238
f6e332e6
AM
42392004-09-17 Alan Modra <amodra@bigpond.net.au>
4240
4241 * ecoff.c: Update u.undef.next refs.
4242 * elf64-ppc.c: Likewise.
4243 * elflink.c: Likewise.
4244 * linker.c: Likewise.
4245 * xcofflink.c: Likewise.
4246
4247 * elf-bfd.h (struct elf_link_hash_entry): Rearrange. Add FIXME to
4248 dynamic_def. Combine weakdef and elf_hash_value. Move vtable
4249 fields to indirect struct.
4250 * elf-m10300.c: Update u.weakdef refs.
4251 * elf32-arm.h: Likewise.
4252 * elf32-cris.c: Likewise.
4253 * elf32-frv.c: Likewise.
4254 * elf32-hppa.c: Likewise.
4255 * elf32-i370.c: Likewise.
4256 * elf32-i386.c: Likewise.
4257 * elf32-m32r.c: Likewise.
4258 * elf32-m68k.c: Likewise.
4259 * elf32-ppc.c: Likewise.
4260 * elf32-s390.c: Likewise.
4261 * elf32-sh.c: Likewise.
4262 * elf32-sparc.c: Likewise.
4263 * elf32-vax.c: Likewise.
4264 * elf32-xtensa.c: Likewise.
4265 * elf64-alpha.c: Likewise.
4266 * elf64-hppa.c: Likewise.
4267 * elf64-ppc.c: Likewise.
4268 * elf64-s390.c: Likewise.
4269 * elf64-sh64.c: Likewise.
4270 * elf64-sparc.c: Likewise.
4271 * elf64-x86-64.c: Likewise.
4272 * elfxx-ia64.c: Likewise.
4273 * elfxx-mips.c: Likewise.
4274 * elflink.c: Likewise. Also u.elf_hash_value.
4275 (elf_gc_propagate_vtable_entries_used): Update for h->vtable
4276 indirection.
4277 (elf_gc_smash_unused_vtentry_relocs): Likewise.
4278 (bfd_elf_gc_record_vtinherit): Alloc vtable.
4279 (bfd_elf_gc_record_vtentry): Likewise.
4280 * elf.c (_bfd_elf_link_hash_newfunc): Use memset.
4281
90c0a373
AM
42822004-09-17 Alan Modra <amodra@bigpond.net.au>
4283
4284 * Makefile.am: Run "make dep-am".
4285 * Makefile.in: Regenerate.
4286 * bfd-in2.h: Regenerate.
4287 * po/SRC-POTFILES.in: Regenerate.
4288 * po/bfd.pot: Regenerate.
4289
f5385ebf
AM
42902004-09-16 Alan Modra <amodra@bigpond.net.au>
4291
4292 * elf-bfd.h (struct elf_link_hash_entry): Replace elf_link_hash_flags
4293 with bitfields. Make "type" and "other" bitfields too.
4294 (ELF_LINK_HASH_REF_REGULAR, ELF_LINK_HASH_DEF_REGULAR,
4295 ELF_LINK_HASH_REF_DYNAMIC, ELF_LINK_HASH_DEF_DYNAMIC,
4296 ELF_LINK_HASH_REF_REGULAR_NONWEAK, ELF_LINK_HASH_DYNAMIC_ADJUSTED,
4297 ELF_LINK_HASH_NEEDS_COPY, ELF_LINK_HASH_NEEDS_PLT, ELF_LINK_NON_ELF,
4298 ELF_LINK_HIDDEN, ELF_LINK_FORCED_LOCAL, ELF_LINK_HASH_MARK,
4299 ELF_LINK_NON_GOT_REF, ELF_LINK_DYNAMIC_DEF, ELF_LINK_DYNAMIC_WEAK,
4300 ELF_LINK_POINTER_EQUALITY_NEEDED): Delete.
4301 (ELF_COMMON_DEF_P, WILL_CALL_FINISH_DYNAMIC_SYMBOL): Update.
4302 * elf-hppa.h: Update all uses of elf_link_hash_flags.
4303 * elf-m10300.c: Likewise.
4304 * elf.c: Likewise.
4305 * elf32-arm.h: Likewise.
4306 * elf32-cris.c: Likewise.
4307 * elf32-frv.c: Likewise.
4308 * elf32-hppa.c: Likewise.
4309 * elf32-i370.c: Likewise.
4310 * elf32-i386.c: Likewise.
4311 * elf32-m32r.c: Likewise.
4312 * elf32-m68k.c: Likewise.
4313 * elf32-ppc.c: Likewise.
4314 * elf32-s390.c: Likewise.
4315 * elf32-sh-symbian.c: Likewise.
4316 * elf32-sh.c: Likewise.
4317 * elf32-sh64.c: Likewise.
4318 * elf32-sparc.c: Likewise.
4319 * elf32-vax.c: Likewise.
4320 * elf32-xtensa.c: Likewise.
4321 * elf64-alpha.c: Likewise.
4322 * elf64-hppa.c: Likewise.
4323 * elf64-ppc.c: Likewise.
4324 * elf64-s390.c: Likewise.
4325 * elf64-sh64.c: Likewise.
4326 * elf64-sparc.c: Likewise.
4327 * elf64-x86-64.c: Likewise.
4328 * elflink.c: Likewise.
4329 * elfxx-ia64.c: Likewise.
4330 * elfxx-mips.c: Likewise.
4331 * configure.in (AM_INIT_AUTOMAKE): Set version to 2.15.92.
4332 * configure: Regenerate.
4333 * aclocal.m4: Regenerate.
4334
b6ee372a
AM
43352004-09-16 Alan Modra <amodra@bigpond.net.au>
4336
4337 * elf32-arm.h (elf32_arm_gc_sweep_hook): Add #ifndef OLD_ARM_ABI
4338 around uses of R_ARM_TARGET1.
4339 (elf32_arm_check_relocs): Likewise.
4340
9c504268
PB
43412004-09-13 Paul Brook <paul@codesourcery.com>
4342
4343 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update
4344 prototype.
4345 * bfd-in2.h: Regenerate.
4346 * libbfd.h: Regenerate.
4347 * elf32-arm.h (elf32_arm_link_hash_table): Add target1_is_rel.
4348 (elf32_arm_link_hash_table_create): Set target1_is_rel.
4349 (bfd_elf32_arm_process_before_allocation): Ditto.
4350 (elf32_arm_final_link_relocate): Handle R_ARM_TARGET1.
4351 (elf32_arm_gc_sweep_hook, elf32_arm_check_relocs): Ditto.
4352 * elfarm-nabi.c (elf32_arm_howto_table): Rename RELABS to TARGET1.
4353 * reloc.c: Ditto.
4354
94ea025a
JB
43552004-09-10 Joel Brobecker <brobecker@gnat.com>
4356
4357 * hpux-core.c (thread_section_p): New function.
4358 (hpux_core_core_file_p): Fix computation of offset in call
4359 to bfd_seek. Create a ".reg" section from an arbitrary
4360 ".reg/<id>" section if none was created after having read
4361 all sections.
4362
24443139
AS
43632004-09-11 Andreas Schwab <schwab@suse.de>
4364
4365 * acinclude.m4: Fix spelling of ACX_NONCANONICAL_*.
4366 * aclocal.m4: Rebuild.
4367 * configure: Rebuild.
4368
f4eae89c
JB
43692004-09-10 Joel Brobecker <brobecker@gnat.com>
4370
4371 * section.c (bfd_sections_find_if): Fix parameter name in
4372 comment to match code.
4373
e0638f70
AM
43742004-09-10 Alan Modra <amodra@bigpond.net.au>
4375
4376 * elf.c (assign_file_positions_except_relocs): Assign relocs
4377 stored in a bfd section.
4378
5e0f5ae3
HPN
43792004-09-08 Hans-Peter Nilsson <hp@axis.com>
4380
4381 * elf32-cris.c (elf_cris_adjust_gotplt_to_got): Reset
4382 h->gotplt_refcount to 0, not -1.
4383
ada1953e
HPN
43842004-09-07 Hans-Peter Nilsson <hp@axis.com>
4385
4386 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
4387 case R_CRIS_32_GOTPLT>: For internal error message, handle NULL
4388 symname.
4389 (cris_elf_check_relocs) <case R_CRIS_32_PLT_PCREL>: Don't try to
4390 handle symbol visibility here.
4391
ee75fd95
AM
43922004-09-07 Alan Modra <amodra@bigpond.net.au>
4393
4394 * elf64-ppc.c (struct ppc_link_hash_table): Add stub_globals.
4395 (is_ppc64_elf_target): Rename from is_ppc64_target. Update all
4396 callers.
4397 (ppc_stub_name): Remove trailing "+0" on stub name.
4398 (create_linkage_sections): Create relocations for
4399 branch lookup table when --emit-relocs as well as when --shared.
4400 (ppc_build_one_stub): Emit relocs for long branch stubs. Adjust
4401 relbrlt test. For --emit-stub-syms, always output a sym even when
4402 one already exists on a plt call stub. Put stub type in the stub
4403 symbol name.
4404 (ppc_size_one_stub): Size long branch stub relocs. Adjust relbrlt
4405 test.
4406 (ppc64_elf_size_stubs): Count global sym stubs added. Zero
4407 reloc_count in stub sections. Adjust relbrlt test.
4408 (ppc64_elf_build_stubs): Adjust relbrlt test. Tweak stats output.
4409 * elflink.c (bfd_elf_size_dynamic_sections): Fix comment typo.
4410 (elf_link_input_bfd): Ignore symbol index zero relocs when checking
4411 for relocs against discarded symbols. Fix comments.
4412
229fcec5
MM
44132004-09-06 Mark Mitchell <mark@codesourcery.com>
4414
4415 * elf-bfd.h (_bfd_elf_make_dynamic_segment): Declare it.
4416 * elf.c (_bfd_elf_make_dynamic_segment): New function, split out
4417 from ...
4418 (map_sections_to_segments): ... here. Use it. Assign a file
4419 position to the .dynamic section if it is not loadable, but part
4420 of the PT_DYNAMIC segment.
4421 * elf32-arm.h (elf32_arm_finish_dynamic_sections): Use file
4422 offsets, not VMAs, for the BPABI. Do not fill in the header in
4423 the .got.plt section for the BPABI.
4424 * elfarm-nabi.c (elf32_arm_symbian_modify_segment_map): Add a
4425 PT_DYNAMIC segment.
4426 (elf_backend_want_got_plt): Define to zero for Symbian OS.
073a2dc3 4427
9a0789ec
NC
44282004-09-06 Nick Clifton <nickc@redhat.com>
4429
4430 * elflink.c (elf_link_add_object_symbols): Set the error code to
4431 bfd_error_wrong_format when the input format does not match the
4432 output format.
4433
7b53ace3
AM
44342004-09-06 Alan Modra <amodra@bigpond.net.au>
4435
4436 * elf64-ppc.c (is_ppc64_target): New function, extracted from..
4437 (ppc64_elf_check_directives): ..here.
4438 (ppc64_elf_size_dynamic_sections): Use it here to check bfd type
4439 before accessing ppc64_elf_tdata.
4440 (ppc64_elf_finish_dynamic_sections): And here too.
4441
3e540f25
AM
44422004-09-04 Alan Modra <amodra@bigpond.net.au>
4443
4444 * bfd.c (_bfd_default_error_handler): Correct loop exit.
4445
e5a52504
MM
44462004-09-03 Mark Mitchell <mark@codesourcery.com>
4447
4448 * config.bfd (arm*-*-symbianelf*): Use OS-specific target vectors.
4449 * configure.in (bfd_elf32_bigarm_symbian_vec): Add it.
4450 (bfd_elf32_littlearm_symbian_vec): Likewise.
4451 * configure: Regenerated.
4452 * elf-bfd.h (elf_backend_data): Add dynamic_sec_flags.
4453 * elf32-arm.h (PLT_HEADER_SIZE): Do not define.
4454 (PLT_ENTRY_SIZE): Likewise.
4455 (bfd_vma_elf32_arm_symbian_plt_entry): New
4456 variable.
4457 (elf32_arm_link_hash_table): Add plt_header_size, plt_entry_size,
4458 and symbian_p.
4459 (create_got_section): Don't create sections when generating BPABI
4460 objects.
4461 (elf32_arm_create_dynamic_sections): Tidy.
4462 (elf32_arm_link_hash_table_create): Set plt_header_size,
4463 plt_entry_size, and symbian_p.
4464 (elf32_arm_check_relocs): Do not mark .rel.dyn as loadable when
4465 generating BPABI objects.
4466 (allocate_dynrelocs): Use htab->plt_header_size, not
4467 PLT_HEADER_SIZE. Do not add to .got.plt when
4468 generating BPABI objects.
4469 (elf32_arm_finish_dynamic_symbol): Generate Symbian OS PLTs.
4470 * elfarm-nabi.c: Add SymbianOS target vectors.
4471 * elflink.c (_bfd_elf_create_got_section): Use dynamic_sec_flags.
4472 (_bfd_elf_link_create_dynamic_sections): Likewise.
4473 * elfxx-target.h (ELF_DYNAMIC_SEC_FLAGS): New macro.
4474 (elfNN_bed): Use it.
4475 * targets.c (bfd_elf32_bigarm_symbian_vec): New variable.
4476 (bfd_elf32_littlearm_symbian_vec): Likewise.
4477 (_bfd_target_vector): Add them.
4478
6e3b6835
NC
44792004-09-03 Nick Clifton <nickc@redhat.com>
4480
4481 PR 360
4482 * coffcode.h (handle_COMDAT): Replace abort with an warning
4483 message and allow the scan to continue.
4484
595da8c5
AM
44852004-09-02 Alan Modra <amodra@bigpond.net.au>
4486
4487 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Use static_syms passed
4488 in when reading relocs, not our sorted syms. Remove unnecessary
4489 var.
4490
6723a9f4
EB
44912004-08-31 Eric Botcazou <ebotcazou@libertysurf.fr>
4492
4493 * elf.c (special_sections): Add .gnu.linkonce.b modelled on .bss.
4494
5464f5a1
NN
44952004-08-30 Nathanael Nerode <neroden@gcc.gnu.org>
4496
4497 * acinclude.m4: Require AC_CANONICAL_TARGET, not AC_CANONICAL_SYSTEM.
4498 Include ../config/acx.m4 and use ACX_NONCANONICAL_* where appropriate;
4499 replace uses of *_alias with *_noncanonical.
4500 * aclocal.m4: Rebuild with aclocal 1.4p6.
4501 * Makefile.in: Rebuild with automake 1.4p6.
4502 * doc/Makefile.in: Rebuild with automake 1.4p6.
4503 * configure.in: Autoupdate with autoupdate 2.59.
4504 * config.in: Regenerate with autoheader 2.59.
4505 * configure: Regnerate with autoconf 2.59.
4506
a7535cf3
AM
45072004-08-28 Alan Modra <amodra@bigpond.net.au>
4508
4509 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Copy input
4510 symbol pointer arrays before modifying.
4511
c9727e01
AM
45122004-08-28 Alan Modra <amodra@bigpond.net.au>
4513
b91e2ae2 4514 * bfd.c (bfd_get_synthetic_symtab): Pass counts and both symbol tables.
c9727e01
AM
4515 * elf-bfd.h (_bfd_elf_get_synthetic_symtab): Adjust.
4516 * elf.c (_bfd_elf_get_synthetic_symtab): Adjust.
4517 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Adjust.
b91e2ae2
AM
4518 * targets.c (struct bfd_target <_bfd_get_synthetic_symtab>): Adjust.
4519 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't read symbols.
4520 Use both symbol tables on non-relocatable objects. Use a common
4521 error exit. Fix "mid" warning.
c9727e01
AM
4522 * libbfd.h: Regenerate.
4523 * bfd-in2.h: Regenerate.
4524
699733f6
AM
45252004-08-28 Alan Modra <amodra@bigpond.net.au>
4526
4527 * elf64-ppc.c (ppc64_elf_branch_reloc): Check .opd is in a regular
4528 object file.
4529 (struct sfpr_def_parms): Save some space.
4530 (sfpr_define): Here too.
4531
4532 * elf64-ppc.c (compare_symbols): Put section syms first.
4533 (sym_exists_at): New function.
4534 (ppc64_elf_get_synthetic_symtab): Use relocs to find code entry
4535 points only for relocatable files. Use .opd section contents
4536 otherwise. Generally clean up the code.
4537
deb0e272
AM
45382004-08-27 Alan Modra <amodra@bigpond.net.au>
4539
4540 * elf64-ppc.c (STD_R0_0R1, STD_R0_0R12, LD_R0_0R1, LD_R0_0R12,
4541 LI_R12_0, STVX_VR0_R12_R0, LVX_VR0_R12_R0, MTLR_R0, SFPR_MAX): Define.
4542 (struct sfpr_def_parms): New.
4543 (sfpr_define): New function.
4544 (savegpr0, savegpr0_tail, restgpr0, restgpr0_tail): New functions.
4545 (savegpr1, savegpr1_tail, restgpr1, restgpr1_tail): New functions.
4546 (savefpr, savefpr0_tail, restfpr, restfpr0_tail): New functions.
4547 (savefpr1_tail, restfpr1_tail): New functions.
4548 (savevr, savevr_tail, restvr, restvr_tail): New functions.
4549 (MIN_SAVE_FPR, MAX_SAVE_FPR): Don't define.
4550 (ppc64_elf_func_desc_adjust): Use sfpr_define in place of existing
4551 code. Define all ABI mandated _save and _rest functions.
4552
85a84e7a
PB
45532004-08-26 Paul Brook <paul@codesourcery.com>
4554
deb0e272 4555 * elf32-arm.h (INTERWORK_FLAG): Return true for EABIv3 objects.
85a84e7a 4556
688c58f3
AM
45572004-08-26 Alan Modra <amodra@bigpond.net.au>
4558
4559 * elf32-m32r.c (m32r_elf_relocate_section): Don't compare with
4560 TRUE or FALSE.
4561
3e95eabc
AM
45622004-08-26 Alan Modra <amodra@bigpond.net.au>
4563
4564 * elf32-i386.c (elf_i386_relocate_section): Tweak last change so
4565 that pcrel correction is applied for R_386_PC32.
4566
f855931b
AM
45672004-08-25 Alan Modra <amodra@bigpond.net.au>
4568
4569 * elf32-i386.c (elf_i386_relocate_section): Zero section contents
4570 for R_386_32 and R_386_PC32 relocs against symbols defined in
4571 discarded sections.
4572
b18c562e
NC
45732004-08-25 Dmitry Diky <diwil@spec.ru>
4574
4575 * reloc.c (BFD_RELOC_MSP430_2X_PCREL,BFD_RELOC_MSP430_RL_PCREL):
4576 Add new relocations.
4577 * bfd-in2.h: Regenerate.
f855931b 4578 * libbfd.h: Regenerate.
b18c562e
NC
4579 * elf32-msp430.c: Clean-up code.
4580 (elf_msp430_howto_table): Add new relocation entries.
4581 (bfd_elf32_bfd_reloc_type_lookup): New relocation handlers.
4582 (msp430_elf_relax_section): New function.
4583 (msp430_elf_relax_delete_bytes): New function.
4584 (msp430_elf_symbol_address_p): New function.
4585
af705ba8
NC
45862004-08-24 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
4587
4588 * elf32-m32r.c (m32r_elf_relocate_section): Handle
4589 R_M32R_SDA16_RELA in the same way as R_M32R_SDA16.
4590
ea5158d8
DJ
45912004-08-20 Daniel Jacobowitz <dan@debian.org>
4592
4593 * elflink.c (_bfd_elf_section_already_linked): Handle
4594 SEC_LINK_DUPLICATES_SAME_CONTENTS.
4595
49d934f1
MM
45962004-08-19 Mark Mitchell <mark@codesourcery.com>
4597
4598 * config.bfd (arm*-*-symbianelf*): New target.
4599 (arm*-*-eabi*): Likewise.
4600
039b3fef
AM
46012004-08-19 Alan Modra <amodra@bigpond.net.au>
4602
4603 * elf64-ppc.c (ppc_get_stub_entry): Change third param to a
4604 "struct ppc_link_hash_entry *".
4605 (ppc64_elf_relocate_section): Ditto for type of h. Introduce h_elf
4606 to satisfy RELOC_FOR_GLOBAL_SYMBOL.
4607
3f764659
JJ
46082004-08-19 Jakub Jelinek <jakub@redhat.com>
4609
4610 * elf64-ppc.c (ppc64_elf_edit_opd): Support 16 byte long .opd
4611 entries (where fd_aux overlaps next entry's fd_func).
4612 Add non_overlapping argument, use it.
4613 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, adjust_opd_syms,
4614 ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4615 ppc64_elf_output_symbol_hook): Use address / 8 instead of address / 24
4616 as indexes into opd_sym_map/opd_adjust array.
4617 * elf64-ppc.h (ppc64_elf_edit_opd): Adjust prototype.
4618
c09bdfe5
AM
46192004-08-18 Alan Modra <amodra@bigpond.net.au>
4620
4621 * elf64-ppc.c (func_desc_adjust): Give undefined dot-symbols a value
4622 if we can look up their function descriptor in a regular file.
4623
271d0fc3
NC
46242004-08-18 Nick Clifton <nickc@redhat.com>
4625
4626 PR 324
4627 * cofflink.c (coff_link_add_symbols): Check that the comdat
4628 pointer in the coff_section_data structure has been initialised
4629 before using it.
4630
a010d60f
AM
46312004-08-18 Alan Modra <amodra@bigpond.net.au>
4632
4633 PR 338
4634 * elflink.c (bfd_elf_record_link_assignment): Add comment about
4635 changing bfd_link_hash_undefined to bfd_link_hash_new.
4636
90e3cdf2
JJ
46372004-08-17 Jakub Jelinek <jakub@redhat.com>
4638
4639 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Only define
4640 if not yet defined.
4641 * elf64-ppc.c (bfd_elf64_get_synthetic_symtab): Define.
4642 (synthetic_opd, synthetic_relocatable): New variables.
4643 (compare_symbols, compare_relocs): New helper routines.
4644 (ppc64_elf_get_synthetic_symtab): New function.
4645 * bfd.c (bfd_get_synthetic_symtab): Rename dynsyms argument
4646 to relsyms.
4647 * bfd-in2.h: Regenerated.
4648 * elf.c (_bfd_elf_get_synthetic_symtab): Rename dynsyms argument
4649 to relsyms. Return 0 if abfd is relocatable.
4650
7c2c8505
AM
46512004-08-17 Alan Modra <amodra@bigpond.net.au>
4652
4653 * elflink.h (elf_gc_sweep): Keep non-alloc, non-load sections.
4654
0367ecfb
NC
46552004-08-17 Nick Clifton <nickc@redhat.com>
4656
4657 * (is_arm_mapping_symbol_name): New function - return true
4658 when a symbol name matches the requirements for an ARM mapping
4659 symbol name.
4660 (arm_elf_find_function): New function based on
4661 elf_find_function in elf.c but skipping ARM mapping symbols
4662 and including thumb function symbols.
4663 (elf32_arm_find_nearest_line): Use arm_elf_find_function.
4664 (elf32_arm_output_symbol_hook): Use is_arm_mapping_symbol_name.
4665
2441e016
AM
46662004-08-17 Alan Modra <amodra@bigpond.net.au>
4667
4668 * elf64-ppc.c (ppc64_elf_branch_reloc): New function.
4669 (ppc64_elf_howto_raw): Use ppc64_elf_branch_reloc.
4670 (ppc64_elf_brtaken_reloc): Here too.
4671
35b0ce59
AM
46722004-08-17 Alan Modra <amodra@bigpond.net.au>
4673
4674 * elf64-ppc.c (add_symbol_adjust): Correct mismatched function
4675 symbol visibility.
4676 (ppc64_elf_check_directives): Check that we have the right hash
4677 table before proceeding.
4678
81688140
AM
46792004-08-17 Alan Modra <amodra@bigpond.net.au>
4680
4681 * elf64-ppc.c (struct ppc64_elf_obj_tdata): Add "deleted_section".
4682 (adjust_opd_syms): Attach opd syms for deleted entries to one of
4683 the sections that will be discarded.
4684
327c1315
AM
46852004-08-16 Alan Modra <amodra@bigpond.net.au>
4686
4687 * elflink.c (elf_section_complain_discarded): Ignore .fixup.
4688
45fc9e4a
AM
46892004-08-16 Alan Modra <amodra@bigpond.net.au>
4690
4691 * bfd.c (_bfd_default_error_handler): Account for doubled '%' in
4692 free space available.
4693
9dadfa79
AM
46942004-08-16 Alan Modra <amodra@bigpond.net.au>
4695
4696 * pdp11.c (struct pdp11_aout_reloc_external): Delete. Replace
f89c4dec 4697 occurrences with bfd_byte * thoughout file.
9dadfa79
AM
4698
4699 * coff-rs6000.c (do_shared_object_padding): Warning fix.
4700 (xcoff_write_armap_big): Likewise.
4701 (xcoff_write_archive_contents_old): Likewise.
4702 (xcoff_write_archive_contents_big): Likewise.
4703
4704 * elf64-mmix.c (mmix_elf_get_section_contents): Delete declaration.
4705
57e8b36a
NC
47062004-08-13 Nick Clifton <nickc@redhat.com>
4707
4708 * elf32-arm.h: Convert to ISO C90.
4709
a005f94e
AM
47102004-08-13 Alan Modra <amodra@bigpond.net.au>
4711
4712 PR 293
4713 * elf32-hppa.c (elf32_hppa_hide_symbol): Use init_refcount to
4714 zero the plt field.
4715
d003868e
AM
47162004-08-13 Alan Modra <amodra@bigpond.net.au>
4717
4718 * bfd.c (_bfd_default_error_handler): Handle %A and %B.
4719 (bfd_archive_filename, bfd_get_section_ident): Delete.
4720 * ecofflink.c (bfd_ecoff_debug_accumulate_other): Don't call
4721 bfd_archive_filename.
4722 * elflink.c (elf_link_input_bfd): Don't use callbacks->error_handler
4723 to warn about symbols in discarded sections. Use _bfd_error_handler.
4724 * aout-adobe.c (aout_adobe_callback): See below.
4725 * aout-cris.c (swap_ext_reloc_in): ..
4726 * coff-arm.c (find_thumb_glue, find_arm_glue,
4727 coff_arm_relocate_section, bfd_arm_process_before_allocation,
4728 coff_arm_merge_private_bfd_data, _bfd_coff_arm_set_private_flags,
4729 coff_arm_copy_private_bfd_data): ..
4730 * coff-i860.c (i860_reloc_processing): ..
4731 * coff-mcore.c (mcore_coff_unsupported_reloc,
4732 coff_mcore_relocate_section): ..
4733 * coff-ppc.c (coff_ppc_relocate_section): ..
4734 * coff-rs6000.c (xcoff_create_csect_from_smclas
4735 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
4736 sh_swap_insns, sh_relocate_section): ..
4737 * coff-tic54x.c (tic54x_reloc_processing): ..
4738 * coff-tic80.c (coff_tic80_relocate_section): ..
4739 * coff64-rs6000.c (xcoff64_create_csect_from_smclas): ..
4740 * coffcode.h (styp_to_sec_flags, coff_slurp_line_table,
4741 coff_slurp_symbol_table, coff_classify_symbol,
4742 coff_slurp_reloc_table): ..
4743 * coffgen.c (_bfd_coff_read_string_table): ..
4744 * cofflink.c (coff_link_add_symbols, _bfd_coff_link_input_bfd,
4745 _bfd_coff_generic_relocate_section): ..
4746 * cpu-arm.c (bfd_arm_merge_machines): ..
4747 * cpu-sh.c (sh_merge_bfd_arch): ..
4748 * elf-hppa.h (elf_hppa_relocate_section): ..
4749 * elf.c (bfd_elf_string_from_elf_section, setup_group,
4750 _bfd_elf_setup_group_pointers, bfd_section_from_shdr,
4751 assign_section_numbers, _bfd_elf_symbol_from_bfd_symbol,
4752 copy_private_bfd_data, _bfd_elf_validate_reloc): ..
4753 * elf32-arm.h (find_thumb_glue, find_arm_glue,
4754 bfd_elf32_arm_process_before_allocation, elf32_thumb_to_arm_stub,
4755 elf32_arm_to_thumb_stub, elf32_arm_final_link_relocate,
4756 elf32_arm_relocate_section, elf32_arm_set_private_flags,
4757 elf32_arm_copy_private_bfd_data, elf32_arm_merge_private_bfd_data): ..
4758 * elf32-cris.c (cris_elf_relocate_section, cris_elf_check_relocs,
4759 cris_elf_merge_private_bfd_data
4760 * elf32-frv.c (elf32_frv_relocate_section, elf32_frv_check_relocs): ..
4761 * elf32-gen.c (elf32_generic_link_add_symbols): ..
4762 * elf32-hppa.c (hppa_add_stub, hppa_build_one_stub,
4763 elf32_hppa_check_relocs, get_local_syms, final_link_relocate,
4764 elf32_hppa_relocate_section): ..
4765 * elf32-i370.c (i370_elf_merge_private_bfd_data,
4766 i370_elf_check_relocs, i370_elf_relocate_section): ..
4767 * elf32-i386.c (elf_i386_info_to_howto_rel, elf_i386_check_relocs,
4768 elf_i386_relocate_section): ..
4769 * elf32-m32r.c (m32r_elf_relocate_section,
4770 m32r_elf_merge_private_bfd_data): ..
4771 * elf32-m68hc1x.c (m68hc12_add_stub,
4772 _bfd_m68hc11_elf_merge_private_bfd_data): ..
4773 * elf32-m68k.c (elf_m68k_relocate_section): ..
4774 * elf32-mcore.c (mcore_elf_unsupported_reloc,
4775 mcore_elf_relocate_section): ..
4776 * elf32-ppc.c (ppc_elf_merge_private_bfd_data, bad_shared_reloc,
4777 ppc_elf_check_relocs, ppc_elf_relocate_section,
4778 ppc_elf_begin_write_processing): ..
4779 * elf32-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4780 elf_s390_relocate_section): ..
4781 * elf32-sh-symbian.c (sh_symbian_import_as,
4782 sh_symbian_process_embedded_commands,
4783 sh_symbian_relocate_section): ..
4784 * elf32-sh.c (sh_elf_relax_section, sh_elf_relax_delete_bytes,
4785 sh_elf_swap_insns, sh_elf_relocate_section, sh_elf_check_relocs,
4786 sh_elf_merge_private_data): ..
4787 * elf32-sparc.c (elf32_sparc_check_relocs,
4788 elf32_sparc_relocate_section,
4789 elf32_sparc_merge_private_bfd_data): ..
4790 * elf32-v850.c (v850_elf_check_relocs,
4791 v850_elf_merge_private_bfd_data): ..
4792 * elf32-xtensa.c (elf_xtensa_check_relocs,
4793 elf_xtensa_relocate_section, elf_xtensa_merge_private_bfd_data): ..
4794 * elf64-alpha.c (elf64_alpha_relax_with_lituse,
4795 elf64_alpha_relax_got_load, elf64_alpha_size_got_sections,
4796 elf64_alpha_relocate_section_r, elf64_alpha_relocate_section): ..
4797 * elf64-gen.c (elf64_generic_link_add_symbols): ..
4798 * elf64-ppc.c (ppc64_elf_merge_private_bfd_data, ppc_add_stub,
4799 ppc64_elf_check_relocs, ppc64_elf_edit_opd,
4800 ppc64_elf_relocate_section): ..
4801 * elf64-s390.c (elf_s390_check_relocs, invalid_tls_insn,
4802 elf_s390_relocate_section): ..
4803 * elf64-sh64.c (sh_elf64_relocate_section): ..
4804 * elf64-sparc.c (sparc64_elf_check_relocs,
4805 sparc64_elf_add_symbol_hook, sparc64_elf_relocate_section,
4806 sparc64_elf_merge_private_bfd_data): ..
4807 * elf64-x86-64.c (elf64_x86_64_check_relocs,
4808 elf64_x86_64_relocate_section): ..
4809 * elflink.c (_bfd_elf_add_default_symbol,
4810 _bfd_elf_link_assign_sym_version, elf_link_read_relocs_from_section,
4811 _bfd_elf_link_output_relocs, elf_link_add_object_symbols,
4812 bfd_elf_size_dynamic_sections, elf_link_output_extsym,
4813 elf_get_linked_section_vma, elf_fixup_link_order,
4814 bfd_elf_final_link, bfd_elf_gc_record_vtinherit,
4815 bfd_elf_gc_record_vtinherit, _bfd_elf_section_already_linked): ..
4816 * elfxx-ia64.c (elfNN_ia64_relax_section,
4817 elfNN_ia64_relocate_section, elfNN_ia64_merge_private_bfd_data): ..
4818 * elfxx-mips.c (mips_elf_perform_relocation,
4819 _bfd_mips_elf_check_relocs,
4820 _bfd_mips_elf_merge_private_bfd_data): ..
4821 * ieee.c (ieee_slurp_external_symbols): ..
4822 * ihex.c (ihex_bad_byte, ihex_scan, ihex_read_section): ..
4823 * libbfd.c (_bfd_generic_verify_endian_match): ..
4824 * linker.c (_bfd_generic_link_add_one_symbol,
4825 _bfd_generic_section_already_linked): ..
4826 * pdp11.c (translate_to_native_sym_flags): ..
4827 * pe-mips.c (coff_pe_mips_relocate_section): ..
4828 * peicode.h (pe_ILF_build_a_bfd): ..
4829 * srec.c (srec_bad_byte): ..
4830 * stabs.c (_bfd_link_section_stabs): ..
4831 * xcofflink.c (xcoff_link_add_symbols, xcoff_link_input_bfd): ..
4832 Replace all uses of bfd_archive_filename and bfd_get_section_ident
4833 with corresponding %B and %A in _bfd_error_handler format string.
4834 Replace occurrences of "fprintf (stderr," with _bfd_error_handler
4835 calls to use %A and %B. Fix "against symbol .. from section" and
4836 similar error messages. Combine multiple _bfd_error_handler calls
4837 where they were separated due to bfd_archive_filename deficiencies.
4838 * bfd-in2.h: Regenerate.
4839
6ba842b6
L
48402004-08-12 H.J. Lu <hongjiu.lu@intel.com>
4841
4842 * elf32-i386.c (elf_i386_relocate_section): Report unrecognized
4843 relocation.
4844
99877b66
AM
48452004-08-10 Alan Modra <amodra@bigpond.net.au>
4846
4847 * elf64-ppc.c (struct ppc_link_hash_entry): Add was_undefined.
4848 (struct ppc_link_hash_table): Remove no_multi_toc, multi_toc_needed.
4849 Make emit_stub_syms, stub_error and has_14bit_branch bit-fields.
4850 Add twiddled_syms.
4851 (link_hash_newfunc): Init was_undefined.
4852 (add_symbol_adjust): Don't set undefined dot symbols to defweak;
4853 Use undefweak instead.
4854 (ppc64_elf_check_directives): Fix undefs chain.
4855 (ppc64_elf_next_toc_section): Remove no_multi_toc and multi_toc_needed
4856 references.
4857 (ppc64_elf_size_stubs): Adjust for add_symbol_adjust change.
4858 (undo_symbol_twiddle, ppc64_elf_restore_symbols): New functions.
4859 * elf64-ppc.h (ppc64_elf_restore_symbols): Declare.
4860
ba3bee0b
JJ
48612004-08-09 Jakub Jelinek <jakub@redhat.com>
4862
4863 * elf64-x86-64.c (elf64_x86_64_relocate_section): For -fno-pic
4864 error, test input_section flags rather than sec.
4865
8387904d
AM
48662004-08-09 Alan Modra <amodra@bigpond.net.au>
4867
4868 * elf-bfd.h (struct elf_backend_data): Add
4869 elf_backend_archive_symbol_lookup.
4870 (_bfd_elf_archive_symbol_lookup): Declare.
4871 * elflink.c (_bfd_elf_archive_symbol_lookup): New function..
4872 (elf_link_add_archive_symbols): ..extracted from here. Call the
4873 backend version.
4874 * elfxx-target.h (elf_backend_archive_symbol_lookup): Provide default.
4875 (elfNN_bed): Init new field.
4876 * elf64-ppc.c (elf_backend_check_directives): Define.
4877 (elf_backend_archive_symbol_lookup): Define.
4878 (struct ppc_link_hash_table): Add tls_get_add_fd. Make tls_get_add
4879 a ppc_link_hash_entry pointer.
4880 (get_fdh): Move.
4881 (ppc64_elf_archive_symbol_lookup, opd_entry_value): New functions.
4882 (add_symbol_adjust, ppc64_elf_check_directives): New functions.
4883 (ppc64_elf_check_relocs, ppc64_elf_gc_mark_hook, func_desc_adjust,
4884 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_tls_setup,
4885 ppc64_elf_tls_optimize, allocate_dynrelocs, ppc_type_of_stub,
4886 ppc_build_one_stub, ppc64_elf_size_stubs, ppc64_elf_relocate_section,
4887 ppc64_elf_finish_dynamic_symbol): Handle branch relocs to function
4888 descriptor symbols.
4889
b25116a9
AM
48902004-08-09 Alan Modra <amodra@bigpond.net.au>
4891
8843416a
AM
4892 * elf64-ppc.c (struct ppc_link_hash_entry): Expand adjust_done comment.
4893 (ppc64_elf_add_symbol_hook): Test for NULL section.
4894 (get_sym_h): Formatting.
4895 (ppc64_elf_size_stubs): Include reloc addend in value stored as
4896 stub target_value.
4897
b25116a9
AM
4898 * elf64-ppc.c (ppc64_elf_relocate_section): Combine handling of
4899 long branch stubs with code handling plt and r2off branch stubs.
4900
ccfa59ea
AM
49012004-08-09 Alan Modra <amodra@bigpond.net.au>
4902
4903 * elf-bfd.h (_bfd_elf_gc_mark): Declare.
4904 * elflink.c (elf_link_input_bfd): Formatting.
4905 (_bfd_elf_gc_mark): Rename from elf_gc_mark and make global. Adjust
4906 all callers.
4907 * elf64-ppc.c (struct ppc_link_hash_entry): Remove is_entry.
4908 (link_hash_newfunc): Don't set it.
4909 (ppc64_elf_copy_indirect_symbol): Nor copy it.
4910 (ppc64_elf_mark_entry_syms): Delete.
4911 (ppc64_elf_gc_mark_hook): Mark entry syms here. Also mark opd
4912 sections. Use get_opd_info.
4913 * elf64-ppc.h (ppc64_elf_mark_entry_syms): Delete.
4914
4025353c
AM
49152004-08-09 Alan Modra <amodra@bigpond.net.au>
4916
4f800a42
AM
4917 * elf64-ppc.c (adjust_opd_syms): Fix merge error.
4918
06da1e8e
AM
4919 * elf64-ppc.c (struct ppc_link_hash_table): Remove have_undefweak.
4920 (func_desc_adjust): Don't set have_undefweak.
4921 (ppc64_elf_func_desc_adjust): Don't add an extr nop to sfpr.
4922 (ppc64_elf_relocate_section): NOP out calls to undefweak functions.
4923
34814b9f
AM
4924 * elf64-ppc.c (struct ppc_link_hash_entry): Make "oh" a
4925 "struct ppc_link_hash_entry *". Adjust all references.
4926 (ppc64_elf_hide_symbol): Correct a comment.
4927
4025353c
AM
4928 * elf64-ppc.c (get_opd_info): New function.
4929 (adjust_opd_syms): Use get_opd_info. Define removed symbols as zero.
4930 (ppc64_elf_edit_opd): Use get_opd_info. Check that sym has a dot
4931 before calling get_fdh. Test fdh rather than h before dereferencing
4932 fdh. Mark removed symbols in opd_adjust.
4933 (ppc64_elf_tls_optimize): Don't bother with opd adjustment here.
4934 (ppc64_elf_relocate_section): Use get_opd_info, and handle removed
4935 opd symbols.
4936 (ppc64_elf_output_symbol_hook): Likewise.
4937
db6579d4
PB
49382004-08-06 Paul Brook <paul@codesourcery.com>
4939
4940 * elfarm-nabi.c (elf32_arm_howto_table): Add new EABI relocations.
4941 (elf32_arm_reloc_map): Add BFD_RELOC_ARM_RELABS32,
4942 BFD_RELOC_ARM_ROSEGREL32 and BFD_RELOC_ARM_SBREL32.
4943 * reloc.c: Add BFD_RELOC_ARM_RELABS32, BFD_RELOC_ARM_ROSEGREL32
4944 and BFD_RELOC_ARM_SBREL32.
4945 * bfd-in2.h, bbfd.h: Regenerate.
4946
a4d0f181
TS
49472004-08-01 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4948
4949 * elfxx-mips.c (mips_elf_calculate_relocation): Test only for
4950 the dynamic link symbol actually in use.
4951
83774818
SC
49522004-08-01 Stephane Carrez <stcarrez@nerim.fr>
4953
4954 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Handle bfd_link_hash_new
4955
a4d0f181 49562004-07-31 Joel Brobecker <brobecker@gnat.com>
00b4930b
TS
4957 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
4958
4959 * elfxx-mips.c (_bfd_mips_elf_symbol_processing): Handle
4960 SHN_MIPS_TEXT and SHN_MIPS_DATA.
4961
185d09ad
L
49622004-07-30 H.J. Lu <hongjiu.lu@intel.com>
4963 Nick Clifton <nickc@redhat.com>
4964
4965 PR 290
4966 * bfd.c (_bfd_default_error_handler): Make it global.
4967
4968 * elf-bfd.h (elf_backend_data): Add link_order_error_handler.
4969
4970 * elf.c (assign_section_numbers): Cope gracefully with sections
4971 which have SHF_LINK_ORDER set but no sh_link set up.
4972 * elflink.c (elf_get_linked_section_vma): Likewise.
4973
4974 * elfxx-ia64.c (elf_backend_link_order_error_handler): New. Set
4975 it to NULL.
4976
4977 * elfxx-target.h (elf_backend_link_order_error_handler): New.
4978 Set it to _bfd_default_error_handler.
4979 (elfNN_bed): Add elf_backend_link_order_error_handler.
4980
4981 * libbfd-in.h (_bfd_default_error_handler): New.
4982
4983 * libbfd.h: Regenerated.
4984
7946e94a
JJ
49852004-07-30 Jakub Jelinek <jakub@redhat.com>
4986
4987 * archures.c (bfd_mach_sparc_64bit_p): Define.
4988 * elf32-sparc.c (elf32_sparc_merge_private_bfd_data): Use it.
4989 * bfd-in2.h: Rebuilt.
4990
1d70c7fb
AO
49912004-07-29 Alexandre Oliva <aoliva@redhat.com>
4992
4993 Introduce SH2a support.
4994 2004-02-18 Corinna Vinschen <vinschen@redhat.com>
4995 * archures.c (bfd_mach_sh2a_nofpu): New.
4996 * bfd-in2.h: Rebuilt.
4997 * cpu-sh.c (SH2A_NOFPU_NEXT): New.
4998 (arch_info_struct): Add sh2a_nofpu.
4999 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a_nofpu.
5000 2003-12-29 DJ Delorie <dj@redhat.com>
5001 * reloc.c: Add relocs for sh2a.
5002 * bfd-in2.h: Regenerate.
5003 * libbfd.hh: Regenerate.
5004 2003-12-01 Michael Snyder <msnyder@redhat.com>
5005 * archures.c (bfd_mach_sh2a): New.
5006 * bfd-in2.h: Rebuilt.
5007 * cpu-sh.c (SH_NEXT, SH2_NEXT, etc.): Change defines to enums.
5008 (SH2A_NEXT): New.
5009 (arch_info_struct): Add sh2a.
5010 * elf32-sh.c (sh_elf_set_mach_from_flags): Handle sh2a.
5011
404ed0cf
DA
50122004-07-28 Nick Clifton <nickc@redhat.com>
5013 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5014
5015 PR 273
5016 * som.c (setup_sections): Improve estimation of space sizes in
5017 relocatable objects.
5018
225247f0
JT
50192004-07-27 Jason Thorpe <thorpej@wasabisystems.com>
5020 * config.bfd (hppa*-*-netbsd*): Set targ_defvec to
5021 bfd_elf32_hppa_nbsd_vec. Add bfd_elf32_hppa_linux_vec
5022 to targ_selvecs.
5023 * configure.in (bfd_elf32_hppa_nbsd_vec): Add case.
5024 * configure: Regenerate.
5025 * elf32-hppa.c (elf32_hppa_object_p): Add "elf32-hppa-netbsd"
5026 case that accepts OSABI=NetBSD and OSABI=SysV.
5027 (elf32_hppa_set_gp): For "elf32-hppa-netbsd", set the GP to
5028 the base of .got or .data (if .got does not exist).
5029 (elf32_hppa_post_process_headers): For elf32-hppa-netbsd,
5030 set OSABI=NetBSD.
5031 (TARGET_BIG_SYM): Add bfd_elf32_hppa_nbsd_vec case.
5032 (TARGET_BIG_NAME): Add "elf32-hppa-netbsd" case.
5033 * targets.c (bfd_elf32_hppa_nbsd_vec): Add extern declaration.
5034 (_bfd_target_vector): Add bfd_elf32_hppa_nbsd_vec.
5035
3d7f7666
L
50362004-07-27 H.J. Lu <hongjiu.lu@intel.com>
5037
5038 PR 161/251
5039 * elf-bfd.h (bfd_elf_section_data): Add sec_group.
5040 (elf_sec_group): Defined.
5041 (bfd_elf_match_symbols_in_sections): New prototype.
5042 (_bfd_elf_setup_group_pointers): Likewise.
5043
5044 * elf.c (bfd_elf_discard_group): Abort.
5045 (bfd_elf_set_group_contents): Also include relocation sections.
5046 Remove zero-fill for ld -r.
5047 (_bfd_elf_setup_group_pointers): New function.
5048 (elf_sort_elf_symbol): Likewise.
5049 (elf_sym_name_compare): Likewise.
5050 (bfd_elf_match_symbols_in_sections): Likewise.
5051
5052 * elfcode.h (elf_object_p): Call _bfd_elf_setup_group_pointers.
5053
5054 * elflink.c (match_group_member): New.
5055 (elf_link_input_bfd): Check group member for discarded section.
5056 (try_match_symbols_in_sections): New function.
5057 (already_linked): Likewise.
5058 (_bfd_elf_section_already_linked): Support mixing comdat group
5059 and linkonce section.
5060
5061 * libbfd-in.h (bfd_section_already_linked_table_traverse): New.
5062 * linker.c (bfd_section_already_linked_table_traverse): New.
5063
5064 * libbfd.h: Regenerated.
5065
670ec21d
NC
50662004-07-27 Tomer Levi <Tomer.Levi@nsc.com>
5067
5068 * reloc.c: Add BFD_RELOC_CRX_SWITCH8, BFD_RELOC_CRX_SWITCH16,
5069 BFD_RELOC_CRX_SWITCH32.
5070 * bfd-in2.h: Regenerate.
6cd7f07e 5071 * libbfd.h: Regenerate.
670ec21d
NC
5072 * elf32-crx.c: Support relocation/relaxation of
5073 BFD_RELOC_CRX_SWITCH* types.
5074
2c66dc6c
AM
50752004-07-27 Alan Modra <amodra@bigpond.net.au>
5076
5077 * elf64-ppc.c: Correct "Linker stubs" comment.
5078
38ce5b11
L
50792004-07-26 H.J. Lu <hongjiu.lu@intel.com>
5080
5081 * elf-bfd.h (bfd_elf_section_data): Add a pointer for the
5082 linked-to section.
5083 (elf_linked_to_section): New.
5084
5085 * elf.c (assign_section_numbers): Set up sh_link for
5086 SHF_LINK_ORDER.
5087
5088 * elfxx-ia64.c (elfNN_ia64_final_write_processing): Set sh_info
5089 to sh_link for SHT_IA_64_UNWIND sections.
5090
65da361f
L
50912004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5092
5093 * elflink.c (elf_fixup_link_order): Add _() to error message.
5094
08ccf96b
L
50952004-07-22 H.J. Lu <hongjiu.lu@intel.com>
5096
5097 * elflink.c (elf_fixup_link_order): Issue a warning and flag
5098 an error if failed.
5099
082b7297
L
51002004-07-21 H.J. Lu <hongjiu.lu@intel.com>
5101
5102 * aout-adobe.c (aout_32_section_already_linked): Defined.
5103 * aout-target.h (MY_section_already_linked): Likewise.
5104 * aout-tic30.c (MY_section_already_linked): Likewise.
5105 * binary.c (binary_section_already_linked): Likewise.
5106 * bout.c (b_out_section_already_linked): Likewise.
5107 * coff-alpha.c (_bfd_ecoff_section_already_linked): Likewise.
5108 * coff-mips.c (_bfd_ecoff_section_already_linked): Likewise.
5109 * coffcode.h (coff_section_already_linked): Likewise.
5110 * i386msdos.c (msdos_section_already_linked): Likewise.
5111 * i386os9k.c (os9k_section_already_linked): Likewise.
5112 * ieee.c (ieee_section_already_linked): Likewise.
5113 * ihex.c (ihex_section_already_linked): Likewise.
5114 * mach-o.c (bfd_mach_o_section_already_linked): Likewise.
5115 * mmo.c (mmo_section_already_linked): Likewise.
5116 * nlm-target.h (nlm_section_already_linked): Likewise.
5117 * oasys.c (oasys_section_already_linked): Likewise.
5118 * pef.c (bfd_pef_section_already_linked): Likewise.
5119 * ppcboot.c (ppcboot_section_already_linked): Likewise.
5120 * som.c (som_bfd_discard_group): Likewise.
5121 * srec.c (srec_section_already_linked): Likewise.
5122 * tekhex.c (tekhex_section_already_linked): Likewise.
5123 * versados.c (versados_section_already_linked): Likewise.
5124 * vms.c (vms_section_already_linked): Likewise.
5125 * coff-target.h (_bfd_xcoff_section_already_linked): Likewise.
5126 * xsym.c (bfd_sym_section_already_linked): Likewise.
5127
5128 * bfd-in.h (bfd_section_already_linked_table_init): New.
5129 (bfd_section_already_linked_table_free): Likewise.
5130
5131 * coff-rs6000.c (rs6000coff_vec): Add
5132 _bfd_generic_section_already_linked.
5133 (pmac_xcoff_vec): Likewise.
5134 * coff64-rs6000.c (rs6000coff64_vec): Likewise.
5135 (aix5coff64_vec): Likewise.
5136
5137 * elf-bfd.h (_bfd_elf_section_already_linked): New prototype.
5138 * elflink.c (_bfd_elf_section_already_linked): New function.
5139
5140 * elfxx-target.h (bfd_elfNN_section_already_linked): Defined.
5141
5142 * libbfd-in.h (_bfd_nolink_section_already_linked): Defined.
5143 (_bfd_generic_section_already_linked): New.
5144 (bfd_section_already_linked_hash_entry): Likewise.
5145 (bfd_section_already_linked): Likewise.
5146 (bfd_section_already_linked_table_lookup): Likewise.
5147 (bfd_section_already_linked_table_insert): Likewise.
5148
5149 * linker.c (bfd_section_already_linked): New.
5150 (_bfd_section_already_linked_table): Likewise.
5151 (bfd_section_already_linked_table_lookup): Likewise.
5152 (bfd_section_already_linked_table_insert): Likewise.
5153 (already_linked_newfunc): Likewise.
5154 (bfd_section_already_linked_table_init): Likewise.
5155 (bfd_section_already_linked_table_free): Likewise.
5156 (_bfd_generic_section_already_linked): Likewise.
5157
5158 * section.c (bfd_section): Remove comdat.
5159 (bfd_comdat_info): Moved to ...
5160 * bfd-in.h (coff_comdat_info): Here.
5161 (bfd_coff_get_comdat_section): New.
5162 * coffgen.c (bfd_coff_get_comdat_section): Likewise.
5163 * libcoff-in.h (coff_section_tdata): Add comdat.
5164 * coffcode.h (handle_COMDAT): Updated.
5165 * cofflink.c (coff_link_add_symbols): Likewise.
5166 * ecoff.c (bfd_debug_section): Likewise.
5167
5168 * targets.c (bfd_target): Add _section_already_linked.
5169 (BFD_JUMP_TABLE_LINK): Updated.
5170
5171 * bfd-in2.h: Regenerated.
5172 * libbfd.h: Likewise.
5173 * libcoff.h: Likewise.
5174
0b52efa6
PB
51752003-07-21 Paul Brook <paul@codesourcery.com>
5176
5177 * elflink.c (elf_get_linked_section_vma, compare_link_order,
5178 elf_fixup_link_order): New functions.
5179 (bfd_elf_final_link): Call elf_fixup_link_order.
5180
7e2294f9
AO
51812004-07-21 Alexandre Oliva <aoliva@redhat.com>
5182
5183 * elf-bfd.h (ELF_COMMON_DEF_P): New.
5184 * elflink.c (_bfd_elf_symbol_refs_local_p): Use it to handle
5185 common definitions.
5186 * elf-m10300.c: Use SYMBOL_REFERENCES_LOCAL instead of
5187 _bfd_elf_symbol_refs_local_p.
5188 * elf32-frv.c (FRVFDPIC_SYM_LOCAL): Remove hack for common
5189 symbols.
5190
e56f61be
L
51912004-07-19 H.J. Lu <hongjiu.lu@intel.com>
5192
5193 * bfd-in.h (dynamic_lib_link_class): Add DYN_NO_ADD_NEEDED and
5194 DYN_NO_NEEDED.
5195 (bfd_elf_get_dyn_lib_class): New prototype.
5196 * elf.c (bfd_elf_get_dyn_lib_class): New function.
5197
5198 * elflink.c (elf_link_add_object_symbols): Check DYN_AS_NEEDED,
5199 DYN_DT_NEEDED and DYN_NO_NEEDED bits to see if a DT_NEEDED
5200 entry is needed. Issue an error if a DT_NEEDED entry is needed
5201 for a file marked DYN_NO_NEEDED.
5202 (elf_link_check_versioned_symbol): Check the DYN_DT_NEEDED bit
5203 for DT_NEEDED tags.
5204
5205 * bfd-in2.h: Regenerated.
5206
27b56da8
DA
52072004-07-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
5208
5209 * elflink.c (elf_section_complain_discarded): Don't complain in
5210 .PARISC.unwind.
5211
bbb268c3
JW
52122004-07-10 James E Wilson <wilson@specifixinc.com>
5213
5214 * elfxx-ia64.c (elfNN_ia64_relax_ldxmov): Remove abfd parameter.
5215 (elfNN_ia64_install_value, elfNN_ia64_relax_brl): Likewise.
5216 (elfNN_ia64_relax_section, elfNN_ia64_relocate_section,
5217 elfNN_ia64_finish_dynamic_symbol, elfNN_ia64_finish_dynamic_sections):
5218 Fix callers.
5219 (elfNN_ia64_relax_brl): Change bfd_get_64 to bfd_getl64. Change
5220 bfd_put_64 to bfd_putl64.
5221 (elfNN_ia64_relax_ldxmov, elfNN_ia64_install_value): Likewise.
2c66dc6c 5222
e525914f
L
52232004-07-09 H.J. Lu <hongjiu.lu@intel.com>
5224
5225 PR 240
5226 * elfxx-ia64.c (elfNN_ia64_relax_section): Only warn br in
5227 .init/.fini sections when trying to relax it.
5228
b1a6d0b1
NC
52292004-07-09 Jie Zhang <zhangjie@magima.com.cn>
5230
5231 * elf.c (assign_file_positions_for_segments): Make sure the
5232 .dynamic section is the first section in the PT_DYNAMIC segment.
5233
1a320fbb
NC
52342004-07-09 Nick Clifton <nickc@redhat.com>
5235
5236 * config.bfd: Change sh-sybmian-elf to sh-*-symbianelf.
5237 * elf32-sh-symbian.c: Rename the sh_find_elf_flags and
5238 sh_elf_get_flags_from_mach functions so that they do not conflict
5239 when this target is built with other sh-elf targets.
5240 * elf32-sh.c (sh_elf_get_flags_from_mach): Remove bogus
5241 suppression of this function.
5242 (sh_elf_find_flags): Likewise.
5243
1fe1f39c
NC
52442004-07-07 Tomer Levi <Tomer.Levi@nsc.com>
5245
5246 * Makefile.am (ALL_MACHINES): Add cpu-crx.lo.
5247 (ALL_MACHINES_CFILES): Add cpu-crx.c.
5248 (BFD32_BACKENDS): Add elf32-crx.lo.
5249 (BFD32_BACKENDS_CFILES): Add elf32-crx.c.
5250 (cpu-crx.lo): New target.
5251 (elf32-crx.lo): New target.
5252 * Makefile.in: Regenerate.
5253 * archures.c (bfd_architecture): Add bfd_{arch,mach}_crx.
5254 (bfd_archures_list): Add bfd_crx_arch.
5255 * bfd-in2.h: Regenerate.
5256 * config.bfd: Handle crx-*-elf*, crx*.
5257 * configure.in: Handle bfd_elf32_crx_vec.
5258 * configure: Regenerate.
5259 * cpu-crx.c: New file.
5260 * elf32-crx.c: Likewise.
5261 * libbfd.h: Regenerate.
5262 * reloc.c: Add BFD_RELOC_CRX_REL4, BFD_RELOC_CRX_REL8,
5263 BFD_RELOC_CRX_REL8_CMP, BFD_RELOC_CRX_REL16, BFD_RELOC_CRX_REL24,
5264 BFD_RELOC_CRX_REL32, BFD_RELOC_CRX_REGREL12, BFD_RELOC_CRX_REGREL22,
5265 BFD_RELOC_CRX_REGREL28, BFD_RELOC_CRX_REGREL32, BFD_RELOC_CRX_ABS16,
5266 BFD_RELOC_CRX_ABS32, BFD_RELOC_CRX_NUM8, BFD_RELOC_CRX_NUM16,
5267 BFD_RELOC_CRX_NUM32, BFD_RELOC_CRX_IMM16 and BFD_RELOC_CRX_IMM32
5268 * targets.c (bfd_elf32_crx_vec): Declare.
5269 (bfd_target_vector): Add bfd_elf32_crx_vec.
5270
85fbca6a
NC
52712004-07-06 Nick Clifton <nickc@redhat.com>
5272
5273 * config.bfd: Add sh-symbian-elf target.
5274 * configure.in: Add bfd_elf32_shl_symbian_vec.
5275 * configure: Regenerate.
5276 * elf-bfd.h (struct elf_backend_data): Add new field
5277 'check_directives'.
1fe1f39c 5278 * elflink.c (elf_link_add_object_symbols): Invoke the
85fbca6a 5279 check_directives function, if defined.
1fe1f39c 5280 * elfxx-target.h: Provide a default, NULL definition for
85fbca6a 5281 check_directives.
1fe1f39c
NC
5282 * targets.c: Add bfd_elf32_shl_symbian_vec.
5283 * elf32-sh.c (sh_elf_swap_insns): Protect against unnecessary
85fbca6a 5284 definition.
1fe1f39c 5285 (elf32_shlin_grok_prstatus, elf32_shlib_grok_psinfo,
85fbca6a 5286 * sh_elf_get_flags_from_mach, sh_elf_find_flags): Likewise.
1fe1f39c 5287 (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Only define if they have
85fbca6a 5288 not already been defined.
1fe1f39c
NC
5289 * elf32-sh64.c: Use SH_TARGET_ALREADY_DEFINED.
5290 * sh-symbian.c: New file. Provide functions to support the
85fbca6a
NC
5291 * sh-symbian-elf target.
5292 * Makefile.am: Add elf32-sh-symbian.c
5293 * Makefile.in: Regenerate.
1fe1f39c 5294
871ec896
JR
52952004-07-05 Andrew Stubbs <andrew.stubbs@superh.com>
5296
1fe1f39c
NC
5297 * elf32-sh.c: Include ../opcodes/sh-opc.h.
5298 * Makefile.am: Ran make dep-am.
5299 * Makefile.in: Ran make dep-in.
871ec896 5300
c87db184
CF
53012004-07-03 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
5302
5303 * cofflink.c (_bfd_coff_generic_relocate_section): Resolve PE weak
5304 externals properly.
5305
06f2f6af
MS
53062004-07-02 Martin Schwidefsky <schwidefsky@de.ibm.com>
5307
5308 * config.bfd: Add want64 to configuration target s390-*-linux*.
5309
b602c853
L
53102004-07-01 H.J. Lu <hongjiu.lu@intel.com>
5311
5312 * bfd.c (bfd_get_section_ident): New.
5313
5314 * elflink.c (elf_link_read_relocs_from_section): Call
5315 bfd_get_section_ident to identify the section when reporting
5316 error.
5317 (_bfd_elf_link_output_relocs): Likewise.
5318 (elf_link_output_extsym): Likewise.
5319 (elf_link_input_bfd): Likewise.
5320 (bfd_elf_gc_record_vtinherit): Likewise.
5321
5322 * bfd-in2.h: Regenerated.
5323
7a2a6943
NC
53242004-07-01 Jie Zhang <zhangjie@magima.com.cn>
5325 Nick Clifton <nickc@redhat.com>
5326
5327 PR 204
5328 * elfxx-mips.c (_bfd_mips_elf_final_link): Pass the correct number
5329 of section symbols to mips_elf_sort_hash_table ().
5330
cdd3575c
AM
53312004-07-01 Alan Modra <amodra@bigpond.net.au>
5332
5333 * elflink.c (elf_section_ignore_discarded_relocs): Revert last
5334 change. Comment.
5335 (elf_section_complain_discarded): New function. Handle
5336 .gcc_except_table too.
5337 (elf_link_input_bfd): Rewrite handling of relocs against symbols
5338 in discarded sections.
5339 * elf-bfd.h (elf_discarded_section): Protect macro arg.
5340
21a8f7fa
JW
53412004-06-30 James E Wilson <wilson@specifixinc.com>
5342
5343 * elfxx-ia64.c (elfNN_ia64_check_relocs): New local pltoff. Initialize
5344 to NULL. Call get_pltoff if NULL and NEED_PLTOFF is true.
5345
2de26f35
L
53462004-06-30 H.J. Lu <hongjiu.lu@intel.com>
5347
5348 PR 233
5349 * elflink.c (elf_link_input_bfd): Issue an error for non-debug
5350 local references to discarded sections and report their
5351 locations.
5352
72d7a15c
AM
53532004-06-30 Alan Modra <amodra@bigpond.net.au>
5354
5355 * elflink.c (elf_section_ignore_discarded_relocs): Don't test
5356 sec_info_type, test section name instead.
5357
e7f0a167
L
53582004-06-29 H.J. Lu <hongjiu.lu@intel.com>
5359
5360 PR 240
5361 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't relax branch
5362 in .init/.fini sections.
5363
bff5f93a
BW
53642004-06-29 Bob Wilson <bob.wilson@acm.org>
5365
5366 * elf32-xtensa.c (elf_xtensa_relocate_section): Use
5367 bfd_get_section_limit.
5368
b54d4b07
BW
53692004-06-29 Bob Wilson <bob.wilson@acm.org>
5370
5371 * elf32-xtensa.c (elf_xtensa_combine_prop_entries): Don't change the
5372 output section size.
5373
e87a64e1
AM
53742004-06-29 Alan Modra <amodra@bigpond.net.au>
5375
1a23a9e6
AM
5376 * elf64-mmix.c (mmix_set_relaxable_size): Save original size in
5377 rawsize.
5378 (mmix_elf_perform_relocation): Adjust for above change.
5379 (mmix_elf_relocate_section): Likewise.
5380 (mmix_elf_relax_section): Likewise. Use output_section->rawsize.
5381 (mmix_elf_get_section_contents): Delete.
5382 (bfd_elf64_get_section_contents): Delete.
5383 (mmix_elf_relocate_section): Zero stub area.
5384 * linker.c (default_indirect_link_order): Alloc max of section size
5385 and rawsize.
5386 * simple.c (bfd_simple_get_relocated_section_contents): Likewise.
5387 * section.c (bfd_malloc_and_get_section): Likewise.
5388 (struct bfd_section): Update rawsize comment.
5389 * bfd-in2.h: Regenerate.
5390
e87a64e1
AM
5391 * reloc16.c (bfd_coff_reloc16_relax_section): Set rawsize.
5392
07515404
AM
53932004-06-29 Alan Modra <amodra@bigpond.net.au>
5394
5395 * bfd-in.h (bfd_get_section_limit): Define.
1fe1f39c 5396 * reloc.c (bfd_perform_relocation, bfd_install_relocation)
07515404
AM
5397 (_bfd_final_link_relocate): Use bfd_get_section_limit.
5398 * aout-tic30.c (tic30_aout_final_link_relocate): Likewise.
5399 * coff-arm.c (coff_arm_relocate_section): Likewise.
5400 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): Likewise.
5401 * cpu-ns32k.c (do_ns32k_reloc): Likewise.
5402 (bfd_ns32k_final_link_relocate): Likewise.
5403 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): Likwise.
5404 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): Likewise.
1fe1f39c 5405 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc)
07515404 5406 (i860_howto_highadj_reloc, i860_howto_splitn_reloc): Likewise.
1fe1f39c 5407 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc)
07515404
AM
5408 (m32r_elf_generic_reloc, m32r_elf_relocate_section): Likewise.
5409 * elf32-m68hc1x.c (m68hc11_elf_special_reloc): Likewise.
5410 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
5411 * elf32-or32.c (or32_elf_consth_reloc): Likewise.
5412 * elf32-ppc.c (ppc_elf_addr16_ha_reloc): Likewise.
5413 * elf32-s390.c (s390_elf_ldisp_reloc): Likewise.
5414 * elf32-sh.c (sh_elf_reloc_loop): Likewise.
5415 * elf32-sparc.c (sparc_elf_wdisp16_reloc): Likewise.
5416 (sparc_elf_hix22_reloc, sparc_elf_lox10_reloc): Likwise.
5417 * elf32-v850.c (v850_elf_reloc): Likewise.
5418 * elf32-xstormy16.c (xstormy16_elf_24_reloc): Likewise.
5419 * elf32-xtensa.c (bfd_elf_xtensa_reloc): Likewise.
5420 * elf64-alpha.c (elf64_alpha_reloc_gpdisp): Likewise.
5421 * elf64-mips.c (mips_elf64_gprel32_reloc)
5422 (mips16_gprel_reloc): Likewise.
5423 * elf64-mmix.c (mmix_elf_reloc): Likewise.
5424 * elf64-s390.c (s390_elf_ldisp_reloc): Likewise.
5425 * elf64-sparc.c (init_insn_reloc): Likewise.
5426 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc): Likewise.
1fe1f39c
NC
5427 * elfxx-mips.c (_bfd_mips_elf_gprel16_with_gp)
5428 (_bfd_mips_elf_hi16_reloc, _bfd_mips_elf_lo16_reloc)
07515404
AM
5429 (_bfd_mips_elf_generic_reloc): Likewise.
5430 * bfd-in2.h: Regenerate.
5431
3722b82f
AM
54322004-06-28 Alan Modra <amodra@bigpond.net.au>
5433
5434 * bfd-in.h (struct stab_info): Move from stabs.c.
5435 * stabs.c (struct stab_link_includes_table): Delete.
5436 (stab_link_includes_lookup): Delete.
5437 (_bfd_write_section_stabs, _bfd_write_stab_strings): Remove one
5438 level of indirection from sinfo parm.
5439 (_bfd_link_section_stabs): Likewise. Set SEC_LINKER_CREATED on
5440 stabstr section. Adjust hash table accesses.
5441 * coff-ppc.c (ppc_bfd_coff_final_link): Do include rawsize in contents
5442 alloc. Adjust stab_info test.
5443 * cofflink.c (_bfd_coff_link_hash_table_init): Clear stab_info.
5444 (_bfd_coff_final_link): Adjust stab_info test.
5445 (_bfd_coff_link_input_bfd): Ignore SEC_LINKER_CREATED sections.
5446 * elf-bfd.h (struct elf_link_hash_table): Include struct stab_info
5447 in place.
5448 * libcoff-in.h (struct coff_link_hash_table): Likewise.
5449 * elf.c (_bfd_elf_link_hash_table_init): Clear stab_info.
5450 * elflink.c (bfd_elf_final_link): Don't attempt to link linker created
5451 stabstr section. Adjust stab_info test.
5452 * libbfd-in.h (_bfd_link_section_stabs, _bfd_write_section_stabs)
5453 (_bfd_write_stab_strings): Adjust prototypes.
5454 * libbfd.h: Regenerate.
5455 * libcoff.h: Regenerate.
5456 * bfd-in2.h: Regenerate.
5457
727e493d
MK
54582004-06-27 Mark Kettenis <kettenis@gnu.org>
5459
5460 From Miod Vallat <miod@online.fr>:
5461 * aoutx.h (NAME(aout,machine_type)): Handle bfd_arch_m88k.
5462
146ccdbb
AO
54632004-06-26 Alexandre Oliva <aoliva@redhat.com>
5464
5465 * elf-m10300.c (struct elf_mn10300_pcrel_relocs_copied): Delete.
5466 (struct elf32_mn10300_link_hash_entry): Remove
5467 pcrel_relocs_copied.
5468 (mn10300_elf_check_relocs): Only reserve dynamic relocations for
5469 R_MN10300_32. Don't adjust pcrel_relocs_copied.
5470 (mn10300_elf_final_link_relocate): Fail for direct, pc-relative
5471 and gotoff relocations if the symbol doesn't bind locally. Use
5472 _bfd_elf_symbol_refs_local_p to test. Don't create dynamic
5473 relocation for PCREL32.
5474 (mn10300_elf_relocate_section): Use _bfd_elf_symbol_refs_local_p
5475 to test whether a symbol binds locally.
5476 (elf32_mn10300_link_hash_newfunc): Don't initialize
5477 pcrel_relocs_copied.
5478 (_bfd_mn10300_elf_discard_copies): Delete.
5479 (_bfd_mn10300_elf_size_dynamic_sections): Don't call it.
5480
a5fd0812
MK
54812004-06-26 Mark Kettenis <kettenis@gnu.org>
5482
5483 * config.bfd: Replace m88k-*-openbsd* with m88*-*-openbsd*.
5484
22bfad37
JB
54852004-06-25 Joel Brobecker <brobecker@gnat.com>
5486
5487 * som.c (som_set_reloc_info): Correct small typo.
5488
097f809a
NC
54892004-06-25 Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
5490
5491 * elf32-m32r.c (m32r_elf_howto_table): Support R_M32R_GOTOFF.
5492 (m32r_elf_relocate_section): Changed for R_M32R_GOTOFF.
5493 (m32r_elf_gcsweep_hook): Likewise.
5494 (m32r_elf_check_relocs): Likewise.
5495 (m32r_elf_howto_table): Added R_M32R_GOTOFF_HI_ULO,
5496 R_M32R_GOTOFF_HI_SLO and R_M32R_GOTOFF_LO.
5497 * reloc.c: Added BFD_RELOC_M32R_GOTOFF_HI_ULO,
5498 BFD_RELOC_M32R_GOTOFF_HI_SLO and BFD_RELOC_M32R_GOTOFF_LO.
f9f2cf5d
NC
5499 * bfd-in2.h: Regenerated.
5500 * libbfd.h: Regenerated.
097f809a 5501
6610a52d
L
55022004-06-24 H.J. Lu <hongjiu.lu@intel.com>
5503
5504 * elf64-x86-64.c (elf64_x86_64_check_relocs): Warn overflow
5505 relocation symbol.
5506 (elf64_x86_64_relocate_section): Issue an error for
5507 R_X86_64_PC8, R_X86_64_PC16 and R_X86_64_PC32 relocations
5508 against global symbols when building shared library.
5509
eea6121a
AM
55102004-06-24 Alan Modra <amodra@bigpond.net.au>
5511
5512 * section.c (struct sec): Rename "_cooked_size" to "size".
5513 Rename "_raw_size" to "rawsize".
5514 (STD_SECTION): Adjust comments.
5515 (bfd_set_section_size, bfd_get_section_contents): Use size.
5516 (bfd_malloc_and_get_section): New function.
5517 * bfd-in.h (bfd_section_size, bfd_get_section_size): Use size.
5518 * coff-sh.c (sh_relax_section): Alloc coff_section_data struct early.
5519 Correctly free reloc and contents memory.
5520 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Delete FIXME
5521 and fake CIE now that we can shink section size to zero.
5522 (_bfd_elf_write_section_eh_frame): Likewise..
5523 * elf32-ppc.c (ppc_elf_relax_section): Delay reading section contents.
5524 * elf-m10300.c (mn10300_elf_final_link_relocate): Don't use
5525 _bfd_stab_section_offset. Use _bfd_elf_section_offset.
5526 * stabs.c (_bfd_stab_section_offset_): Remove unused args and
5527 unneeded indirection.
5528 * elf.c (_bfd_elf_section_offset): .. and update call.
5529 * libbfd-in.h (_bfd_stab_section_offset): Update prototype.
5530 * libbfd.h: Regenerate.
5531 * bfd-in2.h: Regenerate.
5532
5533 Replace occurrences of "_raw_size" and "_cooked_size" in most places
5534 with "size". Set new "rawsize" for stabs, eh_frame, and SEC_MERGE
5535 sections. Use "rawsize", if non-zero, for bfd_get_section_contents
5536 calls if the section might be a stabs, eh_frame, or SEC_MERGE section.
5537 Similarly use "rawsize", if non-zero, in reloc functions to validate
5538 reloc addresses. Use new bfd_malloc_and_get_section in most places
5539 where bfd_get_section_contents was called. Expand all occurrences of
5540 bfd_section_size and bfd_get_section_size. Rename "raw_size" var in
5541 grok_prstatus and similar functions to "size".
5542 * aix386-core.c (aix386_core_file_p): ..
5543 * aix5ppc-core.c (xcoff64_core_p): ..
5544 * aout-adobe.c (aout_adobe_callback, aout_adobe_write_object_contents,
5545 aout_adobe_set_section_contents): ..
5546 * aout-target.h (callback): ..
5547 * aout-tic30.c (tic30_aout_callback, tic30_aout_final_link_relocate,
5548 MY_bfd_final_link): ..
5549 * aoutf1.h (sunos4_core_file_p): ..
5550 * aoutx.h (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5551 adjust_n_magic, adjust_sizes_and_vmas, translate_from_native_sym_flags,
5552 final_link, aout_link_input_section): ..
5553 * binary.c (binary_object_p, binary_canonicalize_symtab,
5554 binary_set_section_contents): ..
5555 * bout.c (b_out_callback, b_out_write_object_contents,
5556 b_out_set_section_contents, b_out_bfd_relax_section,
5557 b_out_bfd_get_relocated_section_contents): ..
5558 * cisco-core.c (cisco_core_file_validate): ..
5559 * coff-alpha.c (alpha_ecoff_object_p,
5560 alpha_ecoff_get_relocated_section_conten, alpha_relocate_section): ..
5561 * coff-arm.c (coff_arm_relocate_section,
5562 bfd_arm_allocate_interworking_sections): ..
5563 * coff-h8300.c (h8300_reloc16_extra_cases,
5564 h8300_bfd_link_add_symbols): ..
5565 * coff-mips.c (mips_refhi_reloc, mips_gprel_reloc): ..
5566 * coff-ppc.c (coff_ppc_relocate_section, ppc_allocate_toc_section,
5567 ppc_bfd_coff_final_link): ..
5568 * coff-rs6000.c (xcoff_reloc_type_br, xcoff_ppc_relocate_section): ..
5569 * coff-sh.c (sh_relax_section, sh_relax_delete_bytes,
5570 sh_align_loads, sh_coff_get_relocated_section_contents): ..
5571 * coff64-rs6000.c (xcoff64_write_object_contents,
5572 xcoff64_reloc_type_br, xcoff64_ppc_relocate_section): ..
5573 * coffcode.h (coff_compute_section_file_positions,
5574 coff_write_object_contents): ..
5575 * coffgen.c (make_a_section_from_file, coff_write_symbols,
5576 coff_section_symbol, build_debug_section): ..
5577 * cofflink.c (coff_link_add_symbols, _bfd_coff_final_link,
5578 process_embedded_commands, _bfd_coff_link_input_bfd,
5579 _bfd_coff_write_global_sym): ..
5580 * cpu-arm.c (bfd_arm_update_notes, bfd_arm_get_mach_from_notes): ..
5581 * cpu-ns32k.c (do_ns32k_reloc, _bfd_ns32k_final_link_relocate): ..
5582 * dwarf1.c (parse_line_table, _bfd_dwarf1_find_nearest_line): ..
5583 * dwarf2.c (read_indirect_string, read_abbrevs, decode_line_info,
5584 _bfd_dwarf2_find_nearest_line): ..
5585 * ecoff.c (bfd_debug_section, ecoff_set_symbol_info,
5586 ecoff_compute_section_file_positions,
5587 _bfd_ecoff_write_object_contents, ecoff_indirect_link_order): ..
5588 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame,
5589 _bfd_elf_discard_section_eh_frame_hdr,
5590 _bfd_elf_maybe_strip_eh_frame_hdr, _bfd_elf_eh_frame_section_offset,
5591 _bfd_elf_write_section_eh_frame,
5592 _bfd_elf_write_section_eh_frame_hdr): ..
5593 * elf-hppa.h (elf_hppa_sort_unwind): ..
5594 * elf-m10200.c (mn10200_elf_relax_section,
5595 mn10200_elf_relax_delete_bytes,
5596 mn10200_elf_get_relocated_section_contents): ..
5597 * elf-m10300.c (_bfd_mn10300_elf_create_got_section,
5598 mn10300_elf_check_relocs, mn10300_elf_relax_section,
5599 mn10300_elf_relax_delete_bytes,
5600 mn10300_elf_get_relocated_section_contents,
5601 _bfd_mn10300_elf_adjust_dynamic_symbol,
5602 _bfd_mn10300_elf_discard_copies,
5603 _bfd_mn10300_elf_size_dynamic_sections,
5604 _bfd_mn10300_elf_finish_dynamic_sections): ..
5605 * elf.c (_bfd_elf_print_private_bfd_data, bfd_elf_get_bfd_needed_list,
5606 _bfd_elf_make_section_from_phdr, elf_fake_sections,
5607 bfd_elf_set_group_contents, map_sections_to_segments,
5608 elf_sort_sections, assign_file_positions_for_segments,
5609 SECTION_SIZE, copy_private_bfd_data,
5610 _bfd_elf_get_dynamic_reloc_upper_bound,
5611 _bfd_elf_canonicalize_dynamic_reloc, elfcore_maybe_make_sect,
5612 _bfd_elfcore_make_pseudosection, elfcore_grok_prstatus,
5613 elfcore_grok_lwpstatus, elfcore_grok_win32pstatus,
5614 elfcore_grok_note, elfcore_grok_nto_status, elfcore_grok_nto_gregs,
5615 _bfd_elf_rel_local_sym, _bfd_elf_get_synthetic_symtab): ..
5616 * elf32-arm.h (bfd_elf32_arm_allocate_interworking_sect,
5617 bfd_elf32_arm_process_before_allocation,
5618 elf32_arm_adjust_dynamic_symbol, allocate_dynrelocs,
5619 elf32_arm_size_dynamic_sections, elf32_arm_finish_dynamic_sections,
5620 elf32_arm_write_section): ..
5621 * elf32-cris.c (cris_elf_grok_prstatus,
5622 elf_cris_finish_dynamic_sections, cris_elf_gc_sweep_hook,
5623 elf_cris_adjust_gotplt_to_got, elf_cris_adjust_dynamic_symbol,
5624 cris_elf_check_relocs, elf_cris_size_dynamic_sections,
5625 elf_cris_discard_excess_dso_dynamics,
5626 elf_cris_discard_excess_program_dynamics): ..
5627 * elf32-d30v.c (bfd_elf_d30v_reloc, bfd_elf_d30v_reloc_21): ..
5628 * elf32-dlx.c (_bfd_dlx_elf_hi16_reloc): ..
5629 * elf32-frv.c (_frvfdpic_add_dyn_reloc, _frvfdpic_add_rofixup,
5630 _frv_create_got_section, _frvfdpic_assign_plt_entries,
5631 elf32_frvfdpic_size_dynamic_sections,
5632 elf32_frvfdpic_modify_segment_map,
5633 elf32_frvfdpic_finish_dynamic_sections): ..
5634 * elf32-h8300.c (elf32_h8_relax_section, elf32_h8_relax_delete_bytes,
5635 elf32_h8_get_relocated_section_contents): ..
5636 * elf32-hppa.c (hppa_build_one_stub, hppa_size_one_stub,
5637 elf32_hppa_adjust_dynamic_symbol, allocate_plt_static,
5638 allocate_dynrelocs, elf32_hppa_size_dynamic_sections, group_sections,
5639 elf32_hppa_size_stubs, elf32_hppa_set_gp, elf32_hppa_build_stubs,
5640 elf32_hppa_finish_dynamic_sections): ..
5641 * elf32-i370.c (i370_elf_adjust_dynamic_symbol,
5642 i370_elf_size_dynamic_sections, i370_elf_check_relocs,
5643 i370_elf_finish_dynamic_sections): ..
5644 * elf32-i386.c (elf_i386_grok_prstatus, elf_i386_adjust_dynamic_symbol,
5645 allocate_dynrelocs, elf_i386_size_dynamic_sections,
5646 elf_i386_relocate_section, elf_i386_finish_dynamic_sections): ..
5647 * elf32-i860.c (i860_howto_pc26_reloc, i860_howto_pc16_reloc,
5648 i860_howto_highadj_reloc, i860_howto_splitn_reloc): ..
5649 * elf32-ip2k.c (ip2k_is_switch_table_128,
5650 ip2k_relax_switch_table_128, ip2k_is_switch_table_256,
5651 ip2k_relax_switch_table_256, ip2k_elf_relax_section,
5652 adjust_all_relocations, ip2k_elf_relax_delete_bytes): ..
5653 * elf32-m32r.c (m32r_elf_do_10_pcrel_reloc, m32r_elf_hi16_reloc,
5654 m32r_elf_generic_reloc, m32r_elf_adjust_dynamic_symbol,
5655 allocate_dynrelocs, m32r_elf_size_dynamic_sections,
5656 m32r_elf_relocate_section, m32r_elf_finish_dynamic_sections,
5657 m32r_elf_relax_section, m32r_elf_relax_delete_bytes,
5658 m32r_elf_get_relocated_section_contents): ..
5659 * elf32-m68hc11.c (m68hc11_elf_build_one_stub,
5660 m68hc11_elf_size_one_stub, m68hc11_elf_relax_section,
5661 m68hc11_elf_relax_delete_bytes): ..
5662 * elf32-m68hc12.c (m68hc12_elf_build_one_stub,
5663 m68hc12_elf_size_one_stub): ..
5664 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs,
5665 elf32_m68hc11_build_stubs, m68hc11_elf_special_reloc): ..
5666 * elf32-m68k.c (elf_m68k_check_relocs, elf_m68k_gc_sweep_hook,
5667 elf_m68k_adjust_dynamic_symbol, elf_m68k_size_dynamic_sections,
5668 elf_m68k_discard_copies, elf_m68k_finish_dynamic_sections): ..
5669 * elf32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5670 elf32_mips_grok_prstatus): ..
5671 * elf32-or32.c (or32_elf_consth_reloc): ..
5672 * elf32-ppc.c (ppc_elf_relax_section, ppc_elf_addr16_ha_reloc,
5673 elf_create_pointer_linker_section, ppc_elf_create_linker_section,
5674 ppc_elf_additional_program_headers, ppc_elf_adjust_dynamic_symbol,
5675 allocate_dynrelocs, ppc_elf_size_dynamic_sections,
5676 ppc_elf_finish_dynamic_sections, ppc_elf_grok_prstatus,
5677 ppc_elf_final_write_processing): ..
5678 * elf32-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5679 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5680 elf_s390_finish_dynamic_sections, elf_s390_grok_prstatus): ..
5681 * elf32-sh.c (sh_elf_reloc_loop, sh_elf_relax_section,
5682 sh_elf_relax_delete_bytes, sh_elf_align_loads,
5683 sh_elf_adjust_dynamic_symbol, allocate_dynrelocs,
5684 sh_elf_size_dynamic_sections, sh_elf_get_relocated_section_contents,
5685 sh_elf_finish_dynamic_sections, elf32_shlin_grok_prstatus): ..
5686 * elf32-sh64-com.c (sh64_address_in_cranges,
5687 sh64_get_contents_type): ..
5688 * elf32-sh64.c (sh64_find_section_for_address,
5689 sh64_elf_final_write_processing): ..
5690 * elf32-sparc.c (sparc_elf_wdisp16_reloc, sparc_elf_hix22_reloc,
5691 sparc_elf_lox10_reloc, elf32_sparc_adjust_dynamic_symbol,
5692 allocate_dynrelocs, elf32_sparc_size_dynamic_sections,
5693 elf32_sparc_relocate_section, elf32_sparc_finish_dynamic_sections): ..
5694 * elf32-v850.c (v850_elf_reloc, v850_elf_relax_section): ..
5695 * elf32-vax.c (elf_vax_check_relocs, elf_vax_adjust_dynamic_symbol,
5696 elf_vax_size_dynamic_sections, elf_vax_discard_copies,
5697 elf_vax_instantiate_got_entries, elf_vax_relocate_section,
5698 elf_vax_finish_dynamic_sections): ..
5699 * elf32-xstormy16.c (xstormy16_elf_24_reloc,
5700 xstormy16_elf_check_relocs, xstormy16_relax_plt_check,
5701 xstormy16_elf_relax_section, xstormy16_elf_always_size_sections,
5702 xstormy16_elf_finish_dynamic_sections): ..
5703 * elf32-xtensa.c (xtensa_read_table_entries,
5704 elf_xtensa_allocate_got_size, elf_xtensa_allocate_local_got_size,
5705 elf_xtensa_size_dynamic_sections, elf_xtensa_do_reloc,
5706 bfd_elf_xtensa_reloc, elf_xtensa_relocate_section,
5707 elf_xtensa_combine_prop_entries, elf_xtensa_finish_dynamic_sections,
5708 elf_xtensa_discard_info_for_section, elf_xtensa_grok_prstatus,
5709 get_relocation_opcode, retrieve_contents, find_relaxable_sections,
5710 collect_source_relocs, is_resolvable_asm_expansion, remove_literals,
5711 relax_section, shrink_dynamic_reloc_sections, relax_property_section,
5712 xtensa_callback_required_dependence): ..
5713 * elf64-alpha.c (elf64_alpha_reloc_gpdisp, elf64_alpha_relax_section,
5714 elf64_alpha_check_relocs, elf64_alpha_adjust_dynamic_symbol,
5715 elf64_alpha_calc_got_offsets_for_symbol, elf64_alpha_calc_got_offsets,
5716 elf64_alpha_size_plt_section, elf64_alpha_size_plt_section_1,
5717 elf64_alpha_always_size_sections, elf64_alpha_calc_dynrel_sizes,
5718 elf64_alpha_size_rela_got_section, elf64_alpha_size_rela_got_1,
5719 elf64_alpha_size_dynamic_sections, elf64_alpha_emit_dynrel,
5720 elf64_alpha_finish_dynamic_sections, elf64_alpha_final_link): ..
5721 * elf64-hppa.c (allocate_dynrel_entries,
5722 elf64_hppa_size_dynamic_sections,
5723 elf64_hppa_finish_dynamic_sections): ..
5724 * elf64-mips.c (mips_elf64_gprel32_reloc, mips16_gprel_reloc,
5725 mips_elf64_canonicalize_dynamic_reloc, mips_elf64_slurp_reloc_table,
5726 elf64_mips_grok_prstatus): ..
5727 * elf64-mmix.c (mmix_elf_perform_relocation, mmix_elf_reloc,
5728 mmix_elf_relocate_section, mmix_elf_final_link,
5729 mmix_set_relaxable_size, _bfd_mmix_after_linker_allocation,
5730 mmix_elf_relax_section, mmix_elf_get_section_contents): ..
5731 * elf64-ppc.c (ppc64_elf_object_p, ppc64_elf_grok_prstatus,
5732 ppc64_elf_check_relocs, ppc64_elf_func_desc_adjust,
5733 ppc64_elf_adjust_dynamic_symbol, ppc64_elf_edit_opd,
5734 allocate_dynrelocs, ppc64_elf_size_dynamic_sections,
5735 ppc_build_one_stub, ppc_size_one_stub, ppc64_elf_next_toc_section,
5736 toc_adjusting_stub_needed, group_sections, ppc64_elf_size_stubs,
5737 ppc64_elf_build_stubs, ppc64_elf_relocate_section,
5738 ppc64_elf_finish_dynamic_sections): ..
5739 * elf64-s390.c (s390_elf_ldisp_reloc, elf_s390_adjust_dynamic_symbol,
5740 allocate_dynrelocs, elf_s390_size_dynamic_sections,
5741 elf_s390_finish_dynamic_sections): ..
5742 * elf64-sh64.c (sh_elf64_get_relocated_section_contents,
5743 sh_elf64_check_relocs, sh64_elf64_adjust_dynamic_symbol,
5744 sh64_elf64_discard_copies, sh64_elf64_size_dynamic_sections,
5745 sh64_elf64_finish_dynamic_sections): ..
5746 * elf64-sparc.c (sparc64_elf_slurp_reloc_table, init_insn_reloc,
5747 sparc64_elf_check_relocs, sparc64_elf_adjust_dynamic_symbol,
5748 sparc64_elf_size_dynamic_sections, sparc64_elf_relocate_section,
5749 sparc64_elf_finish_dynamic_symbol,
5750 sparc64_elf_finish_dynamic_sections): ..
5751 * elf64-x86-64.c (elf64_x86_64_grok_prstatus,
5752 elf64_x86_64_adjust_dynamic_symbol, allocate_dynrelocs,
5753 elf64_x86_64_size_dynamic_sections, elf64_x86_64_relocate_section,
5754 elf64_x86_64_finish_dynamic_sections): ..
5755 * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): ..
5756 * elfcode.h (elf_slurp_reloc_table): ..
5757 * elflink.c (_bfd_elf_create_got_section, elf_add_dt_needed_tag,
5758 elf_finalize_dynstr, elf_link_add_object_symbols,
5759 bfd_elf_size_dynamic_sections, elf_link_sort_relocs,
5760 elf_link_input_bfd, bfd_elf_final_link, bfd_elf_discard_info): ..
5761 * elfn32-mips.c (gprel32_with_gp, mips16_gprel_reloc,
5762 elf32_mips_grok_prstatus): ..
5763 * elfxx-ia64.c (elfNN_ia64_relax_section, allocate_dynrel_entries,
5764 elfNN_ia64_size_dynamic_sections, elfNN_ia64_install_dyn_reloc,
5765 elfNN_ia64_choose_gp, elfNN_ia64_final_link,
5766 elfNN_ia64_finish_dynamic_sections): ..
5767 * elfxx-mips.c (mips_elf_create_procedure_table,
5768 mips_elf_check_mips16_stubs, _bfd_mips_elf_gprel16_with_gp,
5769 _bfd_mips_elf_hi16_reloc, _bfd_mips_elf_generic_reloc,
5770 mips_elf_global_got_index, mips_elf_multi_got,
5771 mips_elf_create_compact_rel_section, mips_elf_calculate_relocation,
5772 mips_elf_allocate_dynamic_relocations,
5773 mips_elf_create_dynamic_relocation, _bfd_mips_elf_fake_sections,
5774 _bfd_mips_relax_section, _bfd_mips_elf_adjust_dynamic_symbol,
5775 _bfd_mips_elf_always_size_sections,
5776 _bfd_mips_elf_size_dynamic_sections,
5777 _bfd_mips_elf_finish_dynamic_symbol,
5778 _bfd_mips_elf_finish_dynamic_sections,
5779 _bfd_mips_elf_modify_segment_map, _bfd_mips_elf_discard_info,
5780 _bfd_mips_elf_write_section, _bfd_mips_elf_set_section_contents,
5781 _bfd_elf_mips_get_relocated_section_contents,
5782 _bfd_mips_elf_final_link, _bfd_mips_elf_merge_private_bfd_data): ..
5783 * hp300hpux.c (callback): ..
5784 * hppabsd-core.c (make_bfd_asection): ..
5785 * hpux-core.c (make_bfd_asection): ..
5786 * i386linux.c (linux_link_create_dynamic_sections,
5787 bfd_i386linux_size_dynamic_sections, linux_finish_dynamic_link): ..
5788 * i386msdos.c (msdos_write_object_contents): ..
5789 * i386os9k.c (os9k_callback, os9k_write_object_contents,
5790 os9k_set_section_contents): ..
5791 * ieee.c (parse_expression, ieee_slurp_external_symbols,
5792 ieee_slurp_sections, ieee_slurp_debug, ieee_slurp_section_data,
5793 ieee_write_section_part, do_with_relocs, do_as_repeat,
5794 do_without_relocs, ieee_write_debug_part, init_for_output,
5795 ieee_set_section_contents): ..
5796 * ihex.c (ihex_scan, ihex_read_section, ihex_get_section_contents): ..
5797 * irix-core.c (do_sections, make_bfd_asection): ..
5798 * libaout.h (aout_section_merge_with_text_p): ..
5799 * libbfd.c (_bfd_generic_get_section_contents,
5800 _bfd_generic_get_section_contents_in_window): ..
5801 * linker.c (default_indirect_link_order): ..
5802 * lynx-core.c (make_bfd_asection): ..
5803 * m68klinux.c (linux_link_create_dynamic_sections,
5804 bfd_m68klinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5805 * mach-o.c (bfd_mach_o_make_bfd_section,
5806 bfd_mach_o_scan_read_dylinker, bfd_mach_o_scan_read_dylib,
5807 bfd_mach_o_scan_read_thread, bfd_mach_o_scan_read_symtab,
5808 bfd_mach_o_scan_read_segment): ..
5809 * merge.c (_bfd_add_merge_section, record_section, merge_strings,
5810 _bfd_merge_sections): ..
5811 * mmo.c (mmo_find_sec_w_addr, mmo_get_spec_section, mmo_get_loc,
5812 mmo_map_set_sizes, mmo_canonicalize_symtab,
5813 mmo_internal_write_section, mmo_write_object_contents): ..
5814 * netbsd-core.c (netbsd_core_file_p): ..
5815 * nlm32-alpha.c (nlm_alpha_read_reloc, nlm_alpha_write_import,
5816 nlm_alpha_set_public_section): ..
5817 * nlm32-ppc.c (nlm_powerpc_read_reloc, nlm_powerpc_write_reloc): ..
5818 * nlm32-sparc.c (nlm_sparc_write_import): ..
5819 * nlmcode.h (add_bfd_section, nlm_swap_auxiliary_headers_in,
5820 nlm_compute_section_file_positions): ..
5821 * oasys.c (oasys_object_p, oasys_slurp_section_data,
5822 oasys_write_sections, oasys_write_data, oasys_set_section_contents): ..
5823 * opncls.c (get_debug_link_info): ..
5824 * osf-core.c (make_bfd_asection): ..
5825 * pdp11.c (some_aout_object_p, adjust_o_magic, adjust_z_magic,
5826 adjust_n_magic, adjust_sizes_and_vmas, squirt_out_relocs,
5827 final_link, aout_link_input_section): ..
5828 * peXXigen.c (_bfd_XXi_swap_sym_in, _bfd_XXi_swap_aouthdr_out,
5829 pe_print_idata, pe_print_edata, pe_print_pdata, pe_print_reloc): ..
5830 * pef.c (bfd_pef_make_bfd_section, bfd_pef_print_loader_section,
5831 bfd_pef_scan_start_address, bfd_pef_parse_symbols): ..
5832 * ppcboot.c (ppcboot_object_p, ppcboot_canonicalize_symtab): ..
5833 * ptrace-core.c (ptrace_unix_core_file_p): ..
5834 * reloc.c (bfd_perform_relocation, bfd_install_relocation,
5835 _bfd_final_link_relocate, bfd_generic_relax_section,
5836 bfd_generic_get_relocated_section_contents): ..
5837 * reloc16.c (bfd_coff_reloc16_relax_section,
5838 bfd_coff_reloc16_get_relocated_section_c): ..
5839 * riscix.c (riscix_some_aout_object_p): ..
5840 * rs6000-core.c (read_hdr, make_bfd_asection): ..
5841 * sco5-core.c (make_bfd_asection): ..
5842 * simple.c (bfd_simple_get_relocated_section_contents): ..
5843 * som.c (som_object_setup, setup_sections, som_prep_headers,
5844 som_write_fixups, som_begin_writing, bfd_section_from_som_symbol,
5845 som_set_reloc_info, som_get_section_contents,
5846 som_bfd_link_split_section): ..
5847 * sparclinux.c (linux_link_create_dynamic_sections,
5848 bfd_sparclinux_size_dynamic_sections, linux_finish_dynamic_link): ..
5849 * srec.c (srec_scan, srec_read_section, srec_get_section_contents): ..
5850 * stabs.c (_bfd_link_section_stabs, _bfd_discard_section_stabs,
5851 _bfd_write_stab_strings, _bfd_stab_section_offset): ..
5852 * sunos.c (sunos_read_dynamic_info, sunos_create_dynamic_sections,
5853 bfd_sunos_size_dynamic_sections, sunos_scan_std_relocs,
5854 sunos_scan_ext_relocs, sunos_scan_dynamic_symbol,
5855 sunos_write_dynamic_symbol, sunos_check_dynamic_reloc,
5856 sunos_finish_dynamic_link): ..
5857 * syms.c (_bfd_stab_section_find_nearest_line): ..
5858 * tekhex.c (first_phase, tekhex_set_section_contents,
5859 tekhex_write_object_contents): ..
5860 * trad-core.c (trad_unix_core_file_p): ..
5861 * versados.c (process_esd, process_otr, process_otr): ..
5862 * vms-gsd.c (_bfd_vms_slurp_gsd, _bfd_vms_write_gsd): ..
5863 * vms-misc.c (add_new_contents): ..
5864 * vms-tir.c (check_section, new_section, _bfd_vms_write_tir): ..
5865 * vms.c (vms_set_section_contents): ..
5866 * xcofflink.c (xcoff_get_section_contents, xcoff_link_add_symbols,
5867 xcoff_sweep, bfd_xcoff_size_dynamic_sections, xcoff_build_ldsyms,
5868 _bfd_xcoff_bfd_final_link, xcoff_link_input_bfd): ..
5869 * xsym.c (bfd_sym_scan): .. See above.
5870
bf8b15af
L
58712004-06-21 H.J. Lu <hongjiu.lu@intel.com>
5872
5873 * elfxx-ia64.c (elfNN_ia64_relax_section): Add addend when
5874 calling _bfd_merged_section_offset only for section symbols.
5875
d1c6de6f
AM
58762004-06-22 Alan Modra <amodra@bigpond.net.au>
5877
5878 * elf32-ppc.c (ppc_elf_relax_section): Implement reference code
5879 for handling SEC_MERGE symbols in relax_section.
5880
aa02cc63
AO
58812004-06-21 Alexandre Oliva <aoliva@redhat.com>
5882
5883 2003-05-15 Richard Sandiford <rsandifo@redhat.com>
5884 * cpu-h8300.c (compatible): Allow h8300s and h8300sx code to be
5885 linked together. Mark the result as h8300sx code.
5886
aee6f5b4
AO
58872004-06-21 Alexandre Oliva <aoliva@redhat.com>
5888
5889 * elf-bfd.h (struct elf_backend_data): Added
5890 elf_backend_omit_section_dynsym.
5891 (_bfd_elf_link_omit_section_dynsym): Declare.
5892 * elf32-frv.c (_frvfdpic_link_omit_section_dynsym): New.
5893 (elf_backend_omit_section_dynsym): Use it for frvfdpic.
5894 * elflink.c (_bfd_elf_link_omit_section_dynsym): Split out of...
5895 (_bfd_elf_link_renumber_dynsyms): ... this function.
5896 * elfxx-target.h (elf_backend_omit_section_dynsym): Default to
5897 _bfd_elf_link_omit_section_dynsym).
5898 (elfNN_bed): Added elf_backend_omit_section_dynsym.
5899
05576f10
NC
59002004-06-21 Nick Clifton <nickc@redhat.com>
5901
5902 * coffcode.h (styp_to_sec_flags): Ignore IMAGE_SCN_MEM_NOT_PAGED
5903 flags.
5904
02d5a37b
JG
59052004-06-17 Jerome Guitton <guitton@gnat.com>
5906
5907 * bfd-in.h (bfd_cache_close_all): New function declaration.
5908 * bfd-in2.h: Regenerate.
5909 * cache.c (bfd_cache_close_all): New function definition.
5910
d2bef492
MK
59112004-06-16 Mark Kettenis <kettenis@gnu.org>
5912
5913 * configure.in: Don't set COREFILE to trad-core.lo for FreeBSD
5914 4.10 and beyond.
5915 * configure: Regenerate.
5916
8528d62e
DJ
59172004-06-16 Daniel Jacobowitz <dan@debian.org>
5918
5919 * elf32-ppc.c (ppc_elf_create_linker_section): Create symbols in
5920 the pre-existing section.
5921
911d08a7
AM
59222004-06-15 Alan Modra <amodra@bigpond.net.au>
5923
5924 * section.c (struct sec): Remove usused flags. Reorganize a little.
5925 (bfd_get_section_size_before_reloc): Delete.
5926 (bfd_get_section_size_after_reloc): Delete.
5927 (STD_SECTION): Update.
5928 (bfd_get_section_size_now): Delete.
5929 (bfd_set_section_contents): Don't referece reloc_done.
5930 (bfd_get_section_contents): Remove reloc_done comment.
5931 * bout.c (b_out_bfd_get_relocated_section_contents): Don't set
5932 reloc_done.
5933 * coff-alpha.c (alpha_ecoff_get_relocated_section_contents): Likewise.
5934 * ecoff.c (bfd_debug_section): Update initializer.
5935 * elfxx-mips.c (_bfd_elf_mips_get_relocated_section_contents): Ditto.
5936 * reloc.c (bfd_generic_get_relocated_section_contents): Likewise.
5937 * bfd-in.h (bfd_section_size): Expand.
5938 (bfd_get_section_size): New macro.
5939 * bfd-in2.h: Regenerate.
5940 * coff64-rs6000.c (xcoff64_write_object_contents): Replace
5941 bfd_get_section_size_before_reloc with bfd_get_section_size.
5942 * coffcode.h (coff_write_object_contents): Likewise.
5943 * coffgen.c (build_debug_section): Likewise.
5944 * dwarf1.c (parse_line_table): Likewise.
5945 (_bfd_dwarf1_find_nearest_line): Likewise.
5946 * ecoff.c (_bfd_ecoff_write_object_contents): Likewise.
5947 * i386msdos.c (msdos_write_object_contents): Likewise.
5948 * pdp11.c (squirt_out_relocs): Likewise.
5949 * elf32-sh64.c (sh64_find_section_for_address): Remove comment.
5950 * elf64-mmix.c (mmix_elf_final_link): Update comment.
5951
092dcd75
CD
59522004-06-14 Chris Demetriou <cgd@broadcom.com>
5953
5954 * elf32-mips.c (elf_mips_gnu_pcrel32): Add (undoing 2004-04-24
5955 removal) with updated comment.
5956 (bfd_elf32_bfd_reloc_type_lookup): Add back case for
5957 BFD_RELOC_32_PCREL.
5958 (mips_elf32_rtype_to_howto): Add back case for R_MIPS_PC32.
5959 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
5960
3ffa5234
AM
59612004-06-12 Alan Modra <amodra@bigpond.net.au>
5962
5963 * elf64-x86-64.c (elf64_x86_64_relocate_section): Ignore reloc
5964 overflow on branches to undefweaks.
5965
e9edc808
MR
59662004-06-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5967
5968 * coff-alpha.c (alpha_relocate_section): Set used_by_bfd directly
5969 as ecoff_section_data() does not return a valid lvalue.
5970
a873f25a
AO
59712004-06-09 Alexandre Oliva <aoliva@redhat.com>
5972
a9b881be
AO
5973 * elflink.c (elf_sort_symbol): Compare section id, not pointers.
5974 (elf_link_add_object_symbols): Likewise.
5975
a873f25a
AO
5976 * elf-m10300.c (_bfd_mn10300_elf_reloc_type_class): New.
5977 (elf_backend_reloc_type_class): New.
5978
eef0f186
MK
59792004-06-08 Mark Kettenis <kettenis@gnu.org>
5980
5981 * configure.in (hppa*-*-netbsd*, hppa*-*-openbsd): Set COREFILE to
5982 netbsd-core.lo.
5983 * configure: Regenerate.
5984
822392ce
DJ
59852004-06-07 Daniel Jacobowitz <dan@debian.org>
5986
5987 From: Albert Chin-A-Young <china@thewrittenword.com>
5988 * bfd/elf-bfd.h (struct eh_cie_fde): Convert unsigned char bitfields
5989 to unsigned int.
5990
9f2e92c5
L
59912004-05-29 H.J. Lu <hongjiu.lu@intel.com>
5992
5993 * elfxx-ia64.c (elfNN_ia64_relax_section): Undo the last
5994 change.
5995
dd90f1b2
DD
59962004-05-28 DJ Delorie <dj@redhat.com>
5997
5998 * elf-m10300.c (mn10300_elf_relax_section): Preserve reloc addend
5999 for linking, but otherwise adjust reloc for merged sections.
6000
5dd23ec1
L
60012004-05-28 H.J. Lu <hongjiu.lu@intel.com>
6002
6003 * elfxx-ia64.c (elfNN_ia64_relax_section): Properly call
6004 _bfd_merged_section_offset for local symbols.
6005
f6f9408f
JR
60062004-05-28 Andrew Stubbs <andrew.stubbs@superh.com>
6007
6008 * Makefile.am: Regenerate dependencies.
6009 * Makefile.in: Regenerate.
6010 * archures.c: Add bfd_mach_sh3_nommu .
6011 * bfd-in2.h: Regenerate.
6012 * cpu-sh.c: Add sh3-nommu architecture.
6013 (bfd_to_arch_table): Create new table.
6014 (sh_get_arch_from_bfd_mach): Create new function.
6015 (sh_get_arch_up_from_bfd_mach): Create new function.
6016 (sh_merge_bfd_arch): Create new function.
6017 * elf32-sh.c (sh_ef_bfd_table): Add table.
6018 (sh_elf_check_relocs): Replace switch statement with
6019 use of sh_ef_bfd_table .
6020 (sh_elf_get_flags_from_mach): Add new function.
6021 (sh_find_elf_flags): Likewise.
6022 (sh_elf_copy_private_data): Replace most of non-elf contents
6023 with a call to sh_merge_bfd_arch() .
6024
d866f350
MC
60252004-05-27 Michael Chastain <mec.gnu@mindspring.com>
6026
6027 * Makefile.am (bfdver.h): Use explicit filename, not $< .
6028 * Makefile.in: Regenerate.
6029
1055df0f
AO
60302004-05-27 Alexandre Oliva <aoliva@redhat.com>
6031
6032 * elf-m10300.c (elf32_mn10300_finish_hash_table_entry): Avoid
6033 custom calling conventions for dynamic symbols.
6034 (mn10300_elf_relax_section): Avoid relaxing a function as a local
6035 symbol if it's an alias to a global one.
6036
b3096250
L
60372004-05-26 H.J. Lu <hongjiu.lu@intel.com>
6038
6039 * elf.c (_bfd_elf_make_section_from_shdr): Undo the last
6040 change.
6041
9bb351fd
AO
60422004-05-27 Alexandre Oliva <aoliva@redhat.com>
6043
6044 * elf-m10300.c (mn10300_elf_relax_section): Don't test isym within
6045 loop over hashes.
6046
e49f5022
AM
60472004-05-26 Alan Modra <amodra@bigpond.net.au>
6048
6049 * elf.c (_bfd_elf_make_section_from_shdr): Don't set SEC_EXCLUDE
6050 for SHT_GROUP sections.
6051
57ceae94
AM
60522004-05-25 Alan Modra <amodra@bigpond.net.au>
6053
6054 * elflink.c (elf_link_add_object_symbols): Don't set up merge
6055 section data here..
6056 * elf.c (_bfd_elf_merge_sections): .. Do it here instead.
6057 * merge.c: Formatting. Remove unnecessary casts. Expand
6058 bfd_get_section_alignment macro.
6059 (struct sec_merge_sec_info): Rename "first" to "first_str". Update
6060 use throughout file.
6061 (_bfd_add_merge_section): Rename from _bfd_merge_section. Update
6062 comment. Abort on dynamic or non-SEC_MERGE input. Don't test
6063 section name to determine sinfo group, instead test output section
6064 and alignment.
6065 (_bfd_merge_sections): Add struct bfd_link_info param. Call
6066 _bfd_strip_section_from_output rather than just twiddling flags.
6067 * libbfd-in.h (_bfd_add_merge_section): Rename, update comment.
6068 (_bfd_merge_sections): Update prototype.
6069 * libbfd.h: Regenerate.
6070
c6f8758f 60712004-05-24 Mark Kettenis <kettenis@gnu.org>
d34436e8
MK
6072
6073 * netbsd-core.c: Correctly indent section that sets architecture
6074 from machine ID.
6075
c6f8758f
NC
6076 From Miod Vallat <miod@online.fr>:
6077 * m88kopenbsd.c: New file.
6078 * targets.c (m88k_openbsd_vec): New.
6079 * config.bfd: Add m88k-*-openbsd*.
6080 * configure.in (m88k-*-openbsd*): Set COREFILE to netbsd-core.lo.
6081 (m88kopenbsd_vec): New.
6082 * configure: Regenerate.
6083 * Makefile.am (BFD32_BACKENDS): Add m88kopenbsd.lo.
6084 (BFD32_BACKENDS_CFILES): Add m88kopenbsd.c.
6085 Run "make dep-am".
6086 * Makefile.in: Regenerate.
6087 * po/SRC-POTFILES.in: Regenerate.
6088
7d7e6bc4
NC
60892004-05-24 Nick Clifton <nickc@redhat.com>
6090
6091 * hash.c: Remove bogus node "Changing the default Hash Table Size"
6092 introduced by hash table size patch.
6093
bc286f95
BE
60942004-05-22 Ben Elliston <bje@au.ibm.com>
6095
6096 * configure.in (is_release): Remove.
6097 (bfd_version_date, bfd_version, bfd_version_string): Likewise.
6098 (AC_OUTPUT): Don't output bfdver.h from version.h.
6099 * configure: Regenerate.
6100 * Makefile.am (RELEASE): New variable.
6101 (bfdver.h): New target.
6102 * Makefile.in: Regenerate.
6103 * doc/Makefile.in: Likewise.
6104
8b89a4eb
BE
61052004-05-22 Ben Elliston <bje@au.ibm.com>
6106
6107 * Makefile.am (config.status): Don't depend on version.h.
6108 * Makefile.in: Regenerate.
6109
753731ee
AM
61102004-05-22 Alan Modra <amodra@bigpond.net.au>
6111
6112 * merge.c (_bfd_merged_section_offset): Remove "addend" param.
6113 * libbfd-in.h (_bfd_merged_section_offset): Adjust prototype.
6114 * libbfd.h: Regenerate.
6115 * elf.c (_bfd_elf_rela_local_sym): Adjust call.
6116 (_bfd_elf_rel_local_sym): Likewise.
6117 * elflink.c (_bfd_elf_link_sec_merge_syms): Likewise.
6118 (elf_link_input_bfd): Likewise.
6119 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
6120 * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
6121 * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
6122 (elfNN_ia64_relocate_section): Likewise.
6123
2d643429
NC
61242004-05-21 Andy Chittenden <achittenden@bluearc.com>
6125
6126 * hash.c (bfd_default_hash_table_size): New variable.
6127 (bfd_hash_table_init): Use new variable instead of DEFAULT_SIZE.
6128 (bfd_hash_set_default_size): New function. Set the default size
6129 to a selected prime number close to the argument. Document new
6130 function.
6131 * bfd-in.h: Add prototype for bfd_hash_set_default_size.
6132 * bfd-in2.h: Regenerate.
6133 * Makefile.am (hash.lo): Add dependency upon libiberty.h.
6134 * Makefile.in: Regenerate.
6135
8377c19c
MK
61362004-05-21 Mark Kettenis <kettenis@gnu.org>
6137
6138 * libaout.h (machine_type): Add M_88K_OPENBSD and M_HPPA_OPENBSD.
6139 * netbsd-core.c (netbsd_core_file_p): Set architecture for alpha,
6140 arm, m68k, m88k and hppa core files.
6141
69fd4758
NC
61422004-05-21 Nick Clifton <nickc@redhat.com>
6143
6144 * bfdio.c (bfd_bread): Do not use iovec if it is NULL.
6145 (bfd_bwrite): Likewise.
6146 (bfd_tell): Likewise.
6147 (bfd_flush): Likewise.
6148 (bfd_stat): Likewise.
6149 (bfd_seek): Likewise.
6150 (bfd_get_mtime): Likewise.
6151 (bfd_get_size): Likewise.
6152
cd917290
BE
61532004-05-19 Ben Elliston <bje@au.ibm.com>
6154
6155 * dwarf2.c (_bfd_dwarf2_find_nearest_line): Comment correction.
6156
1b09e940
NC
61572004-05-19 Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
6158
6159 * archive.c (_bfd_get_elt_at_filepos): Cope with a nested archives.
6160 (bfd_generic_openr_next_archived_file): Likewise.
6161
096c35a7
BW
61622004-05-17 Bob Wilson <bob.wilson@acm.org>
6163
6164 * elf32-xtensa.c (xtensa_get_property_section_name): Determine linkonce
6165 section names by inserting a new substring after .gnu.linkonce, except
6166 for .gnu.linkonce.t.* where the "t." is replaced.
6167
eea6121a 61682004-05-17 Adam Nemet <anemet@lnxw.com>
b2d65c0b
NC
6169
6170 * config.bfd (sparc-*-lynxos* case): Add to obsolete list.
6171 (m68-*-lynxos* case): Likewise.
6172 (powerpc-*-lyxnos* case): New case.
6173 (i[3-7]86-*-lynxos* case): Update to LynxOS 4.0 ELF.
6174
80fccad2
BW
61752004-05-17 David Heine <dlheine@tensilica.com>
6176
6177 * aout-target.h (MY_bfd_copy_private_header_data): Define.
6178 * aout-tic30.c (MY_bfd_copy_private_header_data): Define.
6179 * bfd.c (bfd_copy_private_header_data): Define.
6180 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Add entries for new
6181 interface.
6182 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Likewise.
6183 * coffcode.h (coff_bfd_copy_private_header_data): Define.
6184 * elf-bfd.h (_bfd_elf_copy_private_header_data): Declare.
6185 * elf.c (_bfd_elf_copy_private_section_data): Remove code to set up
6186 segments by calling copy_private_bfd_data.
6187 (_bfd_elf_copy_private_header_data): Define.
6188 * elfxx-target.h (bfd_elfNN_bfd_copy_private_header_data): Define.
6189 * libbfd-in.h (_bfd_generic_bfd_copy_private_header_data): Define.
6190 * libecoff.h (_bfd_ecoff_bfd_copy_private_header_data): Define.
6191 * mach-o.c (bfd_mach_o_bfd_copy_private_header_data): Define.
6192 * mmo.c (mmo_bfd_copy_private_header_data): Define.
6193 * ppcboot.c (ppcboot_bfd_copy_private_header_data): Define.
6194 * som.c (som_bfd_copy_private_header_data): Define.
6195 * targets.c (BFD_JUMP_TABLE_COPY): Add _bfd_copy_private_header_data.
6196 * vms.c (vms_bfd_copy_private_header_data): Define.
6197 * bfd-in2.h: Regenerate.
6198 * libbfd.h: Regenerate.
6199
c5ae1840
TS
62002004-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6201
6202 * elfxx-mips.c (MINUS_TWO): Define.
6203 (mips_elf_higher, mips_elf_highest,
6204 mips_elf_create_dynamic_relocation): Use MINUS_ONE and MINUS_TWO for
6205 some bfd_vma values.
6206 (_bfd_mips_elf_finish_dynamic_symbol): Likewise. Code cleanup.
6207
a99cf92b
DA
62082004-05-14 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6209
6210 * som.c (log2): Rename to exact_log2. Adjust all callers.
6211
0da76f83
NC
62122004-05-13 Paul Brook <paul@codesourcery.com>
6213
c273895f 6214 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Handle
336b9722
NC
6215 dwarf3 format CIE entries. Remove comment about the size of the
6216 ra_column field. It is now correctly deduced.
0da76f83 6217
4b363073
NC
62182004-05-13 Joel Sherrill <joel@oarcorp.com>
6219
6220 * config.bfd (or32-*-rtems*): Switch to elf.
6221
9598fbe5
NC
62222004-05-13 Nick Clifton <nickc@redhat.com>
6223
6224 * po/fr.po: Updated French translation.
6225
8c37241b
JJ
62262004-05-11 Jakub Jelinek <jakub@redhat.com>
6227
0306b3bf 6228 * elflink.c (bfd_elf_final_link): Don't output STT_SECTION symbol
8c37241b
JJ
6229 into .dynsym if elf_section_data (sec)->dynindx <= 0.
6230 Adjust counting of last_local.
6231 (_bfd_elf_link_renumber_dynsyms): Don't assign dynindx to sections
6232 other than SHT_PROGBITS/SHT_NOBITS and neither for .got/.got.plt/.plt
6233 created by the linker nor !SHF_ALLOC.
6234
6235 * elf32-i386.c (elf_i386_finish_dynamic_sections): Point
6236 DT_PLTGOT to the start of the .got.plt section instead of the
6237 .got output section. Set sh_entsize for .got section in addition
6238 to .got.plt.
6239 (elf_i386_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6240 is at sgot->output_section->vma.
6241 * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Point
6242 DT_PLTGOT to the start of the .got.plt section instead of the
6243 .got output section.
6244 (elf64_x86_64_relocate_section): Don't assume _GLOBAL_OFFSET_TABLE_
6245 is at sgot->output_section->vma. Set sh_entsize for .got section
6246 in addition to .got.plt.
6247 * elf.c (_bfd_elf_print_private_bfd_data): Handle PT_GNU_RELRO.
6248 (bfd_section_from_phdr): Likewise.
6249 (map_sections_to_segments): Likewise.
6250 (assign_file_positions_for_segments): Likewise.
6251 (get_program_header_size): Likewise.
6252 * elflink.c (bfd_elf_size_dynamic_sections): Set
6253 elf_tdata (output_bfd)->relro from info->relro.
6254 * elf-bfd.h (struct elf_obj_tdata): Add relro field.
6255
3f980e41
AO
62562004-05-08 Alexandre Oliva <aoliva@redhat.com>
6257
6258 * elf32-frv.c (_frvfdpic_add_dyn_reloc): Don't warn when we get
6259 a zero symndx for which we hadn't accounted a dynamic relocation.
6260 (_frvfdpic_add_rofixup): Likewise.
6261
d70270c5 62622004-05-07 Brian Ford <ford@vss.fsi.com>
eea6121a 6263 DJ Delorie <dj@redhat.com>
d70270c5
BF
6264
6265 * coffcode.h (coff_write_object_contents) [COFF_IMAGE_WITH_PE]:
6266 Propagate IMAGE_FILE_LARGE_ADDRESS_AWARE.
6267 * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Recognize
6268 IMAGE_FILE_LARGE_ADDRESS_AWARE. Use PE defines.
6269
7e9f3bd6
AO
62702004-05-07 Alexandre Oliva <aoliva@redhat.com>
6271
6272 * elf32-frv.c (elf32_frvfdpic_modify_segment_map): Return
6273 immediately if there's no link info.
6274 (elf32_frvfdpic_copy_private_bfd_data): New.
6275 (bfd_elf32_bfd_copy_private_bfd_data): Use it for frvfdpic.
6276
eb61d2d6
ZW
62772004-05-06 Zack Weinberg <zack@codesourcery.com>
6278
6279 * dwarf2.c (add_line_info): Also set info->filename to NULL if
6280 filename argument is null; do not call strlen on a null pointer.
6281
ecb2d096
DJ
62822004-05-06 Daniel Jacobowitz <drow@mvista.com>
6283
6284 * elf32-arm.h (elf32_arm_relocate_section): Remove R_ARM_PLT32
6285 special case.
6286
43850d5b
AO
62872004-05-05 Alexandre Oliva <aoliva@redhat.com>
6288
6289 * configure.in (bfd_elf32_frvfdpic_vec): New.
6290 * configure: Rebuilt.
6291 * targets.c (bfd_elf32_frvfdpic_vec): New.
6292 * config.bfd: Enable it on frv-*-elf and frv-*-*linux*, as default
6293 on the latter.
6294 * elf32-frv.c: Prefix all identifiers added for FDPIC support with
6295 frvfdpic instead of frv. Rearrange elf-target macros such that
6296 the FDPIC-specific ones are only defined for this new target
6297 vector.
6298 (bfd_elf32_frvfdpic_vec): Declare.
6299 (IS_FDPIC): New.
6300 (elf32_frv_relocate_section): Use it to enable segment checking
6301 and to control rofixup emission. Add output section vma to
6302 applied relocation in non-LOAD non-ALLOC sections. Use
6303 _bfd_error_handler for errors.
6304 (_frv_create_got_section): Create .rel.got and .rofixup only in
6305 FDPIC. Create non-dynamic _gp at .got+2048 in non-FDPIC, like the
6306 linker script.
6307 (elf32_frvfdpic_size_dynamic_sections): Assume FDPIC.
6308 (elf32_frvfdpic_modify_segment_map): Likewise.
6309 (elf32_frv_finish_dynamic_sections): New, do-nothing.
6310 (elf32_frvfdpic_finish_dynamic_sections): Assume FDPIC. Improve
6311 error message if we miscompute the rofixup size.
6312 (frvfdpic_elf_use_relative_eh_frame): Assume FDPIC.
6313 (frvfdpic_elf_encode_eh_address): Likewise.
6314 (elf32_frv_check_relocs): Reject FDPIC-only relocs in non-FDPIC.
6315 Record relocs only in FDPIC. Make sure _gp is defined for GPREL
6316 relocs. Reject unknown relocation types.
6317 (elf32_frv_object_p): Make sure target vector matches FDPIC bits.
6318 (frv_elf_merge_private_bfd_data): Likewise.
6319 (ELF_MAXPAGESIZE): Revert to 0x1000 for elf32-frv; keep it as
6320 0x4000 for newly-added elf32-frvfdpic.
6321
06fc8a8c
NC
63222004-05-05 Nick Clifton <nickc@redhat.com>
6323
6324 PR/136
6325 * cache.c (bfd_cache_lookup_worker): Call abort() rather than
6326 returning NULL as most users of this function do not check its
6327 return value.
33216455
NC
6328 * hppabsd-core.c (hppabsd_core_core_file_p): Do not check result
6329 of bfd_cache_lookup().
6330 * sco5-core.c (sco5_core_file_p): Likewise.
6331 * trad-core.c (trad_unix_core_file_p): Likewise.
06fc8a8c
NC
6332
63332004-05-05 Nick Clifton <nickc@redhat.com>
6334
6335 * cache.c (bfd_cache_lookup): Improve formatting.
6336 * archive.c: Fix formatting.
6337
6b6e92f4
NC
63382004-05-05 Peter Barada <peter@the-baradas.com>
6339
6340 * bfd_archures.c(bfd_architecture): Add 521x,5249,547x,548x.
6341 * cpu-m68k.c(bfd_m68k_arch): Likewise.
6342 * bfd-in2.h(bfd_architecture): Regenerate.
6343
6a8d1586
AM
63442004-05-03 Alan Modra <amodra@bigpond.net.au>
6345
6346 * elf.c (_bfd_elf_rela_local_sym): Set kept_section for excluded
6347 SEC_MERGE sections.
6348 * elflink.c (elf_link_input_bfd): Adjust output reloc index for
6349 those against discarded link-once and SEC_MERGE section symbols.
6350
fafe6678
L
63512004-05-02 H.J. Lu <hongjiu.lu@intel.com>
6352
6353 * section.c (bfd_get_section_by_name_if): New.
6354 * bfd-in2.h: Regenerated.
6355
ad7b9a36
AM
63562004-05-02 Alan Modra <amodra@bigpond.net.au>
6357
6358 * som.c (som_bfd_is_group_section): Define.
6359
73499ab8
AM
63602004-05-01 Alan Modra <amodra@bigpond.net.au>
6361
6362 * section.c (bfd_make_section_anyway): Copy the whole
6363 bfd_hash_entry, not just "next" from existing entry.
6364
45c5e9ed
L
63652004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6366
6367 * elf.c (bfd_section_from_shdr): Maintain the section order in
6368 a section group.
6369 (special_sections): Add ".note.GNU-stack".
6370 (elf_fake_sections): Handle section group for relocatable
6371 link..
6372
bc87dd2e
L
63732004-04-30 H.J. Lu <hongjiu.lu@intel.com>
6374
6375 * section.c (bfd_sections_find_if): New.
6376 * bfd-in2.h: Regenerated.
6377
72adc230
AM
63782004-04-30 Alan Modra <amodra@bigpond.net.au>
6379
6380 * section.c (bfd_make_section_anyway): Add all sections to hash tab.
6381
6382 * elf-bfd.h (bfd_elf_is_group_section): Declare.
6383 * elf.c (bfd_elf_is_group_section): New function.
6384 * elfxx-target.h (bfd_elfNN_bfd_is_group_section
6385 * section.c (bfd_generic_is_group_section): New function.
6386 * targets.c (struct bfd_target): Add _bfd_is_group_section field.
6387 (BFD_JUMP_TABLE_LINK): Adjust.
6388 * aout-adobe.c (aout_32_bfd_is_group_section): Define.
6389 * aout-target.h (MY_bfd_is_group_section): Define.
6390 * aout-tic30.c (MY_bfd_is_group_section): Define.
6391 * bfd.c (bfd_is_group_section): Define.
6392 * binary.c (binary_bfd_is_group_section): Define.
6393 * bout.c (b_out_bfd_is_group_section): Define.
6394 * coff-alpha.c (_bfd_ecoff_bfd_is_group_section): Define.
6395 * coff-mips.c (_bfd_ecoff_bfd_is_group_section): Define.
6396 * coff-rs6000.c (rs6000coff_vec, pmac_xcoff_vec): Adjust.
6397 * coff64-rs6000.c (rs6000coff64_vec, aix5coff64_vec): Adjust.
6398 * coffcode.h (coff_bfd_is_group_section): Define.
6399 * i386msdos.c (msdos_bfd_is_group_section): Define.
6400 * i386os9k.c (os9k_bfd_is_group_section): Define.
6401 * ieee.c (ieee_bfd_is_group_section): Define.
6402 * ihex.c (ihex_bfd_is_group_section): Define.
6403 * libbfd-in.h (_bfd_nolink_bfd_is_group_section): Define.
6404 * mach-o.c (bfd_mach_o_bfd_is_group_section): Define.
6405 * mmo.c (mmo_bfd_is_group_section): Define.
6406 * nlm-target.h (nlm_bfd_is_group_section): Define.
6407 * oasys.c (oasys_bfd_is_group_section): Define.
6408 * pef.c (bfd_pef_bfd_is_group_section): Define.
6409 * ppcboot.c (ppcboot_bfd_is_group_section): Define.
6410 * srec.c (srec_bfd_is_group_section): Define.
6411 * tekhex.c (tekhex_bfd_is_group_section): Define.
6412 * versados.c (versados_bfd_is_group_section): Define.
6413 * vms.c (vms_bfd_is_group_section): Define.
6414 * xsym.c (bfd_sym_bfd_is_group_section): Define.
6415 * bfd-in2.h: Regenerate.
6416 * libbfd.h: Regenerate.
6417
20f0a1ad
AM
64182004-04-30 Alan Modra <amodra@bigpond.net.au>
6419
6420 * elflink.c (elf_gc_mark): Follow indirect and warning syms.
6421
f7458fc9 64222004-04-30 Hans-Peter Nilsson <hp@axis.com>
7dfb3b6b
HPN
6423
6424 * configure.in: Update version to 2.15.91.
6425 * configure: Regenerate.
6426
8a7140c3
NC
64272004-04-29 Brian Ford <ford@vss.fsi.com>
6428
6429 * bfd.c (bfd_get_sign_extend_vma): Add pe[i]-i386 case to DJGPP hack.
6430 * coffcode.h (DOT_DEBUG, GNU_LINKONCE_WI): Define.
6431 [!COFF_WITH_PE] (sec_to_styp_flags, styp_to_sec_flags): Use them.
6432 (coff_compute_section_file_positions) [RS6000COFF_C]: Likewise.
6433 [COFF_WITH_PE] (sec_to_styp_flags): Handle DWARF 2/3 .debug* and
6434 .gnu.linkonce.wi. sections.
6435 * pe-i386.c (COFF_SUPPORT_GNU_LINKONCE): Define.
6436 (COFF_SECTION_ALIGNMENT_ENTRIES): Add entries for .debug and
6437 .gnu.linkonce.wi..
6438 * pei-i386.c (COFF_SUPPORT_GNU_LINKONCE): Likewise.
6439 (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
6440
3e722fb5
CD
64412004-04-28 Chris Demetriou <cgd@broadcom.com>
6442
6443 * reloc.c: Remove BFD_RELOC_PCREL_HI16_S and BFD_RELOC_PCREL_LO16.
6444 * bfd-in2.h: Regenerate.
6445 * libbfd.h: Likewise.
6446
351e2b5a
DA
64472004-04-28 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6448
6449 * som.c (struct som_misc_symbol_info): Add is_comdat, is_common and
6450 dup_common fields.
6451 (setup_sections): Use som_subspace_dictionary_record struct instead
6452 subspace_dictionary_record. Set SEC_LINK_ONCE if subspace is
6453 is_comdat, is_common or dup_common.
6454 (som_prep_headers): Use som_subspace_dictionary_record struct. Set
6455 is_comdat, is_common and dup_common in section subspace_dict from
6456 copy_data.
6457 (som_begin_writing): Use som_subspace_dictionary_record struct.
6458 (som_finish_writing): Likewise.
6459 (som_bfd_derive_misc_symbol_info): Add support to set is_comdat,
6460 is_common and dup_common flags in info for symbol. Add comment
6461 regarding linker support for these fields. Slightly reorganize
6462 function.
6463 (som_build_and_write_symbol_table): Set is_comdat, is_common and
6464 dup_common fields in symbol table from symbol info.
6465 (bfd_som_set_subsection_attributes): Add comdat, common and dup_common
6466 arguments. Set corresponding fields in copy_data. Change all callers.
6467 (som_bfd_ar_write_symbol_stuff): Set dup_common flag in library
6468 symbol table.
6469 (som_vec): Add SEC_LINK_ONCE to applicable section flags.
6470 * som.h (som_subspace_dictionary_record): Define.
6471 (som_copyable_section_data_struct): Add is_comdat, is_common and
6472 dup_common fields.
6473 (som_section_data_struct): Use som_subspace_dictionary_record struct
6474 instead of subspace_dictionary_record.
6475 (bfd_boolean bfd_som_set_subsection_attributes): Adjust prototype.
6476
3ba3bc8c
BW
64772004-04-27 Bob Wilson <bob.wilson@acm.org>
6478
6479 * elf32-xtensa.c (xtensa_read_table_entries): Use section _cooked_size
6480 if set. Check reloc_done flag before applying relocations. Use
6481 output addresses, both when applying relocations and when comparing
6482 against the specified section.
6483 (elf_xtensa_relocate_section): Use output address to check if dynamic
6484 reloc is in a literal pool. Set section's reloc_done flag.
6485
beb8df56
L
64862004-04-27 H.J. Lu <hongjiu.lu@intel.com>
6487
6488 * elf32-sh64.c (elf_backend_section_flags): New. Defined.
6489 (sh64_elf_set_mach_from_flags): Remove the kludge for .cranges
6490 section.
6491 (sh64_elf_section_flags): New. Set SEC_DEBUGGING for .cranges
6492 section.
6493
1829f4b2
AM
64942004-04-27 Alan Modra <amodra@bigpond.net.au>
6495
6496 * elf64-alpha.c (elf64_alpha_read_ecoff_info): Don't assign
6497 structure field removed in 2004-04-24 patch.
6498 * elf64-sparc.c (sparc64_elf_plt_sym_val): Warning fix.
6499
6500 * elf-bfd.h (struct elf_backend_data <elf_backend_section_flags>):
6501 Constify hdr arg.
6502 * elf32-arm.h (elf32_arm_section_flags): Likewise.
6503 * elf64-alpha.c (elf64_alpha_section_flags): Likewise.
6504 * elfxx-ia64.c (elfNN_ia64_section_flags): Likewise.
6505 * elf.c (_bfd_elf_make_section_from_shdr): Set the bfd_section
6506 field before calling elf_backend_section_flags.
6507
4030e8f6
CD
65082004-04-24 Chris Demetriou <cgd@broadcom.com>
6509
6510 * elf32-mips.c (elf_mips_gnu_rel_hi16, elf_mips_gnu_rel_lo16)
6511 (elf_mips_gnu_pcrel64, elf_mips_gnu_pcrel32): Remove.
6512 (bfd_elf32_bfd_reloc_type_lookup): Remove cases for
6513 BFD_RELOC_PCREL_HI16_S, BFD_RELOC_PCREL_LO16, BFD_RELOC_64_PCREL,
6514 and BFD_RELOC_32_PCREL.
6515 (mips_elf32_rtype_to_howto): Remove cases for R_MIPS_GNU_REL_HI16,
6516 R_MIPS_GNU_REL_LO16, R_MIPS_PC64, R_MIPS_PC32.
6517 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
6518 (_bfd_mips_elf_lo16_reloc): Remove handling for R_MIPS_GNU_REL_HI16.
6519 (mips_elf_next_relocation): Move comment about matching HI/LO
6520 relocations to...
6521 (_bfd_mips_elf_relocate_section): Here. Remove handling for
6522 R_MIPS_GNU_REL_HI16.
6523
3e27568f
CD
65242004-04-23 Chris Demetriou <cgd@broadcom.com>
6525
6526 * coff-mips.c (mips_relhi_reloc, mips_rello_reloc)
6527 (mips_switch_reloc, mips_read_relocs, mips_relax_section)
6528 (mips_relax_pcrel16, PCREL16_EXPANSION_ADJUSTMENT): Remove.
6529 (mips_relocate_hi): Remove now-unused 'adjust' and 'pcrel' arguments,
6530 and update comments to reflect current usage.
6531 (mips_howto_table): Remove entries for MIPS_R_RELHI, MIPS_R_RELLO,
6532 and MIPS_R_SWITCH, as well as several empty entries. Update comment
6533 for MIPS_R_PCREL16.
6534 (mips_ecoff_swap_reloc_in, mips_ecoff_swap_reloc_out)
6535 (mips_adjust_reloc_out, mips_bfd_reloc_type_lookup): Remove support
6536 for MIPS_R_SWITCH, MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6537 (mips_adjust_reloc_in): Likewise, adjust maximum accepted relocation
6538 type number to be MIPS_R_PCREL16.
6539 (mips_relocate_section): Remove support for link-time relaxation
6540 of branches used by embedded-PIC. Remove support for MIPS_R_SWITCH,
6541 MIPS_R_RELLO, and MIPS_R_RELHI relocations.
6542 (_bfd_ecoff_bfd_relax_section): Redefine to bfd_generic_relax_section.
6543 * ecoff.c (ecoff_indirect_link_order): Remove support for link-time
6544 relaxation of branches used by embedded-PIC.
6545 * ecofflink.c (bfd_ecoff_debug_accumulate): Likewise.
6546 * libecoff.h (struct ecoff_section_tdata): Remove embedded-PIC
6547 related members, update comment.
6548 * pe-mips.c: Remove disabled (commented-out and #if 0'd)
6549 code related to embedded-PIC.
6550 * elfxx-mips.c (_bfd_mips_elf_read_ecoff_info): Remove
6551 initialization of now-removed 'adjust' member of
6552 'struct ecoff_debug_info'.
6553
b32de0bc 65542004-04-23 Chris Demetriou <cgd@broadcom.com>
8472310d
CD
6555
6556 * elfxx-mips.c (mips_elf_get_global_gotsym_index): Remove.
6557
955af222
PB
65582004-04-21 Philip Blundell <pb@nexus.co.uk>
6559
6560 * elf32-arm.h (elf32_arm_check_relocs): Don't output REL32
6561 relocs for locally defined symbols during -shared final link.
6562 (elf32_arm_final_link_relocate): Likewise.
6563
47a9f7b3
JJ
65642004-04-22 Jakub Jelinek <jakub@redhat.com>
6565
6566 * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Copy also
6567 ELF_LINK_POINTER_EQUALITY_NEEDED.
6568 (elf64_x86_64_check_relocs): Set ELF_LINK_POINTER_EQUALITY_NEEDED
6569 if r_type is not R_X86_64_PC32.
6570 (elf64_x86_64_finish_dynamic_symbol): If
6571 ELF_LINK_POINTER_EQUALITY_NEEDED is not set, clear st_value of
6572 SHN_UNDEF symbols.
6573
1f1799d5
KK
65742004-04-22 Kaz Kojima <kkojima@rr.iij4u.or.jp>
6575
6576 * elf32-sh.c (sh_elf_plt_sym_val): New function.
6577 (elf_backend_plt_sym_val): Define.
6578
0fdea5ce
AC
65792004-04-22 Andrew Cagney <cagney@redhat.com>
6580
6581 * opncls.c (bfd_alloc): Fix type of "wanted" in doco.
6582
5198ba8b
DA
65832004-04-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
6584
eb61d2d6 6585 * hpux-core.c (hpux_core_core_file_p): Add cast in call to
5198ba8b
DA
6586 make_bfd_asection.
6587 * som.c (som_set_section_contents): Constantify second argument.
6588 (hppa_som_gen_reloc_type): Abort for unsupported selectors.
6589 (som_object_setup): Rework to avoid warning.
6590 (setup_sections, som_write_fixups, bfd_section_from_som_symbol):
6591 Likewise.
6592
fe2e161a
AC
65932004-04-22 Andrew Cagney <cagney@redhat.com>
6594
6595 * cache.c (bfd_cache_close): Check for a previously closed file.
6596
4c45e5c9
JJ
65972004-04-22 Jakub Jelinek <jakub@redhat.com>
6598
6599 * bfd.c (bfd_get_synthetic_symtab): Define.
6600 * targets.c (BFD_JUMP_TABLE_DYNAMIC): Add
6601 NAME##_get_synthetic_symtab.
6602 (struct bfd_target): Add _bfd_get_synthetic_symtab.
6603 * libbfd-in.h (_bfd_nodynamic_get_synthetic_symtab): Define.
6604 * elf-bfd.h (struct elf_backend_data): Add plt_sym_val and
6605 relplt_name fields.
6606 (_bfd_elf_get_synthetic_symtab): New prototype.
6607 * elfcode.h (elf_get_synthetic_symtab): Define.
6608 * elf.c (_bfd_elf_get_synthetic_symtab): New function.
6609 * elfxx-target.h (bfd_elfNN_get_synthetic_symtab): Define.
6610 (elf_backend_plt_sym_val, elf_backend_relplt_name): Define.
6611 (elfNN_bed): Add elf_backend_plt_sym_val and elf_backend_relplt_name.
6612 * bfd-in2.h: Rebuilt.
6613 * libbfd.h: Rebuilt.
6614 * elf32-i386.c (elf_i386_plt_sym_val): New function.
6615 (elf_backend_plt_sym_val): Define.
6616 * elf64-x86-64.c (elf64_x86_64_plt_sym_val): New function.
6617 (elf_backend_plt_sym_val): Define.
6618 * elf32-s390.c (elf_s390_plt_sym_val): New function.
6619 (elf_backend_plt_sym_val): Define.
6620 * elf64-s390.c (elf_s390_plt_sym_val): New function.
6621 (elf_backend_plt_sym_val): Define.
6622 * elf32-sparc (elf32_sparc_plt_sym_val): New function.
6623 (elf_backend_plt_sym_val): Define.
6624 * elf64-sparc.c (sparc64_elf_plt_sym_val): New function.
6625 (elf_backend_plt_sym_val): Define.
6626 * elf32-ppc.c (ppc_elf_plt_sym_val): New function.
6627 (elf_backend_plt_sym_val): Define.
6628 * aout-target.h (MY_get_synthetic_symtab): Define.
6629 * aout-tic30.c (MY_get_synthetic_symtab): Define.
6630 * coff-rs6000.c (rs6000coff_vec): Add
6631 _bfd_nodynamic_get_synthetic_symtab.
6632 (pmac_xcoff_vec): Likewise.
6633 * coff64-rs6000.c (rs6000coff64_vec): Add
6634 _bfd_nodynamic_get_synthetic_symtab.
6635 (aix5coff64_vec): Likewise.
6636 * sunos.c (MY_get_synthetic_symtab): Define.
6637 * vms.c (vms_get_synthetic_symtab): Define.
6638
d2f7ecac
NC
66392004-04-22 Nick Clifton <nickc@redhat.com>
6640
6641 * bfd.c (bfd_archive_filename): Return NULL on NULL input.
6642
fd99574b
NC
66432004-04-22 Peter Barada <peter@the-baradas.com>
6644
6645 * archures.c: Add bfd_mach_mcfv4e to bfd_architecture.
6646 * bfd2-in.h: Regenerate.
6647 * cpu-m68k.c: Add 'm68k:mcfv4e' to arch_info_struct[].
6648
23867d67
CD
66492004-04-21 Chris Demetriou <cgd@broadcom.com>
6650
6651 * coff-mips.c (bfd_mips_ecoff_create_embedded_relocs): Remove.
6652 * elf32-mips.c (bfd_mips_elf32_create_embedded_relocs): Remove.
6653 * bfd-in.h (bfd_mips_ecoff_create_embedded_relocs)
6654 (bfd_mips_elf32_create_embedded_relocs): Remove prototypes
6655 * bfd-in2.h: Regenerate.
6656
2c8c90bc
BW
66572004-04-21 Bob Wilson <bob.wilson@acm.org>
6658
6659 * elf32-xtensa.c (is_same_value): Add final_static_link argument and
6660 require relocations against a weak symbol to reference the same
6661 symbol hash entry if not a final, static link.
6662 (get_cached_value, add_value_map): Add final_static_link argument.
6663 (remove_literals): Pass final_static_link argument as needed.
6664
40838a72
AC
66652004-04-21 Andrew Cagney <cagney@redhat.com>
6666
6667 * opncls.c (_bfd_new_bfd_contained_in): Copy "iovec".
6668 (struct opncls, opncls_btell, opncls_bseek, opncls_bread)
6669 (opncls_bwrite, opncls_bclose, opncls_bflush)
6670 (opncls_bstat, opncls_iovec, bfd_openr_iovec): Implement a
6671 bfd iovec that uses function callbacks.
6672 (bfd_close): Use the iovec's bclose.
6673 * cache.c (cache_btell, cache_bseek, cache_bread, cache_bwrite)
6674 (cache_bclose, cache_bflush, cache_bstat)
6675 (cache_iovec): New functions and global variable, implement a
6676 cache "iovec", where applicable set bfd_error.
6677 (bfd_cache_init, bfd_cache_close): Set/test the bfd's iovec.
6678 * bfdio.c (struct bfd_iovec): Define.
6679 (real_read): Delete function.
6680 (bfd_bread, bfd_bread, bfd_bwrite, bfd_tell, bfd_flush, bfd_stat)
6681 (bfd_seek, bfd_get_mtime, bfd_get_size): Use the bfd's "iovec",
6682 assume that bread and bwrite set bfd_error.
6683 * bfd.c (struct bfd): Add "iovec", update comments.
6684 * bfd-in2.h, libbfd.h: Re-generate.
6685
7f919c84
AC
66862004-04-21 Andrew Cagney <cagney@redhat.com>
6687
6688 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6689
715df9b8
EB
66902004-04-21 Eric Botcazou <ebotcazou@act-europe.fr>
6691
6692 * elflink.c (elf_gc_mark_dynamic_ref_symbol): New function.
6693 (bfd_elf_gc_sections): Fail if a shared object is being created.
6694 Do not fail if dynamic sections have been created. Instead call
6695 elf_gc_mark_dynamic_ref_symbol to mark sections that contain
6696 dynamically referenced symbols. Do not mark the whole graph
6697 rooted at .eh_frame, only the section proper.
6698
6482c264
NC
66992004-04-20 DJ Delorie <dj@redhat.com>
6700
6701 * reloc.c: Add BFD_RELOC_32_SECREL.
6702 * bfd-in2.h: Regenerate.
6703 * libbfd.h: Likewise.
6704 * coff-i386.c (howto_table) [COFF_WITH_PE]: Add R_SECREL32.
6705 (coff_i386_rtype_to_howto) [COFF_WITH_PE]: Handle it.
6706 (coff_i386_reloc_type_lookup) [COFF_WITH_PE]: Likewise.
6707
4dc570c2
JJ
67082004-04-19 Jakub Jelinek <jakub@redhat.com>
6709
6710 * elf32-sparc.c (elf32_sparc_relocate_section): Handle
6711 relocs against hidden/protected undefweak symbols properly.
6712 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6713
0b60d5d3
MK
67142004-04-18 Mark Kettenis <kettenis@gnu.org>
6715
6716 * libaout.h (enum machine_type): Add M_POWERPC_NETBSD.
6717 * netbsd-core.c (netbsd_core_file_p): Set architecture for PowerPC
6718 core files.
6719
d48bdb99
AM
67202004-04-17 Brian Ford <ford@vss.fsi.com>
6721
6722 * peXXigen.c (_bfd_XXi_swap_aouthdr_out): Use the first non-zero
6723 filepos for the SizeOfHeaders field.
6724 (_bfd_XXi_swap_scnhdr_out): Correct section flags lossage on reloc
6725 overflow.
6726 (_bfd_XXi_swap_sym_in): Remove redundant section flags assignment.
6727
57a1784e
AM
67282004-04-16 Alan Modra <amodra@bigpond.net.au>
6729
6730 * simple.c (bfd_simple_get_relocated_section_contents): Don't
6731 change reloc_done. Set and restore _cooked_size.
6732 (RETURN): Delete.
6733
d1ad3f6f
MK
67342004-04-15 Mark Kettenis <kettenis@gnu.org>
6735
6736 * netbsd-core.c (netbsd_core_file_p): Set architecture for VAX
6737 core files.
6738
3d1bca9d
NC
67392004-04-15 Nick Clifton <nickc@redhat.com>
6740
6741 * bfd.c (bfd_archive_filename): Catch NULL bfd pointers.
6742
019b892f
AM
67432004-04-15 Alan Modra <amodra@bigpond.net.au>
6744
6745 * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change.
6746
15b43f48
AM
67472004-04-15 H.J. Lu <hongjiu.lu@intel.com>
6748
6749 * elflink.c (_bfd_elf_merge_symbol): Treat weak as strong only
6750 when it is a definition.
6751
6de00a78
AM
67522004-04-14 Alan Modra <amodra@bigpond.net.au>
6753
6754 * elf32-sparc.c (elf32_sparc_relocate_section): Don't abort
6755 when statically linking PIC code.
6756 * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
6757
279500de
TS
67582004-04-11 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
6759
6760 * config.bfd: Remove mips*-*-mach3* and mips*-dec-mach3* targets.
6761 * configure.in: Remove mips-dec-bsd*, mips-dec-mach3*, mips-*-mach3*
6762 targets amd aout_mips_big_vec, aout_mips_little_vec target vectors.
6763 * configure: Regenerate.
6764
ccf2f652
RS
67652004-04-08 Richard Sandiford <rsandifo@redhat.com>
6766
6767 * elflink.c: Include libiberty.h.
6768 * Makefile.am (elflink.lo): Depend on libiberty.h.
6769 * Makefile.in: Regenerate.
6770
ca07892d
DJ
67712004-04-06 Daniel Jacobowitz <drow@mvista.com>
6772
6773 * elfxx-mips.c (MIPS_ELF_STUB_SECTION_NAME): Always use
6774 ".MIPS.stubs".
6775
a5a58ba4
L
67762004-04-05 H.J. Lu <hongjiu.lu@intel.com>
6777
6778 * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Always
6779 reserve the memory for dynamic linker
6780
24d18d30
MK
67812004-04-05 Mark Kettenis <kettenis@gnu.org>
6782
6783 * netbsd-core.c (CORE_WCOOKIE_OFFSET): New define.
6784 (netbsd_core_file_p): Create a .wcookie section for OpenBSD/sparc.
6785
a4d7b4b5
L
67862004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6787
6788 * elf32-cr16c.c (elf32_cr16c_relocate_section): Use
6789 RELOC_FOR_GLOBAL_SYMBOL.
6790 (elf32_cr16c_add_symbol_hook): Remove const from Elf_Internal_Sym.
6791
1f433d93
L
67922004-04-02 H.J. Lu <hongjiu.lu@intel.com>
6793
6794 * elf32-arm.h (elf32_arm_final_link_relocate): Handle
6795 R_ARM_ALU* only if OLD_ARM_ABI is not defined.
6796
e489d0ae
PB
67972004-04-01 Paul Brook <paul@codesourcery.com>
6798
6799 * bfd-in.h (bfd_elf32_arm_process_before_allocation): Update.
6800 * elf32-arm.h (struct elf32_elf_section_map): New.
6801 (struct _arm_elf_section_data): New.
6802 (elf32_arm_section_data): Define.
6803 (struct elf32_arm_link_hash_table): Add byteswap_code.
6804 (elf32_arm_link_hash_table_create): Initialize byteswap_code.
6805 (bfd_elf32_arm_process_before_allocation): Add byteswap_code.
6806 (elf32_arm_post_process_headers): Set EF_ARM_BE8.
6807 (elf32_arm_output_symbol_hook, elf32_arm_new_section_hook,
6808 elf32_arm_compare_mapping, elf32_arm_write_section): New functions.
6809 (bfd_elf32_new_section_hook, elf_backend_write_section,
6810 elf_backend_link_output_symbol_hook): Define.
6811
66a695f0
NC
68122004-04-01 Andy Chittenden <achittenden@bluearc.com>
6813
6814 * stabs.c (struct stab_link_includes_totals): Add field 'symb'
6815 that keeps the characters in a B_INCL..B_EINCL range.
6816 (_bfd_link_section_stabs): When computing the sum of the
6817 characters in a B_INCL..B_EINCL range also keep a copy of those
6818 characters. Use this information to distinguish between
6819 include sections that have the same sum and the same length
6820 but which are nevertheless unique.
6821
8375c36b
PB
68222004-03-31 Paul Brook <paul@codesourcery.com>
6823
6824 * elf32-arm.h (elf32_arm_final_link_relocate): Add R_ARM_ALU*.
6825 * elfarm-nabi.c (elf32_arm_howto_table): Ditto.
6826
a56b48eb
NC
68272004-03-31 Andy Chittenden <achittenden@bluearc.com>
6828
6829 * stabs.c (struct stab_link_includes_totals): Rename field 'total'
6830 to 'sum_chars' and add field 'num_chars'.
6831 (_bfd_link_section_stabs): When computing the sum of the
6832 characters in a B_INCL..B_EINCL range also keep a count of the
6833 number of characters. Use this information to help distinguish
6834 between include sections when have the same sum but which
6835 nevertheless are still unique.
6836
1fbc7e7a 68372004-03-31 Mattias Engdegård <mattias@virtutech.se>
3d456464
NC
6838
6839 * stabs.c (_bfd_link_section_stabs): Do not skip N_EXCL stabs.
6840
0949843d 68412004-03-30 Galit Heller <Galit.Heller@nsc.com>
eb61d2d6 6842 Tomer Levi <Tomer.Levi@nsc.com>
0949843d
NC
6843
6844 * Makefile.am (ALL_MACHINES): Add cpu-cr16c.lo.
6845 (ALL_MACHINES_CFILES): Add cpu-cr16c.c.
6846 (BFD32_BACKENDS): Add elf32-cr16c.lo.
6847 (BFD32_BACKENDS_CFILES): Add elf32-cr16c.c.
6848 (cpu-cr16c.lo): New target.
6849 (elf32-cr16c.lo): Likewise.
6850 * Makefile.in: Regenerate.
6851 * archures.c (bfd_architecture): Add bfd_{arch,mach}_cr16c.
6852 (bfd_archures_list): Add bfd_cr16c_arch.
6853 * config.bfd: Handle cr16c-*-elf*.
6854 * configure.in: Handle bfd_elf32_cr16c_vec.
6855 * configure: Regenerate.
6856 * reloc.c: Add BFD_RELOC_16C_NUM08, BFD_RELOC_16C_NUM08_C,
6857 BFD_RELOC_16C_NUM16, BFD_RELOC_16C_NUM16_C,
6858 BFD_RELOC_16C_NUM32, BFD_RELOC_16C_NUM32_C,
6859 BFD_RELOC_16C_DISP04, BFD_RELOC_16C_DISP04_C,
6860 BFD_RELOC_16C_DISP08, BFD_RELOC_16C_DISP08_C,
6861 BFD_RELOC_16C_DISP16, BFD_RELOC_16C_DISP16_C,
6862 BFD_RELOC_16C_DISP24, BFD_RELOC_16C_DISP24_C,
6863 BFD_RELOC_16C_DISP24a, BFD_RELOC_16C_DISP24a_C,
6864 BFD_RELOC_16C_REG04, BFD_RELOC_16C_REG04_C,
6865 BFD_RELOC_16C_REG04a, BFD_RELOC_16C_REG04a_C,
6866 BFD_RELOC_16C_REG14, BFD_RELOC_16C_REG14_C,
6867 BFD_RELOC_16C_REG16, BFD_RELOC_16C_REG16_C,
6868 BFD_RELOC_16C_REG20, BFD_RELOC_16C_REG20_C,
6869 BFD_RELOC_16C_ABS20, BFD_RELOC_16C_ABS20_C,
6870 BFD_RELOC_16C_ABS24, BFD_RELOC_16C_ABS24_C,
6871 BFD_RELOC_16C_IMM04, BFD_RELOC_16C_IMM04_C,
6872 BFD_RELOC_16C_IMM16, BFD_RELOC_16C_IMM16_C,
6873 BFD_RELOC_16C_IMM20, BFD_RELOC_16C_IMM20_C,
6874 BFD_RELOC_16C_IMM24, BFD_RELOC_16C_IMM24_C,
6875 BFD_RELOC_16C_IMM32, BFD_RELOC_16C_IMM32_C.
6876 * targets.c (bfd_elf32_cr16c_vec): Declare.
6877 (bfd_target_vector): Add bfd_elf32_cr16c_vec.
6878 * cpu-cr16c.c: New file.
6879 * elf32-cr16c.c: Likewise.
6880 * libbfd.h: Regenerate.
6881 * bfd-in2.h: Likewise.
6882
baaff79e
JJ
68832004-03-30 Jakub Jelinek <jakub@redhat.com>
6884
6885 * elf.c (map_sections_to_segments): Fix handling of .tbss.
6886
c152c796
AM
68872004-03-27 Alan Modra <amodra@bigpond.net.au>
6888
6889 * Makefile.am: Remove all mention of elflink.h.
6890 * Makefile.in: Regenerate.
6891 * bfd-in.h (bfd_elf_discard_info): Declare.
6892 (bfd_elf32_discard_info, bfd_elf64_discard_info): Delete.
6893 * bfd-in2.h: Regenerate.
6894 * elf-bfd.h (bfd_elf32_print_symbol, bfd_elf64_print_symbol,
6895 bfd_elf32_link_record_dynamic_symbol,
6896 bfd_elf64_link_record_dynamic_symbol,
6897 _bfd_elf_link_record_dynamic_symbol, bfd_elf32_bfd_final_link,
6898 bfd_elf64_bfd_final_link, elf_link_record_local_dynamic_symbol,
6899 _bfd_elf32_link_record_local_dynamic_symbol,
6900 _bfd_elf64_link_record_local_dynamic_symbol,
6901 _bfd_elf32_gc_sections, _bfd_elf32_gc_common_finalize_got_offsets,
6902 _bfd_elf32_gc_common_final_link, _bfd_elf64_gc_common_final_link,
6903 _bfd_elf32_gc_record_vtinherit, _bfd_elf32_gc_record_vtentry,
6904 _bfd_elf64_gc_sections, _bfd_elf64_gc_common_finalize_got_offsets,
6905 _bfd_elf64_gc_record_vtinherit, _bfd_elf64_gc_record_vtentry,
6906 _bfd_elf32_reloc_symbol_deleted_p,
6907 _bfd_elf64_reloc_symbol_deleted_p): Delete.
6908 (bfd_elf_link_record_dynamic_symbol,
6909 bfd_elf_link_record_local_dynamic_symbol,
6910 bfd_elf_final_link, bfd_elf_gc_sections,
6911 bfd_elf_gc_record_vtinherit, bfd_elf_gc_record_vtentry,
6912 bfd_elf_gc_common_finalize_got_offsets, bfd_elf_gc_common_final_link,
6913 bfd_elf_reloc_symbol_deleted_p): Declare.
6914 (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
6915 * elf32-arm.h: Update for changed function names. Remove local
6916 WILL_CALL_FINISH_DYNAMIC_SECTION define.
6917 * elf-hppa.h, elf-m10300.c, elf32-cris.c, elf32-d10v.c, elf32-dlx.c,
6918 * elf32-fr30.c, elf32-frv.c, elf32-h8300.c, elf32-hppa.c, elf32-i386.c,
6919 * elf32-iq2000.c, elf32-m32r.c, elf32-m68hc1x.c, elf32-m68k.c,
6920 * elf32-mcore.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
6921 * elf32-sh.c, elf32-sparc.c, elf32-v850.c, elf32-vax.c,
6922 * elf32-xstormy16.c, elf32-xtensa.c, elf64-alpha.c, elf64-hppa.c,
6923 * elf64-mmix.c, elf64-ppc.c, elf64-s390.c, elf64-sh64.c, elf64-sparc.c,
6924 * elf64-x86-64.c, elfxx-ia64.c, elfxx-mips.c, elfxx-target.h: Likewise.
6925 * elfxx-target.h (bfd_elfNN_bfd_final_link): Define.
6926 (bfd_elfNN_print_symbol): Define.
6927 * elfcode.h: Don't include elflink.h.
6928 (elf_bfd_discard_info, elf_reloc_symbol_deleted_p,
6929 elf_link_record_dynamic_symbol, elf_bfd_final_link, elf_gc_sections,
6930 elf_gc_common_finalize_got_offsets, elf_gc_common_final_link,
6931 elf_gc_record_vtinherit, elf_gc_record_vtentry,
6932 elf_link_record_local_dynamic_symbol): Don't define.
6933 * elflink.c: Update for changed function names. Move elflink.h
6934 code here.
6935 * elflink.h: Delete file.
6936 * po/SRC-POTFILES.in: Regenerate.
6937 * po/bfd.pot: Regenerate.
6938
6a9cae7f
AM
69392004-03-27 Alan Modra <amodra@bigpond.net.au>
6940
6941 * elf64-mmix.c (mmix_elf_relocate_section): Restore code setting
6942 "name" for global syms accidentally removed in 2004-03-20 change.
6943
140f6c8e
AM
69442004-03-27 Alan Modra <amodra@bigpond.net.au>
6945
6946 * elf-bfd.h (struct elf_reloc_cookie): Add r_sym_shift field.
6947 * elflink.h: Replace all occurrences of sizeof (Elf_External_*)
6948 where Elf_External_* is different for 64 and 32 bit, with
6949 corresponding elf_size_info field.
6950 (struct elf_final_link_info): Use "bfd_byte *" instead
6951 of "Elf_External_Sym *" for external_syms and symbuf.
6952 (elf_link_adjust_relocs): Set up r_type_mask and r_sym_shift local
6953 vars and use instead of ELF_R_INFO and ELF_R_TYPE macros.
6954 (struct elf_link_sort_rela): Add "sym_mask" alias for "offset".
6955 (elf_link_sort_cmp1): Use sym_mask field instead of ELF_R_SYM.
6956 (elf_link_sort_cmp2): Adjust.
6957 (elf_link_sort_relocs): Set up r_sym_mask local var instead of
6958 using ELF_R_SYM macro. Set u.sym_mask.
6959 (elf_bfd_final_link): Call _bfd_elf_stringtab_init instead of macro
6960 version, elf_stringtab_init. Ditto for bfd_section_from_elf_index
6961 vs. section_from_elf_index. Adjust Elf_External_Sym pointer
6962 arithmetic. Pass bed to elf_link_flush_output_syms. Adjust
6963 Elf_External_Dyn pointer arithmentic. Use bed swap_dyn_in and
6964 swap_syn_out functions. Rearrange dyn swap in/out switch.
6965 (elf_link_output_sym): Adjust Elf_External_Sym pointer arithmentic.
6966 Pass bed to elf_link_flush_output_syms. Use bed swap_symbol_out.
6967 (elf_link_flush_output_syms): Add elf_backend_data arg.
6968 (elf_link_check_versioned_symbol): Likewise.
6969 (elf_link_output_extsym): Pass bed to elf_link_check_versioned_symbol.
6970 Adjust Elf_External_Sym pointer arithmetic. Use bed swap_symbol_out.
6971 (elf_link_input_bfd): Use bfd_section_from_elf_index. Set up
6972 r_type_mask and r_sym_shift local vars and use instead of ELF_R_SYM,
6973 ELF_R_TYPE and ELF_R_INFO macros.
6974 (elf_reloc_link_order): Select ELF32_R_INFO or ELF64_R_INFO invocation
6975 based on size rather than using ELF_R_INFO.
6976 (elf_gc_mark): Set up r_sym_shift local var and use instead of
6977 ELF_R_SYM macro.
6978 (struct alloc_got_off_arg): New.
6979 (elf_gc_common_finalize_got_offsets): Use elf_size_info instead of
6980 ARCH_SIZE. Pass get entry size down to elf_gc_allocate_got_offsets.
6981 (elf_gc_allocate_got_offsets): Adjust.
6982 (elf_reloc_symbol_deleted_p): Usee cookie.r_sym_shift instead of
6983 ELF_R_SYM. Use bfd_section_from_elf_index.
6984 (elf_bfd_discard_info): Set cookie.r_sym_shift.
6985 * elfcode.h (elf_stringtab_init, section_from_elf_index): Delete.
6986 (elf_slurp_symbol_table): Use bfd_section_from_elf_index.
6987
14bde378
SS
69882004-03-26 Stan Shebs <shebs@apple.com>
6989
6990 Remove MPW support, no longer used.
6991 * config.bfd (powerpc-*-mpw*): Remove configuration.
6992 * mpw-config.in, mpw-make.sed: Remove files.
6993 * ecoffswap.h [MPW_C]: Remove MPW-C-friendly version of code.
6994
555cd476
AM
69952004-03-26 Alan Modra <amodra@bigpond.net.au>
6996
6997 * elf64-ppc.c (elf_backend_add_symbol_hook): Define.
6998 (ppc64_elf_add_symbol_hook): New function.
6999 * elf-bfd.h (struct elf_backend_data <elf_add_symbol_hook>): Remove
7000 const from Elf_Internal_Sym param.
7001 * elflink.c (elf_link_add_object_symbols): Adjust.
7002 * elf-hppa.h (elf_hppa_add_symbol_hook): Adjust.
7003 * elf32-frv.c (elf32_frv_add_symbol_hook): Adjust.
7004 * elf32-i370.c (elf_backend_add_symbol_hook): Adjust.
7005 * elf32-m32r.c (m32r_elf_add_symbol_hook): Adjust.
7006 * elf32-m68hc1x.c (elf32_m68hc11_add_symbol_hook): Adjust.
7007 * elf32-m68hc1x.h (elf32_m68hc11_add_symbol_hook): Adjust.
7008 * elf32-ppc.c (ppc_elf_add_symbol_hook): Adjust.
7009 * elf32-sh64.c (sh64_elf_add_symbol_hook): Adjust.
7010 * elf32-v850.c (v850_elf_add_symbol_hook): Adjust.
7011 * elf64-alpha.c (elf64_alpha_add_symbol_hook): Adjust.
7012 * elf64-mmix.c (mmix_elf_add_symbol_hook): Adjust.
7013 * elf64-sh64.c (sh64_elf64_add_symbol_hook): Adjust.
7014 * elf64-sparc.c (sparc64_elf_add_symbol_hook): Adjust.
7015 * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Adjust.
7016 * elfxx-mips.c (_bfd_mips_elf_add_symbol_hook): Adjust.
7017 * elfxx-mips.h (_bfd_mips_elf_add_symbol_hook): Adjust.
7018
4ad4eba5
AM
70192004-03-26 Alan Modra <amodra@bigpond.net.au>
7020
7021 * elfxx-target.h (bfd_elfNN_bfd_link_add_symbols): Define.
7022 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): Delete.
7023 (_bfd_elf_sort_symbol, _bfd_elf_add_dt_needed_tag): Delete.
7024 (_bfd_elf_finalize_dynstr, bfd_elf32_bfd_link_add_symbols): Delete.
7025 (bfd_elf64_bfd_link_add_symbols): Delete.
7026 (bfd_elf_link_add_symbols): Declare.
7027 * elfcode.h (elf_bfd_link_add_symbols): Delete.
7028 * elflink.c: Include safe-ctype.h.
7029 (elf_add_dt_needed_tag): Rename from _bfd_elf_add_dt_needed_tag,
7030 make static.
7031 (elf_sort_symbol): Rename from _bfd_elf_sort_symbol, make static.
7032 (elf_finalize_dynstr): Rename from _bfd_elf_finalize_dynstr, make
7033 static.
7034 (elf_link_add_archive_symbols): Rename from
7035 _bfd_elf_link_add_archive_symbols, make static.
7036 (elf_link_add_object_symbols): New function. Corresponding
7037 elflink.h function converted to use elf_size_info.
7038 (bfd_elf_link_add_symbols): Likewise.
7039 (bfd_elf_size_dynamic_sections): Adjust.
7040 * elflink.h (elf_bfd_link_add_symbols): Delete.
7041 (elf_link_add_object_symbols): Delete.
7042 * elf32-gen.c (elf32_generic_link_add_symbols): Call
7043 bfd_elf_link_add_symbols.
7044 * elf64-gen.c (elf64_generic_link_add_symbols): Likewise.
7045
5a580b3a
AM
70462004-03-25 Alan Modra <amodra@bigpond.net.au>
7047
7048 * elflink.h (elf_link_add_object_symbols): Add DT_NEEDED for as-needed
7049 and chained shared libs only if dynsym. Clear dynsym on forced-local.
c152c796 7050
5a580b3a
AM
7051 * elf-bfd.h (_bfd_elf_add_dynamic_entry): Declare.
7052 (bfd_elf32_add_dynamic_entry, bfd_elf64_add_dynamic_entry): Delete.
7053 (_bfd_elf_add_dt_needed_tag): Declare.
7054 (_bfd_elf_sort_symbol): Declare.
7055 (_bfd_elf_finalize_dynstr): Declare.
7056 (RELOC_FOR_GLOBAL_SYM): Formatting.
7057 * elfcode.h (elf_add_dynamic_entry): Delete.
7058 * elflink.c (_bfd_elf_add_dynamic_entry): New function. Corresponding
7059 elflink.h function converted to use elf_size_info.
7060 (_bfd_elf_add_dt_needed_tag): Likewise.
7061 (_bfd_elf_sort_symbol): Likewise.
7062 (_bfd_elf_finalize_dynstr): Likewise.
7063 (compute_bucket_count): Likewise.
7064 (bfd_elf_size_dynamic_sections): Likewise. Check result of
7065 _bfd_elf_strtab_add before calling _bfd_elf_strtab_addref.
7066 (elf_adjust_dynstr_offsets, elf_collect_hash_codes): Moved from..
7067 * elflink.h: ..here.
7068 (sort_symbol, add_dt_needed_tag): Delete.
7069 (elf_add_dynamic_entry, elf_finalize_dynstr): Delete.
7070 (compute_bucket_count, NAME(bfd_elf,size_dynamic_sections)): Delete.
7071 Update all users.
7072 * elf32-arm.h (add_dynamic_entry): Update. Remove casts.
7073 * elf32-cris.c (add_dynamic_entry): Likewise.
7074 * elf32-hppa.c (add_dynamic_entry): Likewise.
7075 * elf32-i370.c (add_dynamic_entry): Likewise.
7076 * elf32-i386.c (add_dynamic_entry): Likewise.
7077 * elf32-m32r.c (add_dynamic_entry): Likewise.
7078 * elf32-m68k.c (add_dynamic_entry): Likewise.
7079 * elf32-ppc.c (add_dynamic_entry): Likewise.
7080 * elf32-s390.c (add_dynamic_entry): Likewise.
7081 * elf32-sh.c (add_dynamic_entry): Likewise.
7082 * elf32-sparc.c (add_dynamic_entry): Likewise.
7083 * elf32-vax.c (add_dynamic_entry): Likewise.
7084 * elf32-xtensa.c (add_dynamic_entry): Likewise.
7085 * elf64-alpha.c (add_dynamic_entry): Likewise.
7086 * elf64-hppa.c (add_dynamic_entry): Likewise.
7087 * elf64-ppc.c (add_dynamic_entry): Likewise.
7088 * elf64-s390.c (add_dynamic_entry): Likewise.
7089 * elf64-sparc.c (add_dynamic_entry): Likewise.
7090 * elf64-x86-64.c (add_dynamic_entry): Likewise.
7091 * elfxx-ia64.c (add_dynamic_entry): Likewise.
7092 * elfxx-mips.c (MIPS_ELF_ADD_DYNAMIC_ENTRY): Likewise.
7093 * elf-m10300.c (_bfd_mn10300_elf_size_dynamic_sections): Likewise.
7094 * elf32-frv.c (elf32_frv_size_dynamic_sections): Likewise.
7095 * elf64-sh64.c (sh64_elf64_size_dynamic_sections): Likewise.
7096
d507cf36
PB
70972004-03-23 Paul Brook <paul@codesourcery.com>
7098
7099 * elf32-arm.h (arm_print_private_bfd_data): Add EABI v3.
7100
88d65ad6
BW
71012004-03-22 Bob Wilson <bob.wilson@acm.org>
7102
7103 * elf32-xtensa.c (elf_xtensa_check_relocs): Remove code to read
7104 literal tables and check for relocs outside of literal pools.
7105 (elf_xtensa_make_sym_local): Don't clear ELF_LINK_NON_GOT_REF flag.
7106 (elf_xtensa_fix_refcounts): Don't check ELF_LINK_NON_GOT_REF or
7107 set DF_TEXTREL.
7108 (elf_xtensa_size_dynamic_sections): Don't add DT_TEXTREL entry.
7109 (elf_xtensa_relocate_section): Read literal tables and check for
7110 dynamic relocations in read-only sections and not in literal pools.
c152c796 7111
b9cf773d
AM
71122004-03-23 Alan Modra <amodra@bigpond.net.au>
7113
7114 PR 51.
7115 * linker.c (bfd_wrapped_link_hash_lookup): Handle info->wrap_char.
7116
e4a2175c
HPN
71172004-03-22 Hans-Peter Nilsson <hp@axis.com>
7118
7119 * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_16_GOTPLT,
7120 R_CRIS_16_GOTPLT>: Also error if there's no PLT for a symbol
7121 not defined by the executable, or defined in a DSO.
7122 <eliding run-time relocation of .got>: Initialize GOT entry for a
7123 function symbol or ELF_LINK_HASH_NEEDS_PLT statically in an
7124 executable.
7125 (cris_elf_gc_sweep_hook): Improve fallthrough marking.
7126 (elf_cris_try_fold_plt_to_got): Improve head comment. Do not fold
7127 a PLT reloc to GOT for an executable.
7128 (elf_cris_adjust_dynamic_symbol): Only fold a .got.plt entry with
b9cf773d 7129 .got for a DSO and explain why.
e4a2175c
HPN
7130 (elf_cris_discard_excess_program_dynamics): Also lose GOT-relocs
7131 and unreferenced symbols for which a PLT is defined. Adjust
7132 dynamic-symbol pruning correspondingly, to make sure we don't lose
7133 a dynamic symbol also defined by a DSO.
7134
b2a8e766
AM
71352004-03-22 Alan Modra <amodra@bigpond.net.au>
7136
7137 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Add input_bfd, input_section
7138 and rel args. Group input and output args. Wrap to 80 columns.
7139 * elf-m10200.c, elf-m10300.c, elf32-arm.h, elf32-avr.c,
7140 elf32-cris.c, elf32-d10v.c, elf32-fr30.c, elf32-h8300.c,
7141 elf32-hppa.c, elf32-i386.c, elf32-i860.c, elf32-ip2k.c,
7142 elf32-iq2000.c, elf32-m68hc1x.c, elf32-m68k.c, elf32-mcore.c,
7143 elf32-msp430.c, elf32-openrisc.c, elf32-ppc.c, elf32-s390.c,
7144 elf32-sparc.c, elf32-v850.c, elf32-vax.c, elf32-xstormy16.c,
7145 elf32-xtensa.c, elf64-alpha.c, elf64-mmix.c, elf64-ppc.c,
7146 elf64-s390.c, elf64-sparc.c, elf64-x86-64.c, elfxx-ia64.c: Update
7147 RELOC_FOR_GLOBAL_SYMBOL invocation.
7148
59c2e50f
L
71492004-03-20 H.J. Lu <hongjiu.lu@intel.com>
7150
7151 * elf-bfd.h (RELOC_FOR_GLOBAL_SYMBOL): Report error if
7152 unresolved symbols in objects aren't allowed.
7153
7154 * elf-hppa.h (elf_hppa_relocate_section): Properly handle
7155 unresolved symbols.
7156 (elf_hppa_remark_useless_dynamic_symbols): Likewise.
7157 (elf_hppa_unmark_useless_dynamic_symbols):
7158 * elf32-frv.c (elf32_frv_relocate_section): Likewise.
7159 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
7160 (elf32_hppa_relocate_section): Likewise.
7161 * elf32-i370.c (i370_elf_relocate_section): Likewise.
7162 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
7163 * elf32-sh.c (sh_elf_relocate_section): Likewise.
7164 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
7165 * elfxx-mips.c (mips_elf_calculate_relocation): Likewise.
7166
7167 * elf-m10200.c (mn10200_elf_relocate_section): Use
7168 RELOC_FOR_GLOBAL_SYMBOL.
7169 * elf32-avr.c (elf32_avr_relocate_section): Likewise.
7170 * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
7171 * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
7172 * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
7173 * elf32-i860.c (elf32_i860_relocate_section): Likewise.
7174 * elf32-m68hc1x.c (m68hc11_get_relocation_value): Likewise.
7175 * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
7176 * elf32-msp430.c (elf32_msp430_relocate_section): Likewise.
7177 * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
7178 * elf32-v850.c (v850_elf_relocate_section): Likewise.
7179 * elf32-xstormy16.c (xstormy16_elf_relocate_section): Likewise.
7180 * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
7181
9992270f
DA
71822004-03-19 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7183
36751eee
DA
7184 * elf32-hppa.c (elf32_hppa_check_relocs): Handle R_PARISC_PCREL32.
7185 (final_link_relocate): Likewise.
9992270f
DA
7186 * elf-hppa.h (elf_hppa_reloc_final_type): Handle selectors for
7187 R_PARISC_PCREL32 and R_PARISC_PCREL64 relocations.
7188
05864e2a
AM
71892004-03-19 Alan Modra <amodra@bigpond.net.au>
7190
7191 * Makefile.am: Run "make dep-am".
7192 * Makefile.in: Regenerate.
7193 * aclocal.m4: Regenerate.
7194 * config.in: Regenerate.
7195 * po/bfd.pot: Regenerate.
7196
f218a464 71972004-03-19 Alan Modra <amodra@bigpond.net.au>
0f8a2703
AM
7198 H.J. Lu <hongjiu.lu@intel.com>
7199
7200 * elflink.c (_bfd_elf_merge_symbol): Revert last change. Move
7201 type and size change code to where it was previously. Remove
7202 dt_needed param. Treat old weak syms as strong if new sym is
7203 from a shared lib, even when old sym is from another shared
7204 lib. Remove unnecessary tests of oldweak and newweak. Correct
7205 comments.
7206 (_bfd_elf_add_default_symbol): Remove dt_needed param. Update
7207 _bfd_elf_merge_symbol calls.
7208 * elflink.h (elf_link_add_object_symbols): Update calls. Remove
7209 dt_needed local var. Update comments.
7210 * elf-bfd.h (_bfd_elf_merge_symbol): Update prototype.
7211 (_bfd_elf_add_default_symbol): Likewise.
f218a464
AM
7212
7213 * elflink.c (_bfd_elf_merge_symbol): Reinstate code to handle
7214 strong syms in one shared object overriding weak syms in another.
7215
79349b09
AM
72162004-03-18 Alan Modra <amodra@bigpond.net.au>
7217
4a43e768
AM
7218 * elf-bfd.h (struct elf_obj_tdata): Delete dt_soname field. Add
7219 dyn_lib_class field. Rearrange for better packing.
7220 (elf_dt_soname): Delete.
7221 (elf_dyn_lib_class): Define.
7222 * elf.c (bfd_elf_set_dt_needed_name): Update comment.
7223 (bfd_elf_set_dt_needed_soname): Delete.
7224 (bfd_elf_set_dyn_lib_class): New function.
7225 * elflink.h (add_dt_needed_tag): New function. Split out from..
7226 (elf_link_add_object_symbols): ..here. Rename "name" to "soname".
7227 Use elf_dyn_lib_class to set dt_needed and add_needed. Move fallback
7228 initialization of soname.
7229 (elf_link_check_versioned_symbol): Test elf_dyn_lib_class instead of
7230 elf_dt_soname.
7231 * bfd-in.h (enum dynamic_lib_link_class): New.
7232 (bfd_elf_set_dt_needed_soname): Delete.
7233 (bfd_elf_set_dyn_lib_class): Declare.
7234 * bfd-in2.h: Regenerate.
7235
79349b09
AM
7236 * elflink.c (_bfd_elf_merge_symbol): Rewrite weak symbol handling.
7237 (_bfd_elf_add_default_symbol): Remove indirect BFD_ASSERTs.
7238 * elflink.h (elf_link_add_object_symbols): Don't clear dt_needed in
7239 symbol loop. Instead use add_needed to flag tag as written.
7240
d13d89fa
NS
72412004-03-17 Nathan Sidwell <nathan@codesourcery.com>
7242
7243 * elfxx-mips.c (_bfd_mips_elf_merge_private_bfd_data): Correct
7244 logic for null_input_bfd detection.
7245
9183ed4b
AM
72462004-03-17 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
7247
7248 * config.bfd: Switch sh-*-rtems* to ELF. Add sh-*-rtemscoff*.
7249
021d7868
MK
72502004-03-16 Mark Kettenis <kettenis@gnu.org>
7251
7252 * netbsd-core.c (netbsd_core_file_p) [CORE_FPU_OFFSET]: Remove
7253 code.
7254
51992aec
AM
72552004-03-16 Alan Modra <amodra@bigpond.net.au>
7256
7257 * elflink.c (elf_link_read_relocs_from_section): Don't use
7258 NUM_SHDR_ENTRIES in end of reloc calc. Move NULL shdr check..
7259 (_bfd_elf_link_read_relocs): ..to here.
7260 * elf32-ppc.c (ppc_elf_relax_section): Formatting.
7261
ccba357f
AM
72622004-03-16 Alan Modra <amodra@bigpond.net.au>
7263
7264 * configure.in (HOST_64BIT_TYPE, HOST_U_64BIT_TYPE): Don't override
7265 values selected in configure.host. Require both to be defined
7266 before setting BFD_HOST_64_BIT_DEFINED. Protect assignment to
7267 corresponding BFD_HOST vars with quotes.
7268 <${host64}-${target64}-${want64} in *true*>: Don't exempt gcc;
7269 Always require BFD_HOST_64_BIT_DEFINED.
7270 <file_ptr type>: Find off_t size before emitting message. Combine
7271 off_t and ftello64 conditional.
7272 * configure: Regenerate.
7273
41978308
AM
72742004-03-16 Alan Modra <amodra@bigpond.net.au>
7275
7276 * elf32-m32r.c (m32r_elf_create_dynamic_sections): Fix pointer
7277 aliasing warning. Remove trailing whitespace throughout file.
7278
d63b5ed9
DA
72792004-03-15 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
7280
7281 * elf-hppa.h (elf_hppa_relocate_section): Pass input_bfd instead of
7282 input_section in calls to get_dyn_name.
7283 * elf64-hppa.c (get_dyn_name): Change type of first argument to "bfd *". Use section id of first section in input BFD to build dynamic name for
7284 local symbols.
7285 (elf64_hppa_check_relocs): Pass abfd in call to get_dyn_name.
7286
8ce8c090
AM
72872004-03-15 Alan Modra <amodra@bigpond.net.au>
7288
7289 * bfd-in.h (bfd_int64_t, bfd_uint64_t): New types.
7290 (BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Don't define here.
7291 (bfd_getb64, bfd_getl64, bfd_get_bits): Return bfd_uint64_t.
7292 (bfd_getb_signed_64, bfd_getl_signed_64): Return bfd_int64_t.
7293 (bfd_putb64, bfd_putl64, bfd_put_bits): Accept bfd_uint64_t.
7294 * configure.in (HOST_U_64BIT_TYPE): Set when sizeof long is 8.
7295 (BFD_HOST_64_BIT_DEFINED, BFD_HOST_64_BIT, BFD_HOST_U_64_BIT): Set
7296 when using long.
7297 * libbfd.c (EIGHT_GAZILLION, COERCE64): Use bfd_int64_t.
7298 (bfd_getb64): Return bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7299 (bfd_getl64, bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7300 (bfd_putb64): Accept bfd_uint64_t. Enable when BFD_HOST_64_BIT.
7301 (bfd_putl64, bfd_put_bits, bfd_get_bits): Likewise.
7302 * dwarf2.c (struct attribute): Use bfd_int64_t and bfd_uint64_t.
7303 (read_8_bytes, read_indirect_string, read_address): Likewise.
7304 (read_abbrevs, parse_comp_unit): Likewise.
7305 * targets.c (struct bfd_target): Likewise.
7306 * aix386-core.c (NO_GET64, NO_PUT64, NO_GETS64): Define and use.
7307 * hppabsd-core.c: Likewise. Formatting.
7308 * hpux-core.c: Likewise.
7309 * irix-core.c: Likewise.
7310 * netbsd-core.c: Likewise.
7311 * osf-core.c: Likewise.
7312 * ptrace-core.c: Likewise.
7313 * sco5-core.c: Likewise.
7314 * trad-core.c: Likewise.
7315 * configure: Regenerate.
7316 * bfd-in2.h: Regenerate.
7317
edeb6e24
AM
73182004-03-15 Alan Modra <amodra@bigpond.net.au>
7319
7320 * bfd-in.h (bfd_getb64, bfd_getl64): Replace bfd_byte* with void*.
7321 (bfd_getb32, bfd_getl32, bfd_getb16, bfd_getl16): Likewise.
7322 (bfd_getb_signed_64, bfd_getl_signed_64): Likewise.
7323 (bfd_getb_signed_32, bfd_getl_signed_32): Likewise.
7324 (bfd_getb_signed_16, bfd_getl_signed_16): Likewise.
7325 (bfd_putb64, bfd_putl64, bfd_putb32, bfd_putl32): Likewise.
7326 (bfd_putb16, bfd_putl16, bfd_get_bits, bfd_put_bits): Likewise.
7327 * libbfd.c: Likewise in function definitions.
7328 (bfd_put_8): Mask with 0xff rather than casting to char.
7329 (bfd_putb16, bfd_putl16, bfd_putb32, bfd_putl32): Likewise.
7330 (bfd_putb64, bfd_putl64, bfd_put_bits): Likewise.
7331 (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8): Remove casts, simplify.
7332 (H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8): Likewise.
7333 (H_GET_64, H_GET_32, H_GET_16, H_GET_8): Likewise.
7334 (H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Likewise.
7335 * libaout.h (H_PUT_64 H_PUT_32, H_PUT_16): Remove casts, simplify.
7336 (H_PUT_S64, H_PUT_S32, H_PUT_S16): Likewise.
7337 (H_GET_64, H_GET_32, H_GET_16): Likewise.
7338 (H_GET_S64, H_GET_S32, H_GET_S16): Likewise.
7339 * archive.c (do_slurp_coff_armap): Update swap prototype.
7340 * coff-tic54x.c (tic54x_getl32): Replace bfd_byte* with void*.
7341 (tic54x_getl_signed_32): Likewise.
7342 (tic54x_putl32): Likewise. Mask with 0xff rather than casting to char.
7343 * mach-o.c (bfd_mach_o_read_header): Update get32 prototype.
7344 * pdp11.c (bfd_getp32): Make static, replace bfd_byte* with void*.
7345 (bfd_getp_signed_32, bfd_putp32): Likewise.
7346 * targets.c (struct bfd_target): Use void* in place of bfd_byte* for
7347 bfd_getx64, bfd_getx_signed_64, bfd_putx64, bfd_getx32,
7348 bfd_getx_signed_32, bfd_putx32, bfd_getx16, bfd_getx_signed_16,
7349 bfd_putx16, bfd_h_getx64, bfd_h_getx_signed_64, bfd_h_putx64,
7350 bfd_h_getx32, bfd_h_getx_signed_32, bfd_h_putx32, bfd_h_getx16,
7351 bfd_h_getx_signed_16, bfd_h_putx16.
7352 * aix386-core.c (NO_GET, NO_GETS, NO_PUT): Update prototypes.
7353 * hppabsd-core.c: Similarly. Rename NO_SIGNED_GET to NO_GETS.
7354 * hpux-core.c: Likewise.
7355 * irix-core.c: Likewise.
7356 * netbsd-core.c: Likewise.
7357 * osf-core.c: Likewise.
7358 * ptrace-core.c: Likewise.
7359 * sco5-core.c: Likewise.
7360 * trad-core.c: Likewise.
7361 * bfd-in2.h: Regenerate.
7362
c1b954e2
AM
73632004-03-15 Matt Thomas <matt@3am-software.com>
7364
7365 * config.bfd: Add x86-64 vector to NetBSD/i386 if 64bit BFD is
7366 selected.
7367
85cfd8d3
MK
73682004-03-13 Mark Kettenis <kettenis@gnu.org>
7369
7370 * config.bfd: Add x86_64-*-openbsd*.
7371 * configure.in (x86_64-*-openbsd*): Set COREFILE to
7372 netbsd-core.lo.
7373 * configure: Regenerate.
7374
d1f161ea
NC
73752004-03-12 Nick Clifton <nickc@redhat.com>
7376 Dave Murphy <wintermute2k4@ntlworld.com>
c1b954e2 7377
d1f161ea
NC
7378 * elf32-arm.h (elf32_arm_merge_private_bfd_data): Skip most checks
7379 if the input bfd does not contain any code.
7380
8b6f2683
JW
73812004-03-09 Steve Ellcey <sje@cup.hp.com>
7382
7383 * elfxx-ia64.c (plt_full_entry): Change ld8 to ld8.acq.
7384
79cda7cf
FF
73852004-03-05 Fred Fish <fnf@redhat.com>
7386
7387 * elfxx-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Just force
7388 mips16 symbols to be even rather than testing first for even/odd.
7389 (_bfd_mips_elf_link_output_symbol_hook): Ditto.
7390
e5caec89
NS
73912004-03-05 Nathan Sidwell <nathan@codesourcery.com>
7392
7393 * elf.c (map_sections_to_segments): Ignore .tbss sections for
7394 layout purposes.
7395
02bb6eae
AO
73962004-03-03 Alexandre Oliva <aoliva@redhat.com>
7397
7398 * elflink.c (bfd_elf_record_link_assignment): Mark undefweak and
7399 undefined symbols as hash_new.
7400
ae51a426
JR
74012003-03-03 Andrew Stubbs <andrew.stubbs@superh.com>
7402
7403 * archures.c: Add bfd_mach_sh4_nommu_nofpu.
7404 * cpu-sh.c: Ditto.
7405 * elf32-sh.c: Ditto.
7406 * bfd-in2.h: Regenerate.
7407
3b712a1a
AO
74082004-03-02 Alexandre Oliva <aoliva@redhat.com>
7409
7410 * elf32-frv.c (struct frv_pic_relocs_info): Added fixups and
7411 dynrelocs.
7412 (_frv_count_got_plt_entries): Initialize them.
7413 (frv_pic_relocs_info_find): Add insert argument. Adjust all
7414 callers.
7415 (frv_pic_relocs_info_for_global): Likewise.
7416 (frv_pic_relocs_info_for_local): Likewise.
7417 (frv_pic_merge_early_relocs_info): New.
7418 (_frv_resolve_final_relocs_info): Use it in case one entry maps to
7419 another.
7420 (_frv_add_dyn_reloc): Add entry argument. Adjust all callers.
7421 Check that we don't exceed the allocated count for entry.
7422 (_frv_add_rofixup): Likewise.
7423 (_frv_emit_got_relocs_plt_entries): Adjust for coding standards.
7424 (elf32_frv_finish_dynamic_sections): Improve error message in case
7425 we emit too few rofixup entries.
7426
676a64f4
RS
74272004-03-01 Richard Sandiford <rsandifo@redhat.com>
7428
7429 * archures.c (bfd_mach_fr450): New.
7430 * bfd-in2.h: Regenerate.
7431 * cpu-frv.c (arch_info_450): New bfd_arch_info_type.
7432 (arch_info_500): Link to it.
7433 * elf32-frv.c (elf32_frv_machine, frv_elf_merge_private_bfd_data)
7434 (frv_elf_print_private_bfd_data): Handle fr405 and fr450 header flags.
7435 (frv_elf_arch_extension_p): New function.
7436 (frv_elf_merge_private_bfd_data): Use it.
7437
0ad989f9
L
74382004-02-28 H.J. Lu <hongjiu.lu@intel.com>
7439
7440 * elf-bfd.h (_bfd_elf_link_add_archive_symbols): New prototype.
7441
7442 * elflink.h (is_global_data_symbol_definition): Moved to
7443 elflink.c.
7444 (elf_link_is_defined_archive_symbol): Likewise.
7445 (elf_link_add_archive_symbols): Likewise. Renamed to
7446 _bfd_elf_link_add_archive_symbols.
7447
7448 * elflink.c (elf_link_is_defined_archive_symbol): Get the size
7449 of ELF symbol table entry from backend.
7450 (_bfd_elf_link_add_archive_symbols): Call bfd_link_add_symbols
7451 instead of elf_link_add_object_symbols.
7452
ec3391e7
AO
74532004-02-27 Alexandre Oliva <aoliva@redhat.com>
7454
7455 * elf-bfd.h (struct elf_backend_data): Added
7456 elf_backend_can_make_relative_eh_frame,
7457 elf_backend_can_make_lsda_relative_eh_frame and
7458 elf_backend_encode_eh_address.
7459 (_bfd_elf_encode_eh_address): Declare.
7460 (_bfd_elf_can_make_relative): Declare.
7461 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Use new
7462 hooks to decide whether to attempt to make_relative and
7463 make_lsda_relative.
7464 (_bfd_elf_write_section_eh_frame_hdr): Call encode_eh_address.
7465 (_bfd_elf_can_make_relative): New.
7466 (_bfd_elf_encode_eh_address): New.
7467 * elf32-frv.c (frv_elf_use_relative_eh_frame): New.
7468 (frv_elf_encode_eh_address): New.
7469 (elf_backend_can_make_relative_eh_frame): Define.
7470 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7471 (elf_backend_encode_eh_address): Define.
7472 * elfxx-target.h
7473 (elf_backend_can_make_relative_eh_frame): Define.
7474 (elf_backend_can_make_lsda_relative_eh_frame): Define.
7475 (elf_backend_encode_eh_address): Define.
7476 (elfNN_bed): Add them.
7477
e6deed0a
AO
74782004-02-27 Alexandre Oliva <aoliva@redhat.com>
7479
7480 * elf32-frv.c (elf32_frv_howto_table) <R_FRV_LABEL16>: Set
7481 complain_on_overflow to signed.
7482
b60d7a1a
L
74832004-02-27 H.J. Lu <hongjiu.lu@intel.com>
7484
7485 * elflink.h (sort_symbol): New.
7486 (elf_link_add_object_symbols): Use a sorted symbol array for
7487 weakdef.
7488
1c3ff0f2
MS
74892004-02-27 Jakub Jelinek <jakub@redhat.com>
7490
7491 * elf32-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7492 for pc relative relocs.
7493 (elf_s390_relocate_section): Likewise.
7494 * elf64-s390.c (allocate_dynrelocs): Use SYMBOL_REFERENCES_LOCAL
7495 for pc relative relocs.
7496 (elf_s390_relocate_section): Likewise.
7497
de9811af
L
74982004-02-26 H.J. Lu <hongjiu.lu@intel.com>
7499
7500 * elfxx-ia64.c (elfNN_ia64_check_relocs): Fix call to
7501 count_dyn_reloc.
7502
ac33696c
L
75032004-02-25 H.J. Lu <hongjiu.lu@intel.com>
7504
7505 * elfxx-ia64.c (elfNN_ia64_dyn_reloc_entry): Add the reltext.
7506 field to track if a relocation is against readonly section.
7507 (count_dyn_reloc): Take a new argument for rent->reltext.
7508 (elfNN_ia64_check_relocs): Adjust call to count_dyn_reloc.
7509 (get_reloc_section): Don't set ia64_info->reltext here.
7510 (allocate_dynrel_entries): Set ia64_info->reltext here.
7511
072c8903
AO
75122004-02-24 Alexandre Oliva <aoliva@redhat.com>
7513
7514 * elf32-frv.c (FRV_SYM_LOCAL): Weak undefined doesn't imply local.
7515 (_frv_emit_got_relocs_plt_entries): Decay relocation to protected
7516 function's descriptor to symbol+offset, and map local undefweak
7517 symbol to NULL function descriptor.
7518 (elf32_frv_relocate_section): Likewise.
7519
aca305d9
NC
75202004-02-23 Mark Kettenis <kettenis@gnu.org>
7521
7522 * libaout.h (enum machine_type): Add M_SPARC64_NETBSD and
7523 M_X86_64_NETBSD.
7524 * netbsd-core.c (M_SPARC64_OPENBSD): Define.
7525 (netbsd_core_file_p): Set architecture from machine ID for
7526 selected machines.
7527
646411fb
JJ
75282004-02-23 Jakub Jelinek <jakub@redhat.com>
7529
7530 * elflink.h (size_dynamic_sections): If not adding DT_FLAGS and
7531 DF_BIND_NOW is set in info->flags, create DT_BIND_NOW dynamic entry.
7532
1de1a317
L
75332004-02-21 H.J. Lu <hongjiu.lu@intel.com>
7534
7535 * elflink.c (_bfd_elf_merge_symbol): Properly handle undefined
7536 symbols with non-default visibility.
7537
3c9d0484
DS
75382004-02-21 Danny Smith <daanysmith@users.sourceforge.net>
7539
7540 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Clear
7541 IMAGE_SCN_MEM_WRITE on known sections only.
7542
a876ecf9
JJ
75432004-02-20 Jakub Jelinek <jakub@redhat.com>
7544
7545 * elf32-ppc.c (allocate_dynrelocs): Create dynsym for undef weak
7546 symbols used in PIE relocs.
7547
a8a6d7ce
JJ
75482004-02-19 Jakub Jelinek <jakub@redhat.com>
7549
7550 * elf32-sparc.c (elf32_sparc_finish_dynamic_sections): Clear
7551 .plt sh_entsize.
7552
d080fcd2
DJ
75532004-02-18 Daniel Jacobowitz <drow@mvista.com>
7554
7555 * configure.in: Update version to 2.15.90.
7556 * configure: Regenerate.
7557
d25aed71 75582004-02-17 Daniel Jacobowitz <drow@mvista.com>
c1b954e2 7559 Richard Sandiford <rsandifo@redhat.com>
d25aed71
RS
7560
7561 * elfxx-mips.c (mips_elf_calculate_relocation): Use
7562 _bfd_elf_symbol_refs_local_p to decide whether to decay
7563 a GOT_PAGE/GOT_OFST pair to GOT_DISP/addend.
7564 (_bfd_mips_elf_check_relocs): Add a global GOT entry for GOT_PAGE
7565 relocs if the symbol wasn't defined by a regular object file.
7566 Don't check the symbol's dynindx.
7567
d7ce59e3
AC
75682004-02-16 Andrew Cagney <cagney@redhat.com>
7569
7570 * bfd-in.h (file_ptr, ufile_ptr): Configure type using
7571 @bfd_file_ptr@.
7572 * bfd-in2.h: Re-generate.
7573
ca0b7686
AC
75742004-02-14 Andrew Cagney <cagney@redhat.com>
7575
7576 * configure.host (HDEFINES): When hppa*-*-hpux*, define
7577 _LARGEFILE64_SOURCE.
7578
340b6d91
AC
75792004-02-13 Andrew Cagney <cagney@redhat.com>
7580
7581 * elf.c (vma_page_aligned_bias): New function.
7582 (assign_file_positions_except_relocs)
7583 (assign_file_positions_for_segments): Replace broken modulo
7584 arithmetic with call to vma_page_aligned_bias.
7585
1012372a
AC
75862004-02-11 Andrew Cagney <cagney@redhat.com>
7587
7c192733
AC
7588 * bfd-in.h: Update copyright.
7589 (bfd_tell): Change return type to file_ptr.
7590 * bfd-in2.h: Re-generate.
7591 * cache.c: Update copyright.
7592 (bfd_cache_lookup_worker): Use real_fseek, do not cast offset
7593 parameter.
7594 (close_one): Use real_ftell.
7595 * bfdio.c: Update copyright.
7596 (real_ftell, real_fseek): New functions.
7597 (bfd_tell): Use real_fseek and real_ftell, change return type to
7598 file_ptr.
7599 (bfd_seek): Use real_ftell and real_fseek, change type of
7600 file_position to a file_ptr.
7601 * libbfd-in.h: Update copyright.
7602 (real_ftell, real_fseek): Declare.
7603 * libbfd.h: Re-generate.
7604
1012372a
AC
7605 * configure.in (AC_CHECK_FUNCS): Check for ftello, ftello64,
7606 fseeko and fseeko64. Determine bfd_file_ptr.
7607 * configure: Re-generate.
c1ea0c09 7608 * config.in: Re-generate.
c1b954e2 7609
3255318a
NC
76102004-02-09 Anil Paranjpe <anilp1@KPITCummins.com>
7611
7612 * coff-h8300.c: Added comments about relaxation for ldc.w and stc.w.
7613 * elf32-h8300.c: Likewise.
7614
0d5f9994
NC
76152004-02-09 Christian Vogel <vogelchr@vogel.cx>
7616 Nick Clifton <nickc@redhat.com>
7617
7618 * elf64-alpha.c (elf64_alpha_calc_got_offsets_for_symbol): Catch
7619 GOT entries with no associated GOT subsection.
7620
174fd7f9
RS
76212004-02-09 Richard Sandiford <rsandifo@redhat.com>
7622
7623 * bfd-elf.h (elf_backend_name_local_section_symbols): New hook.
7624 * elf.c (swap_out_syms): Use it to decide whether local section
7625 symbols should be named.
7626 * elfxx-target.h (elf_backend_name_local_section_symbols): New macro.
7627 * elfxx-mips.h (_bfd_mips_elf_name_local_section_symbols): Declare.
7628 (elf_backend_name_local_section_symbols): Define.
7629 * elfxx-mips.c (_bfd_mips_elf_name_local_section_symbols): New.
7630
03609792
L
76312004-01-30 H.J. Lu <hongjiu.lu@intel.com>
7632
7633 * elfxx-ia64.c (elfNN_ia64_relax_brl): New function.
7634 (elfNN_ia64_relax_section): Optimize brl to br during the relax
7635 finalize pass.
7636
ea01195e
AO
76372004-01-30 Alexandre Oliva <aoliva@redhat.com>
7638
7639 * elf32-frv.c (elf32_frv_always_size_sections): Initialize pointer
7640 to bfd_link_hash_entry passed by reference to
7641 _bfd_generic_link_add_one_symbol.
7642
838e70c5
L
76432004-01-25 H.J. Lu <hongjiu.lu@intel.com>
7644
7645 * elfxx-ia64.c (elfNN_ia64_relocate_section): Disallow imm
7646 relocations against dynamic symbols.
7647
4f199be3
DJ
76482004-01-23 Daniel Jacobowitz <drow@mvista.com>
7649
7650 * elf32-arm.h (elf32_arm_check_relocs): Revert part of 2004-01-13
7651 change.
7652
28d39d1a
NC
76532004-01-21 Tom Rix <tcrix@worldnet.att.net>
7654
7655 * reloc.c: New 5 bit reloc, BFD_RELOC_M68HC12_5B, for m68hc12 movb/movw.
7656 * bfd-in2.h, libbfd.h: Rebuilt.
7657
66bed356
DS
76582004-01-20 Danny Smith <dannysmith@users.sourceforge.net>
7659
7660 * peXXigen.c (_bfd_XXi_swap_scnhdr_out): Don't remove
7661 IMAGE_SCN_MEM_WRITE flag from .text section if WP_TEXT
7662 flag has been cleared.
7663
7e89635a
KH
76642004-01-19 Kazu Hirata <kazu@cs.umass.edu>
7665
7666 * coff-h8300.c: Add and adjust comments about relaxation.
7667 * elf32-h8300.c: Likewise.
7668
e804e836
KH
76692004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7670
7671 * coff-h8300.c: Fix comment typos.
7672 * elf32-h8300.c: Likewise.
7673
630a7b0a
KH
76742004-01-16 Kazu Hirata <kazu@cs.umass.edu>
7675
7676 * coff-h8300.c: Add comments about relaxation.
7677 * elf32-h8300.c: Likewise.
7678
f8b73030
MR
76792004-01-14 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7680
7681 * acinclude.m4: Quote names of macros to be defined by AC_DEFUN
7682 throughout.
7683 * aclocal.m4: Regenerate.
7684 * configure: Regenerate.
7685
32159579
ILT
76862004-01-13 Ian Lance Taylor <ian@wasabisystems.com>
7687
7688 * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Call
7689 mips_elf64_rtype_to_howto instead of using howto_table.
7690
c84cd8ee
DJ
76912004-01-13 Daniel Jacobowitz <drow@mvista.com>
7692
7693 * elf32-arm.h (elf32_arm_final_link_relocate): Check that we created
7694 the .plt section.
7695 (elf32_arm_check_relocs): Don't increment the PLT refcount for
7696 relocs which would not use the PLT.
7697
680a3378
AM
76982004-01-13 Alan Modra <amodra@bigpond.net.au>
7699
7700 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
7701 (ppc64_elf_gc_sweep_hook): Likewise.
7702 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
7703
faca21e5
NC
77042004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
7705
7706 Adds linker relaxation support for bit manipulation insns like
680a3378 7707 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
faca21e5 7708 bst, btst, bxor.
680a3378 7709 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5 7710 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
680a3378 7711 * coff-h8300.c: Opcode for bit manipulation insn is checked in
faca21e5
NC
7712 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
7713
818a27ac
AM
77142004-01-12 Alan Modra <amodra@bigpond.net.au>
7715
7716 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
7717
96ef1419
KH
77182004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7719
7720 * elf32-h8300.c: Fix formatting.
7721
babfd660
KH
77222004-01-11 Kazu Hirata <kazu@cs.umass.edu>
7723
7724 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
7725 dynamic object is present. Declare r_symndx and h in an inner
7726 scope.
7727 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
7728
7359ea65
DJ
77292004-01-09 Daniel Jacobowitz <drow@mvista.com>
7730
7731 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
7732 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
7733 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
7734 identically. Do not emit PC24 relocations for shared libraries.
7735 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
7736 identically. Don't adjust pc_count.
7737 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
7738 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
7739 adjust count for branch relocations.
7740 (allocate_dynrelocs): Correct typo in call to
7741 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
7742 PC24 or PLT32 relocs when linking.
7743
44e88952
NC
77442004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7745
7746 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
7747 relocation howto with ARM_26 one for consistency.
7748 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
7749 that will be converted to ARM_26D ones, since we always want 'done'
7750 relocations to be reflected in section's data.
7751 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
7752 offset.
7753 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
7754 requested.
7755
1e7fef1d
NC
77562004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
7757
7758 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
7759 are not partial_inplace during a relocatable link.
7760
4f075348
KH
77612004-01-08 Kazu Hirata <kazu@cs.umass.edu>
7762
babfd660 7763 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
4f075348
KH
7764 if no dynamic object is present. Declare r_symndx and h in an
7765 inner scope.
7766
de0d9f33
L
77672004-01-07 H.J. Lu <hongjiu.lu@intel.com>
7768
7769 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
7770 trampoline if it is known out of range.
7771
51532845
AO
77722004-01-06 Alexandre Oliva <aoliva@redhat.com>
7773
7774 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
7775 * elf32-frv.c (_frv_osec_readonly_p): New.
7776 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
7777 undefweak symbol.
7778 (_frv_count_got_plt_entries): Adjust expected count accordingly.
7779 (elf32_frv_relocate_section): Likewise. Error out if attempting
7780 to emit rofixups or dynamic relocs in read-only segments. Use
7781 _bfd_elf_section_offset to adjust r_offsets in rofixups and
7782 dynamic relocations.
7783 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
7784 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
7785 relocations or fixups involving merged sections correctly. Avoid
7786 crash when undefined symbol is referenced by R_FRV_32 or
7787 R_FRV_FUNCDESC_VALUE.
7788 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
7789 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
7790 input section holding local symbol to addend of R_FRV_32 or
7791 R_FRV_FUNCDESC_VALUE dynamic relocation.
7792 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
7793 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
7794 (elf32_frv_always_size_sections): Don't store pointer to
7795 __stacksize symbol in sec_info.
7796 (elf32_frv_modify_segment_map): Look it up here.
7797 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
7798 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
7799 of the lazy PLT entry, not only its offset, as the low word of a
7800 function descriptor.
7801 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
7802 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
7803 if a hash table entry already exists but is not a definition.
7804 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
7805 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
7806 (_frv_add_rofixup): Don't inline.
7807 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
7808 for undefweak symbols.
7809 (elf32_frv_relocate_section): Avoid crash while computing
7810 relocation when linking with shared library. Only emit rofixups
7811 and dynamic relocations for alloc&load sections. Mark binaries
7812 with inter-segment relocations for relocation as a unit.
7813 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
7814 (DEFAULT_STACK_SIZE): New.
7815 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
7816 emit rofixups or dynamic relocs when linking dynamic non-PIE
7817 executables.
7818 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
7819 shared libs too. Reserve the last entry for the GOT pointer.
7820 (elf32_frv_finish_dynamic_sections): Emit it.
7821 (elf32_frv_always_size_sections): New.
7822 (elf32_frv_modify_segment_map): New.
7823 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
7824 sections.
7825 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
7826 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
7827 (elf_backend_always_size_sections): New.
7828 (elf_backend_modify_segment_map): New.
7829 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
7830 * config.bfd: Added frv-*-*linux*.
7831 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
7832 ABS section, instead of crashing.
7833 (elf32_frv_relocate_section): Don't crash before warning about
7834 different segments in non-PIC relocation.
7835 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
7836 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
7837 relocs to undefweak symbols.
7838 (elf32_frv_relocate_section): Ditto for undefined symbols.
7839 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
7840 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
7841 gotfixup section was created.
7842 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
7843 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
7844 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
7845 complain_overflow_signed.
7846 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
7847 have not been allocated.
7848 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
7849 privfd only if dynamic sections were created.
7850 (elf32_frv_relocate_section): Compute gprel_segment, and use it
7851 for GPREL relocs. When linking relocatable FDPIC executables,
7852 emit warnings for relocations that would be illegal on PIE or
7853 shared libraries. Emit rofixup for R_FRV_32 only if input object
7854 is not FDPIC.
7855 (_frv_create_got_section): Define _gp symbol in the rofixup
7856 section.
7857 (elf32_frv_finish_dynamic_sections): If rofixups needed but
7858 dynamic sections missing, error out requesting -melf32frvfd.
7859 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
7860 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
7861 computation of addends from section and global or local symbol
7862 value. Change return type to bfd_boolean, and return a failure if
7863 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
7864 nonzero addend is required.
7865 (elf32_frv_relocate_section): Likewise. Print error for
7866 unsupported nonzero addends.
7867 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
7868 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
7869 force everything local.
7870 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
7871 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
7872 (frv_gotfixup_section): New.
7873 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
7874 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
7875 and relocsfdv.
7876 (_frv_add_rofixup): New.
7877 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
7878 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
7879 improve some ugly conditions.
7880 (elf32_frv_relocate_section): Likewise. Reject inter-segment
7881 relocations in fdpic.
7882 (_frv_create_got_section): Create .rofixup.got section.
7883 (struct _frv_dynamic_got_info): Added fixups.
7884 (_frv_count_got_plt_entries): Account in-GOT relocations into
7885 relocs32, relocsfd and relocsfdv. Account them into relocs or
7886 fixups, as appropriate.
7887 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
7888 sizing of gotrel.
7889 (elf32_frv_finish_dynamic_sections): Verify that the right number
7890 of relocations and fixups was generated.
7891 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
7892 relocsfdv.
7893 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
7894 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
7895 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
7896 descriptor of a (formerly-)global symbol is local.
7897 (struct frv_pic_relocs_info): Adjust comments.
7898 (_frv_emit_got_relocs_plt_entries): Adjust.
7899 (elf32_frv_relocate_section): Likewise.
7900 (_frv_count_got_plt_entries): Likewise.
7901 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
7902 symbol's value to addend in the common preamble. Decay dynamic
7903 symbols to section+offset if they bind or call locally, for GOT
7904 and FUNCDESC_VALUE, respectively.
7905 (elf32_frv_relocate_section): Likewise.
7906 (elf32_frv_check_relocs): Don't register as dynamic symbols of
7907 internal or hidden visibility.
7908 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
7909 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
7910 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
7911 (elf32_frv_relocate_section): Pass relocation addend in. Use
7912 original relocation addend to look up the got relocs/plt entries
7913 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
7914 processing relocations that reference .scommon symbols.
7915 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
7916 Introduce support for dynamic linking.
7917 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
7918 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
7919 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
7920 (frv_reloc_type_lookup): Return REL howtos for executables and
7921 dynamic libraries.
7922 (frv_info_to_howto_rel): New.
7923 (struct frv_elf_link_hash_table): New.
7924 (frv_hash_table, frv_got_section, frv_gotrel_section,
7925 frv_plt_section, frv_pltrel_section, frv_relocs_info,
7926 frv_got_initial_offset, frv_plt_initial_offset): New macros.
7927 (frv_elf_link_hash_table_create): New.
7928 (struct frv_pic_relocs_info): New.
7929 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
7930 (frv_pic_relocs_info_find): New.
7931 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
7932 New.
7933 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
7934 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
7935 (_frv_emit_got_relocs_plt_entries): New.
7936 (elf32_frv_relocate_section): Add support for dynamic linking.
7937 Handle new relocations.
7938 (_frv_create_got_section): New.
7939 (elf32_frv_create_dynamic_sections): New.
7940 (ELF_DYNAMIC_INTERPRETER): New.
7941 (struct _frv_dynamic_got_info): New.
7942 (_frv_count_got_plt_entries): New.
7943 (struct _frv_dynamic_got_plt_info): New.
7944 (_frv_compute_got_alloc_data): New.
7945 (_frv_get_got_entry, _frv_get_fd_entry): New.
7946 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
7947 (_frv_resolve_final_relocs_info): New.
7948 (elf32_frv_size_dynamic_sections): New.
7949 (elf32_frv_finish_dynamic_sections): New.
7950 (elf32_frv_adjust_dynamic_symbol): New.
7951 (elf32_frv_finish_dynamic_symbol): New.
7952 (elf32_frv_check_relocs): Handle new relocs. Explain how the
7953 whole thing works.
7954 (elf_info_to_howto_rel): Define.
7955 (bfd_elf32_bfd_link_hash_table_create): Define.
7956 (elf_backend_create_dynamic_sections): Define.
7957 (elf_backend_adjust_dynamic_symbol): Define.
7958 (elf_backend_size_dynamic_sections): Define.
7959 (elf_backend_finish_dynamic_symbol): Define.
7960 (elf_backend_finish_dynamic_sections): Define.
7961 (elf_backend_want_got_sym): Define.
7962 (elf_backend_got_header_size): Define.
7963 (elf_backend_want_got_plt): Define.
7964 (elf_backend_plt_readonly): Define.
7965 (elf_backend_want_plt_sym): Define.
7966 (elf_backend_plt_header_size): Define.
7967 (elf_backend_may_use_rel_p): Define.
7968 (elf_backend_may_use_rela_p): Define.
7969 (elf_backend_default_use_rela_p): Define.
7970 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
7971 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
7972 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
7973 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
7974 (frv_reloc_map): Map the corresponding BFD relocs to them.
7975 (frv_reloc_type_lookup): ... and back to BFD relocs.
7976 * reloc.c: New relocs.
7977 * bfd-in2.h, libbfd.h: Rebuilt.
7978 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
7979 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
7980 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
7981 R_FRV_FUNCDESC_GOTLO): New.
7982 (frv_reloc_map): Map the corresponding BFD relocs to them.
7983 (frv_reloc_type_lookup): ... and back to BFD relocs.
7984 * reloc.c: New relocs.
7985 * bfd-in2.h, libbfd.h: Rebuilt.
7986
4301eeb1
MR
79872004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7988
7989 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7990 targets to support pages of up to 64kB.
7991 (elf32_bed): Redefine to get a separate backend data structure for
7992 traditional targets.
7993 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7994 targets to support pages of up to 64kB.
7995 (elf64_bed): Redefine to get a separate backend data structure for
7996 traditional targets.
7997 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
7998 targets to support pages of up to 64kB.
7999 (elf32_bed): Redefine to get a separate backend data structure for
8000 traditional targets.
8001
0647ed71
MK
80022004-01-04 Mark Kettenis <kettenis@gnu.org>
8003
8004 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
8005
61adc1a4
NC
80062004-01-02 Mark Kettenis <kettenis@gnu.org>
8007
8008 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
8009 (elf_i386_grok_psinfo): Likewise.
8010
b50c15dc
NC
80112004-01-02 Bernardo Innocenti <bernie@develer.com>
8012
8013 * config.bfd: Add m68k-uClinux target.
8014
2627de83
AM
80152004-01-01 Grant Edwards <grante@visi.com>
8016
8017 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
8018 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
8019 (elf32_h8_gc_sweep_hook): New function.
8020 (elf_backend_gc_mark_hook): Define.
8021 (elf_backend_gc_sweep_hook): Define.
8022 (elf_backend_can_gc_sections): Define.
8023
c9e214e5 8024For older changes see ChangeLog-0203
56882138
AM
8025\f
8026Local Variables:
8027mode: change-log
8028left-margin: 8
8029fill-column: 74
8030version-control: never
8031End: