This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: don't assume reloc_addr passed to elf_machine_rel* is aligned
- From: Roland McGrath <roland at redhat dot com>
- To: Alexandre Oliva <aoliva at redhat dot com>
- Cc: Daniel Jacobowitz <drow at mvista dot com>, Andreas Jaeger <aj at suse dot de>,libc-alpha at sources dot redhat dot com
- Date: Tue, 24 Jun 2003 15:27:07 -0700
- Subject: Re: don't assume reloc_addr passed to elf_machine_rel* is aligned
I took another look at this patch. While I think it is probably ok, it
seems cleaner not to use the trailing _ variable name and temporary
variable--instead just have each store use an explicit cast (unless there
is an architecture where all the stores in elf_machine_rel* are in fact
through the same type). I don't know the new aliasing rules off hand, but
I imagine the code as you've left it might still have some not fully kosher
casts on other platforms where the compiler's optimizations don't happen to
break anything now but future compilers might. Or is that danger removed
by going through a void * stage? Anyway, it's a bit unsightly and it's not
so hard to modify each machine's file that it can't be made prettier.
Thanks,
Roland