aboutsummaryrefslogtreecommitdiffstats
path: root/trunk/src/undo.c
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2010-07-22 18:58:28 -0500
committerMark Hatle <mark.hatle@windriver.com>2010-07-22 18:58:28 -0500
commit45f3e0e99fc1f0385ef2fa5f8c5fd126edb1805c (patch)
tree1bd69ffa9f93f975f72003b820d0787acb645155 /trunk/src/undo.c
parent1c973105e4bad9e31f0096fd6baa41e772d17484 (diff)
parentac2eeba55196424954b58cf540c44e42bc2774dc (diff)
downloadprelink-cross-45f3e0e99fc1f0385ef2fa5f8c5fd126edb1805c.tar.gz
prelink-cross-45f3e0e99fc1f0385ef2fa5f8c5fd126edb1805c.tar.bz2
prelink-cross-45f3e0e99fc1f0385ef2fa5f8c5fd126edb1805c.zip
Merge commit 'ac2eeba55196424954b58cf540c44e42bc2774dc' into cross_prelink
Conflicts: trunk/src/dso.c trunk/testsuite/reloc8.sh trunk/testsuite/reloc9.sh
Diffstat (limited to 'trunk/src/undo.c')
-rw-r--r--trunk/src/undo.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/trunk/src/undo.c b/trunk/src/undo.c
index f9b0bd3..4d1332c 100644
--- a/trunk/src/undo.c
+++ b/trunk/src/undo.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2005 Red Hat, Inc.
+/* Copyright (C) 2001, 2002, 2003, 2005, 2010 Red Hat, Inc.
Written by Jakub Jelinek <jakub@redhat.com>, 2001.
This program is free software; you can redistribute it and/or modify
@@ -406,7 +406,7 @@ undo_sections (DSO *dso, int undo, struct section_move *move,
if (! strcmp (name, ".bss")
|| ! strcmp (name, ".sbss")
- || (! strcmp (name, ".plt")
+ || ((! strcmp (name, ".plt") || ! strcmp (name, ".iplt"))
&& dso->shdr[i].sh_type == SHT_PROGBITS))
{
int is_plt = ! strcmp (name, ".plt");
@@ -500,7 +500,8 @@ prelink_undo (DSO *dso)
if (undo == dso->ehdr.e_shnum)
{
if (undo_output)
- return reopen_dso (dso, NULL, undo_output);
+ return reopen_dso (dso, NULL, strcmp (undo_output, "-") == 0
+ ? "/tmp/undo" : undo_output);
error (0, 0, "%s does not have .gnu.prelink_undo section", dso->filename);
return 1;
}
@@ -516,7 +517,8 @@ prelink_undo (DSO *dso)
if (undo_sections (dso, undo, move, &rinfo, &ehdr, phdr, shdr))
goto error_out;
- if (reopen_dso (dso, move, undo_output))
+ if (reopen_dso (dso, move, (undo_output && strcmp (undo_output, "-") == 0)
+ ? "/tmp/undo" : undo_output))
goto error_out;
if (find_reloc_sections (dso, &rinfo))
@@ -621,7 +623,8 @@ prelink_undo (DSO *dso)
{
assert (strcmp (name, ".bss") == 0
|| strcmp (name, ".sbss") == 0
- || strcmp (name, ".plt") == 0);
+ || strcmp (name, ".plt") == 0
+ || strcmp (name, ".iplt") == 0);
scn = dso->scn[i];
d = elf_getdata (scn, NULL);
assert (d != NULL && elf_getdata (scn, d) == NULL);