2018-12-30 11:19:11 +00:00
|
|
|
/*++ NDK Version: 0099
|
|
|
|
|
|
|
|
Copyright (c) Alex Ionescu. All rights reserved.
|
|
|
|
|
|
|
|
Header Name:
|
|
|
|
|
|
|
|
section_attribs.h
|
|
|
|
|
|
|
|
Abstract:
|
|
|
|
|
2020-10-06 19:36:45 +00:00
|
|
|
Preprocessor definitions to put code and data into specific sections.
|
2018-12-30 11:19:11 +00:00
|
|
|
|
|
|
|
Author:
|
|
|
|
|
|
|
|
Timo Kreuzer (timo.kreuzer@reactos.org)
|
|
|
|
|
|
|
|
--*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2019-02-03 17:04:03 +00:00
|
|
|
#if defined(__GNUC__) || defined(__clang__)
|
2018-12-30 11:19:11 +00:00
|
|
|
|
2020-10-06 19:36:45 +00:00
|
|
|
#define DATA_SEG(segment) __attribute__((section(segment)))
|
|
|
|
#define CODE_SEG(segment) __attribute__((section(segment)))
|
2018-12-30 11:19:11 +00:00
|
|
|
|
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
|
2020-10-06 19:36:45 +00:00
|
|
|
#define DATA_SEG(segment) __declspec(allocate(segment))
|
|
|
|
#define CODE_SEG(segment) __declspec(code_seg(segment))
|
2018-12-30 11:19:11 +00:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
#error Invalid compiler!
|
|
|
|
|
|
|
|
#endif
|