mirror of
https://github.com/reactos/reactos.git
synced 2024-11-10 00:34:39 +00:00
658f742c2d
These are for putting code and data to non-default sections At the same time, move INIT section attributes declaration to cmake files
35 lines
616 B
C
35 lines
616 B
C
/*++ NDK Version: 0099
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
Header Name:
|
|
|
|
section_attribs.h
|
|
|
|
Abstract:
|
|
|
|
Preprocessor definitions to put code and data into specific sections.
|
|
|
|
Author:
|
|
|
|
Timo Kreuzer (timo.kreuzer@reactos.org)
|
|
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
#if defined(__GNUC__) || defined(__clang__)
|
|
|
|
#define DATA_SEG(segment) __attribute__((section(segment)))
|
|
#define CODE_SEG(segment) __attribute__((section(segment)))
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
#define DATA_SEG(segment) __declspec(allocate(segment))
|
|
#define CODE_SEG(segment) __declspec(code_seg(segment))
|
|
|
|
#else
|
|
|
|
#error Invalid compiler!
|
|
|
|
#endif
|