diff options
| author | Filip Strömbäck <filip.stromback@liu.se> | 2016-05-24 21:14:21 +0200 |
|---|---|---|
| committer | Filip Strömbäck <filip.stromback@liu.se> | 2016-05-24 21:14:21 +0200 |
| commit | f03411fa9c4c8d47ba8ec1d200f57b6a10612852 (patch) | |
| tree | 7f5a6c316ad061ee417da0d96525c7dc3bb149fc /src/lib | |
| parent | 9cb696c142769e29d4bac21475431d2c235a0ad4 (diff) | |
| download | pintos-rs-f03411fa9c4c8d47ba8ec1d200f57b6a10612852.tar.gz | |
Fixed sc-bad-write once again...
It seems that the BSS segment got larger than one page for some reason,
which caused the test to be useless as the boundary to nonmapped memory
were not located where the test thought. Now, it uses some linker script
magic to define the symbol _bss_end, the address of which is after the
end of the bss segment. This seems to be a fool-proof way of detecting
where the real boundary to unmapped memory is.
Signed-off-by: Filip Strömbäck <filip.stromback@liu.se>
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/user/user.lds | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/user/user.lds b/src/lib/user/user.lds index cc6d6c0..27ea4be 100644 --- a/src/lib/user/user.lds +++ b/src/lib/user/user.lds @@ -16,7 +16,11 @@ SECTIONS . = DATA_SEGMENT_ALIGN (0x1000, 0x1000); .data : { *(.data) } - .bss : { *(.bss) } + .bss : { + *(.bss) + /* Get the end of the bss segment as a symbol linkable from C */ + _end_bss = .; + } /* Stabs debugging sections. */ .stab 0 : { *(.stab) } |
