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