elf_clone, strip on archives
by Roland McGrath
I'm really sure I understand the intent of elf_clone, and it does not have
comments that make anything any more clear. Solaris does not have this
interface. Is it your invention?
It is only used in strip, for the in-place case (without -o).
eu-strip on archives is completely broken. I'm not really sure what the
plan was. The patch below makes it stop crashing. But it produces
completely bogus output (it comes out with an ELF file header for some
reason, and I have no idea about the contents).
binutils strip on an archive actually makes a temporary directory, fills it
with stripped versions of the member files, then creates a fresh archive in
a temporary file, removes the directory, and renames the output file into
place. (It doesn't fork ar, but it almost might as well.)
I think we could reasonably easily do better than that, anyway. It's
probably easiest just to do it by supporting -o for archives, and making
the "in place" case (no -o) actually just work line -o to a temp file.
Modifying in place could work too, but it could entail a lot of copying
member contents around. We could keep the old long name table and so
forth, but each member gets shorter from stripping, so we both have to
write later members back earlier after shortening each earlier one, and
have to go back and update the symdef table offsets.
Thanks,
Roland
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 7bcc235..0000000 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,7 @@
+2009-08-05 Roland McGrath <roland(a)redhat.com>
+
+ * elf_clone.c: Chain onto the ELF->parent->state.ar.children list.
+
2009-07-26 Ulrich Drepper <drepper(a)redhat.com>
* elf.h: Update from glibc.
diff --git a/libelf/elf_clone.c b/libelf/elf_clone.c
index 8b699fa..0000000 100644
--- a/libelf/elf_clone.c
+++ b/libelf/elf_clone.c
@@ -1,5 +1,5 @@
/* Create clone of a given descriptor.
- Copyright (C) 2003, 2004 Red Hat, Inc.
+ Copyright (C) 2003, 2004, 2009 Red Hat, Inc.
This file is part of Red Hat elfutils.
Written by Ulrich Drepper <drepper(a)redhat.com>, 2003.
@@ -92,6 +92,14 @@ elf_clone (Elf *elf, Elf_Cmd cmd)
retval->state.elf32.scns.max = elf->state.elf32.scns.max;
retval->class = elf->class;
+
+ if (retval->parent != NULL)
+ {
+ /* Enlist this new descriptor in the list of children. */
+ assert (retval->parent->kind == ELF_K_AR);
+ retval->next = retval->parent->state.ar.children;
+ retval->parent->state.ar.children = retval;
+ }
}
/* Release the lock. */
14 years, 8 months
2009-08-04 Status
by Petr Machata
Last week
---------
Time spent on elfutils: 80%
That was all output (well except that readelf locale bit). We emit a
copy of DIE tree since the end of last week.
* References are all broken, DIE offset() is emitted directly instead
of being translated to DIE reference.
* All strings are inline.
* A lot of stuff is emitted as just zeroes.
* Endians are not taken care of at all.
... but it gives dwarflint/readelf something to chew on.
That's all on pmachata/dwarf-writer.
This week
---------
On Monday I was all dizzy and sickly and unable to concentrate, so after
spending several hours by fruitless poking into code I called it a sick
day and went home to sleep.
Today I've written the Elf_Data builder that you've described in your
Re: to my previous status report and adjusted the code to work with that.
Then I mistakenly committed dwarflint patch to dwarf branch instead of
writer branch. Used that opportunity to port all the dwarflint patches
that accumulated on writer branch over to dwarf branch.
My plan for the rest of this week:
* emit references correctly
* make all strings into strp. I.e. implement the stuff necessary to
emit strings off-section. Emit meaningful .debug_str.
* emit DW_AT_sibling
* I guess that won't busy me till Friday, but something will have
turned up by then.
PM
14 years, 8 months
elfutils status 2009-08-03
by Roland McGrath
Last week:
Time actually spent on elfutils: 60%
* 0.142 release
-> fedorahosted, rawhide, F-{10,11} updates-testing
* dwarf branch
** tracker/maker
-> done except for mutually recursive refs, formulated plan for that
This week:
Time expected to spend on elfutils: 60%
* dwarf
** maker with mutually recursive refs
** get emitters going/review pmachata work
** contemplate partial_unit generation
14 years, 9 months
[SPAM] Sex Tips, Idesa, Guidelines, and Sugggestions - Starting With O and P
by fluidised
Gnantly_]! THE WOMAN [_continuing_]--and why you are wandering here alone without a nurse. THE ELD
, of all things, stagnation; for from the moment I, Lilith, lose hope and faith in them,
Nimals; and they are dissatisfied because they cannot be bothered with their bodies! Foolishness, I call it. [_He disappears_]. LILITH. They have accepted the burden of eternal life. They have taken the agony from birth; and their life does not fail them even in the hour of their destruction. Their breasts are without milk: their bowels are gone: the very shapes of them are only ornaments for their children to admire and caress without understanding. Is this enough; or shall I labor again? Shall I bring forth something that will sweep them away and make an end of them as they have swept away the beasts of the garden, and made an end of the crawling things and the flying things and of all them that refuse to live for ever? I had patience with them for many ages: they tried me very sorely. They did
They are poison to me. BURGE-LUBIN. What possible objection can there be to their living Se of a man living 283 years, I advise you to take a few weeks at the seaside. BARNABAS. Let there be an end of this hinting that I am out of my mind. Come and look at the cinema record. I tell you this man is Archbishop Haslam, Archbishop Stickit, President Dickenson, General Bullyboy and himself into the bargain;
all five of them. THE ARCHBISHOP. I do not deny it. I never have denied it Nobody has ever asked me. BURGE-LUBIN. But damn it, man--I beg your pardon, Archbishop; but really, really-- THE ARCHBISHOP. Dont mention it. What
ed in p [cid:08375f432b676720090801051939]
Us sham good fellowship our democratic public men get up for shop use. He pretends to believe me, and assures me his visit is quite disinterested; but why should he come if he has no axe to grind? These chaps never believe anything they say themselves; and naturally they cannot believe anything anyone else says. CONRAD [_rising_] Well, I shall clear out. It was hard enou who--unworthily perhaps, but not quite unsuccessf
rten th
14 years, 9 months