bfd:
[deliverable/binutils-gdb.git] / bfd / ChangeLog
CommitLineData
19540007
JM
12008-11-25 Joseph Myers <joseph@codesourcery.com>
2
3 * elf32-arm.c (elf32_arm_final_link_relocate): Do not turn
4 branches to undefine weak symbols into branches to the next
5 instruction if creating PLT entries for those symbols.
6
83bac4b0
NC
72008-11-25 Nick Clifton <nickc@redhat.com>
8
9 * elflink.c (is_reloc_section): New function. Returns true if the
10 given name matches the name of the reloc-containing section
11 associated with the given section.
12 (get_dynamic_reloc_section_name): New function. Computes the name
13 of the section that contains the dynamic relocs associated with
14 the given section.
15 (_bfd_elf_get_dynamic_reloc_section): New function. Returns a
16 pointer to the section containing the dynamic relocs associated
17 with the given section.
18 (_bfd_elf_make_dynamic_reloc_section): New function. Creates a
19 section to contain the dynamic relocs associated with a given
20 section.
21 * elf-bfd.h: Prototype the new functions.
22 * elf-m10300.c (mn10300_elf_check_relocs): Use new functions.
23 (mn10300_elf_final_link_relocs): Likewise.
24 * elf32-arm.c (reloc_section_p): Delete - replaced by new
25 functions.
26 (elf32_arm_final_link_relocate): Use new functions.
27 (elf32_arm_check_relocs): Likewise.
28 * elf32-cris.c (cris_elf_relocate_section): Likewise.
29 (elf_cris_check_relocs): Likewise.
30 * elf32-hppa.c (elf32_hppa_check_relocs): Likewise.
31 * elf32-i370.c (i370_elf_check_relocs): Likewise.
32 (i370_elf_relocate_section): Likewise.
33 * elf32-i386.c (elf_i386_check_relocs): Likewise.
34 * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
35 (m32r_elf_check_relocs): Likewise.
36 * elf32-m68k.c (elf_m68k_check_relocs): Likewise.
37 * elf32_ppc.c (ppc_elf_check_relocs): Likewise.
38 (ppc_elf_relocate_section): Likewise.
39 * elf32-s390.c (elf_s390_check_relocs): Likewise.
40 * elf32-sh.c (sh_elf_relocate_section): Likewise.
41 (sh_elf_check_relocs): Likewise.
42 * elf32-vax.c (elf_vax_check_relocs): Likewise.
43 (elf_vax_relocate_section): Likewise.
44 * elf64-alpha.c (elf64_alpha_check_relocs): Likewise.
45 * elf64-ppc.c (ppc64_elf_check_relocs): Likewise.
46 * elf64-s390.c (elf_s390_check_relocs): Likewise.
47 * elf64-sh64.c (sh_elf64_relocate_section): Likewise.
48 * elf64-x86-64.c (elf64_x86_64_check_relocs): Likewise.
49 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Likewise.
50 * elf32-bfin.c (bfin_check_relocs): Remove redundant local
51 variable 'sreloc'.
52 (bfin_relocate_section): Likewise.
53 * elf32-v850.c (v850_elf_check_relocs): Likewise.
54
100382c7
HPN
552008-11-23 Hans-Peter Nilsson <hp@axis.com>
56
57 Implement TLS for CRIS.
58 * elf32-cris.c: Include limits.h.
59 (TLSHOWTO16): Redefine in terms of and move contents to...
60 (TLSHOWTO16X): New macro.
61 (TLSHOWTO16S, LGOT_REG_NDX, LGOT_DTP_NDX, LGOT_ALLOC_NELTS_FOR)
62 (elf_cris_hash_entry): New macros.
63 (cris_elf_howto_table): Make R_CRIS_16_DTPREL,
64 R_CRIS_16_GOT_TPREL, R_CRIS_16_TPREL check overflow for signed,
65 not unsigned values.
66 (cris_info_to_howto_rela): Make r_type a enum elf_cris_reloc_type,
67 not unsigned int.
68 (struct elf_cris_link_hash_entry): New members reg_got_refcount,
69 tprel_refcount, and dtp_refcount.
70 (struct elf_cris_link_hash_table): New member dtpmod_refcount.
71 (elf_cris_link_hash_newfunc): Initialize new members.
72 (elf_cris_link_hash_table_create): Similar.
73 (cris_final_link_relocate, elf_cris_reloc_type_class): Use a
74 temporary variable when testing the relocation type.
75 (cris_elf_gc_mark_hook): Ditto. Add default case where needed.
76 (cris_elf_gc_sweep_hook): Ditto. Handle reference-counting for
77 the new assembly-generated relocs. Rewrite refcount handling to
78 set temporary variables to pointers to reloc-specific variables
79 and entry size and common code for the update.
80 (additional_relocation_error_msg_count): New variable.
81 (cris_elf_relocate_section): Use a function-local variable srelgot
82 for the .rela.got section instead of looking it up for every need.
83 Make r_type a enum elf_cris_reloc_type, not int. Actually set
84 symname for non-local symbols. Handle new assembly-generated
85 relocs. For overflow, emit additional messages for the new 16-bit
86 relocs as well as R_CRIS_16_GOTPLT and R_CRIS_16_GOT.
87 (elf_cris_finish_dynamic_symbol): Use elf_cris_finish_dynamic_symbol
88 instead of plain casts. Check new hash entry member
89 reg_got_refcount when checking whether to emit a GOT entry.
90 (elf_cris_finish_dynamic_sections): Update head comment to warn
91 about emitting relocs here. Use a temporary variable when testing
92 the relocation type.
93 (elf_cris_discard_excess_program_dynamics)
94 (elf_cris_adjust_gotplt_to_got): Handle reference counting change
95 regarding h->reg_got_refcount.
96 (cris_elf_check_relocs): Rewrite refcount handling to set
97 temporary variables and entry size and common code for the update
98 for local symbols. Use new macro elf_cris_hash_entry. Adjust
99 allocation for change in reference counting of GOT entries for
100 local symbols.
101 (elf_cris_size_dynamic_sections): Adjust calculated size of
102 .got.plt and .rela.got if we need a GOT entry for a
103 R_CRIS_DTPMOD relocation.
104 (elf_cris_got_elt_size): New function.
105 (elf_backend_got_elt_size): Define.
106
1fa3cd83
SA
1072008-11-21 Sterling Augustine <sterling@tensilica.com>
108
109 * xtensa-isa.c (xtensa_state_is_shared_or): New function.
110
10455f89
HPN
1112008-11-21 Hans-Peter Nilsson <hp@axis.com>
112
113 * elf-bfd.h (struct elf_backend_data): New member got_elt_size.
114 (_bfd_elf_default_got_elt_size): Declare.
115 * elflink.c (struct alloc_got_off_arg): Replace member got_elt_size
116 by new member info.
117 (elf_gc_allocate_got_offsets): Adjust for calling bed->got_elt_size
118 to get the element size instead of using a gofarg entry.
119 (bfd_elf_gc_common_finalize_got_offsets): Similar.
120 (_bfd_elf_default_got_elt_size): New function.
121 * elfxx-target.h: New macro elf_backend_got_elt_size.
122 (elfNN_bed): Use it.
123
78bc95e3
TG
1242008-11-20 Tristan Gingold <gingold@adacore.com>
125
126 * bfdwin.c: Fix comment.
127
6aa341c7
TG
1282008-11-20 Tristan Gingold <gingold@adacore.com>
129
130 * bfd.c (is32bit): Use architecture information for non-ELF
131 targets.
132
d6e14abc
AM
1332008-11-20 Alan Modra <amodra@bigpond.net.au>
134
135 * elf32-ppc.c (allocate_dynrelocs): Always use tlsld_got for
136 TLS_LD even when symbol is used with other TLS reloc types.
137 (ppc_elf_relocate_section): Bypass symbol checks when using tlsld_got.
138 Leave addend zero on LD DTPMOD dynamic reloc.
139
33430bd0
BW
1402008-11-19 Bob Wilson <bob.wilson@acm.org>
141
142 * xtensa-modules.c (sysregs): Add MMID, VECBASE, EPC5, EPC6, EPC7,
143 EXCSAVE5, EXCSAVE6, EXCSAVE7, EPS5, EPS6, EPS7, CPENABLE,
144 SCOMPARE1, and THREADPTR registers.
145 (NUM_SYSREGS, MAX_USER_REG): Update.
146 (states): Change width of INTERRUPT, WindowBase, WindowStart, and
147 INTENABLE. Add VECBASE, EPC5, EPC6, EPC7, EXCSAVE5, EXCSAVE6,
148 EXCSAVE7, EPS6, EPS6, EPS7, THREADPTR, CPENABLE, and SCOMPARE1 states.
149 (NUM_STATES): Update.
150 (enum xtensa_state_id): Add entries for new states.
151 (enum xtensa_field_id): Add entries for xt_wbr15_imm and xt_wbr18_imm
152 fields, along with functions to extract and set them.
153 (regfiles): Change number of AR registers to 32.
154 (Operand_ar0_encode, Operand_ar4_encode, Operand_ar8_encode,
155 Operand_ar12_encode, Operand_ars_entry_encode): Update register mask.
156 (operands): Add entries for tp7, xt_wbr15_label, xt_wbr18_label,
157 xt_wbr15_imm, and xt_wbr18_imm operands, along with functions to
158 encode and decode them.
159 (enum xtensa_operand_id): Add entries for new operands.
160 (Iclass_xt_iclass_rfi_stateArgs): Add EPC5, EPC6, EPC7, EPS5, EPS6, and
161 EPC7 states.
162 (Iclass_xt_iclass_rfdo_stateArgs): Replace EPC4 and EPS4 by EPC6 and
163 EPS6, respectively.
164 (iclasses): Add entries for rur_threadptr, wur_threadptr,
165 xt_iclass_wsr_176, xt_iclass_rsr_epc5, xt_iclass_wsr_epc5,
166 xt_iclass_xsr_epc5, xt_iclass_rsr_excsave5, xt_iclass_wsr_excsave5,
167 xt_iclass_xsr_excsave5, xt_iclass_rsr_epc6, xt_iclass_wsr_epc6,
168 xt_iclass_xsr_epc6, xt_iclass_rsr_excsave6, xt_iclass_wsr_excsave6,
169 xt_iclass_xsr_excsave6, xt_iclass_rsr_epc7, xt_iclass_wsr_epc7,
170 xt_iclass_xsr_epc7, xt_iclass_rsr_excsave7, xt_iclass_wsr_excsave7,
171 xt_iclass_xsr_excsave7, xt_iclass_rsr_eps5, xt_iclass_wsr_eps5,
172 xt_iclass_xsr_eps5, xt_iclass_rsr_eps6, xt_iclass_wsr_eps6,
173 xt_iclass_xsr_eps6, xt_iclass_rsr_eps7, xt_iclass_wsr_eps7,
174 xt_iclass_xsr_eps7, xt_iclass_rsr_vecbase, xt_iclass_wsr_vecbase,
175 xt_iclass_xsr_vecbase, xt_iclass_mul16, xt_iclass_wsr_mmid,
176 xt_iclass_icache_lock, xt_iclass_dcache_lock, xt_iclass_rsr_cpenable,
177 xt_iclass_wsr_cpenable, xt_iclass_xsr_cpenable, xt_iclass_clamp,
178 xt_iclass_minmax, xt_iclass_sx, xt_iclass_l32ai, xt_iclass_s32ri,
179 xt_iclass_s32c1i, xt_iclass_rsr_scompare1, xt_iclass_wsr_scompare1,
180 xt_iclass_xsr_scompare1, xt_iclass_div, and xt_iclass_mul32, along
181 with corresponding argument and state argument arrays. Change
182 number of state arguments for xt_iclass_rfi. Add arguments for
183 xt_iclass_rfdo.
184 (enum xtensa_iclass_id): Add entries for new iclasses.
185 (opcodes): Add entries for RUR_THREADPTR, WUR_THREADPTR, WSR_176,
186 RSR_EPC5, WSR_EPC5, XSR_EPC5, RSR_EXCSAVE5, WSR_EXCSAVE5, XSR_EXCSAVE5,
187 RSR_EPC6, WSR_EPC6, XSR_EPC6, RSR_EXCSAVE6, WSR_EXCSAVE6, XSR_EXCSAVE6,
188 RSR_EPC7, WSR_EPC7, XSR_EPC7, RSR_EXCSAVE7, WSR_EXCSAVE7, XSR_EXCSAVE7,
189 RSR_EPS5, WSR_EPS5, XSR_EPS5, RSR_EPS6, WSR_EPS6, XSR_EPS6, RSR_EPS7,
190 WSR_EPS7, XSR_EPS7, RSR_VECBASE, WSR_VECBASE, XSR_VECBASE, MUL16U,
191 MUL16S, WSR_MMID, IPFL, IHU, IIU, DPFL, DHU, DIU, RSR_CPENABLE,
192 WSR_CPENABLE, XSR_CPENABLE, CLAMPS, MIN, MAX, MINU, MAXU, SEXT, L32AI,
193 S32RI, S32C1I, RSR_SCOMPARE1, WSR_SCOMPARE1, XSR_SCOMPARE1, QUOU, QUOS,
194 REMU, REMS, and MULL opcodes, along with the corresponding functions
195 to encode them.
196 (enum xtensa_opcode_id): Add entries for new opcodes.
197 (Slot_inst_decode): Handle new opcodes.
198 (Slot_inst_get_field_fns, Slot_inst_set_field_fns): Add entries for
199 xt_wbr15_imm and xt_wbr18_imm fields.
200 (Slot_inst16a_get_field_fns, Slot_inst16a_set_field_fns): Likewise.
201 (Slot_inst16b_get_field_fns, Slot_inst16b_set_field_fns): Likewise.
202 (xtensa_modules): Update number of fields, operands, iclasses and
203 opcodes.
204
c91e322a
NC
2052008-11-19 Nix <nix@esperi.org.uk>
206
207 * elf.c (swap_out_syms) [USE_STT_COMMON]: Fix syntax error.
208
af1fb11f
NC
2092008-11-19 Nick Clifton <nickc@redhat.com>
210
211 PR 7027
212 * elfxx-sparc.c (_bfd_sparc_elf_check_relocs): Treat WPLT30 relocs
213 against local symbols in 64-bit binaries as if they were WDISP30
214 relocs.
215 (_bfd_sparc_elf_relocate_section): Likewise.
216
8e79c3df
CM
2172008-11-18 Catherine Moore <clm@codesourcery.com>
218
219 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Merge
220 half-precision attributes.
221 (elf32_arm_copy_one_eabi_other_attribute): New.
222 (elf32_arm_copy_other_attribute_list): New.
223
dc80fd5c
NC
2242008-11-18 Nick Clifton <nickc@redhat.com>
225
226 * dwarf2.c (read_section): Fix formatting.
227 (read_n_bytes): Remove unhelpful comment.
228 (read_indirect_string): Pass symbol table to read_section in case
229 the .debug_str section needs relocating.
230
231 PR 7037
232 * elf32-cr16.c (cr16_elf_howto_table): Zero the src_mask field of
233 the reloc descriptions.
234
28b02751
EW
2352008-11-14 Eric B. Weddington <eric.weddington@atmel.com>
236
237 PR 7022
238 * elf32-avr.c (bfd_elf_avr_final_write_processing):
239 Add missing break statements.
240
af4bed4b
BW
2412008-11-14 Bob Wilson <bob.wilson@acm.org>
242
243 * xtensa-modules.c (xtensa_state_id): New enum, replacing STATE macros.
244 (xtensa_field_id, xtensa_regfile_id, xtensa_operand_id)
245 (xtensa_iclass_id, xtensa_opcode_id): New enums.
246 Replace hardcoded constants throughout this file with enum values.
247
2b0bc088
NC
2482008-11-14 Nathan Sidwell <nathan@codesourcery.com>
249
250 * elf.c (assign_file_positions_for_load_sections): Use header_size
251 to avoid moving the load address of file headers.
252 (assign_file_positions_for_load_sections): Set header_size for
253 segments containing the file header.
254
d387240a
TG
2552008-11-14 Tristan Gingold <gingold@adacore.com>
256
257 * configure.com: Handle bfd_default_target_size, BFD_HOST_LONG_LONG,
258 BFD_HOST_64BIT_LONG_LONG, BFD_HOSTPTR_T, bfd_file_ptr.
259 Generate bfdver.h.
260 * vms-hdr.c (_bfd_vms_write_hdr): Use strdup/free instead of alloca.
261 * hosts/alphavms.h: Defines macros to bypass i18n.
262 * makefile.vms (OBJS): Update file list.
263 (DEFS): Remove VMS_DEBUG, const, add DEBUGDIR.
264 (CFLAGS): Update flags.
265 * bfdio.c (real_fopen): Add code specific to VMS: extract attributes
266 from modes.
267
08c13eba
JB
2682008-11-13 Joel Brobecker <brobecker@adacore.com>
269
270 * configure.in: Deactivate large-file support on native 32bit
271 sparc-solaris unless the user explicitly requested it.
272 * configure: Regenerate.
273
57268894
HPN
2742008-11-13 Hans-Peter Nilsson <hp@axis.com>
275
276 PR ld/7028
277 * elf.c (assign_file_positions_for_load_sections): Allocate phrds
278 with bfd_zalloc2 instead of bfd_alloc2. For the amount, use
279 the possibly-preset header-size, not the computed one.
280
3337c1e5
AM
2812008-11-13 Alan Modra <amodra@bigpond.net.au>
282
283 PR 7023
284 * elf.c (bfd_section_from_shdr <SHT_SYMTAB>): Fail on invalid sh_info.
285
b84a33b5
AM
2862008-11-11 Alan Modra <amodra@bigpond.net.au>
287
288 * elf.c (assign_file_positions_for_non_load_sections): Consolidate
289 PT_GNU_RELRO handling.
290
5d0900eb
AM
2912008-11-11 Alan Modra <amodra@bigpond.net.au>
292
293 PR 7012
294 * dwarf2.c (find_line): Don't keep stale pointers into realloc'd
295 memory. Return on errors. Fix memory leak.
296 (_bfd_dwarf2_cleanup_debug_info): Free dwarf_str_buffer.
297
129af99f
AS
2982008-11-10 Andreas Schwab <schwab@suse.de>
299
300 PR 7011
301 * elf.c (assign_file_positions_for_non_load_sections): Handle
302 PT_GNU_RELRO specially.
303
8a2a2dbb
NC
3042008-11-06 Joel Sherrill <joel.sherrill@oarcorp.com>
305
306 * config.bfd: Add m32c-*-rtems* and m32r-*-rtems*.
307
428b207a
TT
3082008-11-06 Tom Tromey <tromey@redhat.com>
309
310 * configure, config.in: Rebuild.
311 * configure.in: Check for fileno.
312 * bfdio.c (close_on_exec): New function.
313 (real_fopen): Use it.
314 (FD_CLOEXEC): New define.
315
15e1c58a
TG
3162008-11-06 Tristan Gingold <gingold@adacore.com>
317
318 * mach-o.h (BFD_MACH_O_NO_SECT): Add; reorders the macros.
319 (BFD_MACH_O_SYM_NTYPE, BFD_MACH_O_SYM_NSECT,
320 BFD_MACH_O_SYM_NDESC): New macros.
321 (bfd_mach_o_i386_thread_flavour): Define according to the latest
322 definition from system header.
323 (bfd_mach_o_load_command_type): Add BFD_MACH_O_LC_RPATH,
324 BFD_MACH_O_LC_CODE_SIGNATURE.
325 (BFD_MACH_O_SECTION_TYPE_MASK, BFD_MACH_O_SECTION_ATTRIBUTES_MASK,
326 BFD_MACH_O_SECTION_ATTRIBUTES_SYS, BFD_MACH_O_SECTION_ATTRIBUTES_USR,
327 BFD_MACH_O_S_ATTR_LOC_RELOC, BFD_MACH_O_S_ATTR_EXT_RELOC,
328 BFD_MACH_O_S_ATTR_SOME_INSTRUCTIONS, BFD_MACH_O_S_ATTR_DEBUG,
329 BFD_MACH_O_S_ATTR_PURE_INSTRUCTIONS): Add.
330 (bfd_mach_o_segment_command): Add room for a nul terminator in
331 segname field.
332 (BFD_MACH_O_PROT_READ, BFD_MACH_O_PROT_WRITE,
333 BFD_MACH_O_PROT_EXECUTE): Add.
334 (INDIRECT_SYMBOL_LOCAL): Renames to BFD_MACH_O_INDIRECT_SYMBOL_LOCAL.
335 (INDIRECT_SYMBOL_ABS): Renames to BFD_MACH_O_INDIRECT_SYMBOL_ABS.
336 (bfd_mach_o_uuid_command): Add the structure.
337 (bfd_mach_o_load_command): Add uuid field.
338 (bfd_get_mach_o_data): New macro.
339 * mach-o.c (bfd_mach_o_bfd_print_private_bfd_data): New function which
340 replaces the macro.
341 (SECTION_TYPE, SECTION_ATTRIBUTES, SECTION_ATTRIBUTES_USR,
342 S_ATTR_PURE_INSTRUCTIONS, SECTION_ATTRIBUTES_SYS,
343 S_ATTR_SOME_INSTRUCTIONS, S_ATTR_EXT_RELOC, S_ATTR_LOC_RELOC): Renamed
344 and moved to mach-o.h.
345 (N_STAB, N_TYPE, N_EXT, N_UNDF, N_ABS, N_TEXT, N_DATA, N_BSS,
346 N_SECT, N_INDR): Removed as they duplicated macros in mach-o.h.
347 (bfd_mach_o_print_symbol): Print much more details.
348 (bfd_mach_o_make_bfd_section): Add prot argument, use canonical
349 dwarf name for dwarf sections. Precisely set section flags.
350 (bfd_mach_o_scan_read_section_32): Add prot argument.
351 (bfd_mach_o_scan_read_section_64): Ditto.
352 (bfd_mach_o_scan_read_section): Ditto.
353 (bfd_mach_o_scan_read_symtab_symbol): Set section for debugging
354 stabs, set BSF_GLOBAL and LOCAL flags correctly. Fix section
355 for N_SECT symbols.
356 (bfd_mach_o_i386_flavour_string): Reindent and adjust for new
357 names.
358 (bfd_mach_o_scan_read_symtab): Set HAS_SYMS flags on bfd if there
359 are symbols.
360 (bfd_mach_o_scan_read_uuid): New function.
361 (bfd_mach_o_scan_read_segment): Add a trailing nul. Segments
362 flags are now simply HAS_CONTENTS. Pass protection to
363 bfd_mach_o_scan_read_section.
364 (bfd_mach_o_scan_read_command): Decode UUID command.
365 (bfd_mach_o_flatten_sections): Add comments. Fix flavour names.
366 (bfd_mach_o_scan): Set flags according to file type.
367 (mach_o_fat_archentry): Remove abfd field.
368 (bfd_mach_o_archive_p): Remove initialization of abfd field.
369 (bfd_mach_o_openr_next_archived_file): Find previous archive
370 by position and not by bfd (as former bfds may have been freed).
371 Give architecture name to archived file.
372 * mach-o-target.c (TARGET_NAME): Use generic archive for non fat
373 targets.
374
cb5220a0
NC
3752008-10-30 Jay Krell <jay.krell@cornell.edu>
376
377 * cache.c (cache_bread): Cast void * pointer before performing
378 arithmetic on it.
379
7d9616d7
AM
3802008-10-20 Alan Modra <amodra@bigpond.net.au>
381
382 * elf64-ppc.c (ppc64_elf_process_dot_syms): Renamed from
383 ppc64_elf_check_directives.
384 * elf32-sh-symbian.c (sh_symbian_process_directives): Combine..
385 (sh_symbian_check_directives): ..this
386 (bfd_elf32_sh_symbian_process_directives) ..and this function.
387
58217f29
AM
3882008-10-20 Alan Modra <amodra@bigpond.net.au>
389
390 * elflink.c (bfd_elf_final_link): Move code reading relocs to..
391 * elf32-spu.c (spu_elf_count_relocs): ..here. Adjust params.
392 * elf-bfd.h (struct elf_backend_data): Update elf_backend_count_relocs
393 params.
394
bef26483
AM
3952008-10-20 Alan Modra <amodra@bigpond.net.au>
396
397 * elflink.c (bfd_elf_final_link): Use d_ptr rather than d_val
398 where Elf_Internal_Dyn holds an address.
399
f82e0623
NF
4002008-10-10 Nathan Froyd <froydnj@codesourcery.com>
401
402 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Merge
403 Tag_GNU_Power_ABI_Struct_Return.
404
d078078d
KT
4052008-10-09 Kai Tietz <kai.tietz@onevision.com>
406
58217f29
AM
407 * cofflink.c (_bfd_coff_generic_relocate_section): Dump bfd_vma
408 sized addresses instead of long sized.
d078078d 409
066ee829
AM
4102008-10-09 Alan Modra <amodra@bigpond.net.au>
411
412 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Don't attempt to
413 read plt relocs if no dynamic syms.
414
8cc9115f
NC
4152008-10-08 Nick Clifton <nickc@redhat.com>
416
417 * configure.in (ALL_LINGUAS): Add "id".
418 * configure: Regenerate.
419 * po/id.po: New Indonesian translation.
420
aea274d3
AM
4212008-10-08 Alan Modra <amodra@bigpond.net.au>
422
423 * elf.c (assign_file_positions_for_load_sections): When checking
424 a segment for contents, don't assume that a non-TLS nobits section
425 must only be followed by nobits sections.
426
3926fc54
HPN
4272008-10-04 Hans-Peter Nilsson <hp@axis.com>
428
429 * elf32-cris.c (TLSHOWTO32, TLSHOWTO16): New macros.
430 (cris_elf_howto_table): Add entries for R_CRIS_32_GOT_GD,
431 R_CRIS_16_GOT_GD, R_CRIS_32_GD, R_CRIS_DTP, R_CRIS_32_DTPREL,
432 R_CRIS_16_DTPREL, R_CRIS_DTPMOD, R_CRIS_32_GOT_TPREL,
433 R_CRIS_16_GOT_TPREL, R_CRIS_32_TPREL, R_CRIS_16_TPREL.
434 (cris_reloc_map): Similarly.
435 * reloc.c (bfd_reloc_code_type): Add entries for
436 BFD_RELOC_CRIS_32_GOT_GD, BFD_RELOC_CRIS_16_GOT_GD,
437 BFD_RELOC_CRIS_32_GD, BFD_RELOC_CRIS_DTP,
438 BFD_RELOC_CRIS_32_DTPREL, BFD_RELOC_CRIS_16_DTPREL,
439 BFD_RELOC_CRIS_DTPMOD, BFD_RELOC_CRIS_32_GOT_TPREL,
440 BFD_RELOC_CRIS_16_GOT_TPREL, BFD_RELOC_CRIS_32_TPREL,
441 BFD_RELOC_CRIS_16_TPREL.
442 * libbfd.h, bfd-in2.h: Regenerate.
443
bcacc0f5
AM
4442008-10-03 Alan Modra <amodra@bigpond.net.au>
445
e932ca37 446 PR 6931
bcacc0f5
AM
447 * elf.c (bfd_elf_set_group_contents): Assign sh_info for ld -r when
448 the signature symbol is global.
449 * elflink.c (elf_link_input_bfd): Ensure group signature symbol
450 is output when ld -r. Set group sh_info when local.
451 * linker.c (default_indirect_link_order): Handle group sections
452 specially.
453
e144674a
NC
4542008-09-30 Wesley W. Terpstra <wesley@terpstra.ca>
455 Nick Clifton <nickc@redhat.com>
456
457 * coffgen.c (coff_write_symbols): Check to see if a symbol's flags
458 do not match it class and if necessary update the class.
459 (null_error_handler): New function. Suppresses the generation of
460 bfd error messages.
461 * coff64-rs6000.c (bfd_xcoff_backend_data): Update comment.
462
782e11fd
AM
4632008-09-30 Alan Modra <amodra@bigpond.net.au>
464
465 * Makefile.am: Run "make dep-am".
466 * Makefile.in: Regenerate.
467
33177bb1
AM
4682008-09-30 Alan Modra <amodra@bigpond.net.au>
469
470 * elflink.c (elf_link_add_object_symbols): Don't ignore returned
471 value of check_directives.
472
718a6fd8
SE
4732008-09-29 Peter O'Gorman <pogma@thewrittenword.com>
474 Steve Ellcey <sje@cup.hp.com>
475
476 * configure: Regenerate for new libtool.
477 * aclocal.m4: Ditto.
478 * Makefile.in: Ditto.
479 * doc/Makefile.in: Ditto.
480
ceae84aa
AM
4812008-09-29 Alan Modra <amodra@bigpond.net.au>
482
483 PR 6789
484 * elf.c (assign_file_positions_for_load_sections): Call
485 _bfd_elf_map_sections_to_segments, not elf_modify_segment_map.
486 (get_program_header_size): Protect against NULL info.
487 (_bfd_elf_map_sections_to_segments): Likewise.
488 * elf32-spu.c (spu_elf_additional_program_headers): Likewise.
489
afac680a
NC
4902008-09-29 Nick Clifton <nickc@redhat.com>
491
492 * po/vi.po: Updated Vietnamese translation.
493
9659de1c
AM
4942008-09-28 Alan Modra <amodra@bigpond.net.au>
495
496 * elf.c (_bfd_elf_init_private_section_data): Tweak union copy.
497 (bfd_section_from_shdr): Don't change SHT_GROUP section name.
498 * elflink.c (section_signature): New function.
499 (_bfd_elf_section_already_linked): Use it.
500
e79f5955
AM
5012008-09-19 Alan Modra <amodra@bigpond.net.au>
502
503 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Handle vxworks
504 _GLOBAL_OFFSET_TABLE_ in .got.plt section. Add BFD_ASSERTs.
505
b45329f9
BW
5062008-09-17 Bob Wilson <bob.wilson@acm.org>
507
ceae84aa
AM
508 * elf32-xtensa.c (elf_xtensa_check_relocs): Check for negative
509 refcount.
b45329f9 510
2a7b2e88
JK
5112008-09-17 Jan Kratochvil <jan.kratochvil@redhat.com>
512
513 PR 6893 - Do not consider FDEs for discarded sections as invalid.
514 * elf-eh-frame.c (_bfd_elf_parse_eh_frame): New REQUIRE_CLEARED_RELOCS.
515 Consider FDEs with cleared relocations as valid and ignorable.
516
0a36a439
L
5172008-09-16 H.J. Lu <hongjiu.lu@intel.com>
518
519 PR ld/6877
520 * elflink.c (_bfd_elf_merge_symbol): Allow a common symbol to
521 override the function in a shared library.
522
e87d4038
AM
5232008-09-16 Alan Modra <amodra@bigpond.net.au>
524
525 PR 6844
526 * elf32-ppc.c (SYM_VAL): Define. Use throughout to find symbol vma.
527 (ppc_elf_relocate_section): Correct GOT offset calculation.
528 (ppc_elf_finish_dynamic_symbol): Use PPC_HA and PPC_LO.
529 (ppc_elf_finish_dynamic_sections): Likewise. Error if
530 htab->elf.hgot symbol is not defined in htab->got section.
531
3b4f3a11
AM
5322008-09-16 Alan Modra <amodra@bigpond.net.au>
533
534 PR 6888
535 * elf32-ppc.c (ppc_elf_relocate_section): Handle NULL symbol section
536 on R_PPC_TOC16, R_PPC_SDAREL16, R_PPC_EMB_SDA2REL, R_PPC_EMB_SDA21,
537 R_PPC_EMB_RELSDA, R_PPC_SECTOFF* relocs.
538
d053aef8
JK
5392008-09-11 Jan Kratochvil <jan.kratochvil@redhat.com>
540
541 Fix loading large elf64 binaries on 32bit hosts.
542 * configure.in: Call AC_SYS_LARGEFILE.
543 * config.in: Regenerate.
544 * configure: Regenerate.
545
502e814e
TT
5462008-09-08 Tom Tromey <tromey@redhat.com>
547
548 * elfxx-mips.c (mips16_stub_symndx) <sec>: Mark argument as
549 unused.
550
5609a71e
DJ
5512008-09-08 H.J. Lu <hongjiu.lu@intel.com>
552 Daniel Jacobowitz <dan@codesourcery.com>
553
554 PR ld/3191
555 * dwarf2.c (struct adjusted_section): Renamed from struct
556 loadable_section.
557 (struct dwarf2_debug): Adjust for renaming. Add version field.
558 (read_attribute_value): Correctly handle DW_FORM_ref_addr for
559 DWARF3.
560 (find_abstract_instance_name): Pass a pointer to
561 attribute instead of offset. For DW_FORM_ref_addr, get the
562 entry at the offset from the .debug_info section.
563 (scan_unit_for_symbols): Update.
564 (parse_comp_unit): Allow DWARF3. Save the version.
565 (unset_sections): Update for renaming.
566 (place_sections): Likewise. Set new VMAs for DWARF sections
567 also.
568
96497422
TG
5692008-09-08 Tristan Gingold <gingold@adacore.com>
570
571 * configure.in: Update version to 2.19.50
572 * configure: Regenerated.
573
2d47a72c
DJ
5742008-09-05 Daniel Jacobowitz <dan@codesourcery.com>
575
576 * dwarf2.c: Change leading whitespace to tabs.
577
1e8a024a
TG
5782008-09-05 Tristan Gingold <gingold@adacore.com>
579
580 Add MacOSX 64 bits support.
581 * mach-o.h (bfd_mach_o_ppc_thread_flavour): Add
582 BFD_MACH_O_PPC_THREAD_STATE_64.
583 (bfd_mach_o_i386_thread_flavour): Add BFD_MACH_O_x86_THREAD_STATE64,
584 BFD_MACH_O_x86_FLOAT_STATE64, BFD_MACH_O_x86_EXCEPTION_STATE64,
585 BFD_MACH_O_x86_THREAD_STATE, BFD_MACH_O_x86_FLOAT_STATE,
586 BFD_MACH_O_x86_EXCEPTION_STATE.
587 (bfd_mach_o_load_command_type): Add
588 BFD_MACH_O_LC_SEGMENT_64, BFD_MACH_O_LC_ROUTINES_64,
58217f29 589 BFD_MACH_O_LC_UUID.
1e8a024a
TG
590 (BFD_MACH_O_CPU_IS64BIT): Added.
591 (bfd_mach_o_cpu_type): Add BFD_MACH_O_CPU_TYPE_POWERPC_64,
592 BFD_MACH_O_CPU_TYPE_X86_64.
593 (bfd_mach_o_header): Add version field.
594 (bfd_mach_o_section) Add reserved3 field.
595 (bfd_mach_o_segment_command): Add initprot and maxprot fields.
596
597 * mach-o.c (N_TEXT, N_DATA, N_BSS): Added.
598 (bfd_mach_o_version): New function.
599 (bfd_mach_o_valid): Handle 64bits cpus.
600 (bfd_mach_o_write_header): handler 64bits headers.
601 (bfd_mach_o_scan_write_section_32, bfd_mach_o_scan_write_section_64):
602 New functions (from bfd_mach_o_scan_write_section) to handle both
603 flavors.
604 (bfd_mach_o_scan_write_segment): Parameter wide added to support
605 both flavors.
606 (bfd_mach_o_write_contents): Support both flavors.
607 (bfd_mach_o_read_header): Ditto.
608 (bfd_mach_o_scan_read_section_32, bfd_mach_o_scan_read_section_64):
609 New functions (from bfd_mach_o_scan_read_section) to support both
610 flavors.
611 (bfd_mach_o_scan_read_symtab_symbol): Support both flavors.
612 (bfd_mach_o_scan_read_symtab): Ditto.
613 (bfd_mach_o_scan_read_segment): Parameter wide added to support
614 both flavors.
615 (bfd_mach_o_scan_read_segment_32, bfd_mach_o_scan_read_segment_64):
616 New functions to call bfd_mach_o_scan_read_segment.
617 (bfd_mach_o_flatten_sections): Support both flavors.
618 (bfd_mach_o_scan_start_address): Ditto.
619 (bfd_mach_o_scan): Ditto.
620 (bfd_mach_o_lookup_section): Ditto.
58217f29 621
6bba1048
DA
6222008-08-27 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
623
624 * elf-hppa.h (elf_hppa_reloc_final_type): Handle R_PARISC_GPREL64,
625 R_PARISC_SEGREL32 and R_PARISC_SEGREL64.
626 * som.c (som_fixup_formats): Add R_DATA_GPREL fixup.
627 (som_hppa_howto_table): Likewise.
628 (hppa_som_gen_reloc_type): In case R_HPPA_GOTOFF, detect R_DATA_GPREL
629 final type.
630 (som_write_fixups): Handle R_DATA_GPREL.
631
fcef9eb7
NC
6322008-08-26 Nick Clifton <nickc@redhat.com>
633
634 * elf32-arm.c: Fix up comment describing Thumb to ARM interworking
635 stub.
636
c820be07
NC
6372008-08-25 Christophe Lyon <christophe.lyon@st.com>
638
639 * elf32-arm.c (arm_thumb_arm_v4t_short_branch_stub): Define.
640 (elf32_arm_stub_type): Add arm_thumb_arm_v4t_stub_short_branch.
641 (arm_type_of_stub): Handle armv4t short branches. Update
642 prototype.
643 (arm_stub_is_thumb): Handle arm_thumb_arm_v4t_stub_short_branch.
644 (arm_build_one_stub): Likewise.
645 (arm_size_one_stub): Likewise.
646 (elf32_arm_size_stubs): Use new arm_type_of_stub prototype.
647 (arm_map_one_stub): Handle arm_thumb_arm_v4t_stub_short_branch.
648
9c47c4c1
AS
6492008-08-24 Andreas Schwab <schwab@suse.de>
650
651 * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Do proper
652 extension when calculating difference of offsets.
653
da594c4a
AM
6542008-08-24 Alan Modra <amodra@bigpond.net.au>
655
656 * configure.in: Update a number of obsolete autoconf macros.
657 * aclocal.m4: Regenerate.
658
91910cdd
AS
6592008-08-23 Andreas Schwab <schwab@suse.de>
660
661 * opncls.c (find_separate_debug_file): Use the canonical
662 absolute name of the bfd object for finding the debug file in
663 the global debugfile directory.
664
b2064611
JK
6652008-08-22 Jakub Jelinek <jakub@redhat.com>
666
667 Fix PR ld/3290 regression for cross-files DW_FORM_ref_addr relocations.
668 * elflink.c (elf_link_add_object_symbols): Make debug symbols local
669 now only for non-RELOCATABLE targets.
670
28dbbc02
BW
6712008-08-20 Bob Wilson <bob.wilson@acm.org>
672
673 * elf-bfd.h (elf_object_id): Add XTENSA_ELF_TDATA.
674 * elf32-xtensa.c (elf_howto_table): Add TLS relocations.
675 (elf_xtensa_reloc_type_lookup): Likewise.
676 (TCB_SIZE): Define.
677 (elf_xtensa_link_hash_entry): New.
678 (GOT_UNKNOWN, GOT_NORMAL, GOT_TLS_GD, GOT_TLS_IE, GOT_TLS_ANY): Define.
679 (elf_xtensa_hash_entry): Define.
680 (elf_xtensa_obj_tdata): New.
681 (elf_xtensa_tdata): Define.
682 (elf_xtensa_local_got_tls_type): Define.
683 (elf_xtensa_local_tlsfunc_refcounts): Define.
684 (is_xtensa_elf): Define.
685 (elf_xtensa_mkobject): New.
686 (elf_xtensa_link_hash_table): Add tlsbase field.
687 (elf_xtensa_link_hash_newfunc): New.
688 (elf_xtensa_link_hash_table_create): Use elf_xtensa_link_hash_newfunc.
689 Create an entry for "_TLS_MODULE_BASE_" and save it in tlsbase field.
690 (elf_xtensa_copy_indirect_symbol): New.
691 (elf_xtensa_check_relocs): Rewrite to handle TLS relocations.
692 (elf_xtensa_gc_sweep_hook): Likewise.
693 (elf_xtensa_allocate_dynrelocs): Optimize away GOT entries for
694 TLSDESC_FN relocations when an IE reference is seen.
695 (elf_xtensa_allocate_local_got_size): Likewise.
696 (elf_xtensa_always_size_sections): New.
697 (dtpoff_base, tpoff): New.
698 (elf_xtensa_do_reloc): Handle TLS relocations.
699 (replace_tls_insn): New.
700 (IS_XTENSA_TLS_RELOC): Define.
701 (elf_xtensa_relocate_section): Handle TLS relocations.
702 (get_indirect_call_dest_reg): New.
703 (bfd_elf32_mkobject): Define.
704 (elf_backend_always_size_sections): New.
705 (elf_backend_copy_indirect_symbol): New.
706 * reloc.c (BFD_RELOC_XTENSA_TLSDESC_FN, BFD_RELOC_XTENSA_TLSDESC_ARG)
707 (BFD_RELOC_XTENSA_TLS_DTPOFF, BFD_RELOC_XTENSA_TLS_TPOFF)
708 (BFD_RELOC_XTENSA_TLS_FUNC, BFD_RELOC_XTENSA_TLS_ARG)
709 (BFD_RELOC_XTENSA_TLS_CALL): New.
710 * bfd-in2.h: Regenerate.
711 * libbfd.h: Regenerate.
712
61b0a4af
RS
7132008-08-18 Richard Sandiford <rdsandiford@googlemail.com>
714
715 * elfxx-mips.c (_bfd_mips_elf_copy_indirect_symbol): Copy MIPS16
716 stub information.
717
3e08fb72
NC
7182008-08-17 Nick Clifton <nickc@redhat.com>
719
8029a119
NC
720 * elf32-arm.c: Tidy up the code.
721 (bfd_elf32_arm_allocate_interworking_sections): Move common code
722 into...
723 (arm_allocate_glue_section_space): ... New function.
724 (bfd_elf32_arm_add_glue_sections_to_bfd): Move common code
725 into...
726 (arm_make_glue_section): ... New function.
727
3e08fb72
NC
728 * elfxx-mips.c (_bfd_mips_elf_check_relocs): Handle the situation
729 where the sym_hashes are not available.
730
5c1d2f5f
AM
7312008-08-17 Alan Modra <amodra@bigpond.net.au>
732
733 * bfd.c (struct _bfd): Correct outsymbols comment.
734 * bfd-in2.h: Regenerate.
735 * linker.c (bfd_generic_link_read_symbols): Renamed from..
736 (generic_link_read_symbols): ..this, and made global.
737
7357c5b6
AM
7382008-08-15 Alan Modra <amodra@bigpond.net.au>
739
740 PR 6526
741 * configure.in: Invoke AC_USE_SYSTEM_EXTENSIONS.
742 * Makefile.in: Regenerate.
743 * aclocal.m4: Regenerate.
744 * config.in: Regenerate.
745 * configure: Regenerate.
746
70df0c05
AM
7472008-08-14 Jaka Močnik <jaka@xlab.si>
748
749 * coffgen.c (coff_find_nearest_line): Correct cached line index.
750
b099ab9f
AM
7512008-08-12 Alan Modra <amodra@bigpond.net.au>
752
753 * elf32-ppc.c (allocate_dynrelocs): Ignore dyn_relocs when
754 !dynamic_sections_created. Don't make symbols with got
755 references dynamic if !dynamic_sections_created.
756 * elf64-ppc.c (allocate_dynrelocs): Likewise. Alloc dynamic
757 relocs on undefined symbols.
758 (ppc64_elf_relocate_section): Allow dynamic relocs on
759 undefined symbols.
760
90aecf7a
AM
7612008-08-11 Alan Modra <amodra@bigpond.net.au>
762
763 * elf64-ppc.c (toc_adjusting_stub_needed): Any call via the plt
764 needs r2 valid, not just those to external syms.
765
ae38509c
PA
7662008-08-09 Pedro Alves <pedro@codesourcery.com>
767
768 * archive.c (_bfd_archive_bsd_update_armap_timestamp): Cast stat
769 st_mtime to long before comparison.
770
7b21ac3f
EW
7712008-08-08 Anatoly Sokolov <aesok@post.ru>
772
773 * archures.c (bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35,
774 bfd_mach_avr51): New.
775 * bfd-in2.h: Regenerate.
776 * cpu-avr.c (arch_info_struct): Add avr25, avr31, avr35, and avr51
777 architectures. Change comments to match architecture comments in GCC.
778 (compatible): Add test for new AVR architectures.
779 * elf32-avr.c (bfd_elf_avr_final_write_processing): Recognize
780 bfd_mach_avr25, bfd_mach_avr31, bfd_mach_avr35 and bfd_mach_avr51.
781 (elf32_avr_object_p): Recognize E_AVR_MACH_AVR25, E_AVR_MACH_AVR31,
782 E_AVR_MACH_AVR35 and E_AVR_MACH_AVR51.
783
784
861fb55a
DJ
7852008-08-08 Richard Sandiford <rdsandiford@googlemail.com>
786 Daniel Jacobowitz <dan@codesourcery.com>
787 Catherine Moore <clm@codesourcery.com>
788 Mark Shinwell <shinwell@codesourcery.com>
789 Maxim Kuvyrkov <maxim@codesourcery.com>
790
791 * elf32-mips.c (mips_vxworks_copy_howto_rela): Replace with...
792 (elf_mips_copy_howto): ...this howto. Clear the size fields.
793 (mips_vxworks_jump_slot_howto_rela): Replace with...
794 (elf_mips_jump_slot_howto): ...this howto.
795 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
796 and BFD_RELOC_MIPS_JUMP_SLOT.
797 (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
798 "R_MIPS_JUMP_SLOT".
799 (mips_elf32_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
800 (elf_backend_plt_readonly): Define.
801 (elf_backend_plt_sym_val): Define for non-VxWorks targets.
802 (mips_vxworks_bfd_reloc_type_lookup): Delete.
803 (mips_vxworks_bfd_reloc_name_lookup): Likewise.
804 (mips_vxworks_rtype_to_howto): Likewise.
805 (elf_backend_want_dynbss): Don't define for VxWorks.
806 (elf_backend_plt_readonly): Likewise.
807 (bfd_elf32_bfd_reloc_type_lookup): Likewise.
808 (bfd_elf32_bfd_reloc_name_lookup): Likewise.
809 (elf_backend_mips_rtype_to_howto): Likewise.
810 (elf_backend_adjust_dynamic_symbol): Likewise.
811 (elf_backend_got_symbol_offset): Don't define.
812 * elfn32-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
813 (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
814 and BFD_RELOC_MIPS_JUMP_SLOT.
815 (bfd_elf32_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
816 "R_MIPS_JUMP_SLOT".
817 (mips_elf32_n32_rtype_to_howto): Handle R_MIPS_COPY and
818 R_MIPS_JUMP_SLOT.
819 (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
820 (elf_backend_plt_sym_val): Define.
821 * elf64-mips.c (elf_mips_copy_howto, elf_mips_jump_slot_howto): New.
822 (bfd_elf64_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS_COPY
823 and BFD_RELOC_MIPS_JUMP_SLOT.
824 (bfd_elf64_bfd_reloc_name_lookup): Handle "R_MIPS_COPY" and
825 "R_MIPS_JUMP_SLOT".
826 (mips_elf64_rtype_to_howto): Handle R_MIPS_COPY and R_MIPS_JUMP_SLOT.
827 (elf_backend_rela_plts_and_copies_p, elf_backend_plt_readonly)
828 (elf_backend_plt_sym_val): Define.
829 * elfxx-mips.h (_bfd_mips_vxworks_adjust_dynamic_symbol): Delete.
830 (_bfd_mips_elf_use_plts_and_copy_relocs, _bfd_mips_elf_init_stubs)
831 (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): Declare.
832 * elfxx-mips.c (mips_elf_la25_stub): New structure.
833 (LA25_LUI, LA25_J, LA25_ADDIU): New macros.
834 (mips_elf_link_hash_entry): Add "la25_stubs", "has_static_relocs"
835 and "has_nonpic_branches" fields. Remove "is_relocation_target" and
836 "is_branch_target".
837 (mips_elf_link_hash_table): Add blank lines. Add
838 "use_plts_and_copy_relocs", "reserved_gotno", "strampoline",
839 "la25_stubs" and "add_stub_section" fields.
840 (mips_htab_traverse_info): New structure.
841 (PIC_OBJECT_P, MIPS_ELF_LOAD_WORD): New macros.
842 (MIPS_RESERVED_GOTNO): Delete.
843 (mips_o32_exec_plt0_entry, mips_n32_exec_plt0_entry)
844 (mips_n64_exec_plt0_entry, mips_exec_plt_entry): New tables.
845 (mips_elf_link_hash_newfunc): Update after the changes to
846 mips_elf_link_hash_entry.
847 (mips_elf_check_mips16_stubs): Replace the DATA parameter with
848 an INFO parameter. Don't look through warnings symbols here;
849 do it in mips_elf_check_symbols instead.
850 (mips_elf_create_stub_symbol): New function.
851 (mips_elf_la25_stub_hash, mips_elf_la25_stub_eq): New functions.
852 (_bfd_mips_elf_init_stubs, mips_elf_local_pic_function_p): Likewise.
853 (mips_elf_add_la25_intro, mips_elf_add_la25_trampoline): Likewise.
854 (mips_elf_add_la25_stub, mips_elf_check_symbols): New functions.
855 (mips_elf_gotplt_index): Check for VxWorks.
856 (mips_elf_output_dynamic_relocation): Take the relocation index
857 as an extra parameter. Do not increment reloc_count here.
858 (mips_elf_initialize_tls_slots): Update the calls to
859 mips_elf_output_dynamic_relocation accordingly.
860 (mips_elf_multi_got): Use htab->reserved_gotno instead of
861 MIPS_RESERVED_GOTNO.
862 (mips_elf_create_got_section): Don't allocate reserved GOT
863 entries here. Unconditionally create .got.plt, but don't
864 set its alignment here.
865 (mips_elf_relocation_needs_la25_stub): New function.
866 (mips_elf_calculate_relocation): Redirect branches and jumps to
867 a non-PIC stub if one exists. Check !h->has_static_relocs instead
868 of !htab->is_vxworks when deciding whether to create dynamic
869 relocations for R_MIPS_32, R_MIPS_REL32 and R_MIPS_64.
870 (_bfd_mips_elf_create_dynamic_sections): Unconditionally call
871 _bfd_elf_create_dynamic_sections. Unconditionally set up
872 htab->splt and htab->sdynbss. Set htab->srelplt to ".rel.plt"
873 if !htab->is_vxworks. Add non-VxWorks values of
874 htab->plt_header_size and htab->plt_entry_size.
875 (_bfd_mips_elf_check_relocs): Set pointer_equality_needed for
876 non-branch static relocations. Set has_nonpic_branches when an la25
877 stub might be required. Set can_make_dynamic_p to TRUE if R_MIPS_32,
878 R_MIPS_REL32 and R_MIPS_64 relocations can be made dynamic,
879 rather than duplicating the condition. Do not make them dynamic
880 for read-only sections in non-PIC executable objects.
881 Do not protect this code with dynobj == NULL || htab->sgot == NULL;
882 handle each group of cases separately. Add a default case that
883 sets has_static_relocs for non-GOT relocations that cannot be
884 made dynamic. Don't set is_relocation_target and is_branch_target.
885 Reject non-PIC static relocations in shared objects.
886 (_bfd_mips_vxworks_adjust_dynamic_symbol): Fold into...
887 (_bfd_mips_elf_adjust_dynamic_symbol): ...here, using
888 htab->use_plts_and_copy_relocs instead of htab->is_vxworks
889 to select PLT and copy-reloc handling. Set the alignment of
890 .plt and .got.plt when allocating the first entry. Generalize
891 code to handle REL as well as RELA sections and 64-bit as well as
892 32-bit GOT entries. Complain if we find a static-only reloc
893 against an externally-defined symbol and if we cannot create
894 dynamic relocations for it. Allocate copy relocs using
895 mips_elf_allocate_dynamic_relocations on non-VxWorks targets.
896 Set possibly_dynamic_relocs to 0 when using PLTs or copy relocs.
897 Skip reserved .got.plt entries.
898 (_bfd_mips_elf_always_size_sections): Use mips_elf_check_symbols
899 instead of mips_elf_check_mips16_stubs to process each symbol.
900 Do the traversal for relocatable objects too.
901 (mips_elf_lay_out_got): Use htab->reserved_gotno instead of
902 MIPS_RESERVED_GOTNO.
903 (_bfd_mips_elf_size_dynamic_sections): Exclude sdynbss if it
904 is empty. Extend the DT_PLTREL, DT_JMPREL and DT_PLTRELSZ handling
905 to non-VxWorks targets. Only add DT_REL{,A}, DT_REL{,A}SZ and
906 DT_REL{,A}ENT if .rel.dyn is nonempty. Create a symbol for the
907 PLT. Allocate a nop at the end of the PLT. Allocate DT_MIPS_PLTGOT.
908 (mips_elf_create_la25_stub_info): New function.
909 (_bfd_mips_elf_finish_dynamic_symbol): Write out PLT entries
910 and copy relocs where necessary. Check pointer_equality_needed.
911 (mips_finish_exec_plt): New function.
912 (_bfd_mips_elf_finish_dynamic_sections): Always set DT_PLTGOT
913 to the beginning of htab->sgot. Use htab->reserved_gotno instead
914 of MIPS_RESERVED_GOTNO. Assert htab->use_plts_and_copy_relocs
915 instead of htab->is_vxworks for DT_PLTREL, DT_PLTRELSZ and DT_JMPREL.
916 Set DT_PLTREL to DT_REL instead of DT_RELA on non-VxWorks targets.
917 Use mips_finish_exec_plt to create non-VxWorks PLT headers. Set
918 DT_MIPS_PLTGOT.
919 (_bfd_mips_elf_copy_indirect_symbol): Copy has_static_relocs
920 from the indirect symbol to the direct symbol. Also copy
921 has_nonpic_branches for indirect symbols.
922 (_bfd_mips_elf_get_target_dtag): Handle DT_MIPS_PLTGOT and
923 DT_MIPS_RWPLT.
924 (_bfd_mips_elf_link_hash_table_create): Initialize the new
925 mips_elf_link_hash_table fields.
926 (_bfd_mips_vxworks_link_hash_table_create): Set
927 use_plts_and_copy_relocs to TRUE. Use TRUE rather than 1
928 when setting is_vxworks.
929 (_bfd_mips_elf_use_plts_and_copy_relocs): New function.
930 (_bfd_mips_elf_final_link): Call mips_elf_create_la25_stub for
931 each la25_stub.
932 (_bfd_mips_elf_merge_private_bfd_data): Treat dynamic objects
933 as PIC. Generalize message about linking PIC and non-PIC.
934 (_bfd_mips_elf_plt_sym_val, _bfd_mips_post_process_headers): New
935 functions.
936 * reloc.c: Update comment near BFD_RELOC_MIPS_JUMP_SLOT.
937 * bfd-in2.h: Regenerated.
938
4dd07732
AM
9392008-08-08 Alan Modra <amodra@bigpond.net.au>
940
941 * elf.c (bfd_elf_get_elf_syms): Don't leak memory on error.
942 * elflink.c (_bfd_elf_link_read_relocs): bfd_release on error.
943 (elf_link_add_object_symbols): Don't leak memory on error.
944 (bfd_elf_size_dynsym_hash_dynstr): Likewise.
945 (elf_fixup_link_order): Free sections.
946
d35fd659
RS
9472008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
948
949 * elf-bfd.h (elf_backend_data): Add a "rela_plts_and_copies_p" field.
950 * elfxx-target.h (elf_backend_rela_plts_and_copies_p): New macro.
951 (elfNN_bed): Use it.
952 * elf.c (_bfd_elf_get_synthetic_symtab): Use rela_plts_and_copies_p
953 instead of default_use_rela_p to choose between ".rel.plt" and
954 ".rela.plt".
955 * elflink.c (_bfd_elf_create_dynamic_sections): Use
956 rela_plts_and_copies_p instead of default_use_rela_p to choose
957 between ".rel.plt" and ".rela.plt", and between ".rel.bss" and
958 ".rela.bss".
959
d5eaccd7
RS
9602008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
961
962 * elf-bfd.h (MIPS_ELF_TDATA): New elf_object_id.
963 * elf32-mips.c (bfd_elf32_mkobject): Define.
964 * elf64-mips.c (bfd_elf64_mkobject): Likewise.
965 * elfn32-mips.c (bfd_elf32_mkobject): Likewise.
966 * elfxx-mips.h (_bfd_mips_elf_mkobject): Declare.
967 * elfxx-mips.c (is_mips_elf): New macro.
968 (_bfd_mips_elf_mkobject): New function.
969 (_bfd_mips_elf_final_link): Use is_mips_elf.
970 (_bfd_mips_elf_merge_private_bfd_data): Likewise.
971
aff469fa
RS
9722008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
973
974 * elfxx-mips.c (mips_elf_record_relocs): Defer allocation of a
975 global GOT entry when deferring allocation of dynamic relocations.
976 (allocate_dynrelocs): When allocating deferred dynamic relocations,
977 also do the deferred allocation of a GOT entry.
978
23cc69b6
RS
9792008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
980
981 * elfxx-mips.c (mips_got_info): Add a "reloc_only_gotno" field.
982 (mips_elf_got_section): Delete.
983 (mips_elf_sort_hash_table): Use g->reloc_only_gotno to decide
984 how many reloc-only entries there are.
985 (mips_elf_count_got_symbols): Adjust g->reloc_only_gotno as
986 well as g->global_gotno.
987 (mips_elf_make_got_per_bfd): Initialize reloc_only_gotno.
988 (mips_elf_multi_got): Likewise. Use gg->reloc_only_gotno
989 rather than gg->assigned_gotno to store the number of
990 reloc-only GOT entries.
991 (mips_elf_create_got_section): Remove the MAYBE_EXCLUDE parameter.
992 Initialize reloc_only_gotno.
993 (mips_elf_calculate_relocation): Check htab->got_info instead of
994 dynobj when deciding whether to call mips_elf_adjust_gp,
995 (_bfd_mips_elf_create_dynamic_sections): Adjust the call
996 to mips_elf_create_got_section.
997 (mips_elf_record_relocs): Likewise. Remove redundant
998 "dynobj == NULL" code. Do not use mips_elf_create_got_section
999 or mips_elf_record_global_got_symbol for R_MIPS_32, R_MIPS_REL32
1000 and R_MIPS_64; limit global_got_area to GGA_RELOC_ONLY instead.
1001 (_bfd_mips_elf_finish_dynamic_symbol): Use htab->sgot instead
1002 of mips_elf_got_section.
1003 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1004 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1005 Move the initial assignment of G to the block that uses it;
1006 it is used for an unrelated purpose later.
1007
d4596a51
RS
10082008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
1009
1010 * elfxx-mips.c (count_section_dynsyms): Move before the new first use.
1011 (mips_elf_sort_hash_table): Take the output bfd as a parameter.
1012 Remove the MAX_LOCAL parameter. Exit early if there are no
1013 dynamic symbols, if there is no dynobj, or if there is no
1014 GOT section. Use count_section_dynsyms instead of MAX_LOCAL.
1015 Assert == rather than <= when checking hsd.max_unref_got_dynindx.
1016 Also assert that g->global_gotno is right.
1017 (mips_elf_count_forced_local_got_symbols): Rename to...
1018 (mips_elf_count_got_symbols): ...and count global GOT entries too.
1019 Set the global_got_area of a forced-local GGA_RELOC_ONLY symbol
1020 to GGA_NONE.
1021 (mips_elf_multi_got): Don't sort the symbol table.
1022 (mips_elf_lay_out_got): Likewise. Use mips_elf_count_got_symbols
1023 to count the number of global GOT entries.
1024 (_bfd_mips_elf_final_link): Unconditionally call
1025 mips_elf_sort_hash_table.
1026
634835ae
RS
10272008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
1028
1029 * elfxx-mips.c (GGA_NORMAL, GGA_RELOC_ONLY, GGA_NONE): New macros.
1030 (mips_elf_link_hash_entry): Add a "global_got_area" field.
1031 (mips_elf_link_hash_newfunc): Initialize it.
1032 (mips_elf_sort_hash_table_f): Use h->global_got_area instead of
1033 h->root.got.offset. Do not handle forced_local symbols specially.
1034 (mips_elf_record_global_got_symbol): Set h->global_got_area
1035 instead of h->root.got.offset.
1036 (mips_elf_recreate_got): Assert that h->global_got_area == GGA_NONE
1037 for indirect and warning symbols.
1038 (mips_elf_count_forced_local_got_symbols): Change the argument
1039 from a "elf_link_hash_entry" to "mips_elf_link_hash_entry".
1040 Use and set h->global_got_area instead of h->root.got.offset.
1041 Set it to GGA_NONE for all forced-local symbols.
1042 (mips_elf_set_global_got_offset): Set h->global_got_area
1043 instead of h->root.got.offset. Use g->global_got_area instead
1044 of a combination of dynindx, forced_local and tls_type.
1045 (mips_elf_multi_got): Remove disabled code. Pass GGA_* values to
1046 mips_elf_set_global_got_offset.
1047 (mips_elf_lay_out_got): Use mips_elf_link_hash_traverse instead
1048 of elf_link_hash_traverse.
1049 (_bfd_mips_elf_copy_indirect_symbol): Copy the indirect symbol's
1050 global_got_area to the direct symbol if the latter's value is higher.
1051 Set the indirect symbol's area to GGA_NONE.
1052
33bb52fb
RS
10532008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
1054
1055 * elf32-mips.c (elf_backend_hide_symbol): Delete.
1056 * elfn32-mips.c (elf_backend_hide_symbol): Likewise.
1057 * elf64-mips.c (elf_backend_hide_symbol): Likewise.
1058 * elfxx-mips.h (elf_backend_hide_symbol): Likewise.
1059 * elfxx-mips.c (mips_elf_link_hash_entry): Remove "forced_local"
1060 and add "needs_lazy_stub".
1061 (mips_elf_link_hash_newfunc): Update accordingly.
1062 (mips_elf_link_hash_table): Remove "computed_got_sizes" and
1063 add "lazy_stub_count".
1064 (_bfd_mips_elf_link_hash_table_create): Update accordingly.
1065 (mips_elf_output_extsym): Use hd->needs_lazy_stub to detect
1066 cases where a lazy stub is being used.
1067 (mips_elf_sort_hash_table_f): Use h->root.forced_local instead
1068 of h->forced_local.
1069 (mips_elf_record_global_got_symbol): Use _bfd_elf_link_hash_hide_symbol
1070 instead of _bfd_mips_elf_hide_symbol. Do not increment local_gotno
1071 here.
1072 (mips_elf_allocate_dynamic_relocations): Move before new first use.
1073 (mips_elf_check_recreate_got, mips_elf_recreate_got): New functions.
1074 (mips_elf_resolve_final_got_entries): Move earlier in file. Make at
1075 most two passes over the hash table. Use mips_elf_check_recreate_got
1076 to see if there are any indirect or warning entries and
1077 mips_elf_recreate_got to create a new GOT without them.
1078 Return a boolean success value.
1079 (mips_elf_count_forced_local_got_entries): New function.
1080 (mips_elf_make_got_per_bfd): Check h->root.forced_local instead of
1081 h->forced_local.
1082 (mips_elf_set_global_got_offset): Likewise.
1083 (mips_elf_set_no_stub): Replace with...
1084 (mips_elf_forbid_lazy_stubs): ...this new function.
1085 (mips_elf_resolve_final_got_entry): Delete.
1086 (mips_elf_multi_got): Fix formatting. Use mips_elf_forbid_lazy_stubs
1087 instead of mips_elf_set_no_stub. Move the code that sets
1088 global offsets and allocates dynamic relocations from the main
1089 _bfd_mips_elf_size_dynamic_sections loop to here.
1090 (_bfd_mips_elf_adjust_dynamic_symbol): Do not allocate room in
1091 .MIPS.stubs here; just set hmips->needs_lazy_stub and increment
1092 htab->lazy_stub_count.
1093 (_bfd_mips_elf_always_size_sections): Move the stub-estimation
1094 code to mips_elf_estimate_stub_size and the GOT-sizing code to
1095 mips_elf_lay_out_got. Do not call these functions here.
1096 (mips_elf_estimate_stub_size): New function, split
1097 out from _bfd_mips_elf_always_size_sections. Call
1098 mips_elf_resolve_final_got_entries earlier. Count the number
1099 of forced-local entries. Do not add stub sizes to loadable_size;
1100 after this patch, the stub sizes are already included in the main
1101 estimate. Allocate dynamic relocations here rather than in the
1102 main _bfd_mips_elf_size_dynamic_sections loop.
1103 (mips_elf_estimate_stub_size): New function, split out from
1104 _bfd_mips_elf_always_size_sections.
1105 (mips_elf_allocate_lazy_stub): New function.
1106 (mips_elf_lay_out_lazy_stubs): Likewise.
1107 (_bfd_mips_elf_size_dynamic_sections): Call mips_elf_estimate_stub_size,
1108 mips_elf_lay_out_got and mips_elf_lay_out_lazy_stubs. Do not handle
1109 the allocation of sreldyn specially.
1110 (_bfd_mips_elf_hide_symbol): Delete.
1111
63897e2c
RS
11122008-08-07 Richard Sandiford <rdsandiford@googlemail.com>
1113
1114 * elfxx-mips.c (allocate_dynrelocs): Ignore indirect and warning
1115 symbols.
1116
71782a75
RS
11172008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
1118
1119 * elfxx-mips.c (mips_elf_link_hash_entry): Move bfd_boolean
1120 fields to the end of the structure and make them single-bit
1121 bitfields.
1122 (mips_elf_link_hash_newfunc): Make the initialization statements
1123 follow the new field order.
1124
a8028dd0
RS
11252008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
1126
1127 * elfxx-mips.c (_mips_elf_section_data): Remove the "u.got_info" field.
1128 (mips_elf_link_hash_table): Add "sgot" and "got_info" fields.
1129 (_bfd_mips_elf_link_hash_table_create): Initialize them.
1130 (mips_elf_got_section): Always apply the !maybe_excluded behavior.
1131 (mips_elf_got_info): Delete.
1132 (mips_elf_initialize_tls_slots): Remove the DYNOBJ local variable.
1133 Adjust the call to mips_elf_got_section.
1134 (mips_elf_local_got_index): Don't call mips_elf_got_info.
1135 Update the call to mips_elf_create_local_got_entry.
1136 Use htab->got_info.
1137 (mips_elf_global_got_index): Don't call mips_elf_got_info;
1138 use htab->got_info and htab->sgot instead.
1139 (mips_elf_got_page): Don't call mips_elf_got_info. Update the
1140 call to mips_elf_create_local_got_entry.
1141 (mips_elf_got16_entry): Likewise.
1142 (mips_elf_got_offset_from_index): Replace with DYNOBJ parameter
1143 with an INFO parameter. Don't call mips_elf_got_info; use htab->sgot
1144 and htab->got_info instead.
1145 (mips_elf_create_local_got_entry): Remove the GG and SGOT parameters.
1146 Use htab->sgot and htab->got_info.
1147 (mips_elf_sort_hash_table): Remove the DYNOBJ local variable.
1148 Don't call mips_elf_got_info; use htab->got_info instead.
1149 (mips_elf_record_global_got_symbol): Turn G from a paramter to
1150 a local variable and read it from htab->got_info.
1151 (mips_elf_record_local_got_symbol): Replace the G parameter with
1152 an INFO parameter. Make G a local variable and read it from
1153 htab->got_info instead.
1154 (mips_elf_record_got_page_entry): Likewise.
1155 (mips_elf_multi_got): Remove the G parameter and make it a local
1156 variable instead. Read it from htab->got_info.
1157 (mips_elf_create_got_section): Cache the GOT section in htab->sgot.
1158 Store the GOT information in htab->got_info.
1159 (mips_elf_calculate_relocation): Don't call mips_elf_got_section
1160 and mips_elf_got_info; use htab->sgot and htab->got_info instead.
1161 Adjust the calls to mips_elf_got_offset_from_index and
1162 mips_elf_adjust_gp.
1163 (_bfd_mips_elf_check_relocs): Remove the G and SGOT local variables.
1164 Adjust the calls to mips_elf_record_local_got_symbol,
1165 mips_elf_record_global_got_symbol and mips_elf_record_got_page_entry.
1166 Use htab->sgot.
1167 (_bfd_mips_elf_always_size_sections): Remove the DYNOBJ local variable.
1168 Don't call mips_elf_got_info; use htab->sgot and htab->got_info instead.
1169 Update the call to mips_elf_multi_got.
1170 (_bfd_mips_elf_size_dynamic_sections): Don't call mips_elf_got_info;
1171 use htab->got_info instead.
1172 (_bfd_mips_elf_finish_dynamic_symbol): Update the call to
1173 mips_elf_got_section. Get the got_info from the hash table
1174 rather than the GOT section.
1175 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1176 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1177 (_bfd_mips_elf_hide_symbol): Don't call mips_elf_got_section;
1178 get the got_info from the hash table instead. Remove the GOT
1179 local variable.
1180 (_bfd_mips_elf_final_link): Likewise. Also remove the DYNOBJ
1181 local variable.
1182
4e41d0d7
RS
11832008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
1184
1185 * elfxx-mips.c (mips_elf_link_hash_table): Add an "sstubs" field.
1186 (_bfd_mips_elf_create_dynamic_sections): Use it to cache the stubs
1187 section. Don't check whether the section already exists.
1188 (_bfd_mips_elf_adjust_dynamic_symbol): Use htab->sstubs.
1189 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1190 (_bfd_mips_elf_finish_dynamic_sections): Likewise.
1191 (_bfd_mips_elf_size_dynamic_sections): Likewise. Don't add the
1192 dummy stub to an empty section.
1193 (_bfd_mips_elf_link_hash_table_create): Initialize the "sstubs" field.
1194
738e5348
RS
11952008-08-06 Richard Sandiford <rdsandiford@googlemail.com>
1196
1197 * reloc.c (BFD_RELOC_MIPS16_GOT16, BFD_RELOC_MIPS16_CALL16): Declare.
1198 * libbfd.h, bfd-in2.h: Regenerate.
1199 * elf32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
1200 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
1201 (mips16_reloc_map): Add mappings.
1202 * elf64-mips.c (mips16_elf64_howto_table_rel): Fill in reserved
1203 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
1204 (mips16_elf64_howto_table_rela): Likewise.
1205 (mips16_reloc_map): Add mappings.
1206 * elfn32-mips.c (elf_mips16_howto_table_rel): Fill in reserved
1207 R_MIPS16_GOT16 and R_MIPS16_CALL16 entries.
1208 (elf_mips16_howto_table_rela): Likewise.
1209 (mips16_reloc_map): Add mappings.
1210 * elfxx-mips.c (mips_elf_create_shadow_symbol): New function.
1211 (section_allows_mips16_refs_p): Likewise.
1212 (mips16_stub_symndx): Likewise.
1213 (mips_elf_check_mips16_stubs): Treat the data argument as a
1214 bfd_link_info. Mark every dynamic symbol as needing MIPS16 stubs
1215 and create a "shadow" symbol for the original MIPS16 definition.
1216 (mips16_reloc_p, got16_reloc_p, call16_reloc_p, hi16_reloc_p)
1217 (lo16_reloc_p, mips16_call_reloc_p): New functions.
1218 (_bfd_mips16_elf_reloc_unshuffle): Use mips16_reloc_p to generalize
1219 relocation checks.
1220 (_bfd_mips16_elf_reloc_shuffle): Likewise.
1221 (_bfd_mips_elf_lo16_reloc): Handle R_MIPS16_GOT16.
1222 (mips_elf_got16_entry): Add comment.
1223 (mips_elf_calculate_relocation): Use hi16_reloc_p,
1224 lo16_reloc_p, mips16_call_reloc_p, call16_reloc_p and got16_reloc_p
1225 to generalize relocation checks. Use section_allows_mips16_refs_p
1226 instead of mips16_stub_section_p. Handle R_MIPS16_CALL16 and
1227 R_MIPS16_GOT16, allowing the former to refer directly to a
1228 MIPS16 function if its stub is not needed.
1229 (mips16_stub_section_p): Delete.
1230 (_bfd_mips_elf_symbol_processing): Convert odd-valued function
1231 symbols into even MIPS16 symbols.
1232 (mips_elf_add_lo16_rel_addend): Use mips16_reloc_p to generalize
1233 a relocation check.
1234 (_bfd_mips_elf_check_relocs): Calculate "bed" and "rel_end"
1235 earlier in the function. Use mips16_stub_symndx to identify
1236 the target function. Avoid out-of-bounds accesses when the
1237 stub has no relocations; report an error instead. Use
1238 section_allows_mips16_refs_p instead of mips16_stub_section_p.
1239 Use mips16_call_reloc_p and got16_reloc_p to generalize relocation
1240 checks. Handle R_MIPS16_CALL16 and R_MIPS16_GOT16. Don't create
1241 dynamic relocations for absolute references to __gnu_local_gp.
1242 (_bfd_mips_elf_always_size_sections): Pass a bfd_link_info as
1243 the argument to mips_elf_check_mips16_stubs. Generalize comment.
1244 (_bfd_mips_elf_relocate_section): Use hi16_reloc_p and got16_reloc_p
1245 to generalize relocation checks.
1246 (_bfd_mips_elf_finish_dynamic_symbol): If a dynamic MIPS16 function
1247 symbol has a non-MIPS16 stub, redirect the symbol to the stub.
1248 Fix an overly long line. Don't give dynamic symbols type STO_MIPS16.
1249 (_bfd_mips_elf_gc_sweep_hook): Handle R_MIPS16_CALL16 and
1250 R_MIPS16_GOT16.
1251
e7d92e2e
AM
12522008-08-06 Alan Modra <amodra@bigpond.net.au>
1253
1254 * elf32-ppc.c (ppc_elf_relax_section): Clear R_PPC_PLTREL24 addend.
1255 (ppc_elf_relocate_section <R_PPC_RELAX32_PLT>): Don't bother here.
1256
46f2f11d
AM
12572008-08-05 Alan Modra <amodra@bigpond.net.au>
1258 Jaka Močnik <jaka@xlab.si>
1259
1260 * coffcode.h (coff_slurp_line_table): bfd_alloc lineno_cache first
1261 so that we don't inadvertently free it. Use bfd_alloc for sort
1262 arrays, and memcpy sorted line table.
1263
e5e6a5ff
AM
12642008-08-04 Alan Modra <amodra@bigpond.net.au>
1265
1266 * elf32-spu.c (spu_elf_auto_overlay): Use the maximum possible
1267 if --fixed-space request is too large.
1268
323ee3f4
AM
12692008-08-04 Alan Modra <amodra@bigpond.net.au>
1270
1271 * Makefile.am (SRC-POTFILES.in, BLD-POTFILES.in): Set LC_ALL=C.
1272 * Makefile.in: Regenerate.
1273 * po/SRC-POTFILES.in: Regenerate.
1274
4f0d75be
AM
12752008-08-02 Alan Modra <amodra@bigpond.net.au>
1276
1277 * elf32-spu.c (mark_overlay_section): Move code calculating
1278 max_overlay_size to correct block.
1279 (spu_elf_auto_overlay): Don't use %x in einfo error message.
1280
11a7ae4f
AM
12812008-08-01 Alan Modra <amodra@bigpond.net.au>
1282 Jan Kratochvil <jan.kratochvil@redhat.com>
1283
1284 * elfcore.h (elf_core_file_p): Ensure we have a backend match
1285 with the correct arch size before rejecting the generic fallback.
1286 * elfcode.h (elf_object_p): Likewise. Ensure arch size matches
1287 before accepting a target.
1288
010c8431
AM
12892008-08-01 Alan Modra <amodra@bigpond.net.au>
1290
d3ae097c 1291 PR 6774
010c8431
AM
1292 * elf.c (rewrite_elf_program_header): Don't wrap p_paddr to
1293 include file or program headers.
1294
0af1713e
AM
12952008-07-30 Alan Modra <amodra@bigpond.net.au>
1296
1297 * coff-ppc.c, coffgen.c, ecoff.c, ecofflink.c, elf.c, elf32-frv.c,
1298 elf32-iq2000.c, elf32-m32c.c, elf32-mep.c, elf32-mt.c,
1299 elf32-sh-symbian.c, elf64-hppa.c, mach-o.c, peXXigen.c, pef.c,
1300 ppcboot.c, vms-misc.c, xsym.c: Silence gcc warnings.
1301
9a59ad6b
DJ
13022008-07-28 Daniel Jacobowitz <dan@codesourcery.com>
1303
1304 * elfxx-mips.c (mips_elf_calculate_relocation): Avoid generating
1305 relocations for undefined weak symbols with non-default visibility.
1306 (_bfd_mips_elf_check_relocs): Use possibly_dynamic_relocs for
1307 global symbols in shared libraries.
1308 (allocate_dynrelocs): New function.
1309 (_bfd_mips_elf_adjust_dynamic_symbol): Do not handle
1310 possibly_dynamic_relocs here.
1311 (_bfd_mips_elf_size_dynamic_sections): Call allocate_dynrelocs.
1312
9f03412a
AO
13132008-07-28 Alexandre Oliva <aoliva@redhat.com>
1314
1315 * elf32-i386.c (struct elf_i386_link_hash_table): Added field
1316 tls_module_base.
1317 (elf_i386_link_hash_table_create): Initialize it.
1318 (elf_i386_always_size_sections): Set it.
1319 (set_tls_module_base): New.
1320 (elf_i386_relocate_sections): Call it.
1321 * elf64-x86-64.c (struct elf64_x86_64_link_hash_table): Added
1322 field tls_module_base.
1323 (elf64_x86_64_link_hash_table_create): Initialize it.
1324 (elf64_x86_64_always_size_sections): Set it.
1325 (set_tls_module_base): New.
1326 (elf64_x86_64_relocate_sections): Call it.
1327 Reported by Cary Coutant <ccoutant@google.com>
1328
9a008db3
AM
13292008-07-28 Ineiev <ineiev@yahoo.co.uk>
1330
1331 * elf32-arm.c (arm_map_one_stub): Declare variables at beginning
1332 of block.
1333 * elf32-avr.c (get_local_syms): Likewise.
1334
14a91970
AM
13352008-07-28 Alan Modra <amodra@bigpond.net.au>
1336
1337 PR 6769
1338 * bfd-in.h (BFD_VMA_FMT): Define.
1339 (printf_vma, sprintf_vma): Use the above.
1340 (_bfd_int64_low, _bfd_int64_high): Delete.
1341 * bfd-in2.h: Regenerate.
1342
baea7ef1
AM
13432008-07-27 Alan Modra <amodra@bigpond.net.au>
1344
1345 * elf.c (_bfd_elf_make_section_from_shdr): Ignore return from
1346 elf_parse_notes. Use bfd_malloc_and_get_section.
1347 (elf_parse_notes): Validate note namesz and descsz.
1348
3c7b9897
AM
13492008-07-26 Michael Eager <eager@eagercon.com>
1350
1351 * elf32-ppc.c (ppc_elf_merge_obj_attributes): Check compatibility
1352 between single-float, double-float, and soft-float.
1353
20163277
DJ
13542008-07-24 Daniel Jacobowitz <dan@codesourcery.com>
1355
1356 * elf32-mips.c (elf_backend_write_section): Define.
1357
4ff73856
NC
13582008-07-24 Nick Clifton <nickc@redhat.com>
1359
1360 * elf.c (_bfd_elf_map_sections_to_segments): Catch off by one
1361 error assigning sections to segments.
1362
39948a60
NC
13632008-07-22 Nick Clifton <nickc@redhat.com>
1364
1365 * elf.c (_bfd_elf_map_sections_to_segments): Allow sections in
1366 adjoining pages to be included in the same segment.
1367
bda987c2
CD
13682008-07-22 Simon Baldwin <simonb@google.com>
1369
1370 * elflink.c (elf_link_output_extsym): Set st_size to zero for
1371 symbols from dynamic libraries.
1372
88ba32a0
L
13732008-07-21 H.J. Lu <hongjiu.lu@intel.com>
1374
1375 PR ld/4424
1376 * elflink.c (_bfd_elf_merge_symbol): Call bed->relocs_compatible
1377 to check if 2 inputs are compatible.
1378
37c43c55
NC
13792008-07-21 Sterling Augustine <sterling@tensilica.com>
1380
1381 * elf.c (assign_file_positions_for_load_sections): Print vma in
1382 error message about overlapping section vmas.
1383
50403a1f
L
13842008-07-21 H.J. Lu <hongjiu.lu@intel.com>
1385
1386 PR ld/6747
1387 * elf32-frv.c (elf32_frv_relocate_section): Revert the change
1388 for PR ld/6446 checked in by accident on May 21, 2008.
1389
799c00e0
NC
13902008-07-21 Nick Clifton <nickc@redhat.com>
1391
1392 * coff-sh.c (bfd_pe_print_pdata): Define to NULL for non
1393 COFF_WITH_PE based SH ports.
1394 * libpei.h (_bfd_XX_print_ce_compressed_pdata): Prototype.
1395 * arm-wince-pe.c (bfd_pe_print_pdata): Use
1396 _bfd_pe_print_ce_compressed_pdata.
1397 (slurp_symcache, cleanup_syms, pe_print_ce_compressed_pdata): Move
1398 to...
1399 * peXXigen.c: ... here and rename pe_print_ce_compressed_pdata to
1400 _bfd_XX_print_ce_compressed_pdata.
1401
f60e73e9
AM
14022008-07-21 Alan Modra <amodra@bigpond.net.au>
1403
1404 * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Drop
1405 unwanted zero terminators.
1406
dc1859a6
AM
14072008-07-21 Alan Modra <amodra@bigpond.net.au>
1408
1409 * elf32-spu.c (spu_elf_relocate_section): Expand
1410 RELOC_FOR_GLOBAL_SYMBOL. Don't warn about undefined symbols for
1411 R_SPU_PPU32 and R_SPU_PPU64 relocations.
1412
89eeb0bc
LM
14132008-07-21 Luis Machado <luisgpm@br.ibm.com>
1414
1415 * elf-bfd.h: Declare elfcore_write_ppc_vsx.
1416 * elf.c (elfcore_grok_ppc_vsx): New function.
1417 (elfcore_write_ppc_vsx): New function
1418 (elfcore_grok_note): Handle VSX notes.
1419 (elfcore_write_register_note): Handle VSX notes.
1420
a9dc9481
JM
14212008-07-18 Joseph Myers <joseph@codesourcery.com>
1422
1423 * bfd-in.h (bfd_elf32_arm_set_target_relocs): Add new parameter.
1424 * bfd-in2.h: Regenerate.
1425 * elf32-arm.c (struct elf_arm_obj_tdata): Add field
1426 no_wchar_size_warning.
1427 (bfd_elf32_arm_set_target_relocs): Add new parameter
1428 no_wchar_warn.
1429 (elf32_arm_merge_eabi_attributes): Give a warning, not an error,
1430 for conflicting wchar_t attributes. Do not warn if
1431 --no-wchar-size-warning. Make diagnostic text more specific.
1432
6cee0a6f
L
14332008-07-18 H.J. Lu <hongjiu.lu@intel.com>
1434
1435 PR ld/6748
1436 * elf32-arm.c (elf32_arm_link_hash_table_create): Initialize
1437 new fields added for ARM long call support.
1438
2b5c217d
NC
14392008-07-18 Danny Backx <dannybackx@users.sourceforge.net>
1440
1441 * pe-arm-wince.c (pe_print_compressed_pdata): Define new function to
1442 print compressed pdata structure as described on MSDN. This only
1443 applies to a limited set of architectures (ARM, SH4).
1444 (slurp_symtab, my_symbol_for_address): Define static helper
1445 functions for pe_print_compressed_pdata.
1446 * coffcode.h (bfd_coff_backend_data): Add _bfd_coff_print_pdata field.
1447 (bfd_coff_have_print_pdata, bfd_coff_print_pdata): Define.
1448 * bfd/peXXigen.c (_bfd_XX_print_private_bfd_data_common): Add check on
1449 bfd_coff_backend_data, call the function if non-null.
1450 * pei-mcore.c: Add target dependent initialisation for
1451 bfd_coff_backend_data.
1452 * coff-sh.c: Likewise.
1453 * coff64-rs6000.c: Likewise.
1454 * coff-rs6000.c: Likewise.
1455 * libcoff-in.h: Likewise.
1456 * cf-i386lynx.c: Likewise.
1457 * coff-alpha.c: Likewise.
1458 * coff-apollo.c: Likewise.
1459 * coff-arm.c: Likewise.
1460 * coff-aux.c: Likewise.
1461 * coff-h8300.c: Likewise.
1462 * coff-h8500.c: Likewise.
1463 * coff-i386.c: Likewise.
1464 * coff-i860.c: Likewise.
1465 * coff-i960.c: Likewise.
1466 * coff-ia64.c: Likewise.
1467 * coff-m68k.c: Likewise.
1468 * coff-m88k.c: Likewise.
1469 * coff-maxq.c: Likewise.
1470 * coff-mips.c: Likewise.
1471 * coff-or32.c: Likewise.
1472 * coff-sparc.c: Likewise.
1473 * coff-tic30.c: Likewise.
1474 * coff-tic4x.c: Likewise.
1475 * coff-tic54x.c: Likewise.
1476 * coff-tic80.c: Likewise.
1477 * coff-w65.c: Likewise.
1478 * coff-we32k.c: Likewise.
1479 * coff-x86_64.c: Likewise.
1480 * coff-z80.c: Likewise.
1481 * coff-z8k.c: Likewise.
1482 * pe-mcore.c: Likewise.
1483 * pe-mips.c: Likewise.
1484 * pe-ppc.c: Likewise.
1485 * peXXigen.c: Likewise.
dc1859a6 1486 * pei-ppc.c: Likewise.
2b5c217d
NC
1487 * libcoff.h: Regenerate.
1488
c96a8570
BS
14892008-07-16 Bernd Schmidt <bernd.schmidt@analog.com>
1490
1491 * elf32-bfin.c (bfin_check_relocs, bfin_relocate_section,
1492 bfin_final_link_relocate, bfin_gc_mark_hook, bfin_gc_sweep_hook,
1493 ELF_DYNAMIC_INTERPRETER, DEFAULT_STACK_SIZE,
1494 struct _bfinfdpic_dynamic_got_info): Moved around to keep FD-PIC code
1495 separate from non-FD-PIC.
1496
605d18d4
DD
14972008-07-14 DJ Delorie <dj@redhat.com>
1498
1499 * elf-m10300.c (mn10300_elf_final_link_relocate): Correct overflow
1500 checks for PCREL8, PCREL16, GOTPC16, GOTOFF16, PLT16, and GOT16
1501 relocs.
1502 (mn10300_elf_relax_section): Correct jump offset check when target
1503 is in a different section.
1504
b0a0b978
JZ
15052008-07-15 Jie Zhang <jie.zhang@analog.com>
1506
1507 * elf32-bfin.c (elf32_bfin_special_sections[]): New.
1508 (elf_backend_special_sections): Define.
1509
aaf30c25
CS
15102008-07-13 Craig Silverstein <csilvers@google.com>
1511
08b78292 1512 PR binutils/6743
aaf30c25
CS
1513 * dwarf2.c (struct dwarf2_debug): New variable info_ptr_memory.
1514 (find_line): Use info_ptr_memory instead of sec_info_ptr.
1515 (_bfd_dwarf2_cleanup_debug_info): Likewise.
1516
1bac266e
JZ
15172008-07-12 Jie Zhang <jie.zhang@analog.com>
1518
1519 Revert
1520 2008-07-12 Jie Zhang <jie.zhang@analog.com>
1521 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
1522 executable sections into the same segment with other
1523 read only sections if --sep-code.
1524 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
1525 (elf32_bfin_data_in_l1): New variable.
1526 (elf32_bfin_final_write_processing): New.
1527 (elf32_bfin_special_sections[]): New.
1528 (elf_backend_final_write_processing): Define.
1529 (elf_backend_special_sections): Define.
1530
8c684578
JZ
15312008-07-12 Jie Zhang <jie.zhang@analog.com>
1532
1533 * elf.c (_bfd_elf_map_sections_to_segments): Don't put
1534 executable sections into the same segment with other
1535 read only sections if --sep-code.
1536 * elf32-bfin.c (elf32_bfin_code_in_l1): New variable.
1537 (elf32_bfin_data_in_l1): New variable.
1538 (elf32_bfin_final_write_processing): New.
1539 (elf32_bfin_special_sections[]): New.
1540 (elf_backend_final_write_processing): Define.
1541 (elf_backend_special_sections): Define.
1542
3076cd1f
AS
15432008-07-11 Andreas Schwab <schwab@suse.de>
1544
1545 * dwarf2.c (read_section): Take pointer to bfd_size_type instead
1546 of unsigned long as last parameter.
1547 (struct dwarf2_debug): Define dwarf_abbrev_size, dwarf_line_size,
1548 dwarf_str_size and dwarf_ranges_size as bfd_size_type instead of
1549 unsigned long.
1550
0a61c8c2
RS
15512008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
1552
1553 * elfxx-mips.c (mips_elf_calculate_relocation): Calculate GP and GP0
1554 for all relocation types. Allow any type of relocation to refer to
1555 __gnu_local_gp.
1556
30c09090
RS
15572008-07-10 Richard Sandiford <rdsandiford@googlemail.com>
1558
1559 * elfxx-mips.c (mips_elf_check_mips16_stubs): Use ELF_ST_IS_MIPS16.
1560 (mips_elf_calculate_relocation): Likewise.
1561 (_bfd_mips_elf_add_symbol_hook): Likewise.
1562 (_bfd_mips_elf_finish_dynamic_symbol): Likewise.
1563 (_bfd_mips_vxworks_finish_dynamic_symbol): Likewise.
1564
355d10dc
AS
15652008-07-10 Andreas Schwab <schwab@suse.de>
1566
1567 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Add missing
1568 paren.
1569
1b315056
CS
15702008-07-09 Craig Silverstein <csilvers@google.com>
1571
1572 * Makefile.am (BFD32_LIBS): Add compress.lo.
1573 (BFD32_LIBS_CFILES): Add compress.c.
1574 (BFD_H_FILES): Likewise.
1575 * Makefile.in: Regenerate.
1576 * bfd-in2.h: Regenerate.
1577 * config.in: Add HAVE_ZLIB_H
1578 * configure.in: Add test for libz and zlib.h
1579 * configure: Regenerate.
1580 * dwarf2.c (read_section): New function.
1581 (read_indirect_string): Call new function read_section.
1582 (read_abbrevs): Likewise.
1583 (decode_line_info): Likewise.
1584 (read_debug_ranges): Likewise.
1585 (find_line): Call new function read_section when just one
1586 .zdebug_info section is found, otherwise read and compress
1587 multiple sections.
1588 (_bfd_dwarf2_cleanup_debug_info): Free sec_info_ptr.
1589 * elf.c (_bfd_elf_make_section_from_shdr): Add zdebug prefix.
1590 (special_sections_z): New struct.
1591 (special_sections): Refer to special_sections_z.
1592 * elfxx-mips.c (_bfd_mips_elf_section_from_shdr): Recognize
1593 sections named .zdebug_*.
1594 (_bfd_mips_elf_fake_sections): Likewise.
1595 * compress.c: New file.
1596 (bfd_uncompress_section_contents): New function.
dc1859a6 1597
329dcd78
NC
15982008-07-07 Christophe Lyon <christophe.lyon@st.com>
1599
1600 * elf32-arm.c (arm_type_of_stub): Don't crash on local symbols in
1601 the presence of a PLT.
1602
c29aae59
AM
16032008-07-07 Alan Modra <amodra@bigpond.net.au>
1604
1605 * bfd.c (bfd_demangle): Always trim off bfd_get_symbol_leading_char.
1606
7382d32a
AM
16072008-07-02 Alan Modra <amodra@bigpond.net.au>
1608
1609 * elf32-ppc.c (is_pic_glink_stub): New function.
1610 (ppc_elf_get_synthetic_symtab): Don't generate symbols when
1611 multiple shared/pie stubs per plt entry.
1612
cb53bf42
RS
16132008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
1614
1615 * elf.c (_bfd_elf_get_synthetic_symtab): Increment p by
1616 bed->s->int_rels_per_ext_rel.
1617
6ba2a415
RS
16182008-06-30 Richard Sandiford <rdsandiford@googlemail.com>
1619
1620 * syms.c (BSF_SYNTHETIC): New flag.
1621 * elf.c (_bfd_elf_get_synthetic_symtab): Set it.
1622 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Likewise.
1623 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
1624 * bfd-in.h (bfd_asymbol_flavour): Return bfd_target_unknown_flavour
1625 for synthetic symbols.
1626 * bfd-in2.h: Regenerate.
1627
3dccd7b7
DJ
16282008-06-30 Daniel Jacobowitz <dan@codesourcery.com>
1629
1630 * elf32-arm.c (record_arm_to_thumb_glue, record_thumb_to_arm_glue):
1631 Expand comments.
1632 (arm_map_one_stub): Use | 1 when setting the low bit.
1633
f57718b4
AS
16342008-06-29 Andreas Schwab <schwab@suse.de>
1635
1636 * elf32-m68k.c (elf_m68k_relocate_section): Don't ignore existing
1637 addend on _GLOBAL_OFFSET_TABLE_.
1638
7413f23f
DJ
16392008-06-24 Daniel Jacobowitz <dan@codesourcery.com>
1640
1641 * elf32-arm.c (STUB_ENTRY_NAME): Define.
1642 (arm_thumb_thumb_long_branch_stub): Use bx instead of b.n.
1643 (arm_pic_long_branch_stub): Mention R_ARM_REL32 instead of
1644 R_ARM_ABS32.
1645 (struct elf32_arm_stub_hash_entry): Add output_name.
1646 (arm_build_one_stub): Move offsets into the offset argument
1647 of _bfd_final_link_relocate. Correct offset for
1648 arm_thumb_arm_v4t_stub_long_branch.
1649 (elf32_arm_size_stubs): Set stub_entry->output_name.
1650 (elf32_arm_ouput_plt_map_sym): Rename to elf32_arm_output_map_sym.
1651 Update all callers.
1652 (elf32_arm_output_stub_sym): New.
1653 (arm_map_one_stub): Correct formatting. Use elf32_arm_output_stub_sym.
1654
7c39fb20
AM
16552008-06-20 Alan Modra <amodra@bigpond.net.au>
1656
1657 * elf32-spu.c (needs_ovl_stub): Correctly return nonovl_stub for
1658 non-branch insns.
1659
f3c29e8a
AM
16602008-06-20 Alan Modra <amodra@bigpond.net.au>
1661
1662 * elf32-spu.c (build_stub): Allow wraparound on stub branches.
1663 (allocate_spuear_stubs, build_spuear_stubs): Return value from
1664 count_stub/build_stub.
1665 (spu_elf_build_stubs): Correct location of stub reloc error message.
1666
de73c611
SR
16672008-06-18 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
1668
dc1859a6 1669 * elf32-cr16.c (ELF_MACHINE_ALT1): Define to EM_CR16_OLD.
de73c611 1670
7a283e07
RW
16712008-06-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1672
1673 * configure: Regenerate.
1674
99302af9
AM
16752008-06-17 Alan Modra <amodra@bigpond.net.au>
1676
1677 * elf32-spu.c (struct spu_link_hash_table): Add extra_stack_space.
1678 (spu_elf_check_vma): Add extra_stack_space param, copy to htab.
1679 (spu_elf_auto_overlay): Use it.
1680 (RECURSE_UNMARK): Define as 0.
1681 (unmark_overlay_section): Heed RECURSE_UNMARK.
1682 * elf32-spu.h (spu_elf_check_vma): Update prototype.
1683
ff7eeb89
DD
16842008-06-12 DJ Delorie <dj@redhat.com>
1685
1686 * elf32-m32c.c (ELF_MACHINE_ALT1): Define as EM_M32C_OLD.
1687
c13bb2ea
PB
16882008-06-09 Paul Brook <paul@codesourcery.com>
1689
1690 bfd/
1691 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Allow BE8 shared
1692 libraries.
1693
f4ac8484
DJ
16942008-06-09 Christophe Lyon <christophe.lyon@st.com>
1695
1696 * elf32-arm.c (arm_stub_is_thumb): Define.
1697 (elf32_arm_final_link_relocate): Handle near mode switching stubs.
1698
6a267715
AM
16992008-06-07 Alan Modra <amodra@bigpond.net.au>
1700
1701 * elf32-spu.c (spu_elf_auto_overlay): Add valid area below sp
1702 to stack calculation.
1703
23684067
PB
17042008-06-06 Paul Brook <paul@codesourcery.com>
1705
1706 bfd/
1707 * elf32-arm.c (elf32_arm_merge_private_bfd_data): Reject BE8 input.
1708
97407faf
AM
17092008-06-06 Alan Modra <amodra@bigpond.net.au>
1710
1711 * elf32-spu.c (spu_elf_auto_overlay): Relax requirement that
1712 file names be unique. Specify archive:path in overlay script.
1713
7cfbafbc
AM
17142008-06-05 Alan Modra <amodra@bigpond.net.au>
1715
1716 PR ld/6590
1717 * elf64-ppc.c (ppc_build_one_stub): Correct reloc offsets.
1718
0f0a5e58
AM
17192008-06-04 Alan Modra <amodra@bigpond.net.au>
1720
1721 * elf.c (ignore_section_sym): Don't test section sym value here.
1722 (elf_map_symbols): Instead check zero value here as was done prior
1723 to 2006-05-26 change.
1724
696b7ad2
NC
17252008-06-04 Nick Clifton <nickc@redhat.com>
1726
1727 PR ld/6019
1728 * elf32-avr.c (elf32_avr_relax_section): Handle the case where
1729 there are no local symbols.
1730
1f27ab8d
AM
17312008-06-04 Alan Modra <amodra@bigpond.net.au>
1732
1733 * elf32-spu.c (get_sym_h): Don't attempt to read global syms.
1734 (process_stubs): Likewise.
1735 (discover_functions): Don't used cached symbols.
1736 (maybe_insert_function): Correct condition under which function
1737 array is realloc'd.
1738 (mark_functions_via_relocs): Delete unused variable.
1739
adfef0bd
NC
17402008-05-30 Frediano Ziglio <frediano.ziglio@vodafone.com>
1741 Nick Clifton <nickc@redhat.com>
1742
1743 PR ld/6511
1744 * elf64-hppa.c (allocate_global_data_opd): Default to using the
1745 dynamic symbol table for local function names in shared libraries.
1746
11701589
JK
17472008-05-29 Jan Kratochvil <jan.kratochvil@redhat.com>
1748
1749 * elf.c (assign_file_positions_for_load_sections): Adjust pre-section
1750 gaps based on VMA and P_VADDR instead of LMA and P_PADDR addresses.
1751
124b52c6
AM
17522008-05-28 Alan Modra <amodra@bigpond.net.au>
1753
1754 * elf32-spu.c (spu_elf_object_p): New function.
1755 (elf_backend_object_p): Define.
1756 (build_stub): Correct second word of 8 byte overlay stubs.
1757 (spu_elf_relocate_section): Formatting.
1758
bb864ac1
CES
17592008-05-24 Carlos Eduardo Seo <cseo@linux.vnet.ibm.com>
1760
1761 * elf.c (elfcore_write_register_note): New function.
1762 * elf-bfd.h (elfcore_write_register_note): New prototype.
1763
da5938a2
NC
17642008-05-22 Christophe Lyon <christophe.lyon@st.com>
1765
1766 * elf32-arm.c (arm_type_of_stub): Ignore STT_SECTION symbols.
1767 (elf32_arm_stub_add_mapping_symbol): Remove.
1768 (elf32_arm_add_stub): Don't generate mapping symbols. Change
1769 prototype.
1770 (elf32_arm_size_stubs): Use new elf32_arm_add_stub
1771 prototype. Don't generate thumb to arm glue for calls.
1772 (arm_map_one_stub): Define.
1773 (elf32_arm_output_arch_local_syms): Generate mapping symbols for
1774 long calls stubs.
dc1859a6 1775
c2f950c8
L
17762008-05-21 Nick Clifton <nickc@redhat.com>
1777
1778 * elf32-arm.c (group_sections): Reformat comments.
1779
1780 PR ld/6446
1781 * elf32-frv.c (elf32_frv_relocate_section): Set EF_FRV_PIC by
1782 default (for FDPIC). Clear it if any inter-segment relocations
1783 are found.
1784
1785 * elf64-hppa.c (elf64_hppa_finalize_opd): Check NULL return
1786 from elf_link_hash_lookup.
1787
7fb9f789 17882008-05-21 Maxim Kuvyrkov <maxim@codesourcery.com>
dc1859a6 1789
7fb9f789
NC
1790 Add multi-GOT support for m68k.
1791 * elf32-m68k.c (struct elf_m68k_link_hash_entry: got_entry_key,
1792 glist): New fields.
1793 (struct elf_m68k_got_entry_key, struct elf_m68k_got_entry,
1794 struct elf_m68k_got, struct elf_m68k_bfd2got_entry,
1795 struct elf_m68k_multi_got): New data structures.
1796 (struct elf_m68k_link_hash_table: local_gp_p, use_neg_got_offsets_p,
1797 allow_multigot_p, multi_got_): New fields.
1798 (elf_m68k_multi_got): New macro.
1799 (elf_m68k_link_hash_newfunc): Initialize new fields of
1800 struct elf_m68k_link_hash_entry.
1801 (elf_m68k_link_hash_table_create): Initialize new fields of
1802 struct elf_m68k_link_hash_table.
1803 (elf_m68k_link_hash_table_free): New static function implementing hook.
1804 (elf_m68k_init_got, elf_m68k_clear_got, elf_m68k_create_empty_got): New
dc1859a6 1805 static functions for struct elf_m68k_got.
7fb9f789
NC
1806 (elf_m68k_init_got_entry_key, elf_m68k_got_entry_hash,
1807 elf_m68k_got_entry_eq): New static functions for
1808 struct elf_m68k_got_entry.
1809 (ELF_M68K_REL_8O_MAX_N_ENTRIES_IN_GOT,
1810 ELF_M68K_REL_8O_16O_MAX_N_ENTRIES_IN_GOT): New macros.
1811 (enum elf_m68k_get_entry_howto): New enum.
1812 (elf_m68k_get_got_entry, elf_m68k_update_got_entry_type,
1813 elf_m68k_remove_got_entry_type): New static functions for
1814 struct elf_m68k_got_entry.
1815 (elf_m68k_add_entry_to_got): New static function.
1816 (elf_m68k_bfd2got_entry_hash, elf_m68k_bfd2got_entry_eq,
1817 elf_m68k_bfd2got_entry_del, elf_m68k_get_bfd2got_entry): New static
1818 functions for struct elf_m68k_bfd2got_entry.
1819 (struct elf_m68k_can_merge_gots_arg, elf_m68k_can_merge_gots_1,
1820 elf_m68k_can_merge_gots): New traversal.
1821 (struct elf_m68k_merge_gots_arg, elf_m68k_merge_gots_1,
1822 elf_m68k_merge_gots): Ditto.
1823 (struct elf_m68k_finalize_got_offsets_arg,
1824 elf_m68k_finalize_got_offsets_1, elf_m68k_finalize_got_offsets): Ditto.
1825 (struct elf_m68k_partition_multi_got_arg,
1826 elf_m68k_partition_multi_got_1, elf_m68k_init_symndx2h_1,
1827 elf_m68k_partition_multi_got): Ditto.
1828 (elf_m68k_find_got_entry_ptr, elf_m68k_remove_got_entry): New static
1829 functions.
1830 (elf_m68k_copy_indirect_symbol): New static function implementing
1831 a hook.
1832 (elf_m68k_check_relocs): Update to add entries to multi-GOT.
1833 (elf_m68k_gc_sweep_hook): Update to remove entries from multi-GOT.
1834 (elf_m68k_always_size_sections): Assign BFDs to GOTs.
1835 (elf_m68k_relocate_section): Update to properly handle GOT relocations.
1836 (elf_m68k_finish_dynamic_symbol): Update to traverse all GOT entries
1837 of a global symbol.
1838 (bfd_elf_m68k_set_target_options): New function.
1839 (bfd_elf32_bfd_link_hash_table_free): Define hook.
1840 (bfd_elf32_bfd_final_link): Change expansion to bfd_elf_final_link
1841 to skip generic calculation of GOT offsets.
1842 (elf_backend_copy_indirect_symbol): Define hook.
1843 * bfd-in.h (bfd_elf_m68k_set_target_options): Declare function.
1844 * bfd-in2.h: Regenerate.
1845
46f2f11d 18462008-05-21 André Johansen <andrejoh@gmail.com>
90b5b1a5
NC
1847
1848 PR 868
1849 * dwarf2.c (_bfd_dwarf2_cleanup_debug_info): Free memory allocated
1850 for filenames in function tables and variable tables.
1851
6ffd7900
AM
18522008-05-19 Alan Modra <amodra@bigpond.net.au>
1853
1854 PR 2995, PR 6473
1855 * elf.c (_bfd_elf_make_section_from_shdr): Leave lma equal to
1856 vma when all p_paddr fields are zero and there is more than
1857 one PT_LOAD header.
1858
906e58ca
NC
18592008-05-15 Christophe Lyon <christophe.lyon@st.com>
1860
1861 Add long call support for ARM.
1862 * elf32-arm.c (THM2_MAX_FWD_BRANCH_OFFSET): Define.
1863 (THM2_MAX_BWD_BRANCH_OFFSET): Define.
1864 (ARM_MAX_FWD_BRANCH_OFFSET): Define.
1865 (ARM_MAX_BWD_BRANCH_OFFSET): Define.
1866 (THM_MAX_FWD_BRANCH_OFFSET): Define.
1867 (THM_MAX_BWD_BRANCH_OFFSET): Define.
1868 (arm_long_branch_stub): Define.
1869 (arm_pic_long_branch_stub): Define.
1870 (arm_thumb_v4t_long_branch_stub): Define.
1871 (arm_thumb_thumb_long_branch_stub): Define.
1872 (arm_thumb_arm_v4t_long_branch_stub): Define.
1873 (STUB_SUFFIX): Define.
1874 (elf32_arm_stub_type): Define.
1875 (elf32_arm_stub_hash_entry): Define.
1876 (elf32_arm_link_hash_entry): Add stub_cache field.
1877 (arm_stub_hash_lookup): Define.
1878 (elf32_arm_link_hash_table): Add stub_hash_table, stub_bfd,
1879 add_stub_section, layout_sections_again, stub_group, bfd_count,
1880 top_index, input_list fields.
1881 (elf32_arm_link_hash_newfunc): Init new field.
1882 (stub_hash_newfunc): New function.
1883 (elf32_arm_link_hash_table_create): Init stub_hash_table.
1884 (elf32_arm_hash_table_free): New function.
1885 (arm_type_of_stub): New function.
1886 (elf32_arm_stub_name): New function.
1887 (elf32_arm_get_stub_entry): New function.
1888 (elf32_arm_stub_add_mapping_symbol): New function.
1889 (elf32_arm_add_stub): New function.
1890 (arm_build_one_stub): New function.
1891 (arm_size_one_stub): New function.
1892 (elf32_arm_setup_section_lists): New function.
1893 (elf32_arm_next_input_section): New function.
1894 (group_sections): New function.
1895 (elf32_arm_size_stubs): New function.
1896 (elf32_arm_build_stubs): New function.
1897 (bfd_elf32_arm_add_glue_sections_to_bfd): Skip stub sections.
1898 (bfd_elf32_arm_process_before_allocation): No longer handle
1899 R_ARM_CALL and R_ARM_THM_CALL.
1900 (using_thumb_only): New function.
1901 (elf32_arm_final_link_relocate): Redirect calls to stub if range
1902 exceeds encoding capabilities.
1903 (bfd_elf32_bfd_link_hash_table_free): Define.
1904 * bfd-in.h (R_ARM_max): Fix value to 130.
1905 (elf32_arm_setup_section_lists): Protype.
1906 (elf32_arm_next_input_section): Protype.
1907 (elf32_arm_size_stubs): Protype.
1908 (elf32_arm_build_stubs): Protype.
1909 * bfd-in2.h: Regenerate.
1910
86a4952b
UW
19112008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1912
1913 * elf32-ppc.c (ppc_elf_get_synthetic_symtab): Fix memset calls.
1914 * elf64-ppc.c (ppc64_elf_get_synthetic_symtab): Likewise.
1915
8944f3c2
AM
19162008-05-14 Alan Modra <amodra@bigpond.net.au>
1917
1918 * Makefile.am: Run "make dep-am".
1919 * Makefile.in: Regenerate.
1920
468392fb
AM
19212008-05-14 Ulrich Weigand <uweigand@de.ibm.com>
1922 Alan Modra <amodra@bigpond.net.au>
1923
1924 * elf32-ppc.c (section_covers_vma): New function.
1925 (ppc_elf_get_synthetic_symtab): New function.
1926 (bfd_elf32_get_synthetic_symtab): Define.
1927 * elf64-ppc.c (section_covers_vma): New function.
1928 (ppc64_elf_get_synthetic_symtab): Generate sym@plt on glink branch
1929 table entries, and __glink_PLTresolve on resolver stub.
1930 (ppc64_elf_build_stubs): Rename __glink sym to __glink_PLTresolve.
1931
1d483afe
AM
19322008-05-12 Alan Modra <amodra@bigpond.net.au>
1933
1934 PR 6443
1935 * elf32-ppc.c (MUST_BE_DYN_RELOC): Delete.
1936 (must_be_dyn_reloc): New function.
1937 (ppc_elf_check_relocs): Don't set DF_STATIC_TLS for tprel relocs
1938 in pies.
1939 (ppc_elf_tls_optimize): Optimise pies.
1940 (ppc_elf_relocate_section): Use a section symbol rather than no
1941 symbol if possible for LD->IE TLS sequence, but don't error if
1942 we must use no symbol.
1943 * elf64-ppc.c (MUST_BE_DYN_RELOC): As for elf32-ppc.c.
1944 (must_be_dyn_reloc): Likewise.
1945 (ppc64_elf_check_relocs): Likewise.
1946 (ppc64_elf_tls_optimize): Likewise.
1947 (ppc64_elf_relocate_section): Likewise.
1948
cc5ca406
AM
19492008-05-12 Alan Modra <amodra@bigpond.net.au>
1950
1951 * elf32-spu.c (spu_elf_relocate_section): Rename is_ea to is_ea_sym.
1952
536d0ff4
AM
19532008-05-10 Paul Pluzhnikov <ppluzhnikov@google.com>
1954
1955 * elfcore.h (elf_core_file_p): Warn about core truncation.
1956
51c8ebc1
BW
19572008-05-07 Bob Wilson <bob.wilson@acm.org>
1958
1959 * elf32-xtensa.c (xtensa_property_section_name): New.
1960 (xtensa_make_property_section): New.
1961 (xtensa_get_property_section): Make static. Do not create a new
1962 section if it does not exist.
1963
8374f9d4
AM
19642008-05-08 Alan Modra <amodra@bigpond.net.au>
1965
1966 * elf32-spu.c (spu_elf_special_sections): Add "._ea".
1967 (spu_elf_relocate_section): Handle relocations against symbols
1968 defined in ._ea specially.
1969
95720a86
DJ
19702008-05-03 Daniel Jacobowitz <dan@codesourcery.com>
1971
1972 * elf32-arm.c (elf32_arm_symbian_link_hash_table_create): Use
1973 ARRAY_SIZE.
1974 (elf32_arm_symbian_plt_sym_val): New.
1975 (elf_backend_plt_sym_val): Define.
1976
5c44b38e
AM
19772008-05-03 Alan Modra <amodra@bigpond.net.au>
1978
1979 PR 2995, PR 6473
1980 * elf.c (rewrite_elf_program_header): Rather than clearing
1981 p_paddr_valid at end, don't set it in the first place. Delete
1982 comment no longer relevant. When not p_paddr_valid, don't set
1983 paddr from vaddr, and don't set p_vaddr_offset.
1984
3471d59d
CC
19852008-05-01 Cary Coutant <ccoutant@google.com>
1986
1987 * elf.c (bfd_elf_get_str_section): Fix memory leak caused by
1988 corrupt string table.
1989
f12a02c0
JB
19902008-05-01 Joel Brobecker <brobecker@adacore.com>
1991
1992 * cache.c (cache_bread_1): Renames cache_bread.
1993 (cache_bread): New function.
1994
88967714
AM
19952008-05-01 Alan Modra <amodra@bigpond.net.au>
1996
1997 PR 2995, PR 6473
1998 * elf.c (_bfd_elf_make_section_from_shdr): Always set lma from p_paddr.
1999 (assign_file_positions_for_load_sections): Combine nested "if".
2000 (copy_elf_program_header): Don't set p_paddr_valid or p_vaddr_offset
2001 when all header p_paddr fields are zero.
2002
9239aded
AM
20032008-04-30 Edmar Wienskoski <edmar@freescale.com>
2004
2005 * cpu-powerpc.c (bfd_powerpc_archs): Add e500mc entry.
2006
266b05cf
DJ
20072008-04-29 Daniel Jacobowitz <dan@codesourcery.com>
2008
2009 * elf.c (_bfd_elf_get_dynamic_reloc_upper_bound)
2010 (_bfd_elf_canonicalize_dynamic_reloc): Find dynamic relocations
2011 even if they are not loaded.
2012 * elflink.c (_bfd_elf_init_2_index_sections): Set data_index_section
2013 first.
2014
fc2db3b8
NC
20152008-04-25 Jay Foad <jay.foad@gmail.com>
2016
2017 * reloc16.c (bfd_coff_reloc16_get_value): Add support for
2018 undefined weak symbols.
2019
ddeca468
NC
20202008-04-25 Nick Clifton <nickc@redhat.com>
2021
2022 * po/vi.po: Updated Vietnamese translation.
2023
6194aaab
L
20242008-04-23 Paolo Bonzini <bonzini@gnu.org>
2025
2026 * aclocal.m4: Regenerate.
2027 * configure: Regenerate.
2028
38d6ea5b
CC
20292008-04-21 Cary Coutant <ccoutant@google.com>
2030
2031 * archive.c (_bfd_write_archive_contents): Fix incorrect use of
2032 ARFMAG.
2033
131eb6b7
NS
20342008-04-21 Nathan Sidwell <nathan@codesourcery.com>
2035
2036 * elfxx-mips.c (_bfd_mips_vxworks_adjust_dynamic_symbol): Don't
2037 set the value of undefined symbols in shared objects.
2038 (_bfd_mips_vxworks_finish_dynamic_symbol): Clear value for
2039 undefined symbols unless pointer equality is needed.
2040
e0c88096
NC
20412008-04-18 Dennis Roberts <dennis.roberts@sunquestinfo.com>
2042
2043 * aix5ppc-core.c: Define macros for the default architecture and
2044 machine for matching core files.
2045 (xcoff64_core_p): Set the architecture and machine to the default
2046 values defined in the macros mentioned above.
2047 * rs6000-core.c: Define macros to determine whether or not the
2048 core file header uses the core_dumpxx header format.
2049 (rs6000coff_core_p): Don't match core files that use the
2050 core_dumpxx header format.
2051
18c1668c
PA
20522008-04-16 Pedro Alves <pedro@codesourcery.com>
2053
2054 * config.bfd (i[3-7]86-*-dicos*, x86_64-*-dicos*): Add.
2055
739f7f82
DM
20562008-04-16 David S. Miller <davem@davemloft.net>
2057
2058 * reloc.c (BFD_RELOC_SPARC_GOTDATA_HIX22,
2059 BFD_RELOC_SPARC_GOTDATA_LOX10, BFD_RELOC_SPARC_GOTDATA_OP_HIX22,
2060 BFD_RELOC_SPARC_GOTDATA_OP_LOX10, BFD_RELOC_SPARC_GOTDATA_OP): New.
2061 * libbfd.h: Regnerate.
2062 * bfd-in2.h: Regenerate.
2063 * elfxx-sparc.c (_bfd_sparc_elf_howto_table): Add entries for
2064 GOTDATA relocations.
2065 (sparc_reloc_map): Likewise.
2066 (_bfd_sparc_elf_check_relocs): Handle R_SPARC_GOTDATA_* like
2067 R_SPARC_GOT*.
2068 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2069 (_bfd_sparc_elf_relocate_section): Transform R_SPARC_GOTDATA_HIX22,
2070 R_SPARC_GOTDATA_LOX10, R_SPARC_GOTDATA_OP_HIX22, and
2071 R_SPARC_GOTDATA_OP_LOX10 into the equivalent R_SPARC_GOT* reloc.
2072 Simply ignore R_SPARC_GOTDATA_OP relocations.
2073
c5cb8442
TS
20742008-04-14 Aurelien Jarno <aurelien@aurel32.net>
2075
2076 * configure.in: Link with the PIC version of libiberty on
2077 Linux/MIPS hosts.
2078 * configure: Regenerate.
2079
19a6653c
AM
20802008-04-14 Edmar Wienskoski <edmar@freescale.com>
2081
2082 * archures.c: Add bfd_mach_ppc_e500mc.
2083 * bfd-in2.h: Regenerate.
2084
2ec9638b
AM
20852008-04-08 Alan Modra <amodra@bigpond.net.au>
2086
2087 * elf32-spu.c (spu_elf_build_stubs): Correct error message.
2088 (mark_functions_via_relocs): Remove premature init of symtab_hdr.
2089 (collect_overlays): Commment typo fix.
2090
a94b9d2d
AM
20912008-04-08 Kees Cook <kees@canonical.com>
2092
2093 * elflink.c (bfd_elf_size_dynamic_sections): Ignore GNU-stack note
2094 in EXEC_P bfds.
2095
9dcc4794
AM
20962008-04-08 Alan Modra <amodra@bigpond.net.au>
2097
2098 * elf32-spu.c: Include libiberty.h.
2099 (struct spu_link_hash_table): Add local_stire, overlay_fixed, reserved,
2100 non_ovly_stub, spu_elf_load_ovl_mgr, spu_elf_open_overlay_script,
2101 spu_elf_relink, auto_overlay fields.
2102 (AUTO_OVERLAY, AUTO_RELINK, OVERLAY_RODATA): Define.
2103 (needs_ovl_stub): Flip test so that call to non-function warning
2104 is emitted during relocate_section rather than earlier.
2105 (spu_elf_check_vma): Stash --auto-overlay parameters, and clear
2106 auto_overlay if no section exceeds local store.
2107 (struct call_info): Add count, max_depth, is_pasted fields.
2108 (struct function_info): Add rodata, last_caller, call_count,
2109 depth, new visit flags.
2110 (insert_callee): Increment call count.
2111 (copy_callee): New function.
2112 (mark_functions_via_relocs): Investigate all reloc types to count
2113 possible function pointer stubs for --auto-overlay. Track
2114 last_caller and increment function call_count.
2115 (pasted_function): Insert a "call" into call info for pasted section.
2116 (remove_cycles): Track max depth of calls. Don't emit call graph
2117 pruning warning for --auto-overlay.
2118 (build_call_tree): Don't transfer_calls for --auto-overlay.
2119 Adjust remove_cycles call.
2120 (sort_calls, sort_lib, sort_bfds): New functions.
2121 (struct _mos_param, struct _uos_param, struct _cl_param): New.
2122 (mark_overlay_section, unmark_overlay_section): New functions.
2123 (collect_lib_sectios, auto_ovl_lib_functions): New functions.
2124 (collect_overlays, find_pasted_call): New functions.
2125 (sum_stack): Deal with is_pasted "calls". Exit before printing
2126 when --auto-overlay.
2127 (spu_elf_auto_overlay): New function.
2128 (spu_elf_final_link): Call spu_elf_auto_overlay.
2129 * elf32-spu.h (spu_elf_check_vma): Update prototype.
2130
380814a6
AM
21312008-04-07 Alan Modra <amodra@bigpond.net.au>
2132
2133 * elf32-spu.c (allocate_spuear_stubs): Ensure _SPUEAR_ symbol
2134 is defined in overlay section before creating a stub.
2135 (build_spuear_stubs): Likewise.
2136 (spu_elf_size_stubs, spu_elf_build_stubs): Adjust calls.
2137
055ed83b
AM
21382008-04-02 Alan Modra <amodra@bigpond.net.au>
2139
2140 * elf32-spu.c (insert_callee): Reorder call list so most recent
2141 call is always first.
2142 (interesting_section): Move.
2143 (mark_functions_via_relocs): Fold interesting_section and
2144 reloc_count tests in callers to here. Simplify output section
2145 owner test.
2146 (discover_functions): Set "gaps" when no symbols and some
2147 "interesting_section". Run pasted_function loop for no symbol
2148 bfds.
2149 (for_each_node, transfer_calls): New functions.
2150 (mark_non_root): Adjust to suit for_each_node.
2151 (call_graph_traverse): Likewise. Fix memory leak. Rename to..
2152 (remove_cycles): ..this.
2153 (build_call_tree): Use for_each_node and transfer_calls.
2154 (struct _sum_stack_param): New.
2155 (sum_stack): Adjust to suit for_each_node. Return error on
2156 malloc failure. Move code to print root node cumulative stack from..
2157 (spu_elf_stack_analysis): ..here. Use for_each_node.
2158
89a58aeb
AM
21592008-03-31 Cary Coutant <ccoutant@google.com>
2160
2161 PR 6006
2162 * archive.c (_bfd_slurp_extended_name_table): Change
2163 ARFMAG[0] to ARFMAG[1].
2164 (_bfd_construct_extended_name_table): Likewise.
2165
3a3b6725
DJ
21662008-03-31 Daniel Jacobowitz <dan@codesourcery.com>
2167
2168 * elfxx-mips.c (mips_elf_record_got_page_entry): Update comment.
2169 (_bfd_mips_elf_check_relocs): Update comments. Always call
2170 mips_elf_record_got_page_entry for R_MIPS_GOT_PAGE.
2171
21722008-03-27 Cary Coutant <ccoutant@google.com>
a8da6403 2173
89a58aeb 2174 Add support for thin archives.
a8da6403
NC
2175 * archive.c (_bfd_find_nested_archive): New function.
2176 (get_extended_arelt_filename): Add origin parameter.
2177 (_bfd_generic_read_ar_hdr_mag): Deal with extended name
2178 combined with a file offset.
2179 (append_relative_path): New function.
2180 (_bfd_get_elt_at_filepos): Deal with external members and
2181 nested archives.
2182 (bfd_generic_openr_next_archived_file): Thin archives.
2183 (bfd_generic_archive_p): Recognize new magic string.
2184 (adjust_relative_path): New function.
2185 (_bfd_construct_extended_name_table): Construct extended
2186 names for thin archive members.
2187 (_bfd_write_archive_contents): Emit new magic string, skip
2188 copying files for thin archives.
2189 * bfd-in.h (bfd_is_thin_archive): New macro.
2190 * bfd.c (struct bfd): New fields for thin archives.
2191 * libbfd-in.h (struct areltdata): New field for thin archives.
2192 * opncls.c (bfd_close): Delete BFDs for nested archives.
2193
c35e54f4
BS
21942008-03-25 Bernd Schmidt <bernd.schmidt@analog.com>
2195
2196 * elf32-bfin.c (bfin_final_link_relocate): New function, wrapper around
2197 _bfd_final_link_relocate that also handles R_pcrel24 relocs.
2198 (bfinfdpic_relocate_section, bfin_relocate_section): Use it.
2199
3348747a
NS
22002008-03-25 Nathan Sidwell <nathan@codesourcery.com>
2201
2202 * elf32-arm.c (elf32_arm_final_link_relocate): Skip dynamic relocs
2203 in vxworks tls_vars sections.
2204 (allocate_dynrelocs, elf32_arm_size_dynamic_sections): Likewise.
2205 * elf32-i386.c (allocate_dynrelocs,
2206 elf_i386_size_dynamic_sections, elf_i386_relocate_section): Likewise.
2207 * elf32-ppc.c (allocate_dynrelocs, ppc_elf_size_dynamic_sections,
2208 ppc_elf_relocate_section): Likewise.
2209 * elf32-sh.c (allocate_dynrelocs, sh_elf_size_dynamic_sections,
2210 sh_elf_relocate_section): Likewise.
2211 * elfxx-sparc.c (allocate_dynrelocs,
2212 _bfd_sparc_elf_size_dynamic_sections,
2213 _bfd_sparc_elf_relocate_section): Likewise.
2214
a1f3c56e
AN
22152008-03-21 Adam Nemet <anemet@caviumnetworks.com>
2216
2217 * elf.c (_bfd_elf_print_private_bfd_data): Use bfd_fprintf_vma to
2218 print the values from the dynamic section.
2219
51e38d68
RS
22202008-03-20 Richard Sandiford <rsandifo@nildram.co.uk>
2221
2222 * elfxx-mips.c (MIPS_ELF_GNU_GOT1_MASK): New macro.
2223 (_bfd_mips_elf_finish_dynamic_sections): Use it instead of 0x80000000.
2224
c65be8d7
AM
22252008-03-20 Alan Modra <amodra@bigpond.net.au>
2226
2227 * elf32-spu.c (spu_elf_create_sections): Remove output_bfd parameter.
2228 (spu_elf_find_overlays, spu_elf_size_stubs): Likewise
2229 (process_stubs, discover_functions, build_call_tree): Likewise.
2230 (spu_elf_stack_analysis): Likewise.
2231 (spu_elf_check_vma): Likewise. Move.
2232 (struct call_info): Make "is_tail" a bitfield.
2233 (insert_callee): Clear fun->start and set fun->is_func if we find
2234 a non-tail call.
2235 * elf32-spu.h (spu_elf_create_sections): Update prototype.
2236 (spu_elf_find_overlays, spu_elf_size_stubs, spu_elf_check_vma): Ditto.
2237
58c85be7
RW
22382008-03-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2239
2240 * aclocal.m4: Regenerate.
2241 * configure: Likewise.
2242 * Makefile.in: Likewise.
2243
41bed6dd
L
22442008-03-16 H.J. Lu <hongjiu.lu@intel.com>
2245
2246 PR ld/5789
2247 PR ld/5943
2248 * elf32-i386.c (elf_i386_relocate_section): Issue an error
2249 for R_386_GOTOFF relocaton against undefined hidden/internal
2250 symbols when building a shared object.
2251
2252 * elf64-x86-64.c (elf64_x86_64_relocate_section): Issue an
2253 error for R_X86_64_PC8/R_X86_64_PC16/R_X86_64_PC32
2254 relocaton against undefined hidden/internal symbols when
2255 building a shared object.
2256 (elf64_x86_64_finish_dynamic_symbol): Return FALSE when symbol
2257 is referenced locally, but isn't defined in a regular file.
2258
6ad2759d
L
22592008-03-15 H.J. Lu <hongjiu.lu@intel.com>
2260
2261 * bfd-in.h (BFD_NO_FLAGS, HAS_RELOC, EXEC_P, HAS_LINENO,
2262 HAS_DEBUG, HAS_SYMS, HAS_LOCALS, DYNAMIC, WP_TEXT, D_PAGED,
2263 BFD_IS_RELAXABLE, BFD_TRADITIONAL_FORMAT, BFD_IN_MEMORY,
2264 HAS_LOAD_PAGE, BFD_LINKER_CREATED): Moved to ...
2265 * bfd.c: Here.
2266
2267 * bfd.c (bfd): Change cacheable, target_defaulted, opened_once,
2268 mtime_set, no_export, output_has_begun and has_armap to bit
2269 field.
2270
2271 * bfd-in2.h: Regenerated.
2272
c04ea773
DJ
22732008-03-14 Daniel Jacobowitz <dan@codesourcery.com>
2274
2275 * cache.c (close_one): Remove mtime hack.
2276
0f2830ff
L
22772008-03-14 H.J. Lu <hongjiu.lu@intel.com>
2278
2279 PR ld/5913
2280 * elfxx-ia64.c (elfNN_ia64_tprel_base): Remove BFD_ASSERT.
2281 (elfNN_ia64_dtprel_base): Likewise.
2282 (elfNN_ia64_relocate_section): Go to missing_tls_sec if
2283 tls_sec is NULL before calling elfNN_ia64_tprel_base or
2284 elfNN_ia64_dtprel_base. Report unsupported TLS relocations.
2285
fdba2fcd
AM
22862008-03-14 Alan Modra <amodra@bigpond.net.au>
2287
2288 * elf32-spu.c (process_stubs, spu_elf_relocate_section): Move
2289 common code to..
2290 (maybe_needs_stub): ..here, a new function that also omits stubs
2291 for .eh_frame, and..
2292 (needs_ovl_stub): ..here. Create stubs for labels in code section
2293 referenced by switch jump table.
2294 (spu_elf_find_overlays): Set htab->ovly_load and htab->ovly_return.
2295 (enum _insn_type): Delete.
2296 (enum _stub_type): New.
2297 (count_stub, build_stub): Adjust.
2298 (allocate_spuear_stubs, build_spuear_stubs): Adjust.
2299
72de5009
AM
23002008-03-13 Alan Modra <amodra@bigpond.net.au>
2301
2302 * elf.c (_bfd_elf_make_section_from_shdr): Remove unnecessary cast.
2303 (_bfd_elf_assign_file_position_for_section): Simplify align.
2304 (_bfd_elf_init_reloc_shdr): Ensure shift expression wide enough
2305 for sh_addralign.
2306 (elf_fake_sections, swap_out_syms): Likewise.
2307 * elflink.c (bfd_elf_final_link): Likewise.
2308
50e7d84b
AM
23092008-03-13 Alan Modra <amodra@bigpond.net.au>
2310
2311 * Makefile.am: Run "make dep-am".
2312 * Makefile.in: Regenerate.
2313 * po/SRC-POTFILES.in: Regenerate.
2314
2774f1a6
BS
23152008-03-12 Bernd Schmidt <bernd.schmidt@analog.com>
2316
2317 From Jie Zhang <jie.zhang@analog.com>
2318 * elf32-bfin.c (struct bfinfdpic_relocs_info): Make got17m4,
2319 gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4, fdgoffhilo,
2320 gotoff, call and sym not bitfields.
2321 (bfinfdpic_gc_sweep_hook): New function; update the relocation
2322 information for the relocations of the section being removed.
2323 (bfinfdpic_check_relocs): Accumulate the number of relocations
2324 which set got17m4, gothilo, fd, fdgot17m4, fdgothilo, fdgoff17m4,
2325 fdgoffhilo, gotoff, call and sym fields.
2326 (elf_backend_gc_sweep_hook): Redefine for FD-PIC.
2327
4fbb74a6
AM
23282008-03-12 Alan Modra <amodra@bigpond.net.au>
2329
2330 PR 5900
2331 * elf-bfd.h: Include elf/internal.h after elf/external.h.
2332 * elfcode.h (elf_swap_symbol_in): Map reserved shndx range.
2333 (elf_swap_symbol_out): Adjust SHN_XINDEX test.
2334 (elf_swap_ehdr_out): Mask SHN_LORESERVE and SHN_XINDEX to values
2335 seen in external structs.
2336 (valid_section_index_p): Delete.
2337 (elf_object_p): Don't increment section numbers over reserved range.
2338 Simplify test for valid sh_link, sh_info and e_shstrndx fields.
2339 (elf_write_shdrs_and_ehdr): Mask SHN_LORESERVE and SHN_XINDEX to values
2340 seen in external structs. Don't increment section numbers over
2341 reserved range.
2342 * elf.c (bfd_elf_sym_name): Remove redundant tests on st_shndx.
2343 (bfd_section_from_shdr): Likewise.
2344 (group_signature): Range check before accessing elf_elfsections.
2345 (_bfd_elf_setup_sections): Likewise.
2346 (bfd_section_from_shdr): Likewise.
2347 (bfd_section_from_shdr): Don't increment section number over
2348 reserved sections.
2349 (assign_file_positions_for_non_load_sections): Likewise.
2350 (assign_file_positions_except_relocs): Likewise.
2351 (_bfd_elf_write_object_contents): Likewise.
2352 (assign_section_numbers): Likewise. Adjust for changed SHN_*.
2353 (prep_headers): Delete unused variable.
2354 * elflink.c (bfd_elf_link_record_local_dynamic_symbol): Adjust
2355 for changed SHN_* values.
2356 (check_dynsym, elf_link_input_bfd): Likewise.
2357 (bfd_elf_final_link): Likewise. Don't skip over reserved section
2358 range.
2359 (elf_fixup_link_order): Check that sh_link field is valid.
2360 * elf-hppa.h (elf_hppa_add_symbol_hook): Make "index" unsigned.
2361 * elf32-arm.c (elf32_arm_gc_mark_extra_sections): Range check before
2362 accesssing elf_elfsections.
2363 * elf32-avr.c (elf32_avr_size_stubs): Likewise.
2364 * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
2365 * elf32-m68hc1x.c (elf32_m68hc11_size_stubs): Likewise.
2366 * elf64-hppa.c (elf64_hppa_check_relocs): Adjust for changed
2367 SHN_* defines. Test for SHN_BAD return from
2368 _bfd_elf_section_from_bfd_section
2369
cb33740c
AM
23702008-03-12 Alan Modra <amodra@bigpond.net.au>
2371
2372 * elf-bfd.h (_bfd_elf_section_from_bfd_section): Update prototype.
2373 * elf.c (_bfd_elf_section_from_bfd_section): Return unsigned int,
2374 SHN_BAD on error.
2375 (_bfd_elf_print_private_bfd_data): Test for SHN_BAD result from
2376 _bfd_elf_section_from_bfd_section, not -1.
2377 (swap_out_syms): Likewise.
2378 * elflink.c (elf_link_add_object_symbols): Likewise.
2379 (bfd_elf_get_bfd_needed_list): Likewise.
2380 (bfd_elf_match_symbols_in_sections): Likewise.
2381 (elf_link_add_object_symbols): Don't bother testing for symbols
2382 using normal sections before calling bfd_section_from_elf_index.
2383 (elf_link_input_bfd, bfd_elf_final_link): Likewise.
2384 (bfd_elf_reloc_symbol_deleted_p): Likewise.
2385 * elfcode.h (elf_slurp_symbol_table): Likewise.
2386 * elf32-spu.c (get_sym_h): Likewise.
2387 * elf32-xtensa.c (get_elf_r_symndx_section): Likewise.
2388 * elf64-ppc.c (opd_entry_value, get_sym_h, ppc64_elf_edit_toc): Ditto.
2389 * elf64-sh64.c (sh_elf64_get_relocated_section_contents): Likewise.
2390
5f5fb9ec
AM
23912008-03-11 Alan Modra <amodra@bigpond.net.au>
2392
2393 * elf32-spu.c (spu_elf_relocate_section): Test identical conditions
2394 to those in process_stubs for overlay symbols.
2395
b1cc4aeb
PB
23962008-03-09 Paul Brook <paul@codesourcery.com>
2397
2398 * elf32-arm.c (elf32_arm_merge_eabi_attributes): Handle new
2399 Tag_VFP_arch values.
2400
12a0a0fd
PB
24012008-03-08 Paul Brook <paul@codesourcery.com>
2402
2403 * elf32-arm.c (insert_thumb_branch): Rewrite.
2404 (elf32_thumb_to_arm_stub): Use new insert_thumb_branch.
2405
39623e12
PB
24062008-03-07 Paul Brook <paul@codesourcery.com>
2407
2408 * elf32-arm.c (elf32_arm_howto_table_1): Fix bitmasks for MOVW and
2409 MOVT relocations.
2410 (elf32_arm_final_link_relocate): Fix off by one MOVW/MOVT sign
2411 extension.
2412 (elf32_arm_relocate_section): Handle MOVW and MOVT
2413 relocations. Improve safety check for other weird relocations.
2414 (elf32_arm_check_relocs): Only set h->needs_plt for branch/call
2415 relocations.
2416
77cba8a3 24172008-03-03 Bob Wilson <bob.wilson@acm.org>
50e7d84b 2418
77cba8a3
BW
2419 * xtensa-isa.c (xtensa_isa_num_pipe_stages): Make max_stage static and
2420 only compute its value once.
50e7d84b 2421
4a628337
AM
24222008-03-03 Alan Modra <amodra@bigpond.net.au>
2423
2424 * elf32-spu.c (struct got_entry): Add "addend" field.
2425 (count_stub, build_stub): Use a new stub if relocation addend
2426 differs from existing stubs for this symbol.
2427 (process_stubs): Deal with addends.
2428 (spu_elf_relocate_section, spu_elf_output_symbol_hook): Likewise.
2429
d95edcac
L
24302008-03-02 H.J. Lu <hongjiu.lu@intel.com>
2431
2432 PR ld/5789
2433 * elflink.c (_bfd_elf_symbol_refs_local_p): Always return true
2434 for hidden and local symbols.
2435
89200bf8
AM
24362008-03-03 Alan Modra <amodra@bigpond.net.au>
2437
2438 * elf32-ppc.c (allocate_dynrelocs): Discard relocs on
2439 undefined symbols with internal or hidden visibility.
2440 (ppc_elf_relocate_section): Likewise. Use SYMBOL_CALLS_LOCAL
2441 rather than SYMBOL_REFERENCES_LOCAL on branches. Don't
2442 return immediately on dynamic reloc error.
2443
176a0d42
AM
24442008-03-01 Alan Modra <amodra@bigpond.net.au>
2445
2446 * elf64-ppc.c (build_plt_stub): Add relocs on plt call stubs
2447 if emitrelocations.
2448 (get_relocs): New function, split out from..
2449 (ppc_build_one_stub): ..here. Add relocs on plt_branch stubs if
2450 emitrelocations. Remove indx temp.
2451 (ppc_size_one_stub): Count new stub relocs.
2452 (ppc64_elf_size_stubs): Count new glink reloc.
2453 (ppc64_elf_build_stubs): Emit glink reloc if emitrelocations.
2454 (ppc64_elf_finish_dynamic_sections): Output glink relocs.
2455 * elf32-ppc.c (ppc_elf_finish_dynamic_sections): Describe non-pic
2456 glink code.
2457
911f096e
AM
24582008-02-28 Alan Modra <amodra@bigpond.net.au>
2459
2460 * elf32-spu.c (mark_functions_via_relocs): Don't assume that
2461 the "->start" pointer reaches to function origin, so that we
2462 can handle functions split over more than two sections.
2463 (build_call_tree): Likewise.
2464 (pasted_function): Don't attempt to set fun->start back to the
2465 function origin, just go back one section.
2466
ad9563d6
CM
24672008-02-27 Catherine Moore <clm@codesourcery.com>
2468
2469 * elf.c ( _bfd_elf_print_private_bfd_data): Call
2470 elf_backend_get_target_dtag if defined.
2471 * elf32-mips.c (elf_backend_get_target_dtag): Define.
2472 * elf64-mips.c: Likewise.
2473 * elfn32-mips.c: Likewise.
2474 * elfxx-mips.c (_bfd_mips_elf_get_target_dtag): New.
2475 * elfxx-mips.h (_bfd_mips_elf_get_target_dtag): Declare.
2476 * elf-bfd.h (elf_backend_get_target_dtag): Add prototype.
2477 * elfxx-target.h (elf_backend_get_target_dtag): Add default.
911f096e 2478 (elf_backend_data): Add elf_backend_get_target_dtag.
ad9563d6 2479
625af618
AM
24802008-02-26 Alan Modra <amodra@bigpond.net.au>
2481
2482 * elf32-ppc.c (ppc_elf_check_relocs): Set pointer_equality_needed
2483 for R_PPC_REL32 syms. Don't set non_got_ref on branch reloc syms,
2484 and assume branch relocs are not dynamic when non-shared.
2485 (readonly_dynrelocs): New function, split out from..
2486 (maybe_set_textrel): ..here, renamed from old readonly_dynrelocs.
2487 (ppc_elf_adjust_dynamic_symbol): For symbols generating plt entries,
2488 clear non_got_ref..
2489 (allocate_dynrelocs): ..and don't set u.def for undefined weak.
2490 Do allow dynamic relocs on undefined symbols.
2491 (ppc_elf_adjust_dynamic_symbol): Use readonly_dynrelocs.
2492 (ppc_elf_relocate_section): Mirror dynamic reloc changes in
2493 check_relocs.
2494 (ppc_elf_finish_dynamic_symbol): Don't give a warning on weak
2495 plt symbols needing pointer_equality_needed.
2496
1cd81501
AM
24972008-02-23 Alan Modra <amodra@bigpond.net.au>
2498
2499 * elf32-ppc.c (ppc_elf_check_relocs): Revert non_got_ref change.
2500
0eb4a168
AM
25012008-02-23 Alan Modra <amodra@bigpond.net.au>
2502
2503 * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Copy
2504 pointer_equality_needed.
2505 (ppc_elf_check_relocs): Split out non-branch relocs from others
2506 that might emit dynamic relocs. Set pointer_equality_needed
2507 for their symbols. Don't set non_got_ref on branch reloc symbols.
2508 (ppc_elf_hash_symbol): New function.
2509 (elf_backend_hash_symbol): Define.
2510 (ppc_elf_finish_dynamic_symbol): Handle pointer_equality_needed.
2511 Error if pointer_equality_needed on weak plt symbol.
2512
3ae181ee
L
25132008-02-22 H.J. Lu <hongjiu.lu@intel.com>
2514
2515 PR ld/5788
2516 * elflink.c (elf_create_symbuf): Correct buffer size and
2517 position.
2518
34b5e0b2
NC
25192008-02-22 Nick Clifton <nickc@redhat.com>
2520
2521 PR 868
3ae181ee 2522 * dwarf2.c: Revert previous patch. All of the allocate memory is
34b5e0b2 2523 on an obstack which will be freed at some other time.
0eb4a168 2524
515ef31d
NC
25252008-02-20 Nick Clifton <nickc@redhat.com>
2526
2527 PR 868
2528 * libbfd.c (bfd_realloc_or_free): New function. Performs like
2529 bfd_realloc, but if the (re)allocation fails, the pointer is
2530 freed.
2531 * libbfd-in.h: Prototype.
2532 * libbfd.h: Regenerate.
2533 * bfdio.c (bfd_bwrite): Use the new function.
2534 (bfd_seek): Likewise.
2535 * bfdwin.c:(bfd_get_file_window): Likewise.
2536 * elf-strtab.c (_bfd_elf_strtab_add): Likewise.
2537 * elf32-ppc.c (ppc_elf_relax_section): Likewise.
2538 * elf32-xtensa.c (vsprintf_msg): Likewise.
2539 * mach-o.c (bfd_mach_o_core_fetch_environment): Likewise.
2540 * stabs.c (_bfd_link_seciton_stabs): Likewise.
2541 * vms-misc.c (_bfd_vms_get_record): Likewise.
2542 * vms-tir.c (check_section): Likewise.
2543 * vms.c (vms_new_section_hook): Likewise.
2544 * elf32-arm.c (elf32_arm_section_map_add): Check that the
2545 allocation of sec_data->map succeeded before using it.
2546 * elflink.c (elf_link_output_sym): Do not overwrite finfo->
2547 symshndxbuf until it is known that the reallocation succeeded.
2548
b42bf1e0
NC
25492008-02-20 Diogo de Carvalho Kraemer <diogo@kraemer.eng.br>
2550 Nick Clifton <nickc@redhat.com>
2551
2552 PR 868
2553 * dwarf2.c (read_abbrevs): Free the abbreviation table if we run
2554 out of memory.
2555 (decode_line_info): Free the line_info_table before returning a
2556 failure result.
2557 (_bfd_dwarf2_cleanup_debug_info): Free the abbreviation table.
2558 Free the line table. Free the function table. Free the variable
2559 table.
2560
0a40daed
MK
25612008-02-17 Mark Kettenis <kettenis@gnu.org>
2562
2563 * elf.c (swap_out_syms): Avoid preprocessing directive within
2564 macro arg.
2565
3f001e84
JK
25662008-02-17 Jan Kratochvil <jan.kratochvil@redhat.com>
2567
2568 * elf.c (assign_file_positions_for_load_sections): Set the type of
2569 PT_NOTE sections to SHT_NOTE.
2570
37da76e8
AM
25712008-02-17 Ulrich Weigand <uweigand@de.ibm.com>
2572
2573 * simple.c (bfd_simple_get_relocated_section_contents): Set
2574 link_info.output_bfd.
2575
d74e4b29
NS
25762008-02-16 Nathan Sidwell <nathan@codesourcery.com>
2577
2578 * dwarf2.c (find_line): Don't trust debug information after an
2579 unparseable compilation unit.
2580
f856272b
AM
25812008-02-15 Alan Modra <amodra@bigpond.net.au>
2582
2583 PR 5765
2584 * section.c (SEC_LINK_DUPLICATES): Correct. Renumber following flags.
2585 * bfd-in2.h: Regenerate.
2586
0c8d6e5c
AM
25872008-02-15 Alan Modra <amodra@bigpond.net.au>
2588
2589 * elf-bfd.h (enum elf_object_id): Add HPPA_ELF_TDATA.
2590 * elf.c (bfd_elf_allocate_object): Don't check for already allocated
2591 tdata.
2592 * elf32-hppa.c (elf32_hppa_mkobject): New function.
2593 (bfd_elf32_mkobject): Define.
2594 * elf32-ppc.c (is_ppc_elf_target): Delete. Replace all uses with..
2595 (is_ppc_elf): ..this new macro.
2596 * elf64-ppc.c (is_ppc64_elf_target): Delete. Replace all uses with..
2597 (is_ppc64_elf): ..this new macro.
2598
f13a99db
AM
25992008-02-15 Alan Modra <amodra@bigpond.net.au>
2600
2601 * elflink.c: Replace all accesses to hash->creator field with
2602 output_bfd->xvec.
2603 * cofflink.c: Likewise.
2604 * coff-h8300.c: Likewise.
2605 * ecoff.c: Likewise.
2606 * elf32-m68hc1x.c: Likewise.
2607 * elf32-ppc.c: Likewise.
2608 * elf64-alpha.c: Likewise.
2609 * elf64-ppc.c: Likewise.
2610 * elf64-sparc.c: Likewise.
2611 * elfxx-mips.c: Likewise.
2612 * i386linux.c: Likewise.
2613 * m68klinux.c: Likewise.
2614 * sparclinux.c: Likewise.
2615 * sunos.c: Likewise.
2616 * xcofflink.c: Likewise.
2617 * linker.c: Likewise.
2618 (_bfd_link_hash_table_init): Don't store creator.
2619
e81819a5
NC
26202008-02-14 Peter Jones <pjones@redhat.com>
2621
2622 * efi-rtdrv-ia32.c: New file.
2623 * efi-bsdrv-ia32.c: New file.
2624 * efi-rtdrv-ia64.c: New file.
2625 * efi-bsdrv-ia64.c: New file.
2626 * efi-rtdrv-x86_64.c: New file.
2627 * efi-bsdrv-x86_64.c: New file.
2628 * peicode.h (pe_bfd_object_p): Add support for boot service and
2629 runtime service drivers.
2630 * libpei.h: Add macros for EFI formats, and rename the efi application
2631 format macros to disambiguate.
2632 * targets.c: Add bfd_target _vec externs.
2633 (_bfd_tar): Add EFI _vec entries.
2634 * config.bfd: Add EFI vectors into the selection routines.
2635 * configure.in: add EFI _vec entries.
2636 * configure: Regenerate.
2637 * Makefile.am: Add EFI files.
2638 * Makefile.in: Regenerate.
2639
ab1579fd
NS
26402008-02-14 Nathan Sidwell <nathan@codesourcery.com>
2641
2642 * dwarf1.c (struct dwarf1_debug): Add syms member.
2643 (alloc_dwarf1_unit, alloc_dwarf1_func): Check for out of memory.
2644 (parse_line_table, _bfd_dwarf1_find_nearest_line): Relocate
2645 section contents, check for out of memory.
2646
2647 * dwarf1.c (struct dwarf1_debug): Change data pointers to bfd_byte.
2648 (parse_die): Change data pointers to bfd_byte.
2649 (parse_line_table, parse_functions_in_unit): Likewise.
2650
d40f3da9
AM
26512008-02-14 Alan Modra <amodra@bigpond.net.au>
2652
2653 * elflink.c (compute_bucket_count): Warning fixes.
2654
f15557e4
DD
26552008-02-12 DJ Delorie <dj@redhat.com>
2656
2657 * elf32-iq2000.c (iq2000_elf_relocate_section): Adjust addend of
2658 relocation pointing to local symbol in merged section.
2659
2660 * elf32-iq2000.c (iq2000_elf_relocate_offset16): New.
2661 (iq2000_elf_relocate_section): Call it.
2662
0ffa91dd
NC
26632008-02-12 Nick Clifton <nickc@redhat.com>
2664
2665 PR ld/5692
2666 * elf-bfd.h (enum elf_object_id): New enum, used to identify
2667 target specific extensions to the elf_obj_tdata structure.
2668 (struct elf_obj_tdata): New field 'object_id'.
2669 (elf_object_id, elf_program_header_size, elf_symtab_hdr): New
2670 macros for accessing fields in the elf_obj_tdata structure.
2671 (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object.
2672 (bfd_elf_allocate_object): New function.
2673 * elf.c (bfd_elf_mkobject): Rename to bfd_elf_make_generic_object
2674 and implement by calling bfd_elf_allocate_object.
2675 (bfd_elf_allocate_object): New function: Allocates an
2676 elf_obj_tdata structure, possibly with a target specific
2677 extension.
2678 * elfxx-target.h (bfd_elfNN_mkobject): Use
2679 bfd_elf_make_generic_object as the default value.
2680 * elf32-arm.c (elf32_arm_obj_tdata): Rename to elf_arm_obj_tdata
2681 for consistency with other, similar structures.
2682 (is_arm_elf): New macro. Checks a BFD to make sure that is an ARM
2683 ELF bfd.
2684 (elf32_arm_mkobject): Call bfd_elf_allocate_object.
2685 (bfd_elf32_arm_vfp11_erratum_scan): Use is_arm_elf macro to check
2686 the bfd being processed.
2687 (bfd_elf32_arm_vfp11_fix_veneer_locations): Likewise.
2688 (bfd_elf32_arm_set_target_relocs): Likewise.
2689 (bfd_elf32_arm_final_link_relocate): Likewise.
2690 (bfd_elf32_arm_copy_private_bfd_data): Likewise.
2691 (bfd_elf32_arm_merge_eabi_attributes): Likewise.
2692 (bfd_elf32_arm_merge_private_bfd_data): Likewise.
2693 (bfd_elf32_arm_check_relocs): Likewise.
2694 (bfd_elf32_arm_gc_mark_extra_sections): Likewise.
2695 (bfd_elf32_arm_size_dynamic_sections): Likewise.
2696 (bfd_elf32_arm_process_before_allocation): Use elf_symtab_hdr.
2697 (bfd_elf32_arm_init_maps): Likewise.
2698 (bfd_elf32_arm_final_link_relocate): Likewise.
2699 (bfd_elf32_arm_relocate_section): Likewise.
2700 (bfd_elf32_arm_gc_sweep_hook): Likewise.
2701 (bfd_elf32_arm_check_relocs): Likewise.
2702 (bfd_elf32_arm_size_dynamic_sections): Likewise.
2703 * elf32-i386.c (elf_i386_mkobject): Call bfd_elf_allocate_object.
2704 (is_i386_elf): New macro. Checks a BFD to make sure that is an x86
2705 ELF bfd.
2706 (elf_i386_check_relocs): Use is_i386_elf macro to check the bfd
2707 being processed.
2708 (elf_i386_size_dynamic_sections): Likewise.
2709 (elf_i386_relocate_section): Likewise.
2710 (elf_i386_check_relocs): Use elf_symtab_hdr.
2711 (elf_i386_gc_sweep_hook): Likewise.
2712 (elf_i386_size_dynamic_sections): Likewise.
2713 (elf_i386_relocate_section): Likewise.
2714 * elf32-ppc.c (ppc_elf_mkobject): Call bfd_elf_allocate_object.
2715 (elf_create_pointer_linker_section): Use is_ppc_elf_target to
2716 verify that the bfd before accessing target specific fields.
2717 (ppc_elf_check_relocs): Likewise.
2718 (elf_finish_pointer_linker_section): Likewise.
2719 (elf_create_pointer_linker_section): Use elf_symtab_hdr.
2720 (ppc_elf_check_relocs): Likewise.
2721 (ppc_elf_gc_sweep_hook): Likewise.
2722 (ppc_elf_tls_optimize): Likewise.
2723 (ppc_elf_size_dynamic_sections): Likewise.
2724 (ppc_elf_relax_section): Likewise.
2725 (ppc_elf_relocate_section): Likewise.
2726 * elf32-s390.c (struct elf_s390_obj_tdata): Add a comment
2727 reminding programmers to keep this structure in sync with the one
2728 defined in elf64-s390.c.
2729 (elf_s390_mkobject): Call bfd_elf_allocate_object.
2730 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
2731 ELF bfd.
2732 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
2733 being processed.
2734 (elf_s390_size_dynamic_sections): Likewise.
2735 (elf_s390_relocate_section): Likewise.
2736 (elf_s390_check_relocs): Use elf_symtab_hdr.
2737 (elf_s390_gc_sweep_hook): Likewise.
2738 (elf_s390_size_dynamic_sections): Likewise.
0eb4a168 2739 (elf_s390_relocate_section): Likewise.
0ffa91dd
NC
2740 * elf32-sh.c (sh_elf_mkobject): Call bfd_elf_allocate_object.
2741 (is_sh_elf): New macro. Checks a BFD to make sure that is an SH
2742 ELF bfd.
2743 (sh_elf_size_dynamic_sections): Use is_sh_elf macro to check the
2744 bfd being processed.
2745 (sh_elf_relocate_section): Likewise.
2746 (sh_elf_check_relocs): Likewise.
2747 (sh_elf_copy_private_data): Likewise.
2748 (sh_elf_relax_section): Use elf_symtab_hdr.
2749 (sh_elf_size_dynamic_sections): Likewise.
2750 (sh_elf_relocate_section): Likewise.
2751 (sh_elf_get_relocated_section_contents): Likewise.
2752 (sh_elf_gc_sweep_hook): Likewise.
2753 (sh_elf_check_relocs): Likewise.
2754 * elf64-alpha.c (elf64_alpha_mkobject): Call bfd_elf_allocate_object.
2755 (is_alpha_elf): New macro. Checks a BFD to make sure that is an
2756 Alpha ELF bfd.
2757 (elf64_alpha_create_got_section): Use is_alpha_elf macro to check
2758 the bfd being processed.
2759 (elf64_alpha_create_dynamic_section): Likewise.
2760 (elf64_alpha_check_relocs): Likewise.
2761 (elf64_alpha_size_got_sections): Likewise.
2762 (elf64_alpha_relax_section): Likewise.
2763 (elf64_alpha_relocate_section): Likewise.
2764 (elf64_alpha_final_link): Likewise.
2765 (elf64_alpha_check_relocs): Use elf_symtab_hdr.
2766 (elf64_alpha_relax_section): Likewise.
2767 (elf64_alpha_relocate_section_r): Likewise.
2768 (elf64_alpha_relocate_section): Likewise.
2769 * elf64-ppc.c (ppc64_elf_mkobject): Call bfd_elf_allocate_object.
2770 (ppc64_elf_check_relocs): Use is_ppc64_elf_target to check the bfd
2771 being processed.
2772 (opd_entry_value): Likewise.
2773 (allocate_dynrelocs): Likewise.
2774 (ppc64_elf_relocate_section): Likewise.
2775 (ppc64_elf_check_relocs): Use elf_symtab_hdr.
2776 (opd_entry_value): Likewise.
2777 (ppc64_elf_gc_sweep_hook): Likewise.
2778 (get_sym_h): Likewise.
2779 (ppc64_elf_edit_opd): Likewise.
2780 (ppc64_elf_tls_optimize): Likewise.
2781 (ppc64_elf_edit_toc): Likewise.
2782 (ppc64_elf_size_dynamic_sections): Likewise.
2783 (toc_adjusting_stub_needed): Likewise.
2784 (ppc64_elf_size_stubs): Likewise.
2785 (ppc64_elf_relocate_section): Likewise.
2786 * elf64-s390.c (struct elf_s390_obj_tdata): Add a comment
2787 reminding programmers to keep this structure in sync with the one
2788 defined in elf32-s390.c.
2789 (elf_s390_mkobject): Call bfd_elf_allocate_object.
2790 (is_s390_elf): New macro. Checks a BFD to make sure that is an s390
2791 ELF bfd.
2792 (elf_s390_check_relocs): Use is_s390_elf macro to check the bfd
2793 being processed.
2794 (elf_s390_size_dynamic_sections): Likewise.
0eb4a168 2795 (elf_s390_relocate_section): Likewise.
0ffa91dd
NC
2796 (elf_s390_check_relocs): Use elf_symtab_hdr.
2797 (elf_s390_gc_sweep_hook): Likewise.
2798 (elf_s390_size_dynamic_sections): Likewise.
2799 (elf_s390_relocate_section): Likewise.
2800 * elf64-x86_64.c (elf64_x86_64_mkobject): Call bfd_elf_allocate_object.
2801 (is_x86_64_elf): New macro. Checks a BFD to make sure that is an
2802 x86_64 ELF bfd.
2803 (elf64_x86_64_check_relocs): Use is_x86_64_elf macro to check the bfd
2804 being processed.
2805 (elf64_x86_64_size_dynamic_sections): Likewise.
2806 (elf64_x86_64_relocate_section): Likewise.
2807 (elf64_x86_64_check_relocs): Use elf_symtab_hdr.
2808 (elf64_x86_64_gc_sweep_hook): Likewise.
2809 (elf64_x86_64_size_dynamic_sections): Likewise.
2810 (elf64_x86_64_relocate_section): Likewise.
2811 * elfxx-sparc.c (_bfd_sparc_elf_mkobject): Call bfd_elf_allocate_object.
2812 (is_sparc_elf): New macro. Checks a BFD to make sure that is a Sparc
2813 ELF bfd.
2814 (_bfd_sparc_elf_check_relocs): Use is_sparc_elf macro to check the
2815 bfd being processed.
2816 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2817 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
2818 (_bfd_sparc_elf_check_relocs): Use elf_symtab_hdr.
2819 (_bfd_sparc_elf_gc_sweep_hook): Likewise.
2820 (_bfd_sparc_elf_size_dynamic_sections): Likewise.
0eb4a168 2821 (_bfd_sparc_elf_relocate_section): Likewise.
0ffa91dd 2822
be4291f1
AM
28232008-02-12 Alan Modra <amodra@bigpond.net.au>
2824
2825 PR 5303, 5755
2826 * arange-set.c: Delete.
2827 * arange-set.h: Delete.
2828 * dwarf2.c: Revert 2007-09-21 changes.
2829 * Makefile.am: Likewise.
2830 * Makefile.in: Regenerate.
2831 * po/SRC-POTFILES.in: Regenerate.
2832
7a84e3da
BS
28332008-02-11 Bernd Schmidt <bernd.schmidt@analog.com>
2834
2835 * elf32-bfin.c (bfin_relocate_section): Set up dynobj before using it
2836 if necessary.
2837 (elf32_bfin_merge_private_bfd_data): Simplify, and ensure object type
2838 mismatches are detected.
2839
ca889129
BS
2840 * elf32-bfin.c (bfinfdpic_relocate_section): Take more care not to
2841 emit invalid relocs or rofixup entries for deleted .eh_frame entries.
2842
662ed161
DJ
28432008-02-11 Daniel Jacobowitz <dan@codesourcery.com>
2844
2845 * cache.c (cache_bread): Set bfd_error_file_truncated if EOF
2846 was reached.
2847 * srec.c (srec_scan): Calculate the checksum. Complain on mismatch.
2848
2e444bea
AM
28492008-02-07 Alan Modra <amodra@bigpond.net.au>
2850
2851 * elf32-spu.c (spu_elf_size_stubs): Revert 2008-01-28 doubling
2852 of _ovly_buf_table size.
2853 (spu_elf_build_stubs): Use low bit of .size as "present" bit.
2854 Adjust initialisations relating to _ovly_buf_table.
2855
d9ab3f29 28562008-02-04 Bob Wilson <bob.wilson@acm.org>
0eb4a168 2857
d9ab3f29
BW
2858 * elf32-xtensa (elf_xtensa_relocate_section): After finding an invalid
2859 relocation, do not continue processing it. Ignore R_XTENSA_ASM_EXPAND
2860 relocations against dynamic symbols.
2861 (elf_xtensa_finish_dynamic_sections): Do not fail if there is no
2862 .xt.lit section.
0eb4a168 2863
bb8541b9
L
28642008-02-04 Kai Tietz <kai.tietz@onevision.com>
2865 H.J. Lu <hongjiu.lu@intel.com>
2866
2867 PR 5715
2868 * warning.m4: Enable -Wno-format by default when using gcc on
2869 mingw.
2870 * configure: Regenerated.
2871
6f179bd0
AN
28722008-02-04 Adam Nemet <anemet@caviumnetworks.com>
2873
2874 * archures.c: Update copyright.
2875 (bfd_mach_mips_octeon): New macro.
2876 * bfd-in2.h: Regenerate.
2877 * elfxx-mips.c (_bfd_elf_mips_mach): Handle Octeon.
2878 (mips_set_isa_flags): Likewise.
2879 (mips_mach_extensions): Add Octeon.
2880 * cpu-mips.c: Update copyright.
2881 (I_mipsocteon): New enum constant.
2882 (arch_info_struct): Add Octeon.
2883
d16c7321
AM
28842008-02-04 Alan Modra <amodra@bigpond.net.au>
2885
2886 * elf32-spu.c (spu_elf_relocate_section): Correct return type.
2887 Return error status on unexpected relocation errors.
2888
e44a2c9c
AM
28892008-02-04 Alan Modra <amodra@bigpond.net.au>
2890
2891 PR ld/5692
2892 * elf.c (bfd_elf_get_elf_syms): Revert 2008-01-31. Instead abort
2893 on non-ELF input.
2894 * elf32-arm.c (elf32_arm_size_dynamic_sections): Skip glue
2895 processing on non-ELF input.
2896
f8a52b59
BW
28972008-01-31 Marc Gauthier <marc@tensilica.com>
2898
2899 * config.bfd (xtensa*-*-*): Recognize processor variants.
2900
b7c368d0
NC
29012008-01-31 Nick Clifton <nickc@redhat.com>
2902
2903 PR ld/5692
2904 * elf.c (bfd_elf_get_elf_syms): Check the return value of
2905 get_elf_backend_data.
2906
00b2bfc1
NC
29072008-01-28 Fabian Groffen <grobian@gentoo.org>
2908
2909 * config.bfd (x86_64-*-solaris2): Add support for this target.
2910
47f6dab9
AM
29112008-01-28 Alan Modra <amodra@bigpond.net.au>
2912
2913 Rewrite SPU overlay handling code. Put overlay calls stubs in the
2914 overlays where possible. Use a faster call stub, or optionally at
2915 compile time, a more compact stub. Double size of _ovly_buf_table
2916 so that low bit of _ovly_table.buf can be used as a "present" bit.
2917 Reserve an extra _ovly_table entry for index zero.
2918 * elf32-spu.c: (struct spu_link_hash_table): Delete a number of fields,
2919 add new ones.
2920 (struct got_entry): New.
2921 (struct spu_stub_hash_entry): Delete.
2922 (stub_hash_newfunc, spu_elf_link_hash_table_free): Delete.
2923 (spu_elf_link_hash_table_create): Adjust for struct changes.
2924 (spu_stub_name): Delete.
2925 (spu_elf_find_overlays): Don't track sections from overlay regions.
2926 Instead set ovl_buf number in spu elf section data. Error if
2927 overlays in one region don't start at the same address. Adjust
2928 for struct _spu_elf_section_data changes.
2929 (SIZEOF_STUB1, SIZEOF_STUB2, ILA_79, ILA_78): Delete.
2930 (OVL_STUB_SIZE, BRSL, LNOP, ILA): Define.
2931 (needs_ovl_stub): Adjust for struct _spu_elf_section_data changes.
2932 (enum _insn_type): New.
2933 (count_stub, build_stub): New functions.
2934 (allocate_spuear_stubs): Use count_stub.
2935 (build_spuear_stubs): Use build_stub.
2936 (populate_stubs, sort_stubs): Delete.
2937 (process_stubs): New function.
2938 (write_one_stub): Delete.
2939 (spu_elf_size_stubs, spu_elf_build_stubs): Rewrite.
2940 (alloc_stack_info): Adjust for struct _spu_elf_section_data changes.
2941 (maybe_insert_function, check_function_ranges): Likewise.
2942 (find_function, pasted_function, build_call_tree): Likewise.
2943 (spu_elf_stack_analysis, spu_elf_modify_segment_map): Likewise.
2944 (spu_elf_modify_program_headers): Likewise.
2945 (interesting_section): Detect stub sections differently. Delete
2946 htab param, adjust all callers.
2947 (spu_elf_relocate_section): Rewrite stub handling.
2948 (spu_elf_output_symbol_hook): Likewise.
2949 (bfd_elf32_bfd_link_hash_table_free): Delete.
2950 * elf32-spu.h (struct _spu_elf_section_data): Move input-only and
2951 output-only fields into a union. Add ovl_buf.
2952 (spu_elf_size_stubs, spu_elf_build_stubs): Update prototypes.
2953
c006d697
DD
29542008-01-25 DJ Delorie <dj@redhat.com>
2955
2956 * elf32-m32c.c (_bfd_m32c_elf_eh_frame_address_size): New.
2957
6e3d6dc1
NC
29582008-01-25 Kai Tietz <kai.tietz@onevision.com>
2959
2960 * bfd-in.h: Add mingw I64 support.
2961 * bfd-in2.h: Regenerated.
2962 * bfd.c: (bfd_get_sign_extend_vma): Add pe-x86-64 and pei-x86-64.
2963
fbb3bb98
AM
29642008-01-21 Alan Modra <amodra@bigpond.net.au>
2965
2966 PR 4453
2967 * format.c (bfd_check_format_matches): Don't accept archives as
2968 fully matching unless they have a map.
2969
297d8443
AM
29702008-01-21 Alan Modra <amodra@bigpond.net.au>
2971
2972 * elflink.c (_bfd_elf_link_output_relocs): Correct error return.
2973
66cd82b5
AM
29742008-01-21 Alan Modra <amodra@bigpond.net.au>
2975
2976 * ecoff.c (_bfd_ecoff_archive_p): Delete.
2977 * libecoff.h (_bfd_ecoff_archive_p): Delete.
2978 * coff-alpha.c (ecoffalpha_little_vec): Use bfd_generic_archive_p.
2979 * coff-mips.c (ecoff_little_vec, ecoff_big_vec): Likewise.
2980 (ecoff_biglittle_vec): Likewise.
2981
85f7a9cb
AM
29822008-01-19 Alan Modra <amodra@bigpond.net.au>
2983
2984 PR 5646
2985 * elf64-ppc.c (ppc64_elf_tls_optimize): Ensure htab->tls_get_addr
2986 non-NULL before dereferencing.
2987
74f0fb50
AM
29882008-01-15 Alan Modra <amodra@bigpond.net.au>
2989
2990 PR 5604
2991 * elf-bfd.h (struct elf_backend_data): Add gc_keep. Remove param
2992 names from others.
2993 (_bfd_elf_gc_keep): Declare.
2994 * elfxx-target.h (elf_backend_gc_keep): Define.
2995 (elfNN_bed): Init new field.
2996 * elflink.c (_bfd_elf_gc_keep): New function.
2997 (bfd_elf_gc_sections): Call gc_keep.
2998 * elf64-ppc.c (elf_backend_gc_keep): Define.
2999 (struct _ppc64_elf_section_data): Move .opd related fields to
3000 a struct so they don't occupy the same storage. Adjust accesses
3001 throughout file.
3002 (ppc64_elf_gc_keep): New function, split out from..
3003 (ppc64_elf_gc_mark_hook): ..here. Don't call _bfd_elf_gc_mark
3004 to mark .opd section, just set gc_mark.
3005 (ppc64_elf_edit_opd): Remove no_opd_opt parm. Don't set opd->adjust
3006 unless we are changing .opd. Test non-NULL opd->adjust at all
3007 accesses throughout file.
3008 * elf64-ppc.h (ppc64_elf_edit_opd): Update prototype.
3009
787daa7a
AM
30102008-01-15 Alan Modra <amodra@bigpond.net.au>
3011
3012 * bfd-in.h (BFD_HOST_LONG_LONG): Delete.
3013 * bfd-in2.h: Regenerate.
3014
7dda2462
TG
30152008-01-11 Tristan Gingold <gingold@adacore.com>
3016 Eric Botcazou <ebotcazou@adacore.com>
3017
3018 * elf32-ppc.c (ppc_elf_gc_sweep_hook): Exit early if generating a
3019 relocatable.
3020 * elf32-arm.c (elf32_arm_gc_sweep_hook): Likewise.
3021 * elf32-cris.c (cris_elf_gc_sweep_hook): Likewise.
3022 * elf32-hppa.c (elf32_hppa_gc_sweep_hook): Likewise.
3023 * elf32-i386.c (elf_i386_gc_sweep_hook): Likewise.
3024 * elf32-m32r.c (m32r_elf_gc_sweep_hook): Likewise.
3025 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Likewise.
3026 * elf32-s390.c (elf_s390_gc_sweep_hook): Likewise.
3027 * elf32-sh.c (sh_elf_gc_sweep_hook): Likewise.
3028 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
3029 * elf32-xtensa.c (elf_xtensa_gc_sweep_hook): Likewise.
3030 * elf64-x86-64.c (elf64_x86_64_gc_sweep_hook): Likewise.
3031 * elf64-s390.c (elf_s390_gc_sweep_hook): Likewise.
3032 * elf64-ppc.c (ppc64_elf_gc_sweep_hook): Likewise.
3033 * elfxx-mips.c (_bfd_mips_elf_gc_sweep_hook): Likewise.
3034 * elfxx-sparc.c (_bfd_sparc_elf_gc_sweep_hook): Likewise.
3035 * elflink.c (bfd_elf_gc_sections): Do not punt on relocatable output
3036 or executable output with relocations.
3037
d2e2e649
NC
30382008-01-09 Nick Clifton <nickc@redhat.com>
3039
3040 PR gas/5552
3041 * elf32-fr30.c (fr30_elf_howto_table): Set partial_inplace field
3042 to FALSE for all relocs.
3043
184d07da
RS
30442008-01-09 Richard Sandiford <rsandifo@nildram.co.uk>
3045
3046 PR ld/5526
3047 * elf-bfd.h (eh_cie_fde): Add u.cie.u.full_cie and u.cie.merged
3048 fields. Rename u.cie.u.merged to u.cie.u.merged_with.
3049 (eh_frame_sec_info): Add a cies field.
3050 (eh_frame_hdr_info): Add a merge_cies field.
3051 * elf-eh-frame.c (cie): Add a reloc_index member to the personality
3052 union.
3053 (_bfd_elf_begin_eh_frame_parsing): Set hdr_info->merge_cies instead
3054 of hdr_info->cies.
3055 (_bfd_elf_parse_eh_frame): Remove tmp_cie. Ccreate an array of
3056 cie structures in all cases and use it instead of extended_cies.
3057 If merging, store the cie array in sec_info->cies and point each
3058 CIE's eh_fde_cie at the associated element. Do not try to
3059 calculate the value of the personality routine here; record the
3060 offset of the relocation instead. Do not merge CIEs here.
3061 (_bfd_elf_end_eh_frame_parsing): Do not free hdr_info->cies here...
3062 (_bfd_elf_discard_section_eh_frame_hdr): ...do it here instead.
3063 (_bfd_elf_gc_mark_fdes): Mark the original (unmerged) CIE.
3064 (find_merged_cie): New function.
3065 (_bfd_elf_gc_mark_fdes): Use it. Free sec_info->cies.
3066
780b2360
NC
30672008-01-07 Nick Clifton <nickc@redhat.com>
3068
3069 PR binutils/5535
3070 * vms.c (vms_close_and_cleanup): Check for the presence of a
3071 vms_private_data_struct before examining any of its fields.
3072
ace79388
L
30732008-01-07 H.J. Lu <hongjiu.lu@intel.com>
3074
3075 PR ld/5522
3076 * elflink.c (elf_link_input_bfd): Don't write out a section if
3077 its output section is marked with SEC_NEVER_LOAD.
3078
6c7ac64e 3079For older changes see ChangeLog-2007
56882138
AM
3080\f
3081Local Variables:
3082mode: change-log
3083left-margin: 8
3084fill-column: 74
3085version-control: never
3086End:
This page took 0.589309 seconds and 4 git commands to generate.