mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 10:31:37 -08:00
Add pragma to force zero initialized
data into .data segment.
This commit is contained in:
parent
333c25a99b
commit
e54c8cd119
2 changed files with 15 additions and 0 deletions
|
|
@ -39,6 +39,10 @@ typedef struct file_data {
|
|||
unsigned char *file_base;
|
||||
} file_data;
|
||||
|
||||
/* Force zero initialized variables to be placed in the .data segment;
|
||||
MSVC 5.0 otherwise places them in .bss, which breaks the dumping code. */
|
||||
#pragma data_seg(".data")
|
||||
|
||||
/* Basically, our "initialized" flag. */
|
||||
BOOL need_to_recreate_heap = FALSE;
|
||||
|
||||
|
|
|
|||
|
|
@ -66,6 +66,13 @@ cache_system_info (void)
|
|||
syspage_mask = sysinfo_cache.dwPageSize - 1;
|
||||
}
|
||||
|
||||
/* Emulate getpagesize. */
|
||||
int
|
||||
getpagesize (void)
|
||||
{
|
||||
return sysinfo_cache.dwPageSize;
|
||||
}
|
||||
|
||||
/* Round ADDRESS up to be aligned with ALIGN. */
|
||||
unsigned char *
|
||||
round_to_next (unsigned char *address, unsigned long align)
|
||||
|
|
@ -78,6 +85,10 @@ round_to_next (unsigned char *address, unsigned long align)
|
|||
return (unsigned char *) (tmp * align);
|
||||
}
|
||||
|
||||
/* Force zero initialized variables to be placed in the .data segment;
|
||||
MSVC 5.0 otherwise places them in .bss, which breaks the dumping code. */
|
||||
#pragma data_seg(".data")
|
||||
|
||||
/* Info for keeping track of our heap. */
|
||||
unsigned char *data_region_base = NULL;
|
||||
unsigned char *data_region_end = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue