ElfLinker::addSection omits "ABS*" and "UND*" sections
modified: linker.cpp
This commit is contained in:
committed by
Markus F.X.J. Oberhumer
parent
2ed6755d5d
commit
275477f914
@@ -313,6 +313,9 @@ ElfLinker::Symbol *ElfLinker::findSymbol(const char *name, bool fatal) const {
|
|||||||
ElfLinker::Section *ElfLinker::addSection(const char *sname, const void *sdata, int slen,
|
ElfLinker::Section *ElfLinker::addSection(const char *sname, const void *sdata, int slen,
|
||||||
unsigned p2align) {
|
unsigned p2align) {
|
||||||
// printf("addSection: %s len=%d align=%d\n", sname, slen, p2align);
|
// printf("addSection: %s len=%d align=%d\n", sname, slen, p2align);
|
||||||
|
if (!sdata
|
||||||
|
&& (!strcmp("ABS*", sname) || !strcmp("UND*", sname)))
|
||||||
|
return nullptr;
|
||||||
if (update_capacity(nsections, &nsections_capacity))
|
if (update_capacity(nsections, &nsections_capacity))
|
||||||
sections =
|
sections =
|
||||||
static_cast<Section **>(realloc(sections, nsections_capacity * sizeof(Section *)));
|
static_cast<Section **>(realloc(sections, nsections_capacity * sizeof(Section *)));
|
||||||
|
|||||||
Reference in New Issue
Block a user