Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arm soft/hard float detection #920

Closed
croudet opened this issue Feb 5, 2018 · 2 comments
Closed

arm soft/hard float detection #920

croudet opened this issue Feb 5, 2018 · 2 comments

Comments

@croudet
Copy link

croudet commented Feb 5, 2018

  • jna v4.5.1
  • armv7l 32
  • ubuntu based linux (nvidia tk1)
  • jdk-8u162-linux-arm32-vfp-hflt
    readelf -h ./jdk1.8.0_162/bin/java
    ELF Header:
    Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
    Class: ELF32
    Data: 2's complement, little endian
    Version: 1 (current)
    OS/ABI: UNIX - System V
    ABI Version: 0
    Type: EXEC (Executable file)
    Machine: ARM
    Version: 0x1
    Entry point address: 0x8484
    Start of program headers: 52 (bytes into file)
    Start of section headers: 2388 (bytes into file)
    Flags: 0x5000002, has entry point, Version5 EABI
    Size of this header: 52 (bytes)
    Size of program headers: 32 (bytes)
    Number of program headers: 8
    Size of section headers: 40 (bytes)
    Number of section headers: 31
    Section header string table index: 28
  • related to Investigate supporting arm soft- and hardfloat #753

Arm soft/hard float detection does not work because the java exe (ELF header) does not contain the required flags.
In version 4.5.0 ElfAnalyser returned false for both soft and hard float and by luck, the hard float lib was chosen.
In 4.5.1 the detection has slightly changed and now the soft float flag is set to true.

I wonder if a system property can be added (e.g: jna.arm.hardfloat=true) to set the hard/soft flag and to disable runtime detection.

Thanks

@matthiasblaesing
Copy link
Member

The reason this was switched is here:

#863

The reasoning is sound from my POV - the ELF ABI is pretty clear in my interpretation: No marker == soft float.

If you know that you are on linux and hardfloat, then you can override detection by setting the system property jna.prefix to linux-arm, if you know you are on linux with softfloat calling conventions set jna.prefix to linux-armel.

Please - for questions use the google group!

@matthiasblaesing
Copy link
Member

I'll assume this was the correct answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants