Jens Staal
2014-03-03 08:41:47 UTC
Dear all,
As I have mentioned in a couple of posts I am trying to build ReactOS with
OW "for fun" (mostly to learn a bit, but if it works that would be cool).
Now I have run into an issue that I don't even know how to name properly in
this file:
https://github.com/staalmannen/reactos/blob/master/include/asm/genincdata.c
my current attempts to modify it can be seen here:
https://github.com/staalmannen/reactos/blob/reactow/include/asm/genincdata.c
If I understand it correctly, the ".asmdef" put in front of the Table[] is
there for it to be interpreted as ASM, and then the included headers in
Table[] contribute with the ASM code. To me it looks _really_ weird, but I
am also a hobbyist with limited knowledge ...
Below are the relevant parts of the problem:
typedef struct
{
char Type;
char Name[55];
ULONGLONG Value;
} ASMGENDATA;
#if defined(_MSC_VER)
#pragma section(".asmdef")
__declspec(allocate(".asmdef"))
#elif defined(__WATCOMC__)
/* what should I put in here? */
#elif defined(__GNUC__)
__attribute__ ((section(".asmdef")))
#else
#error Your compiler is not supported.
#endif
ASMGENDATA Table[] =
{
/* PORTABLE CONSTANTS
********************************************************/
#include "ksx.template.h"
/* ARCHITECTURE SPECIFIC CONTSTANTS
******************************************/
#ifdef _M_IX86
#include "ks386.template.h"
#elif defined(_M_AMD64)
#include "ksamd64.template.h"
#endif
/* End of list */
{TYPE_END, "", 0}
};
As I have mentioned in a couple of posts I am trying to build ReactOS with
OW "for fun" (mostly to learn a bit, but if it works that would be cool).
Now I have run into an issue that I don't even know how to name properly in
this file:
https://github.com/staalmannen/reactos/blob/master/include/asm/genincdata.c
my current attempts to modify it can be seen here:
https://github.com/staalmannen/reactos/blob/reactow/include/asm/genincdata.c
If I understand it correctly, the ".asmdef" put in front of the Table[] is
there for it to be interpreted as ASM, and then the included headers in
Table[] contribute with the ASM code. To me it looks _really_ weird, but I
am also a hobbyist with limited knowledge ...
Below are the relevant parts of the problem:
typedef struct
{
char Type;
char Name[55];
ULONGLONG Value;
} ASMGENDATA;
#if defined(_MSC_VER)
#pragma section(".asmdef")
__declspec(allocate(".asmdef"))
#elif defined(__WATCOMC__)
/* what should I put in here? */
#elif defined(__GNUC__)
__attribute__ ((section(".asmdef")))
#else
#error Your compiler is not supported.
#endif
ASMGENDATA Table[] =
{
/* PORTABLE CONSTANTS
********************************************************/
#include "ksx.template.h"
/* ARCHITECTURE SPECIFIC CONTSTANTS
******************************************/
#ifdef _M_IX86
#include "ks386.template.h"
#elif defined(_M_AMD64)
#include "ksamd64.template.h"
#endif
/* End of list */
{TYPE_END, "", 0}
};