genksyms needs to know when a symbol must have a "_" prefex as is
true for a few architectures.
Pass $(ARCH) as commandline argument and hardcode what architectures that
needs this info.
Previous attemt to take it from elfconfig.h was br0ken since elfconfig.h
is a generated file.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
cmd_modversions = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
$(CPP) -D__GENKSYMS__ $(c_flags) $< \
cmd_modversions = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
$(CPP) -D__GENKSYMS__ $(c_flags) $< \
+ | $(GENKSYMS) -a $(ARCH) \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
$(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
#endif /* __GNU_LIBRARY__ */
#include "genksyms.h"
#endif /* __GNU_LIBRARY__ */
#include "genksyms.h"
-#include "../mod/elfconfig.h"
/*----------------------------------------------------------------------*/
#define HASH_BUCKETS 4096
/*----------------------------------------------------------------------*/
#define HASH_BUCKETS 4096
char *cur_filename, *output_directory;
int flag_debug, flag_dump_defs, flag_warnings;
char *cur_filename, *output_directory;
int flag_debug, flag_dump_defs, flag_warnings;
+const char *arch = "";
+const char *mod_prefix = "";
static int errors;
static int nsyms;
static int errors;
static int nsyms;
fputs(">\n", debugfile);
/* Used as a linker script. */
fputs(">\n", debugfile);
/* Used as a linker script. */
- printf("%s__crc_%s = 0x%08lx ;\n", MODULE_SYMBOL_PREFIX, name, crc);
+ printf("%s__crc_%s = 0x%08lx ;\n", mod_prefix, name, crc);
#ifdef __GNU_LIBRARY__
struct option long_opts[] = {
#ifdef __GNU_LIBRARY__
struct option long_opts[] = {
{"debug", 0, 0, 'd'},
{"warnings", 0, 0, 'w'},
{"quiet", 0, 0, 'q'},
{"debug", 0, 0, 'd'},
{"warnings", 0, 0, 'w'},
{"quiet", 0, 0, 'q'},
- while ((o = getopt_long(argc, argv, "dwqVDk:p:",
+ while ((o = getopt_long(argc, argv, "a:dwqVDk:p:",
&long_opts[0], NULL)) != EOF)
#else /* __GNU_LIBRARY__ */
&long_opts[0], NULL)) != EOF)
#else /* __GNU_LIBRARY__ */
- while ((o = getopt(argc, argv, "dwqVDk:p:")) != EOF)
+ while ((o = getopt(argc, argv, "a:dwqVDk:p:")) != EOF)
#endif /* __GNU_LIBRARY__ */
switch (o)
{
#endif /* __GNU_LIBRARY__ */
switch (o)
{
+ case 'a':
+ arch = optarg;
+ break;
case 'd':
flag_debug++;
break;
case 'd':
flag_debug++;
break;
genksyms_usage();
return 1;
}
genksyms_usage();
return 1;
}
+ if ((strcmp(arch, "v850") == 0) ||
+ (strcmp(arch, "h8300") == 0))
+ mod_prefix = "_";
{
extern int yydebug;
extern int yy_flex_debug;
{
extern int yydebug;
extern int yy_flex_debug;