Re: editing ELF file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



First at the hardware level:   AMD64 has a few mode, among them pure
64-bit, pure 32bit, mixed 64-32-bit, and etc.   So theoretically at
the assembly level, u can still run 32bit assembly a 64-bit CPU.

2nd, at the software level (essentially:  it is possible to run 32bit
in 64bit environment.....done by the different distros as below):

http://www.redhat.com/magazine/009jul05/features/multilib/
http://www.debian-administration.org/articles/534
http://www-uxsup.csx.cam.ac.uk/pub/doc/suse/suse9.2/suselinux-adminguide_en/ch06.html
http://www.scribd.com/doc/363677/Benchmarks-AMD64-in-32bit-mode-vs-64bit-mode-Ubuntu
https://help.ubuntu.com/community/32bit_and_64bit

How all these work (*I think*) is basically having a 64-bit shell
(windows is called WOW64 http://en.wikipedia.org/wiki/WOW64) that can
switch to 32 bit mode to run the program, and therefore everything
inside that process are running at 32bit, and vice versa.   Some
binary-only applications (like Flash) may not have 64-bit version, and
therefore the browser have to be 32bit.

But all kernel modules/kernel development (*I think*) must be done in
a 64bit environment....unless there exists a 32bit kernel wrapper in
64bit kernel which i am not aware of.

I suspect I may have misunderstood u...in view of what is written
above please elaborate your requirements????

On Tue, May 6, 2008 at 2:14 AM, tejas khatiwala <socretez@xxxxxxxxx> wrote:
> Hello,
>
> This is not exactly relevant to Linux kernel but I'm gonna ask any way.
>
> Is there any way I can modify a 64-bit ELF object file to make it look like
> 32-bit ELF object file and link it (using `ld`) with 32-bit ELF file?
>
> I tried libelf but was unsuccessful. I had this pretty link
> http://people.freebsd.org/~jkoshy/download/libelf/article.html from Freebsd
> website and it seems like the libelf library on Freebsd system is not
> similar to that on Linux system as it complained for "vis.h" headerfile and
> few library calls such as `elf_setshstrndx()`
>
> Any suggestions?
>
> Thanks :-)
>
> /tejas
>



-- 
Regards,
Peter Teoh

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux