H.J. Lu via llvm-dev
2021-Jan-13 17:06 UTC
[llvm-dev] RFC: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX
1. GNU_PROPERTY_UINT32_AND_LO..GNU_PROPERTY_UINT32_AND_HI #define GNU_PROPERTY_UINT32_AND_LO 0xb0000000 #define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff A bit in the output pr_data field is set only if it is set in all relocatable input pr_data fields. If all bits in the the output pr_data field are zero, this property should be removed from output. If the bit is 1, all input relocatables have the feature. If the bit is 0 or the property is missing, the info is unknown. 2. GNU_PROPERTY_UINT32_OR_LO..GNU_PROPERTY_UINT32_OR_HI #define GNU_PROPERTY_UINT32_OR_LO 0xb0008000 #define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff A bit in the output pr_data field is set if it is set in any relocatable input pr_data fields. If all bits in the the output pr_data field are zero, this property should be removed from output. If the bit is 1, some input relocatables have the feature. If the bit is 0 or the property is missing, the info is unknown. The PDF is at https://gitlab.com/x86-psABIs/Linux-ABI/-/wikis/uploads/0690db0a3b7e5d8a44e0271a4be54aa7/linux-gABI-and-or-2021-01-13.pdf -- H.J.
H.J. Lu via llvm-dev
2021-Jan-21 15:02 UTC
[llvm-dev] RFC: Add GNU_PROPERTY_UINT32_AND_XXX/GNU_PROPERTY_UINT32_OR_XXX
On Wed, Jan 13, 2021 at 9:06 AM H.J. Lu <hjl.tools at gmail.com> wrote:> > 1. GNU_PROPERTY_UINT32_AND_LO..GNU_PROPERTY_UINT32_AND_HI > > #define GNU_PROPERTY_UINT32_AND_LO 0xb0000000 > #define GNU_PROPERTY_UINT32_AND_HI 0xb0007fff > > A bit in the output pr_data field is set only if it is set in all > relocatable input pr_data fields. If all bits in the the output > pr_data field are zero, this property should be removed from output. > > If the bit is 1, all input relocatables have the feature. If the > bit is 0 or the property is missing, the info is unknown. > > 2. GNU_PROPERTY_UINT32_OR_LO..GNU_PROPERTY_UINT32_OR_HI > > #define GNU_PROPERTY_UINT32_OR_LO 0xb0008000 > #define GNU_PROPERTY_UINT32_OR_HI 0xb000ffff > > A bit in the output pr_data field is set if it is set in any > relocatable input pr_data fields. If all bits in the the output > pr_data field are zero, this property should be removed from output. > > If the bit is 1, some input relocatables have the feature. If the > bit is 0 or the property is missing, the info is unknown. > > The PDF is at > > https://gitlab.com/x86-psABIs/Linux-ABI/-/wikis/uploads/0690db0a3b7e5d8a44e0271a4be54aa7/linux-gABI-and-or-2021-01-13.pdf > > -- > H.J.Here is the binutils patch to implement it. -- H.J. -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-elf-Add-GNU_PROPERTY_UINT32_AND_XXX-GNU_PROPERTY_UIN.patch Type: text/x-patch Size: 17740 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210121/6f2ac4ea/attachment.bin>
Add GNU_PROPERTY_1_NEEDED: #define GNU_PROPERTY_1_NEEDED GNU_PROPERTY_UINT32_OR_LO to indicate the needed properties by the object file. Add GNU_PROPERTY_1_NEEDED_SINGLE_GLOBAL_DEFINITION: #define GNU_PROPERTY_1_NEEDED_SINGLE_GLOBAL_DEFINITION (1U << 0) to indicate that the object file requires canonical function pointers and cannot be used with copy relocation. The PDF file is at https://gitlab.com/x86-psABIs/Linux-ABI/-/wikis/uploads/9eca2f2defe62b0c5015bf2e3e8a9f05/Linux-gABI-1_needed-2021-06-18.pdf -- H.J.