Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Casper H.S. Dik <Casper.Dik@xxxxxxx>
- Date: 05 Apr 2006 10:26:59 GMT
"Henrik Goldman" <henrik_goldman@xxxxxxxxxxxx> writes:
The "kernel trap" is very slow and memcpy is faster and will make your
code
portable.
I understand that and it makes sense but right now I'm stuck with alot of
code that could take days to fix. Unfortunatly it's not a 2 minute patch in
my case since the code in question will also affect lots of other platforms
that I support. This requires alot of testing.
__asm__("ta 6");
at the beginning of main will workaround all your issues, albeit slowly.
I have a file which gets read into malloced memory. Then do a trick like:
if (((struct a*) m_ptr)->some_member == MAGIC_VAL)
Ah, you have a file based data structure. This too will explode.
Code like above probably will not work anymore, right? So in this case I
need to have extra temporary variables to extract the values in question. In
this case the value would be a 32 bit integer stored in an endian neutral
way, but it could also be any other primitive datatype or even an array. I
am not really sure how to go through all these cases since it takes quite a
bit of time to *think* about if a specific piece of code could be a problem
or not.
Quite; or you could have functions which extract integers at certain
locations.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
.
- Follow-Ups:
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- References:
- Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Paul Pluzhnikov
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Casper H . S . Dik
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Rainer Beushausen
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Casper H . S . Dik
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Casper H . S . Dik
- Re: Buggy /usr/ccs/bin/ld on Solaris 8
- From: Henrik Goldman
- Buggy /usr/ccs/bin/ld on Solaris 8
- Prev by Date: Re: Buggy /usr/ccs/bin/ld on Solaris 8
- Next by Date: upgrade sun 10 from 3/05 to 1/06
- Previous by thread: Re: Buggy /usr/ccs/bin/ld on Solaris 8
- Next by thread: Re: Buggy /usr/ccs/bin/ld on Solaris 8
- Index(es):
Relevant Pages
|