diff options
author | Renato Botelho <renato@netgate.com> | 2018-05-18 14:53:44 -0300 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2018-05-18 14:53:44 -0300 |
commit | 64f021cd075bbcb3042539dcebc63e7d335ec2c0 (patch) | |
tree | 1a64375406a7b5976f98eaf4cf19f00cf2931dd1 /contrib/elftoolchain/elfcopy | |
parent | 8f29f1de284afe0ec8987780d5404a3e1a31712a (diff) | |
parent | eb64daea863b1fe3320e10c6c72cbfe7e9ce967b (diff) | |
download | FreeBSD-src-64f021cd075bbcb3042539dcebc63e7d335ec2c0.zip FreeBSD-src-64f021cd075bbcb3042539dcebc63e7d335ec2c0.tar.gz |
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'contrib/elftoolchain/elfcopy')
-rw-r--r-- | contrib/elftoolchain/elfcopy/elfcopy.h | 1 | ||||
-rw-r--r-- | contrib/elftoolchain/elfcopy/sections.c | 1 | ||||
-rw-r--r-- | contrib/elftoolchain/elfcopy/segments.c | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/contrib/elftoolchain/elfcopy/elfcopy.h b/contrib/elftoolchain/elfcopy/elfcopy.h index 5593a9a..c152588 100644 --- a/contrib/elftoolchain/elfcopy/elfcopy.h +++ b/contrib/elftoolchain/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/contrib/elftoolchain/elfcopy/sections.c b/contrib/elftoolchain/elfcopy/sections.c index 298fce4..b292d18 100644 --- a/contrib/elftoolchain/elfcopy/sections.c +++ b/contrib/elftoolchain/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/contrib/elftoolchain/elfcopy/segments.c b/contrib/elftoolchain/elfcopy/segments.c index 9a26bba..27d5e7a 100644 --- a/contrib/elftoolchain/elfcopy/segments.c +++ b/contrib/elftoolchain/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) |