From: Wolfgang Denk Date: Thu, 18 Aug 2005 23:38:25 +0200 Subject: [U-Boot-Users] Re: MIPS LE build problems Message-ID: <20050818213825.32DFB353CE9@atlas.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <4304D3FD.7080107@smiths-aerospace.com> you wrote: > > As noted in other email in this thread, executing the above code won't > work. What about simply compiling a file containing: > > constant int data = 0x01234567; > > objdumping the data section, and looking (grepping) to see if the data > section has 0x12345678 or 0x78563412? Doesn't work as objdump will be user friendly and always print the "correct" value, i. e. 0x01234567. But the idea is good. The attached test script works with the tool chains available to me. Can others please test this, too? Best regards, Wolfgang Denk -- Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Many aligators will be slain, but the swamp will remain. -------------- next part -------------- #!/bin/sh set -e # make sure CROSS_COMPILE is defined [ "${CROSS_COMPILE}" ] # create temp directory TMPDIR=`mktemp -d` # and make sure it gets removed automagically trap 'rm -fr ${TMPDIR}' 0 1 2 3 15 >${TMPDIR}/foo.c ${CROSS_COMPILE}gcc -c ${TMPDIR}/foo.c -o ${TMPDIR}/foo.o readelf -h ${TMPDIR}/foo.o | \ sed -n 's/.*Data:.* \([^ ][^ ]*\) endian/\1/p' exit 0