Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/link: error if pass a very long args which contains \n character #42295
What version of Go are you using (
In our case, we need to put a INI config file's content(which contains a lot of '\n') in the -ldflags.
It's easy to reproduce it with long -ldflags, I think go should not simply use '\n' as a separator in the response file.
Can you paste in exact commands you run, and the exact output? Possibly to use
The command you mentioned above,
short or long, when I paste it to a shell, never works on my machine with any version of Go.
Here are two example config files (config-wrong.ini, config.ini):
cmd/link error with go1.15 / config-wrong.ini
build success with go1.15 / config.ini
I am not sure if link arg is same on all darwin's machines, so you can add extra lines in
On darwin, in bash, I was able to reproduce this with:
The following fails:
But, this succeeds:
And for the people following along at home: