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

Include user defined static lib files in the Linker object files paths #7758

Merged
merged 1 commit into from Aug 27, 2018

Conversation

Projects
None yet
8 participants
@phyokyaw

phyokyaw commented Aug 10, 2018

Description

This is to fix linker not finding symbols declared in object files inside static library files.

For this case throwing:-

rm-none-eabi-g++: error: unrecognized command line option '--wrap=main'; did you mean '--warn-main'?

For this case to include libmbed.a which contains

mbed_alloc_wrappers.o:
U __real__calloc_r
U __real__free_r
U __real__malloc_r
U __real__memalign_r
U __real__realloc_r
00000000 T __wrap__calloc_r
00000000 T __wrap__free_r
00000000 T __wrap__malloc_r
00000000 T __wrap__memalign_r
00000000 T __wrap__realloc_r
00000000 T free_wrapper
00000000 T malloc_wrapper
00000000 T mbed_stats_heap_get
U memset

This patch also changed the library order to system and then user.

-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lmbed

Resolves: #7155

Pull request type

[ x ] Fix
[ ] Refactor
[ ] Target update
[ ] Feature
[ ] Breaking change

@cmonr cmonr added the needs: work label Aug 10, 2018

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 10, 2018

@phyokyaw Please update your comment to indicate what kind of PR this is.

Additionally, what does 7155 refer to?

Updated to include user defined static lib files in the Linker object…
… files path.

### Description

This is to fix linker not finding symbols declared in object files inside static library files.

For this case throwing:-

> rm-none-eabi-g++: error: unrecognized command line option '--wrap=main'; did you mean '--warn-main'?

For this case to include libmbed.a which contains

mbed_alloc_wrappers.o:
         U __real__calloc_r
         U __real__free_r
         U __real__malloc_r
         U __real__memalign_r
         U __real__realloc_r
00000000 T __wrap__calloc_r
00000000 T __wrap__free_r
00000000 T __wrap__malloc_r
00000000 T __wrap__memalign_r
00000000 T __wrap__realloc_r
00000000 T free_wrapper
00000000 T malloc_wrapper
00000000 T mbed_stats_heap_get
         U memset

This patch also changed the library order to system and then user.

-lstdc++ -lsupc++ -lm -lc -lgcc -lnosys -lmbed

Resolves: #7155

### Pull request type

    [ x ] Fix
    [ ] Refactor
    [ ] Target update
    [ ] Feature
    [ ] Breaking change

@phyokyaw phyokyaw force-pushed the phyokyaw:master branch from 68cc4cc to 87304f8 Aug 13, 2018

@phyokyaw

This comment has been minimized.

phyokyaw commented Aug 13, 2018

@cmonr Thanks for you comment. I amended the commit title and message. 7155 is the issue this PR is related to, added reference at the bottom of the message.

Thanks
Phyo

@cmonr cmonr changed the title from #7155: Updated to include user defined static lib files in the Linker… to Include user defined static lib files in the Linker object files paths Aug 13, 2018

@cmonr cmonr requested a review from theotherjimmy Aug 13, 2018

@0xc0170 0xc0170 added needs: review and removed needs: work labels Aug 20, 2018

@0xc0170

This comment has been minimized.

Member

0xc0170 commented Aug 24, 2018

/morph build

@mbed-ci

This comment has been minimized.

mbed-ci commented Aug 24, 2018

Build : SUCCESS

Build number : 2894
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/7758/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci

This comment has been minimized.

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 26, 2018

/morph test

@mbed-ci

This comment has been minimized.

@cmonr

This comment has been minimized.

Contributor

cmonr commented Aug 27, 2018

/morph mbed2-build

@0xc0170 0xc0170 merged commit 2dfd3be into ARMmbed:master Aug 27, 2018

14 checks passed

AWS-CI uVisor Build & Test Success
Details
ci-morph-build build completed
Details
ci-morph-exporter build completed
Details
ci-morph-mbed2-build build completed
Details
ci-morph-test test completed , RTOS ROM(+0.0%) RAM(+0.0%)
Details
continuous-integration/jenkins/pr-head This commit looks good
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
travis-ci/astyle Passed, 568 files
Details
travis-ci/docs Local docs testing has passed
Details
travis-ci/events Passed, runtime is 9042 cycles (-1022 cycles)
Details
travis-ci/gitattributestest Local gitattributestest testing has passed
Details
travis-ci/licence_check Local licence_check testing has passed
Details
travis-ci/littlefs Passed, code size is 9960B (+0.00%)
Details
travis-ci/tools-py2.7 Local tools-py2.7 testing has passed
Details

pan- pushed a commit to pan-/mbed that referenced this pull request Aug 29, 2018

Merge pull request ARMmbed#7758 from phyokyaw/master
Include user defined static lib files in the Linker object files paths
@adbridge

This comment has been minimized.

Contributor

adbridge commented Sep 7, 2018

This is on top of changes only present in 5.10, so moving to 5.10.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment