info(Android_penalty)
modified: p_lx_elf.cpp
This commit is contained in:
committed by
Markus F.X.J. Oberhumer
parent
b75e7687f4
commit
dc76b2af97
@@ -5558,6 +5558,7 @@ void PackLinuxElf32mipsel::defineSymbols(Filter const *ft)
|
|||||||
void PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho)
|
void PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho)
|
||||||
{
|
{
|
||||||
if (saved_opt_android_shlib) { // Forward select _Shdr
|
if (saved_opt_android_shlib) { // Forward select _Shdr
|
||||||
|
unsigned penalty = total_out;
|
||||||
// Keep _Shdr for rtld data (below xct_off).
|
// Keep _Shdr for rtld data (below xct_off).
|
||||||
// Discard _Shdr for compressed regions.
|
// Discard _Shdr for compressed regions.
|
||||||
// Keep _Shdr for SHF_WRITE.
|
// Keep _Shdr for SHF_WRITE.
|
||||||
@@ -5659,6 +5660,7 @@ void PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho)
|
|||||||
fo->seek(0, SEEK_SET);
|
fo->seek(0, SEEK_SET);
|
||||||
fo->rewrite(eho, sizeof(*eho));
|
fo->rewrite(eho, sizeof(*eho));
|
||||||
fo->seek(0, SEEK_END);
|
fo->seek(0, SEEK_END);
|
||||||
|
info("Android penalty = %d bytes", penalty = total_out - penalty);
|
||||||
}
|
}
|
||||||
else if (sec_arm_attr) {
|
else if (sec_arm_attr) {
|
||||||
// Forward just ARM_ATTRIBUTES
|
// Forward just ARM_ATTRIBUTES
|
||||||
@@ -5700,6 +5702,7 @@ void PackLinuxElf32::forward_Shdrs(OutputFile *fo, Elf32_Ehdr *const eho)
|
|||||||
void PackLinuxElf64::forward_Shdrs(OutputFile *fo, Elf64_Ehdr *const eho)
|
void PackLinuxElf64::forward_Shdrs(OutputFile *fo, Elf64_Ehdr *const eho)
|
||||||
{
|
{
|
||||||
if (saved_opt_android_shlib) { // Forward select _Shdr
|
if (saved_opt_android_shlib) { // Forward select _Shdr
|
||||||
|
unsigned penalty = total_out;
|
||||||
// Keep _Shdr for rtld data (below xct_off).
|
// Keep _Shdr for rtld data (below xct_off).
|
||||||
// Discard _Shdr for compressed regions.
|
// Discard _Shdr for compressed regions.
|
||||||
// Keep _Shdr for SHF_WRITE.
|
// Keep _Shdr for SHF_WRITE.
|
||||||
@@ -5801,6 +5804,7 @@ void PackLinuxElf64::forward_Shdrs(OutputFile *fo, Elf64_Ehdr *const eho)
|
|||||||
fo->seek(0, SEEK_SET);
|
fo->seek(0, SEEK_SET);
|
||||||
fo->rewrite(eho, sizeof(*eho));
|
fo->rewrite(eho, sizeof(*eho));
|
||||||
fo->seek(0, SEEK_END);
|
fo->seek(0, SEEK_END);
|
||||||
|
info("Android penalty = %d bytes", penalty = total_out - penalty);
|
||||||
}
|
}
|
||||||
else if (sec_arm_attr) {
|
else if (sec_arm_attr) {
|
||||||
// Forward just ARM_ATTRIBUTES
|
// Forward just ARM_ATTRIBUTES
|
||||||
|
|||||||
Reference in New Issue
Block a user