aboutsummaryrefslogtreecommitdiff
path: root/src/lib/selfboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/selfboot.c')
-rw-r--r--src/lib/selfboot.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/selfboot.c b/src/lib/selfboot.c
index dff66e5019..feff03e143 100644
--- a/src/lib/selfboot.c
+++ b/src/lib/selfboot.c
@@ -263,6 +263,9 @@ static int build_self_segment_list(
ntohl(segment->mem_len));
new = malloc(sizeof(*new));
new->s_filesz = 0;
+ new->s_srcaddr = (uintptr_t)
+ ((unsigned char *)first_segment)
+ + ntohl(segment->offset);
new->s_dstaddr = ntohll(segment->load_addr);
new->s_memsz = ntohl(segment->mem_len);
break;