summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Tourbin <at@altlinux.ru>2010-05-26 09:56:26 +0400
committerAlexey Tourbin <at@altlinux.ru>2010-05-26 10:10:11 +0400
commit5c4b56fbbc7427d32d2166a20be2aea1f4eb42fc (patch)
treee3bc8117aed2cd840841615184e45ed40547aec0
parent7aa26150d02dfcaee2b3c0bbde043b896f80f97f (diff)
downloadelfutils-5c4b56fbbc7427d32d2166a20be2aea1f4eb42fc.tar.gz
alt-bss.patch: adjust segment flags with .bss (for klcc binaries)
-rw-r--r--elfutils-0.147-alt-bss.patch15
-rw-r--r--elfutils.spec2
2 files changed, 17 insertions, 0 deletions
diff --git a/elfutils-0.147-alt-bss.patch b/elfutils-0.147-alt-bss.patch
new file mode 100644
index 00000000..57cc608f
--- /dev/null
+++ b/elfutils-0.147-alt-bss.patch
@@ -0,0 +1,15 @@
+http://lists.altlinux.org/pipermail/devel/2009-December/178481.html
+
+--- elfutils-0.147/src/elflint.c- 2010-05-26 09:54:09.445943897 +0400
++++ elfutils-0.147/src/elflint.c 2010-05-26 09:54:29.958035185 +0400
+@@ -3816,7 +3816,10 @@ section [%2zu] '%s' has not type NOBITS
+ section [%2zu] '%s' is executable in nonexecutable segment %d\n"),
+ cnt, section_name (ebl, cnt), pcnt);
+ }
++ }
+
++ if (shdr->sh_type != SHT_NOBITS || strcmp (scnname, ".bss") == 0)
++ {
+ if ((shdr->sh_flags & SHF_WRITE) != 0)
+ {
+ segment_flags[pcnt] |= PF_W;
diff --git a/elfutils.spec b/elfutils.spec
index 9ee862dc..8c774a80 100644
--- a/elfutils.spec
+++ b/elfutils.spec
@@ -15,6 +15,7 @@ Patch1: elfutils-0.147-rh-portability.patch
Patch2: elfutils-0.147-rh-robustify.patch
Patch3: elfutils-0.147-alt-findtextrel.patch
Patch4: elfutils-0.147-alt-osabi.patch
+Patch5: elfutils-0.147-alt-bss.patch
Requires: libelf = %version-%release
@@ -85,6 +86,7 @@ object file format, so you can see the different sections of an ELF file.
%patch2 -p1
%patch3 -p1
%patch4 -p1
+%patch5 -p1
# Remove flex-generated files.
rm libcpu/i386_lex.c src/ldlex.c