Mark all functions and symbols that LTO must not break
This commit is contained in:
parent
f8396be4ce
commit
7a4d23b8af
@ -1864,14 +1864,14 @@ InitFonts()
|
||||
}
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
int
|
||||
GetDefaultPointSize()
|
||||
{
|
||||
return 120;
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
FontResolutionPtr
|
||||
GetClientResolutions(int *num)
|
||||
{
|
||||
@ -1911,7 +1911,7 @@ GetClientResolutions(int *num)
|
||||
* should be called (only once!) by each type of fpe when initialized
|
||||
*/
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
int
|
||||
RegisterFPEFunctions(NameCheckFunc name_func,
|
||||
InitFpeFunc init_func,
|
||||
@ -1981,28 +1981,28 @@ find_old_font(XID id)
|
||||
SecurityUnknownAccess);
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
Font
|
||||
GetNewFontClientID()
|
||||
{
|
||||
return FakeClientID(0);
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
int
|
||||
StoreFontClientFont(FontPtr pfont, Font id)
|
||||
{
|
||||
return AddResource(id, RT_NONE, (pointer) pfont);
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
void
|
||||
DeleteFontClientID(Font id)
|
||||
{
|
||||
FreeResource(id, RT_NONE);
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
int
|
||||
client_auth_generation(ClientPtr client)
|
||||
{
|
||||
@ -2013,7 +2013,7 @@ static int fs_handlers_installed = 0;
|
||||
|
||||
static unsigned int last_server_gen;
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
int
|
||||
init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
|
||||
{
|
||||
@ -2034,7 +2034,7 @@ init_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler)
|
||||
return Successful;
|
||||
}
|
||||
|
||||
_X_EXPORT
|
||||
_X_EXPORT XFONT_LTO
|
||||
void
|
||||
remove_fs_handlers(FontPathElementPtr fpe, BlockHandlerProcPtr block_handler,
|
||||
Bool all)
|
||||
|
@ -80,7 +80,7 @@ PtrCtrl defaultPointerControl = {
|
||||
};
|
||||
|
||||
_X_EXPORT ClientPtr clients[MAXCLIENTS];
|
||||
_X_EXPORT ClientPtr serverClient;
|
||||
_X_EXPORT XFONT_LTO_VAR ClientPtr serverClient;
|
||||
_X_EXPORT int currentMaxClients; /* current size of clients array */
|
||||
|
||||
_X_EXPORT long maxBigRequestSize = MAX_BIG_REQUEST_SIZE;
|
||||
@ -89,7 +89,7 @@ _X_EXPORT WindowPtr WindowTable[MAXSCREENS];
|
||||
|
||||
_X_EXPORT unsigned long globalSerialNumber = 0;
|
||||
|
||||
_X_EXPORT unsigned long serverGeneration = 0;
|
||||
_X_EXPORT XFONT_LTO_VAR unsigned long serverGeneration = 0;
|
||||
|
||||
/* these next four are initialized in main.c */
|
||||
_X_EXPORT CARD32 ScreenSaverTime;
|
||||
|
@ -401,7 +401,7 @@ Bool ClientSleep(
|
||||
|
||||
#ifndef ___CLIENTSIGNAL_DEFINED___
|
||||
#define ___CLIENTSIGNAL_DEFINED___
|
||||
Bool ClientSignal(
|
||||
Bool XFONT_LTO ClientSignal(
|
||||
ClientPtr /*client*/);
|
||||
#endif /* ___CLIENTSIGNAL_DEFINED___ */
|
||||
|
||||
@ -413,15 +413,15 @@ Bool ClientIsAsleep(
|
||||
|
||||
/* atom.c */
|
||||
|
||||
Atom MakeAtom(
|
||||
XFONT_LTO Atom MakeAtom(
|
||||
char * /*string*/,
|
||||
unsigned /*len*/,
|
||||
Bool /*makeit*/);
|
||||
|
||||
Bool ValidAtom(
|
||||
XFONT_LTO Bool ValidAtom(
|
||||
Atom /*atom*/);
|
||||
|
||||
char *NameForAtom(
|
||||
XFONT_LTO char *NameForAtom(
|
||||
Atom /*atom*/);
|
||||
|
||||
void AtomError(void);
|
||||
|
@ -122,7 +122,7 @@ void InitFonts(void);
|
||||
|
||||
void FreeFonts(void);
|
||||
|
||||
FontPtr find_old_font(XID /*id*/);
|
||||
FontPtr XFONT_LTO find_old_font(XID /*id*/);
|
||||
|
||||
void GetGlyphs(FontPtr /*font*/,
|
||||
unsigned long /*count*/,
|
||||
|
17
include/os.h
17
include/os.h
@ -67,6 +67,15 @@ SOFTWARE.
|
||||
#define MAX_BIG_REQUEST_SIZE 4194303
|
||||
#endif
|
||||
|
||||
// Need to mark a set of functions so LTO doesn't mangle them
|
||||
#if defined(__GNUC__) && __GNUC__ >= 4
|
||||
#define XFONT_LTO __attribute__((noinline)) __attribute__((used))
|
||||
#define XFONT_LTO_VAR __attribute__((used))
|
||||
#else
|
||||
#define XFONT_LTO
|
||||
#define XFONT_LTO_VAR
|
||||
#endif
|
||||
|
||||
typedef pointer FID;
|
||||
typedef struct _FontPathRec *FontPathPtr;
|
||||
typedef struct _NewClientRec *NewClientPtr;
|
||||
@ -151,7 +160,7 @@ void MakeClientGrabPervious(ClientPtr /*client*/);
|
||||
|
||||
void AvailableClientInput(ClientPtr /* client */);
|
||||
|
||||
CARD32 GetTimeInMillis(void);
|
||||
CARD32 XFONT_LTO GetTimeInMillis(void);
|
||||
|
||||
void AdjustWaitForDelay(
|
||||
pointer /*waitTime*/,
|
||||
@ -192,7 +201,7 @@ void UseMsg(void);
|
||||
|
||||
void ProcessCommandLine(int /*argc*/, char* /*argv*/[]);
|
||||
|
||||
int set_font_authorizations(
|
||||
XFONT_LTO int set_font_authorizations(
|
||||
char ** /* authorizations */,
|
||||
int * /*authlen */,
|
||||
pointer /* client */);
|
||||
@ -394,7 +403,7 @@ typedef enum {
|
||||
|
||||
void AuditF(const char *f, ...) _printf_attribute(1,2);
|
||||
void VAuditF(const char *f, va_list args);
|
||||
void FatalError(const char *f, ...) _printf_attribute(1,2)
|
||||
void FatalError(const char *f, ...) _printf_attribute(1,2) XFONT_LTO
|
||||
#if defined(__GNUC__) && \
|
||||
((__GNUC__ > 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ > 4)))
|
||||
__attribute((noreturn))
|
||||
@ -402,6 +411,6 @@ __attribute((noreturn))
|
||||
;
|
||||
|
||||
void VErrorF(const char *f, va_list args);
|
||||
void ErrorF(const char *f, ...) _printf_attribute(1,2);
|
||||
void ErrorF(const char *f, ...) _printf_attribute(1,2) XFONT_LTO;
|
||||
|
||||
#endif /* OS_H */
|
||||
|
Loading…
Reference in New Issue
Block a user