Hi folks
apparently some tool calls "strip" instead of "$triplet-strip" when cross-building; this is something we shall fix, but it is apparently corrupting the binaries in some cases: https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/615765
It seems the ELF architecture isn't set properly, or so I'm told.
Which component is to blame here? Are we looking at a binutils or a gcc bug for not being able to set or read enough data that the architecture mismatch isn't detected? What could we do about it?
Thanks!
On 9/22/2010 8:34 AM, Loïc Minier wrote:
Which component is to blame here? Are we looking at a binutils or a gcc bug for not being able to set or read enough data that the architecture mismatch isn't detected? What could we do about it?
This is definitely a binutils bug.
On Wed, 2010-09-22 at 08:36 -0700, Mark Mitchell wrote:
On 9/22/2010 8:34 AM, Loïc Minier wrote:
Which component is to blame here? Are we looking at a binutils or a gcc bug for not being able to set or read enough data that the architecture mismatch isn't detected? What could we do about it?
This is definitely a binutils bug.
So I agree that it's a bug in binutils that this produces incorrect output.
I don't think it's necessarily a bug that a generic ELF strip program is unable to strip all ARM ELF binary files. This is particularly true for unlinked object files that can contain additional sections that refer to the symbol section.
R.
On 9/29/2010 10:13 AM, Richard Earnshaw wrote:
I don't think it's necessarily a bug that a generic ELF strip program is unable to strip all ARM ELF binary files. This is particularly true for unlinked object files that can contain additional sections that refer to the symbol section.
I agree. Though I think it's a bug to *attempt* to strip, if you can't do it right. Either strip should be built with support for all architectures and system, detect the architecture and system, and then do the right thing -- or it should tell you it's not the right kind of strip and punt. It shouldn't blindly damage your object file when it has enough information to know that it doesn't know what it's doing.
On Wed, Sep 22, 2010, Loïc Minier wrote:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/615765
This is important to the Foundation team; would someone have time to look into this?
Thanks!
On Thu, Sep 30, 2010 at 4:14 AM, Loïc Minier loic.minier@linaro.org wrote:
On Wed, Sep 22, 2010, Loïc Minier wrote:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/615765
This is important to the Foundation team; would someone have time to look into this?
I see this as being on Marcin's plate. Your thoughts Steve?
-- Michael
On Thu, Sep 30, 2010 at 08:29:52AM +1300, Michael Hope wrote:
On Thu, Sep 30, 2010 at 4:14 AM, Loïc Minier loic.minier@linaro.org wrote:
On Wed, Sep 22, 2010, Loïc Minier wrote:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/615765
This is important to the Foundation team; would someone have time to look into this?
I see this as being on Marcin's plate. Your thoughts Steve?
Marcin hit a dead end, determining that there was insufficient architecture information available in the object files to tell strip to leave them alone. Loïc says Mark Mitchell considers it a binutils bug, but we don't know how he expects to remedy this. I think we need the Toolchain WG to pick this up.
Thanks,
OK, we'll pick it up.
-- Michael
On Thu, Sep 30, 2010 at 9:41 AM, Steve Langasek steve.langasek@linaro.org wrote:
On Thu, Sep 30, 2010 at 08:29:52AM +1300, Michael Hope wrote:
On Thu, Sep 30, 2010 at 4:14 AM, Loïc Minier loic.minier@linaro.org wrote:
On Wed, Sep 22, 2010, Loïc Minier wrote:
https://bugs.launchpad.net/ubuntu/+source/binutils/+bug/615765
This is important to the Foundation team; would someone have time to look into this?
I see this as being on Marcin's plate. Your thoughts Steve?
Marcin hit a dead end, determining that there was insufficient architecture information available in the object files to tell strip to leave them alone. Loïc says Mark Mitchell considers it a binutils bug, but we don't know how he expects to remedy this. I think we need the Toolchain WG to pick this up.
Thanks,
Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slangasek@ubuntu.com vorlon@debian.org
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux)
iQIVAwUBTKOkclaNMPMhshM9AQj3pxAAm/XjKRm6irMBdv9EX8b2T2R70y1DsdeT zGpTKNaCCr1sRVRn5w1BaoS/OOKZHobkcbU/l99cXVkKutmhaxXrq9OJHZPmSHfH Z8L8enTSDsOwPn5SqBUduiaf3r5qqET6P7VOtRY/KXmXZrmcz++6YAW2+d9HESKc uFScXukPTxbqNAOAQemIUAxk3IGPQVmcapMOvX4VGazTnW6CWWnM55nanSANxJpe clpmzL+9settJkyAALTB5gSzn1WxiwR0UhVE8fgPbV4W0WbHHhE4vDcbEsAavFeL givpLe6RL3va5l0RzH7Yw8JJGIwxEBTMgpvlK/Ip9PqJYrGNBZlKRCcJHSRNV8ob sALV3z8psfmkFWJlKwVHlzJc0McMc0b3Ytxc5F0swMWQXeEJbjfNqMAGJWiO6Q/w nFzR79FI/XMEXAK3oTYTK8pFg/GZ2AAEDxgOmpLKD2kngU6YUipHR9JFSPKLShzR bcgVXBpAScsa03fZ9vwaBauS5zGz02KrTpmIaCWEZO5dICSPGmC8vMwAZuvACEIr lX2BsdK+1XRgouvCmjaSD+kezHQITghg5oRaH5stXOPGDng73VKjl9BzYQQBbwHB NLmrDzd9E7s382HBZebr+IbzXfZCIYFy4SEsvEpMepZsXKYQtOXq4IaDD4rC58VN /ACKUNMmuaw= =u0Cv -----END PGP SIGNATURE-----
On 9/29/2010 1:41 PM, Steve Langasek wrote:
Marcin hit a dead end, determining that there was insufficient architecture information available in the object files to tell strip to leave them alone. Loïc says Mark Mitchell considers it a binutils bug, but we don't know how he expects to remedy this. I think we need the Toolchain WG to pick this up.
FWIW, the CodeSourcery folks in Linaro are working at Michael's direction; if Michael wants them to work on this issue, they'll be happy to do so.
It is theoretically possible that there's insufficient information for strip to know what it's looking at, but I'd be very surprised; there should be an ELF header field that indicates the machine type.
Thanks,
On Wed, Sep 29, 2010, Mark Mitchell wrote:
It is theoretically possible that there's insufficient information for strip to know what it's looking at, but I'd be very surprised; there should be an ELF header field that indicates the machine type.
And I guess if there's not, it's also a binutils bug :-)
On 9/30/2010 4:31 AM, Loïc Minier wrote:
On Wed, Sep 29, 2010, Mark Mitchell wrote:
It is theoretically possible that there's insufficient information for strip to know what it's looking at, but I'd be very surprised; there should be an ELF header field that indicates the machine type.
And I guess if there's not, it's also a binutils bug :-)
There are some object/executable file formats where this is no place to put an architecture tag. (The most extreme example is the "binary" format, which is just an exact copy of the program as it will be programmed into flash.) But, yes, in ELF format object files or executables, there is a header and that header has a field for the architecture, so if something is not filling it in, that thing should be fixed.
linaro-toolchain@lists.linaro.org