This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH,take3] Add plugin interface to LD, respun. [1..6/6]
On 13/10/2010 16:37, Dave Korn wrote:
> On 13/10/2010 05:38, H.J. Lu wrote:
>> On Tue, Oct 12, 2010 at 9:22 PM, Dave Korn <dave.korn.cygwin@gmail.com> wrote:
>>>> 368 case LDPT_ADD_INPUT_LIBRARY:
>>>> 369 case LDPT_SET_EXTRA_LIBRARY_PATH:
>>>> 370 TV_MESSAGE (LDPL_INFO, "func@0x%v\n",
>>>> 371 (bfd_vma)(tv->tv_u.tv_message));
>>>> 372 break;
>>> With 64-bit-bfd on a 32-bit host, bfd_vma is an unsigned long long (64-bit)
>>> int, and the tv_message is a 32-bit function pointer, so the warning is true,
>>> but it seems pretty useless to me. What's so bad about a cast that doesn't
>>> lose any data? It doesn't break the build because there's no -Werror in the
>>> test plugin's CFLAGS, and it's of no functional consequence, so I'm not sure
>>> whether to do anything about it.
>> You can cast pointer to uintptr_t/intptr_t first.
>
> That's not C90 though. I couldn't find it used anywhere else in
> bfd/binutils/gas/ld, only gold. I think that means I shouldn't use it.
I think the cleanest solution would be to add a "%p" type to
ldmisc.c/vfinfo(), and cast it to (void*) in the TV_MESSAGE call. I'll do that.
cheers,
DaveK
- References:
- [PATCH,take2] Add plugin interface to LD, respun. [1..6/6]
- Re: [PATCH,take2] Add plugin interface to LD, respun. [1..6/6]
- [PATCH,take3] Add plugin interface to LD, respun. [1..6/6]
- Re: [PATCH,take3] Add plugin interface to LD, respun. [1..6/6]
- Re: [PATCH,take3] Add plugin interface to LD, respun. [1..6/6]