Browse Source

Remove the (unused) option to override _prefix_link_addr,

_textdata_link_addr, _load_addr and _max_align in the linker scripts.
A bug in some versions of ld causes segfaults if the DEFINED() macro
is used in a linker script *and* the -Map option to ld is present.

We don't currently need to override any of these values; if we need to
do so in future then the solution will probably be to always specify
the values on the ld command line, and have the linker script not
define them at all.
tags/v0.9.3
Michael Brown 16 years ago
parent
commit
2c7a9e803c
1 changed files with 4 additions and 14 deletions
  1. 4
    14
      src/arch/i386/scripts/i386.lds

+ 4
- 14
src/arch/i386/scripts/i386.lds View File

15
      * addresses, but may have individual link addresses depending on
15
      * addresses, but may have individual link addresses depending on
16
      * the memory model being used.
16
      * the memory model being used.
17
      *
17
      *
18
-     * The linker symbols _{prefix,textdata}_link_addr, load_addr, and
19
-     * _max_align may be specified explicitly.  If not specified, they
20
-     * will default to:
21
-     *
22
-     *   _prefix_link_addr	= 0
23
-     *   _textdata_link_addr	= 0
24
-     *   _load_addr		= 0
25
-     *   _max_align		= 16
26
-     * 
27
      * We guarantee alignment of virtual addresses to any alignment
18
      * We guarantee alignment of virtual addresses to any alignment
28
      * specified by the constituent object files (e.g. via
19
      * specified by the constituent object files (e.g. via
29
      * __attribute__((aligned(x)))).  Load addresses are guaranteed
20
      * __attribute__((aligned(x)))).  Load addresses are guaranteed
43
      * The prefix
34
      * The prefix
44
      */
35
      */
45
 
36
 
46
-    _prefix_link_addr = DEFINED ( _prefix_link_addr ) ? _prefix_link_addr : 0;
37
+    _prefix_link_addr = 0;
47
     . = _prefix_link_addr;
38
     . = _prefix_link_addr;
48
     _prefix = .;
39
     _prefix = .;
49
 
40
 
112
      * The 32-bit sections
103
      * The 32-bit sections
113
      */
104
      */
114
 
105
 
115
-    _textdata_link_addr = ( DEFINED ( _textdata_link_addr ) ?
116
-			    _textdata_link_addr : 0 );
106
+    _textdata_link_addr = 0;
117
     . = _textdata_link_addr;
107
     . = _textdata_link_addr;
118
     _textdata = .;
108
     _textdata = .;
119
 
109
 
198
      * location counter.
188
      * location counter.
199
      */
189
      */
200
 
190
 
201
-    _max_align		    = DEFINED ( _max_align ) ? _max_align : 16;
202
-    _load_addr		    = DEFINED ( _load_addr ) ? _load_addr : 0;
191
+    _max_align		    = 16;
192
+    _load_addr		    = 0;
203
 
193
 
204
     .			    = _load_addr;
194
     .			    = _load_addr;
205
 
195
 

Loading…
Cancel
Save