Date: Fri, 16 Nov 2018 22:11:00 +0100 From: Szabolcs Nagy <nsz@...t70.net> To: musl@...ts.openwall.com Cc: Paul Sykes <paulsykes@...il.com> Subject: Re: optopt in getopt not being set, only when building with OpenWrt * Paul Sykes <paulsykes@...il.com> [2018-11-16 17:54:23 +0800]: > On my OpenWrt builds I found that the optopt variable was never set > when calling the function getopt. I tested the same code on my desktop > using the gcc wrapper and optopt was set as expected. > > Debugging showed that optopt was being set correctly in getopt.c > however the variable was not being set in my calling code. > > Adding optopt to the file 'dynamic.list' resolved the issue when > building with OpenWrt. I noticed that all the other extern variables > for getopt appear in dynamic.list except optopt. yeah the dynamic list entry is needed so the address of the object internally in the libc is the same as in the main executable in case of copy relocation (only matters for dynamic linked executables and pie executable may work since that does not require copy relocs). all targets with copy relocs are affected, but only musl version 1.1.20 has the problem i think.
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.