Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
b64deb96
Commit
b64deb96
authored
Apr 25, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
From-SVN: r13980
parent
52a18c10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
59 additions
and
8 deletions
+59
-8
gcc/config/i386/cygwin32.h
+33
-8
gcc/config/i386/winnt.c
+26
-0
No files found.
gcc/config/i386/cygwin32.h
View file @
b64deb96
...
...
@@ -158,14 +158,6 @@ while (0)
#define TARGET_DEFAULT \
(MASK_80387 | MASK_IEEE_FP | MASK_FLOAT_RETURNS | MASK_STACK_PROBE)
/* A C statement to output something to the assembler file to switch to section
NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
NULL_TREE. Some target formats do not support arbitrary sections. Do not
define this macro in such cases. */
#define ASM_OUTPUT_SECTION_NAME(FILE, DECL, NAME) \
fprintf (FILE, "\t.section %s\n", NAME)
/* This is how to output an assembler line
that says to advance the location counter
to a multiple of 2**LOG bytes. */
...
...
@@ -173,3 +165,36 @@ while (0)
#undef ASM_OUTPUT_ALIGN
#define ASM_OUTPUT_ALIGN(FILE,LOG) \
if ((LOG)!=0) fprintf ((FILE), "\t.align %d\n", 1<<(LOG))
/* For objects going into their own sections, a C expression of name of the
section, expressed as a STRING_CST node, to put DECL into. The
STRING_CST node must be allocated in the saveable obstack. Function
build_string can be used to do this. Define this macro if the name of a
symbol cannot be used as its section name. */
extern
union
tree_node
*
i386_pe_unique_section
();
#define UNIQUE_SECTION(DECL) i386_pe_unique_section (DECL)
#define MAKE_DECL_ONE_ONLY(DECL) \
DECL_SECTION_NAME (DECL) = UNIQUE_SECTION (DECL)
/* A C statement to output something to the assembler file to switch to section
NAME for object DECL which is either a FUNCTION_DECL, a VAR_DECL or
NULL_TREE. Some target formats do not support arbitrary sections. Do not
define this macro in such cases. */
#undef ASM_OUTPUT_SECTION_NAME
#define ASM_OUTPUT_SECTION_NAME(STREAM, DECL, NAME) \
do { \
if ((DECL) && TREE_CODE (DECL) == FUNCTION_DECL) \
fprintf (STREAM, "\t.section %s,\"x\"\n", (NAME)); \
else if ((DECL) && TREE_READONLY (DECL)) \
fprintf (STREAM, "\t.section %s,\"\"\n", (NAME)); \
else \
fprintf (STREAM, "\t.section %s,\"w\"\n", (NAME)); \
/* Functions may have been compiled at various levels of \
optimization so we can't use `same_size' here. Instead, \
have the linker pick one. */
\
if ((DECL) && DECL_ONE_ONLY (DECL)) \
fprintf (STREAM, "\t.linkonce %s\n", \
TREE_CODE (DECL) == FUNCTION_DECL \
? "discard" : "same_size"); \
} while (0)
gcc/config/i386/winnt.c
View file @
b64deb96
...
...
@@ -64,3 +64,29 @@ gen_stdcall_suffix (decl)
return
IDENTIFIER_POINTER
(
get_identifier
(
newsym
));
}
/* Cover function for UNIQUE_SECTION. */
tree
i386_pe_unique_section
(
decl
)
tree
decl
;
{
int
len
;
char
*
name
,
*
string
,
*
prefix
;
name
=
IDENTIFIER_POINTER
(
DECL_ASSEMBLER_NAME
(
decl
));
/* The object is put in, for example, section .text$foo.
The linker will then ultimately place them in .text
(everything from the $ on is stripped). */
if
(
TREE_CODE
(
decl
)
==
FUNCTION_DECL
)
prefix
=
".text$"
;
else
if
(
TREE_READONLY
(
decl
))
prefix
=
".rdata$"
;
else
prefix
=
".data$"
;
len
=
strlen
(
name
)
+
strlen
(
prefix
);
string
=
alloca
(
len
+
1
);
sprintf
(
string
,
"%s%s"
,
prefix
,
name
);
return
build_string
(
len
,
string
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment