- return 0;
- }
-
- if(startsWith(ptr, "wparam")) {
- char *fname = strtok((char *)NULL, WHITECOMMA);
-
- while(fname) {
- addSet(&wparamList, Safe_strdup(fname));
-
-// debugf("passing with WREG to %s\n", fname);
- fname = strtok((char *)NULL, WHITECOMMA);
- }
-
- return 0;
+#if 0
+ fprintf(stderr, "%s:%d placing symbol %s at section %s (%p)\n", __FILE__, __LINE__,
+ ssym->name, snam->name, snam);
+#endif
+
+ cp = get_pragma_token(cp, &token);
+ if (TOKEN_STR == token.type)
+ symname = get_pragma_string(&token);
+ else if (TOKEN_EOL == token.type)
+ symname = NULL;
+ else
+ {
+ err = 1;
+ symname = NULL;
+ }
+ }
+
+ Safe_free(sectname);
+ }
+ break;
+
+ /* #pragma library library_module */
+ case P_LIBRARY:
+ {
+ const char *lmodule;
+
+ cp = get_pragma_token(cp, &token);
+ if (TOKEN_EOL != token.type)
+ {
+ lmodule = get_pragma_string(&token);
+
+ /* lmodule can be:
+ * c link the C library
+ * math link the math library
+ * io link the IO library
+ * debug link the debug libary
+ * anything else, will link as-is */
+
+ if(!strcmp(lmodule, "c"))
+ libflags.want_libc = 1;
+ else if(!strcmp(lmodule, "math"))
+ libflags.want_libm = 1;
+ else if(!strcmp(lmodule, "io"))
+ libflags.want_libio = 1;
+ else if(!strcmp(lmodule, "debug"))
+ libflags.want_libdebug = 1;
+ else if(!strcmp(lmodule, "ignore"))
+ libflags.ignore = 1;
+ else
+ {
+ if(!libflags.ignore)
+ {
+ fprintf(stderr, "link library %s\n", lmodule);
+ addSetHead(&libFilesSet, (char *)lmodule);
+ }
+ }
+ }
+ else
+ {
+ err = 1;
+ break;
+ }
+
+ cp = get_pragma_token(cp, &token);
+ if (TOKEN_EOL != token.type)
+ {
+ err = 1;
+ break;
+ }
+ }
+ break;
+
+#if 0
+ /* This is an experimental code for #pragma inline
+ and is temporarily disabled for 2.5.0 release */
+ case P_INLINE:
+ {
+ char *tmp = strtok((char *)NULL, WHITECOMMA);
+
+ while(tmp) {
+ addSet(&asmInlineMap, Safe_strdup( tmp ));
+ tmp = strtok((char *)NULL, WHITECOMMA);