* Change an object file without explicit copying
@ 2002-07-07 2:07 André Hauser
2002-07-07 12:45 ` H. J. Lu
0 siblings, 1 reply; 3+ messages in thread
From: André Hauser @ 2002-07-07 2:07 UTC (permalink / raw)
To: binutils
Dear forum,
I want to use bfd to update an existing ELF file, i.e. open a bfd,
perform some changes and save the file afterwards.
Is there a way of doing this without copying the source file? I found
only the two functions bfd_openw() and bfd_openr() for creating a new
resp. opening a bfd; calling bfd_make_writable() in conjunction with
bfd_openr() did not work, my object file wasn't updated after closing
the bfd.
Thank you for your response
Andre
--
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Change an object file without explicit copying
2002-07-07 2:07 Change an object file without explicit copying André Hauser
@ 2002-07-07 12:45 ` H. J. Lu
0 siblings, 0 replies; 3+ messages in thread
From: H. J. Lu @ 2002-07-07 12:45 UTC (permalink / raw)
To: André Hauser; +Cc: binutils
On Sun, Jul 07, 2002 at 08:00:55AM +0200, André Hauser wrote:
> Dear forum,
> I want to use bfd to update an existing ELF file, i.e. open a bfd,
> perform some changes and save the file afterwards.
> Is there a way of doing this without copying the source file? I found
> only the two functions bfd_openw() and bfd_openr() for creating a new
> resp. opening a bfd; calling bfd_make_writable() in conjunction with
> bfd_openr() did not work, my object file wasn't updated after closing
> the bfd.
>
Have you tried libelf?
H.J.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Change an object file without explicit copying
@ 2002-07-10 3:09 andre_hauser
0 siblings, 0 replies; 3+ messages in thread
From: andre_hauser @ 2002-07-10 3:09 UTC (permalink / raw)
To: hjl; +Cc: binutils
Hi H.J.,
I am using bfd because I need its functionality for performing relocations;
that's why I can't change to libelf.
In my actual program, a bfd(1) is opened for reading an ELF file and copied
to a bfd(2) created with bfd_openw() (some of the object's details are being
modified while doing this).
Then I close this recently created bfd(2) and copy it byte by byte
(i.e. without using bfd) to another file(3), which serves as destination
for its original file(2)'s relocated sections' contents.
I would be happy if I could open bfd(1) for changing, make a copy of it and then perform
the relocation with these two objects resp. files.
Greetings André
> -----Original Message-----
> From: H. J. Lu [mailto:hjl@lucon.org]
> Sent: Sunday, July 07, 2002 4:36 PM
> To: André Hauser
> Cc: binutils@sources.redhat.com
> Subject: Re: Change an object file without explicit copying
>
>
> On Sun, Jul 07, 2002 at 08:00:55AM +0200, André Hauser wrote:
> > Dear forum,
> > I want to use bfd to update an existing ELF file, i.e. open a bfd,
> > perform some changes and save the file afterwards.
> > Is there a way of doing this without copying the source
> file? I found
> > only the two functions bfd_openw() and bfd_openr() for
> creating a new
> > resp. opening a bfd; calling bfd_make_writable() in conjunction with
> > bfd_openr() did not work, my object file wasn't updated
> after closing
> > the bfd.
> >
>
> Have you tried libelf?
>
> H.J.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-07-10 8:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-07 2:07 Change an object file without explicit copying André Hauser
2002-07-07 12:45 ` H. J. Lu
2002-07-10 3:09 andre_hauser
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).