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 17 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,15 +15,6 @@ SECTIONS {
15 15
      * addresses, but may have individual link addresses depending on
16 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 18
      * We guarantee alignment of virtual addresses to any alignment
28 19
      * specified by the constituent object files (e.g. via
29 20
      * __attribute__((aligned(x)))).  Load addresses are guaranteed
@@ -43,7 +34,7 @@ SECTIONS {
43 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 38
     . = _prefix_link_addr;
48 39
     _prefix = .;
49 40
 
@@ -112,8 +103,7 @@ SECTIONS {
112 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 107
     . = _textdata_link_addr;
118 108
     _textdata = .;
119 109
 
@@ -198,8 +188,8 @@ SECTIONS {
198 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 194
     .			    = _load_addr;
205 195
 

Loading…
Cancel
Save