mirror of
https://github.com/reactos/reactos.git
synced 2024-08-25 04:38:43 +00:00
![Victor Perevertkin](/assets/img/avatar_default.png)
These are for putting code and data to non-default sections At the same time, move INIT section attributes declaration to cmake files
36 lines
616 B
C
36 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
|