-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
269 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
thestig@chromium.org | ||
thomasanderson@chromium.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Name: eu-strip | ||
URL: https://sourceware.org/elfutils/ | ||
Version: 0.158 | ||
Security Critical: no | ||
License: LGPL 3 | ||
License File: NOT_SHIPPED | ||
|
||
Description: | ||
|
||
Patched eu-strip from elfutils. | ||
|
||
To build (on Trusty): ./build.sh in this directory. |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh -xe | ||
|
||
rm -rf elfutils | ||
git clone git://sourceware.org/git/elfutils.git | ||
cd elfutils | ||
git checkout elfutils-0.170 | ||
autoheader | ||
aclocal | ||
autoconf | ||
automake --add-missing | ||
patch -p1 < ../fix-elf-size.patch | ||
mkdir build | ||
cd build | ||
../configure --enable-maintainer-mode | ||
make -j40 | ||
gcc -std=gnu99 -Wall -Wshadow -Wunused -Wextra -fgnu89-inline \ | ||
-Wformat=2 -Werror -g -O2 -Wl,-rpath-link,libelf:libdw -Wl,--build-id=none -o eu-strip \ | ||
src/strip.o libebl/libebl.a libelf/libelf.a lib/libeu.a libdw/libdw.a -ldl -lz | ||
./eu-strip -o ../../bin/eu-strip eu-strip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
diff --git a/libelf/elf32_updatenull.c b/libelf/elf32_updatenull.c | ||
index d83c0b3f..507e707b 100644 | ||
--- a/libelf/elf32_updatenull.c | ||
+++ b/libelf/elf32_updatenull.c | ||
@@ -137,7 +137,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | ||
return -1; | ||
|
||
/* At least the ELF header is there. */ | ||
- off_t size = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1); | ||
+ ElfW2(LIBELFBITS,Off) size = elf_typesize (LIBELFBITS, ELF_T_EHDR, 1); | ||
|
||
/* Set the program header position. */ | ||
if (elf->state.ELFW(elf,LIBELFBITS).phdr == NULL) | ||
@@ -152,7 +152,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | ||
{ | ||
/* The user is supposed to fill out e_phoff. Use it and | ||
e_phnum to determine the maximum extend. */ | ||
- size = MAX ((size_t) size, | ||
+ size = MAX (size, | ||
ehdr->e_phoff | ||
+ elf_typesize (LIBELFBITS, ELF_T_PHDR, phnum)); | ||
} | ||
@@ -330,7 +330,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | ||
|
||
if (elf->flags & ELF_F_LAYOUT) | ||
{ | ||
- size = MAX ((GElf_Word) size, | ||
+ size = MAX (size, | ||
(shdr->sh_type != SHT_NOBITS | ||
? shdr->sh_offset + shdr->sh_size : 0)); | ||
|
||
@@ -352,9 +352,9 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | ||
update_if_changed (shdr->sh_addralign, sh_align, | ||
scn->shdr_flags); | ||
|
||
- size = (size + sh_align - 1) & ~(sh_align - 1); | ||
+ size = (size + sh_align - 1) & ~(ElfW2(LIBELFBITS,Off))(sh_align - 1); | ||
int offset_changed = 0; | ||
- update_if_changed (shdr->sh_offset, (GElf_Word) size, | ||
+ update_if_changed (shdr->sh_offset, size, | ||
offset_changed); | ||
changed |= offset_changed; | ||
|
||
@@ -416,7 +416,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | ||
/* The user is supposed to fill out e_shoff. Use it and | ||
e_shnum (or sh_size of the dummy, first section header) | ||
to determine the maximum extend. */ | ||
- size = MAX ((GElf_Word) size, | ||
+ size = MAX (size, | ||
(ehdr->e_shoff | ||
+ (elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum)))); | ||
} | ||
@@ -430,7 +430,7 @@ __elfw2(LIBELFBITS,updatenull_wrlock) (Elf *elf, int *change_bop, size_t shnum) | ||
#define SHDR_ALIGN sizeof (ElfW2(LIBELFBITS,Off)) | ||
size = (size + SHDR_ALIGN - 1) & ~(SHDR_ALIGN - 1); | ||
|
||
- update_if_changed (ehdr->e_shoff, (GElf_Word) size, elf->flags); | ||
+ update_if_changed (ehdr->e_shoff, size, elf->flags); | ||
|
||
/* Account for the section header size. */ | ||
size += elf_typesize (LIBELFBITS, ELF_T_SHDR, shnum); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
earthdok@chromium.org | ||
glider@chromium.org | ||
thakis@chromium.org | ||
thomasanderson@chromium.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#ifndef _LIBCPP_CONFIG_SITE | ||
#define _LIBCPP_CONFIG_SITE | ||
|
||
// We set a custom _LIBCPP_ABI_NAMESPACE for the following reasons: | ||
// | ||
// 1. When libcxx_is_shared is true, symbols from libc++.so are exported for all | ||
// DSOs to use. If the system libc++ gets loaded (indirectly through a | ||
// a system library), then it will conflict with our libc++.so. | ||
// 2. The default value of _LIBCPP_ABI_NAMESPACE is the string | ||
// "_LIBCPP_ABI_NAMESPACE". This contributes to an increase in binary size; | ||
// on Windows, the increase is great enough that we go above the 4GB size | ||
// limit for PDBs (https://crbug.com/1327710#c5). To fix this, we set | ||
// _LIBCPP_ABI_NAMESPACE to a shorter value. | ||
#define _LIBCPP_ABI_NAMESPACE Cr | ||
#define _LIBCPP_ABI_VERSION 2 | ||
|
||
/* #undef _LIBCPP_ABI_FORCE_ITANIUM */ | ||
/* #undef _LIBCPP_ABI_FORCE_MICROSOFT */ | ||
/* #undef _LIBCPP_HAS_NO_THREADS */ | ||
/* #undef _LIBCPP_HAS_NO_MONOTONIC_CLOCK */ | ||
/* #undef _LIBCPP_HAS_MUSL_LIBC */ | ||
/* #undef _LIBCPP_HAS_THREAD_API_PTHREAD */ | ||
/* #undef _LIBCPP_HAS_THREAD_API_EXTERNAL */ | ||
/* #undef _LIBCPP_HAS_THREAD_API_WIN32 */ | ||
/* #undef _LIBCPP_HAS_THREAD_LIBRARY_EXTERNAL */ | ||
/* #undef _LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS */ | ||
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS | ||
/* #undef _LIBCPP_NO_VCRUNTIME */ | ||
/* #undef _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION */ | ||
/* #undef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY */ | ||
/* #undef _LIBCPP_HAS_PARALLEL_ALGORITHMS */ | ||
/* #undef _LIBCPP_HAS_NO_RANDOM_DEVICE */ | ||
/* #undef _LIBCPP_HAS_NO_LOCALIZATION */ | ||
/* #undef _LIBCPP_HAS_NO_WIDE_CHARACTERS */ | ||
|
||
// Settings below aren't part of __config_site upstream. | ||
// We set them here since we want them to take effect everywhere, | ||
// unconditionally. | ||
|
||
// Prevent libc++ from embedding linker flags to try to automatically link | ||
// against its runtime library. This is unnecessary with our build system, | ||
// and can also result in build failures if libc++'s name for a library | ||
// does not match ours. Only has an effect on Windows. | ||
#define _LIBCPP_NO_AUTO_LINK | ||
|
||
#define _LIBCPP_REMOVE_TRANSITIVE_INCLUDES | ||
|
||
// Explicitly define _LIBCPP_VERBOSE_ABORT(...) to call the termination | ||
// function because by default, this macro will does not call the verbose | ||
// termination function on Apple platforms. | ||
#define _LIBCPP_VERBOSE_ABORT(...) ::std::__libcpp_verbose_abort(__VA_ARGS__) | ||
|
||
#endif // _LIBCPP_CONFIG_SITE |
Submodule trunk
updated
from d9040c to 6f4617
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
earthdok@chromium.org | ||
glider@chromium.org | ||
thakis@chromium.org | ||
thomasanderson@chromium.org |
Oops, something went wrong.