[PATCH] PR 28447: implement multiple parameters for .file on XCOFF
Mike Frysinger
vapier@gentoo.org
Fri Nov 26 17:47:32 GMT 2021
On 18 Oct 2021 11:37, CHIGOT, CLEMENT via Binutils wrote:
> On XCOFF, ".file" pseudo-op allows 3 extras parameters to provide
> additional information to AIX linker, or its debugger. These are
> stored in auxiliary entries of the C_FILE symbol.
>
> --- a/bfd/coffgen.c
> +++ b/bfd/coffgen.c
> @@ -2135,6 +2203,12 @@ coff_print_symbol (bfd *abfd,
> {
> case C_FILE:
> fprintf (file, "File ");
> + /* Add additional information if this isn't the filename
> + auxiliary entry. */
> + if (aux)
> + fprintf (file, "ftype %d fname \"%s\"",
> + auxp->u.auxent.x_file.x_ftype,
> + (char *) auxp->u.auxent.x_file.x_n.x_n.x_offset);
x_offset is a long and is not safe to directly cast to a pointer. on LLP64
sytems where sizeof(long) == 4 and sizeof(char*) == 8, this fails, and it's
causing a build failure as a result:
bfd/coffgen.c: In function ‘coff_print_symbol’:
bfd/coffgen.c:2221:30: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
2221 | (char *) auxp->u.auxent.x_file.x_n.x_n.x_offset);
| ^
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20211126/7603c816/attachment.sig>
More information about the Binutils
mailing list