summaryrefslogtreecommitdiffstats
path: root/template.S
Commit message (Collapse)AuthorAgeFilesLines
* template.S: fix to build on architecture with non-empty __USER_LABEL_PREFIX__Thomas Petazzoni2017-12-081-8/+20
| | | | | | | | | | | Blackfin has a non-empty __USER_LABEL_PREFIX__, which means that a symbol called "foo" in C must be named "_foo" in assembler. We now use the preprocessor to set the variables in template.S instead of using sed. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Joel Stanley <joel@jms.id.au>
* Rework generation of .dtb.oThomas Petazzoni2017-11-221-0/+10
The .dtb.o files are currently generated by compiling the .dts into .dtb, and then making a pass of objcopy to turn them into an ELF file that can be linked with the rest of pdbg. Unfortunately, this objcopy logic doesn't work on all platforms, because it doesn't generate an object file with the correct ABI flags. For example, on mips32r6, it fails to build with: mipsel-buildroot-linux-gnu/bin/ld: fake.dtb.o: warning: linking abicalls files with non-abicalls files mipsel-buildroot-linux-gnu/bin/ld: fake.dtb.o: linking -mnan=legacy module with previous -mnan=2008 modules mipsel-buildroot-linux-gnu/bin/ld: failed to merge target specific data of file fake.dtb.o mipsel-buildroot-linux-gnu/bin/ld: p8-fsi.dtb.o: warning: linking abicalls files with non-abicalls files In order to fix this, we want to generate a proper object file with gcc instead of playing tricks with objcopy, and this is what this commit implement. We have a template.S file, which gets sed'ed on the fly to point to the right file / use the right symbol name, and then is fed to gcc. This allows to remove all the objdump/objcopy logic from the configure.ac script as well. This fixes build issues of pdbg seems inside the Buildroot project: http://autobuild.buildroot.net/?reason=pdbg-77158819158d1d7053a737ac090d04fdfbfe9265 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Tested-by: Cyril Bur <cyrilbur@gmail.com> [joel: - integrate Cyril/Stephen's tr change - fix out of tree builds] Signed-off-by: Joel Stanley <joel@jms.id.au>
OpenPOWER on IntegriCloud