git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git v2.46.0 and --allow-multiple-definition linker flag

From
JMJames Mills <prologic@shortcircuit.net.au>
Date
Dec 21, 2024, 23:23 UTC
Message-ID
<CALGqR9+bH3nMrGqPQ18aqs-epSHRFQOtnd6Da55=KrtSu+Jrkg@mail.gmail.com>
Hi Folks đź‘‹

Been a while since I've emailed one of the large(r) open source lists, so please excuse me I may be a bit rusty.

For some years now I've been building a very tiny custom LInux distribution called µLInux (micro Linux) over at https://git.mills.io/prologic/ulinux -- I primarily target the x86_64 architecture and its intended use is mostly as lightweight VM(s) that boot really quickly but are otherwise populated with "just enough" UNIX tools, a small package manager and few other bits to get interesting things going.

Today I noticed that when upgrading the zlib (✅) and git (❌) ports that the latest version of Git v2.47.2 does not link and I observe the following linker error, mostly what looks like a missing capability/flag of the TinyC compiler that is used as the linker (LD=tcc):

tcc: error: unsupported linker option '--allow-multiple-definition'

I bisected the Git releases and traced the introduction of this new flag to v2.46.0

I can't find any details of this flag really or when this was introduced in the GNU binutils and so far I haven't asked if the Tiny C devs intend to support this option (yet).

Just wondering, can we consider backing this out? From my very brief research on the web this seems to allow the linker to permit multiple definitions of a function. I'm not even sure why that would be desirable to be honest (but I haven't been a C/C++ developer basically ever, I know enough to be dangerous!)

Kind regards
James
-- James Mills / prologic

Join Yarn.social today! The only decentralised social media that respects your privacy and freedoms!

E:    prologic@shortcircuit.net.au
W:    prologic.shortcircuit.net.au
Blog: Read my Blog
Yarn: @prologic@twtxt.net
Next: Junio C Hamano
Message 1 of 5 in “Git v2.46.0 and --allow-multiple-definition linker flag”
  1. James MillsDec 21, 2024
  2. Junio C HamanoDec 22, 2024
  3. Junio C HamanoDec 22, 2024
  4. Josh SteadmonJan 13, 2025
  5. Jeff KingJan 14, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.