parent
d8bea7da9a
commit
33dadd70ab
@ -1,20 +0,0 @@
|
|||||||
--- a/src/mklibs-readelf/elf.cpp
|
|
||||||
+++ b/src/mklibs-readelf/elf.cpp
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <sys/mman.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
|
|
||||||
using namespace Elf;
|
|
||||||
|
|
||||||
--- a/src/mklibs-readelf/main.cpp
|
|
||||||
+++ b/src/mklibs-readelf/main.cpp
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
|
|
||||||
#include <elf.h>
|
|
||||||
#include <getopt.h>
|
|
||||||
+#include <stdio.h>
|
|
||||||
|
|
||||||
#include "elf.hpp"
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
|||||||
--- a/src/mklibs-readelf/main.cpp
|
|
||||||
+++ b/src/mklibs-readelf/main.cpp
|
|
||||||
@@ -57,6 +57,10 @@ static void process_elf_header (Elf::fil
|
|
||||||
static void process_dynamics (Elf::file *file, int64_t tag)
|
|
||||||
{
|
|
||||||
const Elf::section_type<Elf::section_type_DYNAMIC> *section = file->get_section_DYNAMIC ();
|
|
||||||
+
|
|
||||||
+ if (!section)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
for (std::vector<Elf::dynamic *>::const_iterator it = section->get_dynamics ().begin (); it != section->get_dynamics ().end (); ++it)
|
|
||||||
{
|
|
||||||
Elf::dynamic *dynamic = *it;
|
|
||||||
@@ -67,6 +71,9 @@ static void process_dynamics (Elf::file
|
|
||||||
|
|
||||||
static void process_symbols_provided (const Elf::section_type<Elf::section_type_DYNSYM> *section)
|
|
||||||
{
|
|
||||||
+ if (!section)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
for (std::vector<Elf::symbol *>::const_iterator it = section->get_symbols ().begin (); it != section->get_symbols ().end (); ++it)
|
|
||||||
{
|
|
||||||
const Elf::symbol *symbol = *it;
|
|
||||||
@@ -95,6 +102,9 @@ static void process_symbols_provided (co
|
|
||||||
|
|
||||||
static void process_symbols_undefined (const Elf::section_type<Elf::section_type_DYNSYM> *section)
|
|
||||||
{
|
|
||||||
+ if (!section)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
for (std::vector<Elf::symbol *>::const_iterator it = section->get_symbols ().begin (); it != section->get_symbols ().end (); ++it)
|
|
||||||
{
|
|
||||||
const Elf::symbol *symbol = *it;
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/src/mklibs.py
|
--- a/src/mklibs
|
||||||
+++ b/src/mklibs.py
|
+++ b/src/mklibs
|
||||||
@@ -571,6 +571,11 @@ while 1:
|
@@ -595,6 +595,11 @@ while 1:
|
||||||
extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o")
|
extra_post_obj.append(sysroot + libc_extras_dir + "/sofini.o")
|
||||||
symbols.add(ProvidedSymbol('__dso_handle', None, None, True))
|
symbols.add(ProvidedSymbol('__dso_handle', None, None, True))
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/src/mklibs.py
|
--- a/src/mklibs
|
||||||
+++ b/src/mklibs.py
|
+++ b/src/mklibs
|
||||||
@@ -583,7 +583,7 @@ while 1:
|
@@ -607,7 +607,7 @@ while 1:
|
||||||
# compile in only used symbols
|
# compile in only used symbols
|
||||||
cmd = []
|
cmd = []
|
||||||
cmd.extend(gcc_options)
|
cmd.extend(gcc_options)
|
@ -0,0 +1,20 @@
|
|||||||
|
--- a/src/mklibs-readelf/main.cpp
|
||||||
|
+++ b/src/mklibs-readelf/main.cpp
|
||||||
|
@@ -84,7 +84,7 @@ static void process_symbols_provided (co
|
||||||
|
continue;
|
||||||
|
if (shndx == SHN_UNDEF || shndx == SHN_ABS)
|
||||||
|
continue;
|
||||||
|
- if (type != STT_NOTYPE && type != STT_OBJECT && type != STT_FUNC && type != STT_GNU_IFUNC && type != STT_COMMON && type != STT_TLS)
|
||||||
|
+ if (type != STT_NOTYPE && type != STT_OBJECT && type != STT_FUNC && type != STT_COMMON && type != STT_TLS)
|
||||||
|
continue;
|
||||||
|
if (!name.size())
|
||||||
|
continue;
|
||||||
|
@@ -115,7 +115,7 @@ static void process_symbols_undefined (c
|
||||||
|
continue;
|
||||||
|
if (shndx != SHN_UNDEF)
|
||||||
|
continue;
|
||||||
|
- if (type != STT_NOTYPE && type != STT_OBJECT && type != STT_FUNC && type != STT_GNU_IFUNC && type != STT_COMMON && type != STT_TLS)
|
||||||
|
+ if (type != STT_NOTYPE && type != STT_OBJECT && type != STT_FUNC && type != STT_COMMON && type != STT_TLS)
|
||||||
|
continue;
|
||||||
|
if (!name.size())
|
||||||
|
continue;
|
@ -0,0 +1,10 @@
|
|||||||
|
--- a/src/mklibs
|
||||||
|
+++ b/src/mklibs
|
||||||
|
@@ -263,6 +263,7 @@ def extract_soname(so_file):
|
||||||
|
return ""
|
||||||
|
|
||||||
|
def multiarch(paths):
|
||||||
|
+ return paths
|
||||||
|
devnull = open('/dev/null', 'w')
|
||||||
|
dpkg_architecture = subprocess.Popen(
|
||||||
|
['dpkg-architecture', '-qDEB_HOST_MULTIARCH'],
|
Loading…
Reference in New Issue