This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Pad SEC_MERGE sections to entsize boundary in gas
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Jakub Jelinek wrote:
>
>>gcc should emit the padding word, too.
>
>
> Yeah, I already told Alan in private I'm going to look at gcc today.
> But IMHO gas can do this too, if not for something else than for
> compatibility with gcc 3.[12].
I agree that gas should notice it. It just might not be enough. Some
4-byte aligned 16-byte value could be added (by the user) to the section.
.align 16
.word 0, 1, 2 <--- from the double
.align 4
.word 3,4,5,6 <--- the other object added
Now what? To prevent such errors gas should only add the padding itself
if no "object" has been added to the section which is not 16-byte
aligned. Otherwise gas should fail with an error.
I don't know whether it's worth spending that much effort on it.
Ideally I'd like to see having size % shentsize != 0 being an error all
the time. But this has the compatibility problems.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE94gOS2ijCOnn/RHQRAj1/AJ9V8IBtvDoHmXYoAPv4HjKQqYjMAACfbnkI
OBVKeStyXgazzjZ7/NVqmEw=
=OWE4
-----END PGP SIGNATURE-----