* elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
[binutils-gdb.git] / bfd / ChangeLog
1 2004-01-13 Alan Modra <amodra@bigpond.net.au>
2
3 * elf64-ppc.c (ppc64_elf_check_relocs): Ignore !SEC_ALLOC relocs.
4 (ppc64_elf_gc_sweep_hook): Likewise.
5 (ppc64_elf_size_dynamic_sections): Test for .plt directly.
6
7 2004-01-12 Anil Paranjpe <anilp1@KPITCummins.com>
8
9 Adds linker relaxation support for bit manipulation insns like
10 band, bclr, biand, bild, bior, bist, bixor, bld, bnot, bor, bset,
11 bst, btst, bxor.
12 * elf32-h8300.c: Opcode for bit manipulation insn is checked in
13 elf32_h8_relax_section function while relxation for aa:16 and aa:32.
14 * coff-h8300.c: Opcode for bit manipulation insn is checked in
15 h8300_reloc16_extra_cases function while relxation for aa:16 and aa:32.
16
17 2004-01-12 Alan Modra <amodra@bigpond.net.au>
18
19 * dwarf2.c: Convert to C90, remove unneeded casts and prototypes.
20
21 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
22
23 * elf32-h8300.c: Fix formatting.
24
25 2004-01-11 Kazu Hirata <kazu@cs.umass.edu>
26
27 * elf32-cris.c (cris_elf_gc_sweep_hook): Return early if no
28 dynamic object is present. Declare r_symndx and h in an inner
29 scope.
30 * elf32-vax.c (elf_vax_gc_sweep_hook): Likewise.
31
32 2004-01-09 Daniel Jacobowitz <drow@mvista.com>
33
34 * elf32-arm.h (struct elf32_arm_relocs_copied): Remove pc_count.
35 (elf32_arm_copy_indirect_symbol): Don't copy pc_count.
36 (elf32_arm_final_link_relocate): Handle PLT32 and PC24 relocs
37 identically. Do not emit PC24 relocations for shared libraries.
38 (elf32_arm_gc_sweep_hook): Handle PLT32 and PC24 relocs
39 identically. Don't adjust pc_count.
40 (elf32_arm_check_relocs): Handle PLT32 and PC24 relocs identically.
41 Set ELF_LINK_HASH_NEEDS_PLT for both. Don't adjust pc_count; don't
42 adjust count for branch relocations.
43 (allocate_dynrelocs): Correct typo in call to
44 WILL_CALL_FINISH_DYNAMIC_SYMBOL. Never allocate space for
45 PC24 or PLT32 relocs when linking.
46
47 2004-01-09 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
48
49 * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
50 relocation howto with ARM_26 one for consistency.
51 (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
52 that will be converted to ARM_26D ones, since we always want 'done'
53 relocations to be reflected in section's data.
54 (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
55 offset.
56 (_bfd_final_link_relocate): Do not modify "inplace" data, if not
57 requested.
58
59 2004-01-08 Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
60
61 * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
62 are not partial_inplace during a relocatable link.
63
64 2004-01-08 Kazu Hirata <kazu@cs.umass.edu>
65
66 * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return early
67 if no dynamic object is present. Declare r_symndx and h in an
68 inner scope.
69
70 2004-01-07 H.J. Lu <hongjiu.lu@intel.com>
71
72 * elfxx-ia64.c (elfNN_ia64_relax_section): Don't install
73 trampoline if it is known out of range.
74
75 2004-01-06 Alexandre Oliva <aoliva@redhat.com>
76
77 2003-12-17 Alexandre Oliva <aoliva@redhat.com>
78 * elf32-frv.c (_frv_osec_readonly_p): New.
79 (_frv_emit_got_relocs_plt_entries): Don't emit rofixup for
80 undefweak symbol.
81 (_frv_count_got_plt_entries): Adjust expected count accordingly.
82 (elf32_frv_relocate_section): Likewise. Error out if attempting
83 to emit rofixups or dynamic relocs in read-only segments. Use
84 _bfd_elf_section_offset to adjust r_offsets in rofixups and
85 dynamic relocations.
86 2003-12-12 Alexandre Oliva <aoliva@redhat.com>
87 * elf32-frv.c (elf32_frv_relocate_section): Compute dynamic
88 relocations or fixups involving merged sections correctly. Avoid
89 crash when undefined symbol is referenced by R_FRV_32 or
90 R_FRV_FUNCDESC_VALUE.
91 2003-12-02 Alexandre Oliva <aoliva@redhat.com>
92 * elf32-frv.c (elf32_frv_relocate_section): Add output_offset of
93 input section holding local symbol to addend of R_FRV_32 or
94 R_FRV_FUNCDESC_VALUE dynamic relocation.
95 2003-11-27 Alexandre Oliva <aoliva@redhat.com>
96 * elf32-frv.c (elf32_frv_modify_segment_map): Add link info arg.
97 (elf32_frv_always_size_sections): Don't store pointer to
98 __stacksize symbol in sec_info.
99 (elf32_frv_modify_segment_map): Look it up here.
100 2003-11-26 Alexandre Oliva <aoliva@redhat.com>
101 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Emit the address
102 of the lazy PLT entry, not only its offset, as the low word of a
103 function descriptor.
104 2003-11-10 Alexandre Oliva <aoliva@redhat.com>
105 * elf32-frv.c (elf32_frv_always_size_sections): Define __stacksize
106 if a hash table entry already exists but is not a definition.
107 2003-11-05 Alexandre Oliva <aoliva@redhat.com>
108 * elf32-frv.c (frv_elf_link_hash_table_create): Use bfd_zalloc.
109 (_frv_add_rofixup): Don't inline.
110 (_frv_emit_got_relocs_plt_entries): Use NULL as funcdesc address
111 for undefweak symbols.
112 (elf32_frv_relocate_section): Avoid crash while computing
113 relocation when linking with shared library. Only emit rofixups
114 and dynamic relocations for alloc&load sections. Mark binaries
115 with inter-segment relocations for relocation as a unit.
116 (_frv_create_got_section): Rename .rofixup.got to .rofixup.
117 (DEFAULT_STACK_SIZE): New.
118 (_frv_count_got_plt_entries): Fix thinko in deciding whether to
119 emit rofixups or dynamic relocs when linking dynamic non-PIE
120 executables.
121 (elf32_frv_size_dynamic_sections): Generate rofixup on PIEs and
122 shared libs too. Reserve the last entry for the GOT pointer.
123 (elf32_frv_finish_dynamic_sections): Emit it.
124 (elf32_frv_always_size_sections): New.
125 (elf32_frv_modify_segment_map): New.
126 (elf32_frv_check_relocs): Reserve relocs32 space only in ALLOC
127 sections.
128 (frv_elf_merge_private_bfd_data): Clear PIC bit if FDPIC is set.
129 (frv_elf_print_private_bfd_data): Handle FDPIC and LIBPIC.
130 (elf_backend_always_size_sections): New.
131 (elf_backend_modify_segment_map): New.
132 2003-10-31 Alexandre Oliva <aoliva@redhat.com>
133 * config.bfd: Added frv-*-*linux*.
134 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Use idx 0 for
135 ABS section, instead of crashing.
136 (elf32_frv_relocate_section): Don't crash before warning about
137 different segments in non-PIC relocation.
138 2003-10-17 Alexandre Oliva <aoliva@redhat.com>
139 * elf32-frv.c (elf32_frv_relocate_section): Don't warn on LABEL24
140 relocs to undefweak symbols.
141 (elf32_frv_relocate_section): Ditto for undefined symbols.
142 2003-10-06 Alexandre Oliva <aoliva@redhat.com>
143 * elf32-frv.c (elf32_frv_create_dynamic_sections): Make sure
144 gotfixup section was created.
145 2003-09-30 Alexandre Oliva <aoliva@redhat.com>
146 * elf32-frv.c (elf32_frv_howto_table): Change GOT12,
147 FUNCDESC_GOT12, GOTOFF12 and FUNCDESC_GOTOFF12 to
148 complain_overflow_signed.
149 * elf32-frv.c (_frv_add_rofixup): Do not error out if contents
150 have not been allocated.
151 (_frv_emit_got_relocs_plt_entries): Return non-void. Assert
152 privfd only if dynamic sections were created.
153 (elf32_frv_relocate_section): Compute gprel_segment, and use it
154 for GPREL relocs. When linking relocatable FDPIC executables,
155 emit warnings for relocations that would be illegal on PIE or
156 shared libraries. Emit rofixup for R_FRV_32 only if input object
157 is not FDPIC.
158 (_frv_create_got_section): Define _gp symbol in the rofixup
159 section.
160 (elf32_frv_finish_dynamic_sections): If rofixups needed but
161 dynamic sections missing, error out requesting -melf32frvfd.
162 2003-09-19 Alexandre Oliva <aoliva@redhat.com>
163 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Rearrange
164 computation of addends from section and global or local symbol
165 value. Change return type to bfd_boolean, and return a failure if
166 a dynamic FUNCDESC or FUNCDESC_VALUE relocation that requires a
167 nonzero addend is required.
168 (elf32_frv_relocate_section): Likewise. Print error for
169 unsupported nonzero addends.
170 2003-09-18 Alexandre Oliva <aoliva@redhat.com>
171 * elf32-frv.c (FRV_SYM_LOCAL): In the absence of dynamic sections,
172 force everything local.
173 (_frv_emit_got_relocs_plt_entries): Cope with NULL sec.
174 * elf32-frv.c (struct frv_elf_link_hash_table): Added sgotfixup.
175 (frv_gotfixup_section): New.
176 (FRV_SYM_LOCAL): Accept undefweak and local common symbols.
177 (struct frv_pic_relocs_info): Split relocs into relocs32, relocsfd
178 and relocsfdv.
179 (_frv_add_rofixup): New.
180 (_frv_emit_got_relocs_plt_entries): Generate fixups for non-PIE
181 fdpic executables. Use FRV_SYM_LOCAL more widely to simplify and
182 improve some ugly conditions.
183 (elf32_frv_relocate_section): Likewise. Reject inter-segment
184 relocations in fdpic.
185 (_frv_create_got_section): Create .rofixup.got section.
186 (struct _frv_dynamic_got_info): Added fixups.
187 (_frv_count_got_plt_entries): Account in-GOT relocations into
188 relocs32, relocsfd and relocsfdv. Account them into relocs or
189 fixups, as appropriate.
190 (elf32_frv_size_dynamic_sections): Size rofixup section. Simplify
191 sizing of gotrel.
192 (elf32_frv_finish_dynamic_sections): Verify that the right number
193 of relocations and fixups was generated.
194 (elf32_frv_check_relocs): Compute relocs32, relocsfd and
195 relocsfdv.
196 * elf32-frv.c (FRV_SYM_LOCAL): New macro, used instead of
197 SYMBOL_CALLS_LOCAL and SYMBOL_REFERENCES_LOCAL.
198 (FRV_FUNCDESC_LOCAL): New macro, used to decide whether a function
199 descriptor of a (formerly-)global symbol is local.
200 (struct frv_pic_relocs_info): Adjust comments.
201 (_frv_emit_got_relocs_plt_entries): Adjust.
202 (elf32_frv_relocate_section): Likewise.
203 (_frv_count_got_plt_entries): Likewise.
204 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Don't add global
205 symbol's value to addend in the common preamble. Decay dynamic
206 symbols to section+offset if they bind or call locally, for GOT
207 and FUNCDESC_VALUE, respectively.
208 (elf32_frv_relocate_section): Likewise.
209 (elf32_frv_check_relocs): Don't register as dynamic symbols of
210 internal or hidden visibility.
211 2003-09-17 Alexandre Oliva <aoliva@redhat.com>
212 * elf32-frv.c (_frv_emit_got_relocs_plt_entries): Get addend as
213 argument, so as to not call _bfd_elf_rel_local_sym to compute it.
214 (elf32_frv_relocate_section): Pass relocation addend in. Use
215 original relocation addend to look up the got relocs/plt entries
216 table. Do not call _bfd_elf_rel_local_sym. Don't error out when
217 processing relocations that reference .scommon symbols.
218 2003-09-15 Alexandre Oliva <aoliva@redhat.com>
219 Introduce support for dynamic linking.
220 * elf32-frv.c (R_FRV_FUNCDESC_VALUE): Mark it as 64 bits.
221 (elf32_frv_rel_32_howto, elf32_frv_rel_funcdesc_howto,
222 elf32_frv_rel_funcdesc_value_howto): New REL descriptors.
223 (frv_reloc_type_lookup): Return REL howtos for executables and
224 dynamic libraries.
225 (frv_info_to_howto_rel): New.
226 (struct frv_elf_link_hash_table): New.
227 (frv_hash_table, frv_got_section, frv_gotrel_section,
228 frv_plt_section, frv_pltrel_section, frv_relocs_info,
229 frv_got_initial_offset, frv_plt_initial_offset): New macros.
230 (frv_elf_link_hash_table_create): New.
231 (struct frv_pic_relocs_info): New.
232 (frv_pic_relocs_info_hash, frv_pic_relocs_info_eq): New.
233 (frv_pic_relocs_info_find): New.
234 (frv_pic_relocs_info_for_global, frv_pic_relocs_info_for_local):
235 New.
236 (FRV_LZPLT_BLOCK_SIZE, FRV_LZPLT_RESOLVE_LOC): New.
237 (_frv_add_dyn_reloc, _frv_osec_to_segment): New.
238 (_frv_emit_got_relocs_plt_entries): New.
239 (elf32_frv_relocate_section): Add support for dynamic linking.
240 Handle new relocations.
241 (_frv_create_got_section): New.
242 (elf32_frv_create_dynamic_sections): New.
243 (ELF_DYNAMIC_INTERPRETER): New.
244 (struct _frv_dynamic_got_info): New.
245 (_frv_count_got_plt_entries): New.
246 (struct _frv_dynamic_got_plt_info): New.
247 (_frv_compute_got_alloc_data): New.
248 (_frv_get_got_entry, _frv_get_fd_entry): New.
249 (_frv_assign_got_entries, _frv_assign_plt_entries): New.
250 (_frv_resolve_final_relocs_info): New.
251 (elf32_frv_size_dynamic_sections): New.
252 (elf32_frv_finish_dynamic_sections): New.
253 (elf32_frv_adjust_dynamic_symbol): New.
254 (elf32_frv_finish_dynamic_symbol): New.
255 (elf32_frv_check_relocs): Handle new relocs. Explain how the
256 whole thing works.
257 (elf_info_to_howto_rel): Define.
258 (bfd_elf32_bfd_link_hash_table_create): Define.
259 (elf_backend_create_dynamic_sections): Define.
260 (elf_backend_adjust_dynamic_symbol): Define.
261 (elf_backend_size_dynamic_sections): Define.
262 (elf_backend_finish_dynamic_symbol): Define.
263 (elf_backend_finish_dynamic_sections): Define.
264 (elf_backend_want_got_sym): Define.
265 (elf_backend_got_header_size): Define.
266 (elf_backend_want_got_plt): Define.
267 (elf_backend_plt_readonly): Define.
268 (elf_backend_want_plt_sym): Define.
269 (elf_backend_plt_header_size): Define.
270 (elf_backend_may_use_rel_p): Define.
271 (elf_backend_may_use_rela_p): Define.
272 (elf_backend_default_use_rela_p): Define.
273 2003-08-08 Alexandre Oliva <aoliva@redhat.com>
274 * elf32-frv.c (R_FRV_FUNCDESC_VALUE, R_FRV_FUNCDESC_GOTOFF12,
275 R_FRV_FUNCDESC_GOTOFFHI, R_FRV_FUNCDESC_GOTOFFLO, R_FRV_GOTOFF12,
276 R_FRV_GOTOFFHI, R_FRV_GOTOFFLO): New.
277 (frv_reloc_map): Map the corresponding BFD relocs to them.
278 (frv_reloc_type_lookup): ... and back to BFD relocs.
279 * reloc.c: New relocs.
280 * bfd-in2.h, libbfd.h: Rebuilt.
281 2003-08-04 Alexandre Oliva <aoliva@redhat.com>
282 * elf32-frv.c (R_FRV_GOT12, R_FRV_GOTHI, R_FRV_GOTLO,
283 R_FRV_FUNCDESC, R_FRV_FUNCDESC_GOT12, R_FRV_FUNCDESC_GOTHI,
284 R_FRV_FUNCDESC_GOTLO): New.
285 (frv_reloc_map): Map the corresponding BFD relocs to them.
286 (frv_reloc_type_lookup): ... and back to BFD relocs.
287 * reloc.c: New relocs.
288 * bfd-in2.h, libbfd.h: Rebuilt.
289
290 2004-01-05 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
291
292 * elf32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
293 targets to support pages of up to 64kB.
294 (elf32_bed): Redefine to get a separate backend data structure for
295 traditional targets.
296 * elf64-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
297 targets to support pages of up to 64kB.
298 (elf64_bed): Redefine to get a separate backend data structure for
299 traditional targets.
300 * elfn32-mips.c (ELF_MAXPAGESIZE): Redefine for traditional
301 targets to support pages of up to 64kB.
302 (elf32_bed): Redefine to get a separate backend data structure for
303 traditional targets.
304
305 2004-01-04 Mark Kettenis <kettenis@gnu.org>
306
307 * elf32-sparc.c (elf32_sparc_grok_psinfo): New function.
308
309 2004-01-02 Mark Kettenis <kettenis@gnu.org>
310
311 * elf32-i386.c (elf_i386_grok_prstatus): Add support for FreeBSD.
312 (elf_i386_grok_psinfo): Likewise.
313
314 2004-01-02 Bernardo Innocenti <bernie@develer.com>
315
316 * config.bfd: Add m68k-uClinux target.
317
318 2004-01-01 Grant Edwards <grante@visi.com>
319
320 * elflink.h (elf_gc_sections): Warn when gc-sections option is ignored.
321 * elf32-h8300.c (elf32_h8_gc_mark_hook): New function.
322 (elf32_h8_gc_sweep_hook): New function.
323 (elf_backend_gc_mark_hook): Define.
324 (elf_backend_gc_sweep_hook): Define.
325 (elf_backend_can_gc_sections): Define.
326
327 For older changes see ChangeLog-0203
328 \f
329 Local Variables:
330 mode: change-log
331 left-margin: 8
332 fill-column: 74
333 version-control: never
334 End: