FreeBSD Bugzilla – Attachment 193345 Details for
Bug 227552
w, uptime i386 coredump in libxo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix from Kai Wang (kaiw@) for elfcopy
tls.patch (text/plain), 1.51 KB, created by
Phil Shafer
on 2018-05-13 05:38:04 UTC
(
hide
)
Description:
Fix from Kai Wang (kaiw@) for elfcopy
Filename:
MIME Type:
Creator:
Phil Shafer
Created:
2018-05-13 05:38:04 UTC
Size:
1.51 KB
patch
obsolete
>commit 2378432cb7172967b6cfdb9ed58f989412665bf5 >Author: Kai Wang <kaiwang27@gmail.com> >Date: Sun May 13 03:06:58 2018 +0200 > > Make sure that only TLS sections are sorted into TLS segment. This > fixes a bug that the memory size of TLS segment is miscalcuated when > the TLS segment's memory map also covers non-TLS sections. > >diff --git a/elfcopy/elfcopy.h b/elfcopy/elfcopy.h >index 1ccd9d6..cad74ca 100644 >--- a/elfcopy/elfcopy.h >+++ b/elfcopy/elfcopy.h >@@ -127,6 +127,7 @@ struct section { > uint64_t cap; /* section capacity */ > uint64_t align; /* section alignment */ > uint64_t type; /* section type */ >+ uint64_t flags; /* section flags */ > uint64_t vma; /* section virtual addr */ > uint64_t lma; /* section load addr */ > uint64_t pad_sz;/* section padding size */ >diff --git a/elfcopy/sections.c b/elfcopy/sections.c >index 44b0596..037f928 100644 >--- a/elfcopy/sections.c >+++ b/elfcopy/sections.c >@@ -411,6 +411,7 @@ create_scn(struct elfcopy *ecp) > s->sz = ish.sh_size; > s->align = ish.sh_addralign; > s->type = ish.sh_type; >+ s->flags = ish.sh_flags; > s->vma = ish.sh_addr; > > /* >diff --git a/elfcopy/segments.c b/elfcopy/segments.c >index 0214dc4..d37088a 100644 >--- a/elfcopy/segments.c >+++ b/elfcopy/segments.c >@@ -79,6 +79,8 @@ add_to_inseg_list(struct elfcopy *ecp, struct section *s) > continue; > if (s->vma + s->sz > seg->vaddr + seg->msz) > continue; >+ if (seg->type == PT_TLS && ((s->flags & SHF_TLS) == 0)) >+ continue; > > insert_to_inseg_list(seg, s); > if (seg->type == PT_LOAD)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 227552
: 193345 |
193346