https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577
--- Comment #183 from dave.anglin at bell dot net --- On 2020-02-15 12:49 a.m., peter.bisroev at groundlabs dot com wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61577 > > --- Comment #180 from Peter Bisroev <peter.bisroev at groundlabs dot com> --- > (In reply to dave.anglin from comment #177) >> On 2020-02-13 6:01 p.m., peter.bisroev at groundlabs dot com wrote: >>> I have tried playing around with weak using aCC, however even though it >>> accepts >>> both attribute and pragma (and complains if you misspell "weak"), both >>> compiler >>> and linker seem to ignore it. But I might have made some mistake there, will >>> double check tonight. >> Did you look at .s output? You could also test a simple program with a weak >> function >> in two objects. > Sorry Dave, not 100% sure what kind of test you are talking about. Something > like this? > ---------- > // func0.cpp > > int func0(int) __attribute__((weak)); > int func0(int arg) { > return arg + 1; > } > > // main.cpp > > int func0(int) __attribute__((weak)); > int func0(int arg) { > return arg + 10; > } > > int main(int argc, char * argv[]) { > return func0(argc); > } > ---------- > Yes. Does it link okay?