This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc 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]

Re: mips64 n32 and n64 support in dl-machine.h


Alexandre Oliva <aoliva at redhat dot com> writes:

|> >> +	__builtin_memcpy (&reloc_value, reloc_addr, sizeof (reloc_value));
|> 
|> > Why is this line needed?  I don't understand the need for it.
|> 
|> To support mis-aligned relocations.  According to Ralf Baechle, we
|> must support them.  I had this in the ChangeLog, but somehow got rid
|> of it while cleaning up some duplication.

Then the use of memcpy won't help.  Since both the source and the
destination are pointers to ElfW(Addr) the compiler has the right to
assume that they are correctly aligned.  You have to explicitly tell the
compiler that the source can be an unaligned address.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab at suse dot de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]