System V Application Binary Interface
Linux Extensions
Version 0.1
Edited by
H.J. Lu1
September 18, 2018
.note.gnu.property
The program property array
Each array element represents one program property with type, data size and data.
In 64-bit objects, each element is an array of 8-byte integers in the format of the
target processor. In 32-bit objects, each element is an array of 4-byte integers in
the format of the target processor. An array element has the following structure:
typedef struct {
Elf_Word pr_type;
Elf_Word pr_datasz;
unsigned char pr_data[PR_DATASZ];
unsigned char pr_padding[PR_PADDING];
} Elf_Prop;
pr_type The type of program property. A 4-byte integer in the format of the
target processor.
pr_datasz The size of the pr_data field. A 4-byte integer in the format of the
target processor.
pr_data The program property descriptor which is aligned to 4 bytes in 32-bit
objects and 8 bytes in 64-bit objects.
pr_padding The padding. If necessary, it aligns the array element to 8 or 4-byte
alignment (depending on whether the file is a 64-bit or 32-bit object).
PR_DATASZ The value in the pr_datasz field. A constant.
PR_PADDING The size of the pr_padding field. A constant.

According to the documentation that you posted:
pr_datasz The size of the pr_data field. A 4-byte integer in the format of the target processor.
pr_data The program property descriptor which is aligned to 4 bytes in 32-bit objects and 8 bytes in 64-bit objects.

Line 576 emits WordSize bytes of data (which seems to be 8 bytes for x86-64), so why do you emit '4' for pr_datasz value?

hi vzakhari
The '4' for pr_datasz value will is fixed in the new ABI SPEC which will be modify by the reviewer hjl.tools, In fact, pr_datasz is already fixed 4 in GCC.
I have discussed this data with Hongjiu Lu who maintain the System V Application Binary Interface.

OutStreamer->EmitIntValue(FeatureFlagsAnd, WordSize); // data
Yes, here the WordSize this should change to 4 too, it will have problem in big-end system.