-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
run-make/relocation-model: "final link failed: Nonrepresentable section on output" #47037
Comments
Please run |
Yes, the "Configured with" line of |
@SimonSapin yes, of course, I didn't mean that you should recompile your gcc, I was just pointing out the root cause for this issue. This patch fixed the error on my machine: diff --git a/src/test/run-make/relocation-model/Makefile b/src/test/run-make/relocation-model/Makefile
index 485ecbb4b5..f9213f0af0 100644
--- a/src/test/run-make/relocation-model/Makefile
+++ b/src/test/run-make/relocation-model/Makefile
@@ -4,7 +4,7 @@ all: others
$(RUSTC) -C relocation-model=dynamic-no-pic foo.rs
$(call RUN,foo)
- $(RUSTC) -C relocation-model=default foo.rs
+ $(RUSTC) -C relocation-model=default -C link-arg=-no-pie foo.rs
$(call RUN,foo)
$(RUSTC) -C relocation-model=dynamic-no-pic --crate-type=dylib foo.rs --emit=link,obj
@@ -14,6 +14,6 @@ ifdef IS_MSVC
others:
else
others:
- $(RUSTC) -C relocation-model=static foo.rs
+ $(RUSTC) -C relocation-model=static -C link-arg=-no-pie foo.rs
$(call RUN,foo)
endif But such change will not work on macOS and windows so it has to be fixed in some other way. |
Would it make sense for the makefile to have a |
Well, maybe, but I'm not sure how to easily determine if gcc has |
Isn’t |
@SimonSapin I think this option does not exist on gcc versions less than 5.4 |
I’ve just discovered that |
This seems to be fixed now, presumably by #48076. Thanks! |
Running
./x.py test
on unmodified master bfbb1f5 fails on Ubuntu 17.10. The output ends like this:The text was updated successfully, but these errors were encountered: