s390(x) ELF ABI issue: calling convention for function pointer arguments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lsb |
In Progress
|
Medium
|
Unassigned | ||
Mandriva |
In Progress
|
Low
|
Bug Description
Both the S/390 and zSeries ELF ABI specification contain incorrect text
describing the calling convention with regard to arguments of function pointer
type.
In section "Parameter passing", both documents provide a description of an
algorithm to determine how to pass arguments of certain types. This algorithm
contains the lines:
A SIMPLE_ARG is one of the following:
[...]
* A pointer to an object of any type.
[...]
If read according to a strict interpretation of the terms according to the C
standard, "a pointer to an object of any type" does not include function
pointers, so those would not be covered by the SIMPLE_ARG rule (and thus passed
on the stack instead of in general purpose registers).
This is incorrect. The intent has always been that function pointers are
passed as argument in the same fashion as object pointers (in general purpose
registers), and all existing implementations do it that way.
I'd suggest the specification be brought in line with the original intent and
outstanding implementations by changing the line:
A pointer to an object of any type.
to
Any pointer type.
Changed in mandriva: | |
importance: | Unknown → Low |
status: | Unknown → In Progress |