[RFC][PATCH 21/22] Add Makerules to build %.o and %.os from %.i8
Joseph Myers
joseph@codesourcery.com
Wed Oct 21 12:06:00 GMT 2015
On Wed, 21 Oct 2015, Gary Benson wrote:
> > On some platforms, even assembler files with no actual code need to
> > contain certain assembler directives to be ABI-compatible with those
> > generated by the compiler. In particular, this applies to ARM; see
> > the .eabi_attribute directives in sysdeps/arm/sysdep.h. If
> > generating a .S file, you should make sure it includes <sysdep.h> so
> > that such directives are present.
>
> I did not know that. Is this because all glibc files include this
> file with the directives?
Almost all .S files include <sysdep.h> to use its macros for defining
functions etc. - and where they do not, special measures are needed on ARM
(see sysdeps/arm/abi-note.S adding these attributes and then including
csu/abi-note.S). Including <sysdep.h> in generated .S files is the
simplest way of ensuring such directives are present when required.
> (I guess what I'm asking is, in general, if I have a .c file and a
> .S file with no special directives, can I compile and link them and
> expect it to work?)
Not without these directives on ARM.
> For glibc is it ok if I add '-include sysdep.h' to the %.S -> %.o*
> rules?
I think that should work for these Infinity-generated files.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list