*strchr(name, ' ') = 0;
*strchr(def, ' ') = 0;
+ if(debug['d']) {
+ fprint(2, "%s: %s: cannot use dynamic imports with -d flag\n", argv0, file);
+ nerrors++;
+ return;
+ }
+
if(strcmp(name, "_") == 0 && strcmp(def, "_") == 0) {
// allow #pragma dynimport _ _ "foo.so"
// to force a link of foo.so.
return;
err:
- fprint(2, "%s: invalid dynimport line: %s\n", argv0, p0);
+ fprint(2, "%s: %s: invalid dynimport line: %s\n", argv0, file, p0);
nerrors++;
}
msect = newMachoSect(ms, "__data");
msect->addr = va+v;
- msect->size = symaddr(lookup(".got", 0)) - msect->addr;
msect->off = v;
+ msect->size = segdata.filelen;
s = lookup(".got", 0);
if(s->size > 0) {
+ msect->size = symaddr(s) - msect->addr;
+
msect = newMachoSect(ms, "__nl_symbol_ptr");
msect->addr = symaddr(s);
msect->size = s->size;