mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-22 12:09:44 +08:00
darwin-protos.h (constructor_section, [...]): Prototype.
* darwin-protos.h (constructor_section, destructor_section, mod_init_section, mod_term_section): Prototype. * darwin.c (machopic_finish, update_non_lazy_ptrs, update_stubs): Const-ify. * darwin.h (ASM_DECLARE_OBJECT_NAME, ASM_DECLARE_FUNCTION_NAME): Likewise. (SECTION_FUNCTION): Prototype `FUNCTION'. Delete objc_section_init declaration. (EXTRA_SECTION_FUNCTIONS): Prototype objc_section_init. (objc_section_init, try_section_alias): Make static. (alias_section): Make static and hide unused function. (ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warning. From-SVN: r46447
This commit is contained in:
parent
ee701fade7
commit
91dc3130bf
@ -1,3 +1,18 @@
|
||||
2001-10-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* darwin-protos.h (constructor_section, destructor_section,
|
||||
mod_init_section, mod_term_section): Prototype.
|
||||
* darwin.c (machopic_finish, update_non_lazy_ptrs, update_stubs):
|
||||
Const-ify.
|
||||
* darwin.h (ASM_DECLARE_OBJECT_NAME, ASM_DECLARE_FUNCTION_NAME):
|
||||
Likewise.
|
||||
(SECTION_FUNCTION): Prototype `FUNCTION'. Delete
|
||||
objc_section_init declaration.
|
||||
(EXTRA_SECTION_FUNCTIONS): Prototype objc_section_init.
|
||||
(objc_section_init, try_section_alias): Make static.
|
||||
(alias_section): Make static and hide unused function.
|
||||
(ASM_GENERATE_INTERNAL_LABEL): Fix format specifier warning.
|
||||
|
||||
Tue Oct 23 13:05:53 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
|
||||
|
||||
* alias.c (can_address_p): Compnonents are not addressable if
|
||||
|
@ -33,6 +33,11 @@ extern void machopic_symbol_stub_section PARAMS ((void));
|
||||
extern void machopic_lazy_symbol_ptr_section PARAMS ((void));
|
||||
extern void machopic_nl_symbol_ptr_section PARAMS ((void));
|
||||
|
||||
extern void constructor_section PARAMS ((void));
|
||||
extern void destructor_section PARAMS ((void));
|
||||
extern void mod_init_section PARAMS ((void));
|
||||
extern void mod_term_section PARAMS ((void));
|
||||
|
||||
#ifdef RTX_CODE
|
||||
|
||||
extern int machopic_operand_p PARAMS ((rtx));
|
||||
|
@ -885,8 +885,8 @@ machopic_finish (asm_out_file)
|
||||
temp != NULL_TREE;
|
||||
temp = TREE_CHAIN (temp))
|
||||
{
|
||||
char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
|
||||
char *stub_name = IDENTIFIER_POINTER (TREE_PURPOSE (temp));
|
||||
const char *sym_name = IDENTIFIER_POINTER (TREE_VALUE (temp));
|
||||
const char *stub_name = IDENTIFIER_POINTER (TREE_PURPOSE (temp));
|
||||
char *sym;
|
||||
char *stub;
|
||||
|
||||
@ -1066,7 +1066,7 @@ static void
|
||||
update_non_lazy_ptrs (name)
|
||||
const char *name;
|
||||
{
|
||||
char *name1, *name2;
|
||||
const char *name1, *name2;
|
||||
tree temp;
|
||||
|
||||
STRIP_NAME_ENCODING (name1, name);
|
||||
@ -1097,7 +1097,7 @@ static void
|
||||
update_stubs (name)
|
||||
const char *name;
|
||||
{
|
||||
char *name1, *name2;
|
||||
const char *name1, *name2;
|
||||
tree temp;
|
||||
|
||||
STRIP_NAME_ENCODING (name1, name);
|
||||
|
@ -204,7 +204,7 @@ do { text_section (); \
|
||||
#undef ASM_DECLARE_OBJECT_NAME
|
||||
#define ASM_DECLARE_OBJECT_NAME(FILE, NAME, DECL) \
|
||||
do { \
|
||||
char *xname = NAME; \
|
||||
const char *xname = NAME; \
|
||||
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
|
||||
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
|
||||
if ((TREE_STATIC (DECL) \
|
||||
@ -220,7 +220,7 @@ do { text_section (); \
|
||||
|
||||
#define ASM_DECLARE_FUNCTION_NAME(FILE, NAME, DECL) \
|
||||
do { \
|
||||
char *xname = NAME; \
|
||||
const char *xname = NAME; \
|
||||
if (GET_CODE (XEXP (DECL_RTL (DECL), 0)) != SYMBOL_REF) \
|
||||
xname = IDENTIFIER_POINTER (DECL_NAME (DECL)); \
|
||||
if ((TREE_STATIC (DECL) \
|
||||
@ -310,11 +310,10 @@ do { text_section (); \
|
||||
|
||||
#undef SECTION_FUNCTION
|
||||
#define SECTION_FUNCTION(FUNCTION, SECTION, DIRECTIVE, OBJC) \
|
||||
extern void FUNCTION PARAMS ((void)); \
|
||||
void \
|
||||
FUNCTION () \
|
||||
{ \
|
||||
extern void objc_section_init (); \
|
||||
\
|
||||
if (in_section != SECTION) \
|
||||
{ \
|
||||
if (OBJC) \
|
||||
@ -357,6 +356,7 @@ do { if (!strcmp (alias_name, name)) \
|
||||
|
||||
#undef EXTRA_SECTION_FUNCTIONS
|
||||
#define EXTRA_SECTION_FUNCTIONS \
|
||||
static void objc_section_init PARAMS ((void)); \
|
||||
SECTION_FUNCTION (const_section, \
|
||||
in_const, \
|
||||
".const", 0) \
|
||||
@ -464,7 +464,7 @@ SECTION_FUNCTION (darwin_eh_frame_section, \
|
||||
in_darwin_eh_frame, \
|
||||
".section __TEXT,__eh_frame", 0) \
|
||||
\
|
||||
void \
|
||||
static void \
|
||||
objc_section_init () \
|
||||
{ \
|
||||
static int been_here = 0; \
|
||||
@ -497,14 +497,18 @@ objc_section_init () \
|
||||
} \
|
||||
} \
|
||||
static tree section_alias[(int) num_sections]; \
|
||||
void try_section_alias () \
|
||||
static void try_section_alias PARAMS ((void)); \
|
||||
static void try_section_alias () \
|
||||
{ \
|
||||
if (section_alias[in_section] && asm_out_file) \
|
||||
fprintf (asm_out_file, "%s\n", \
|
||||
IDENTIFIER_POINTER (section_alias[in_section])); \
|
||||
} \
|
||||
void alias_section (name, alias) \
|
||||
char *name, *alias; \
|
||||
|
||||
#if 0
|
||||
static void alias_section PARAMS ((const char *, const char *)); \
|
||||
static void alias_section (name, alias) \
|
||||
const char *name, *alias; \
|
||||
{ \
|
||||
ALIAS_SECTION (in_data, "data"); \
|
||||
ALIAS_SECTION (in_text, "text"); \
|
||||
@ -514,6 +518,7 @@ void alias_section (name, alias) \
|
||||
ALIAS_SECTION (in_literal4, "literal4"); \
|
||||
ALIAS_SECTION (in_literal8, "literal8"); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#undef READONLY_DATA_SECTION
|
||||
#define READONLY_DATA_SECTION const_section
|
||||
@ -685,7 +690,7 @@ void alias_section (name, alias) \
|
||||
|
||||
#undef ASM_GENERATE_INTERNAL_LABEL
|
||||
#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM) \
|
||||
sprintf (LABEL, "*%s%d", PREFIX, NUM)
|
||||
sprintf (LABEL, "*%s%ld", PREFIX, (long)(NUM))
|
||||
|
||||
/* This is how to output an internal numbered label where PREFIX is
|
||||
the class of label and NUM is the number within the class. */
|
||||
|
Loading…
Reference in New Issue
Block a user