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