This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
>>> >+ int pr_fpvalid; /* True if math copro being used. */ >>> >+#if __WORDSIZE == 32 >>> >+ char pad[4]; >>> >+#endif >>> >+ }; >> >> This is wrong. There should be no pad. Please properly copy the >> 64-bit elf_prstatus. >> > > Without this pad, the size of 'struct elf_prstatus64' on 32-bit(332) is not equal to the size of 'struct elf_prstatus' on 64-bit(336). IIUC, the goal of defining 'elf_prstatus64' is to emulate 64-bit 'elf_prstatus' on 32-bit machine. The field 'pad' is for tail padding, as the size of this struct should be multiple of 8.
It won't work for x32.
elf_x86_64_write_core_note (....)
{
switch (note_type)
case NT_PRPSINFO:
if (bed->s->elfclass == ELFCLASS32)
{
prpsinfo32_t data; <--- [3]
}
else
{
prpsinfo64_t data; <---- [1]
}
case NT_PRSTATUS:
if (bed->s->elfclass == ELFCLASS32)
{
if (bed->elf_machine_code == EM_X86_64)
{
prstatusx32_t prstat; <--- [4]
}
else
{
prstatus32_t prstat;
}
}
else
{
prstatus64_t prstat; <--- [2]
}
}
}-- Yao
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |