Skip to content

elf2flt: replace TRUE/FALSE with 1/0 in weak_und_symbol - #37

Merged
gregungerer merged 1 commit into
uclinux-dev:mainfrom
wbx-github:binutils
Nov 4, 2026
Merged

gregungerer merged 1 commit into
uclinux-dev:mainfrom
wbx-github:binutils

Conversation

@wbx-github

Copy link
Copy Markdown
Contributor

binutils 2.47 no longer provides the TRUE and FALSE macros, which breaks the build. The function returns int, so plain 1/0 is equivalent and works with all binutils versions.

Fixes following error, when targeting Blackfin:
elf2flt.c: In function ‘weak_und_symbol’:
elf2flt.c:306:20: error: ‘TRUE’ undeclared (first use in this function)
306 | return TRUE;
| ^~~~
elf2flt.c:306:20: note: each undeclared identifier is reported only once for each function it appears in
elf2flt.c:309:12: error: ‘FALSE’ undeclared (first use in this function)
309 | return FALSE;
| ^~~~~

binutils 2.47 no longer provides the TRUE and FALSE macros, which
breaks the build. The function returns int, so plain 1/0 is
equivalent and works with all binutils versions.

Fixes following error, when targeting Blackfin:
elf2flt.c: In function ‘weak_und_symbol’:
elf2flt.c:306:20: error: ‘TRUE’ undeclared (first use in this function)
  306 |             return TRUE;
      |                    ^~~~
elf2flt.c:306:20: note: each undeclared identifier is reported only once for each function it appears in
elf2flt.c:309:12: error: ‘FALSE’ undeclared (first use in this function)
  309 |     return FALSE;
      |            ^~~~~

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
@gregungerer
gregungerer merged commit 218073f into uclinux-dev:main Nov 4, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants