Re: Embedding ELFs, Using objcopy and/or xdd

2008-11-20 Thread Nick Clifton

Hi mondialeeer,


I am currently trying to embed an ELF into a larger ELF that will manage this
ELF (boostrap it and execute it).


Do you know about the ".incbin" assembler pseudo op which allows you to 
insert an arbitrary file into a section ?  You could use this to embed 
your small ELF executable into the large ELF executable with symbols 
defined exactly where you want them.


Extra information is inserted when trying to embed an ELF into a larger ELF. 
This extra info makes the "start" and "end" labels useless


What "start" and "end" labels are you talking about ?

 if code in the

larger ELF would like to jump to the beginning of the code section in the
embedded ELF.

For instance:

xdd -i small_elf.o small_elf.c


Note - xdd is not a binutils program so we cannot offer you any help 
with using it.



Is this extra information the binary encoded symbol table of the ELF?


No idea.  It is probably the ELF header information though.  You should 
have a look at the ELF standard and read up about the format of the header.


Cheers
  Nick




___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/7041] New: ld -pie on a final executable fails to report undefined symbols

2008-11-20 Thread bje at sources dot redhat dot com
The powerpc64-linux linker does not report undefined symbols when there are some
present.  Tiny test case:

.text
bl .foo

% as -a64 foo.s -o foo.o
% ld -pie foo.o -o foo.x

(No linker error is produced.)

-- 
   Summary: ld -pie on a final executable fails to report undefined
symbols
   Product: binutils
   Version: 2.20 (HEAD)
Status: NEW
  Severity: normal
  Priority: P1
 Component: ld
AssignedTo: amodra at bigpond dot net dot au
ReportedBy: bje at sources dot redhat dot com
CC: bug-binutils at gnu dot org,paulus at samba dot org
  GCC host triplet: powerpc64-linux


http://sourceware.org/bugzilla/show_bug.cgi?id=7041

--- You are receiving this mail because: ---
You are on the CC list for the bug, or are watching someone who is.


___
bug-binutils mailing list
bug-binutils@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-binutils