[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [microblaze-uclinux] abi change
Hi Edgar,
On Thu, Jun 11, 2009 at 9:00 AM, Edgar E.
Iglesias<edgar.iglesias@xxxxxxxxx> wrote:
> Since the ABI was recently changed for stat, I was curios if there
> is a way to tell executable apart, maybe by some ELF flag or
> something?
We've not implemented anything like that, and to be honest I don't
know enough about the ELF format to say how feasible it would be to
automatically tag ELF files in that way.
And, there is the question, what can you do with it? If the ELF
loader detects an app built against old stat.h, refuse to load it?
We've basically worked on the premise that the upstream 2.6.30 and
beyond is a new architecture port, and taken a clean slate regarding
the ABI. We expect the people will rebuild their apps and libs when
they make the transition, rather than looking for any sort of binary
compatability.
If you have any ideas on how this might be achieved and why it would
be useful, please let us know!
> Also, is there someway to tell from an ELF executable what parts
> of the microblaze ISA it needs (barrel, pcmp etc) by lookin at
> the ELF file?
Well you could do an objdump -S and grep for the relevant opcodes, but
I suspect you are meaning a run time approach on the microblaze?
Otherwise it may be possible to add a debug / info section to the ELF
files and put some representation of the ISA-specific CFLAGS in there
- I'm not an ELF/binutils expert so I'm not sure the best way that
would be achieved.
This might be helpful because the ELF loader could potentially check
these flags and cross-reference against /proc/cpuinfo, torefuse to
load a binary that requires more CPU features than are currently
configured. Maybe better than just erroring out with an invalid
opcode exception.
You might also argue a better approach would be to trap and emulate
the unsupported instruction. That's part of the challenge - the right
behavior really depends on what you want.
Regards,
John
--
John Williams, PhD, B.Eng, B.IT
PetaLogix - Linux Solutions for a Reconfigurable World
w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/