+ hdrfn = argv[arg++];
+ fhdr = fopen(hdrfn, "r");
+ my_assert_not(fhdr, NULL);
+
+ rlist_alloc = 64;
+ rlist = malloc(rlist_alloc * sizeof(rlist[0]));
+ my_assert_not(rlist, NULL);
+ // needs special handling..
+ rlist[rlist_len++] = "__alloca_probe";
+
+ for (; arg < argc; arg++) {
+ frlist = fopen(argv[arg], "r");
+ my_assert_not(frlist, NULL);
+
+ while (fgets(line, sizeof(line), frlist)) {
+ p = sskip(line);
+ if (*p == 0 || *p == ';' || *p == '#')
+ continue;
+
+ p = next_word(words[0], sizeof(words[0]), p);
+ if (words[0][0] == 0)
+ continue;
+
+ if (rlist_len >= rlist_alloc) {
+ rlist_alloc = rlist_alloc * 2 + 64;
+ rlist = realloc(rlist, rlist_alloc * sizeof(rlist[0]));
+ my_assert_not(rlist, NULL);
+ }
+ rlist[rlist_len++] = strdup(words[0]);
+ }
+
+ fclose(frlist);
+ frlist = NULL;
+ }
+
+ if (rlist_len > 0)
+ qsort(rlist, rlist_len, sizeof(rlist[0]), cmpstringp);
+
+ fout = fopen(argv[arg_out], "w");