This is the mail archive of the mailing list for the Cygwin 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: [PATCH] exclude runtime-pseudo-reloc symbols from auto-export

> >What about putting such symbols in another named text section, so that
> >ld would ignore them ?
> I don't see how you could do that since the symbol is associated with an
> existing place in memory.  We could put the whole function in a
> different segment

I had in mind something like this
#define NO_EXPORT_TEXT __attribute__((section(".text_no_export")))
#define NO_EXPORT_DATA __attribute__((section(".data_no_export")))
but this need some additional efforts in the ld source.

> but that's not the kind of solution I was thinking of.
> I was thinking that there might be an unused attribute that could be
> pressed into service as a "don't auto export" (doesn't linux/elf have
> something like this?) or that there was a way to name the symbol in some
> way that wasn't easily available from a C program, like putting a "." in
> the name with an asm alias.

The weak attribute does not have any effect for at least gcc version 2.95.3-5
(cygwin special) and I can't see any other attribute, which could be used from

Perhaps somebody else could see something usefull or the gcc could be patched to
uses the weak attribute ???


Unsubscribe info:
Bug reporting:

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