These flags match the meaning and value of flags in Linux, though
Linux has many more flags.
Details
- Reviewers
stevek mmel - Commits
- rS323580: Add AT_HWCAP flags for VFP settings for FreeBSD/arm.
This is part of a patch series used to test using VFP registers in
gdb on armv7.
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/arm/arm/vfp.c | ||
---|---|---|
120 ↗ | (On Diff #32847) | Instead of specifically tying this to the elf handling code, why not have a variable in the arch-specific files (machdep.c maybe?) that the elf code will reference? Consider a possible future of both 32-bit and 64-bit ARM programs running on aarch64 system. |
sys/arm/arm/vfp.c | ||
---|---|---|
120 ↗ | (On Diff #32847) | There are separate elf32_hwcap and elf64_hwcap variables on platforms that support both in case they have different layouts / meanings (I think we should probably try to match Linux's meaning on each architecture when possible). I imagine that we would be setting elf64_hwcap to appropriate values in sys/arm64/arm64/vfp.c along with setting elf32_hwcap under #ifdef COMPAT_FREEBSD32. Alternatively if architectures are known to be the same, then the 64-bit code could just set elf64_hwcap in places and later use a SYSINIT further along in boot that copies the value to elf32_hwcap. |
sys/arm/include/elf.h | ||
---|---|---|
122 ↗ | (On Diff #32847) | These names differ from the ones linux uses by having _ARM in the middle of them. I think that implies that every port that tries to do runtime feature detection will need patching. Given that they're defined in an MD header, I'm not sure the _ARM is necessary. Hmm, we'll probably never escape some need to patch ports, because the linux header file that declares all this stuff is linux/auxvec.h and we'll never have one of those. |
sys/arm/include/elf.h | ||
---|---|---|
122 ↗ | (On Diff #32847) | Hmm, I thought I had seen them with _ARM_ somewhere (maybe in binutils) but now I can't find them. I'm happy to drop the _ARM_ bit from the name. |
sys/arm/include/elf.h | ||
---|---|---|
122 ↗ | (On Diff #32847) | I had also thought about possibly defining these in elf_common.h instead, but it's probably fine to just leave them here. |