• Show log

    Commit

  • Hash : 5ceddf40
    Author : Bill Roberts
    Date : 2025-02-20T04:25:21

    aarch64: add PAC to GNU Notes (#882)
    
    While PAC was enabled, the bit to indicate support in the GNU Notes
    section of the ELF was missing.
    
    Before:
    readelf -n ./aarch64-unknown-linux-gnu/.libs/libffi.so
    
    Displaying notes found in: .note.gnu.property
      Owner                Data size 	Description
      GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
          Properties: AArch64 feature: BTI
    
    This was caused by this file not having PAC indicated in GNU Notes and
    the linker discarding it:
    File: ./aarch64-unknown-linux-gnu/src/aarch64/sysv.o
    
    Displaying notes found in: .note.gnu.property
      Owner                Data size        Description
      GNU                  0x00000010       NT_GNU_PROPERTY_TYPE_0
          Properties: AArch64 feature: BTI
    
    Now it has it:
    File: ./aarch64-unknown-linux-gnu/src/aarch64/sysv.o
    
    Displaying notes found in: .note.gnu.property
      Owner                Data size        Description
      GNU                  0x00000010       NT_GNU_PROPERTY_TYPE_0
          Properties: AArch64 feature: BTI, PAC
    
    As well as the output shared object:
    readelf -n ./aarch64-unknown-linux-gnu/.libs/libffi.so
    
    Displaying notes found in: .note.gnu.property
      Owner                Data size 	Description
      GNU                  0x00000010	NT_GNU_PROPERTY_TYPE_0
          Properties: AArch64 feature: BTI, PAC
    
    Fixes: #881
    
    Signed-off-by: Bill Roberts <bill.roberts@arm.com>