This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Accessing HWCAP on PowerPC?


Steve Munroe wrote:

idr@us.ltcfwd.linux.ibm.com wrote on 10/12/2004 05:25:52 PM:

I was directed here by benh.  I really hope someone here has an answer
as I've spent a couple hours searching around the web and the glibc
2.3.3 source.  Simply, how do I access AT_HWCAP from a library (i.e.,
can't get the auxvec passed to main)?

I tried just accessing _dl_hwcap, but the link fails.  Do I just need
some "decorations" on the extern?  Am I barking up the right tree?

_dl_hwcap is marked private so is not accessible outside of glibc.

I suspected it was something like that. When I found that variable, I was pretty sure the leading _ was sign that it wasn't going to be exported.


The Aux Vector is passed to main as the 4th parm.

What I'm trying to do is dynamically detect things like VMX to selected optimized routines at run-time in libGL and layered DRI drivers. Parameters passed to main do me no good. :( I'm currently examining /proc/<pid>/auxv to get the information, but that's specific to 2.6.x Linux kernels. I'd prefer a solution that will run on 2.4 kernels or BSD.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]