+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
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;
update_non_lazy_ptrs (name)
const char *name;
{
- char *name1, *name2;
+ const char *name1, *name2;
tree temp;
STRIP_NAME_ENCODING (name1, name);
update_stubs (name)
const char *name;
{
- char *name1, *name2;
+ const char *name1, *name2;
tree temp;
STRIP_NAME_ENCODING (name1, name);
#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) \
#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) \
#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) \
#undef EXTRA_SECTION_FUNCTIONS
#define EXTRA_SECTION_FUNCTIONS \
+static void objc_section_init PARAMS ((void)); \
SECTION_FUNCTION (const_section, \
in_const, \
".const", 0) \
in_darwin_eh_frame, \
".section __TEXT,__eh_frame", 0) \
\
-void \
+static void \
objc_section_init () \
{ \
static int been_here = 0; \
} \
} \
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"); \
ALIAS_SECTION (in_literal4, "literal4"); \
ALIAS_SECTION (in_literal8, "literal8"); \
}
+#endif
#undef READONLY_DATA_SECTION
#define READONLY_DATA_SECTION const_section
#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. */