[ros-diffs] [tkreuzer] 48125: [rpcndr.h] Add a tag to NDR_SCONTEXT struct. MS headers don't have it, but gcc 4.5.x requires it, because without the tag, the struct would be from an unnamed namespace and can't be shared by different compilation units in C++. Yeah whatever...
tkreuzer at svn.reactos.org
tkreuzer at svn.reactos.org
Mon Jul 19 23:47:00 UTC 2010
- Previous message: [ros-diffs] [tkreuzer] 48124: [FREELDR] Convert freeldr and setupldr to PE format. Previously freeldr was a raw binary file, which made handling by the bootsector very easy, but it disqualified it from proper debugging with gdb using symbols. This is possible with having unstripped PE files. As we don't have any space to do proper PE loading from the bootsector (I already had to trim some strings to get enough space for the new jump code), we need to make sure, that the PE file doesn't contain a .bss section, which is achieved by a linker script. The next thing is to make sure, we don't have any symbols in the output file, because they would make freeldr too big to be loaded into memory and they are useless anyway. On the other hand we like to keep the symbols in the .nostrip.sys files if requested, as this is the primary purpose. This is in theory not a problem, as we could simply strip the file at the end, but binutils throw a monkey wrench in our plans: both strip and objcopy disrespect the file alignment and create unaligned sections, that don't naturally match their VAs. This is solved by hacking rbuild to do invoke ld 2 times, one time without and one time with the symbols (if requested). Now the bootsectors also got some changes: instead of jumping to the loading address (0x8000) they get the address of the entry point from the image optional header. This is slightly simplified, by assuming the NtHeader begins at offset 0xE0. This finally allows source level debugging of freeldr with gdb.
- Next message: [ros-diffs] [tkreuzer] 48126: [sdkddkver.h] Add UL suffix to some constants.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: tkreuzer
Date: Mon Jul 19 23:47:00 2010
New Revision: 48125
URL: http://svn.reactos.org/svn/reactos?rev=48125&view=rev
Log:
[rpcndr.h]
Add a tag to NDR_SCONTEXT struct. MS headers don't have it, but gcc 4.5.x requires it, because without the tag, the struct would be from an unnamed namespace and can't be shared by different compilation units in C++. Yeah whatever...
Modified:
trunk/reactos/include/psdk/rpcndr.h
Modified: trunk/reactos/include/psdk/rpcndr.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/rpcndr.h?rev=48125&r1=48124&r2=48125&view=diff
==============================================================================
--- trunk/reactos/include/psdk/rpcndr.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/rpcndr.h [iso-8859-1] Mon Jul 19 23:47:00 2010
@@ -128,7 +128,7 @@
(RpcExceptionCode() == RPC_X_BAD_STUB_DATA) || \
(RpcExceptionCode() == RPC_S_INVALID_BOUND))
-typedef struct
+typedef struct tagNDR_SCONTEXT
{
void *pad[2];
void *userContext;
- Previous message: [ros-diffs] [tkreuzer] 48124: [FREELDR] Convert freeldr and setupldr to PE format. Previously freeldr was a raw binary file, which made handling by the bootsector very easy, but it disqualified it from proper debugging with gdb using symbols. This is possible with having unstripped PE files. As we don't have any space to do proper PE loading from the bootsector (I already had to trim some strings to get enough space for the new jump code), we need to make sure, that the PE file doesn't contain a .bss section, which is achieved by a linker script. The next thing is to make sure, we don't have any symbols in the output file, because they would make freeldr too big to be loaded into memory and they are useless anyway. On the other hand we like to keep the symbols in the .nostrip.sys files if requested, as this is the primary purpose. This is in theory not a problem, as we could simply strip the file at the end, but binutils throw a monkey wrench in our plans: both strip and objcopy disrespect the file alignment and create unaligned sections, that don't naturally match their VAs. This is solved by hacking rbuild to do invoke ld 2 times, one time without and one time with the symbols (if requested). Now the bootsectors also got some changes: instead of jumping to the loading address (0x8000) they get the address of the entry point from the image optional header. This is slightly simplified, by assuming the NtHeader begins at offset 0xE0. This finally allows source level debugging of freeldr with gdb.
- Next message: [ros-diffs] [tkreuzer] 48126: [sdkddkver.h] Add UL suffix to some constants.
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Ros-diffs
mailing list