Commit 0068461
newlib: use brk(0) to get initial program break (riscv-collab#172)
There are no guarantees that the break going to be located exactly
at the _end, but brk(0) is guaranteed to return its current value.
QEMU ELF loader moves the initial break up to the next page boundary,
disabling sbrk-based malloc for any allocations smaller than
the adjustment made. And ASLR may do even worse.1 parent bfbfdec commit 0068461
1 file changed
Lines changed: 7 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
436 | 436 | | |
437 | 437 | | |
438 | 438 | | |
439 | | - | |
440 | 439 | | |
441 | 440 | | |
442 | | - | |
443 | | - | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
444 | 448 | | |
445 | 449 | | |
446 | 450 | | |
| |||
0 commit comments