public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
@ 2022-09-16 15:39 koldat at gmail dot com
  2022-09-16 15:41 ` [Bug build/29576] " koldat at gmail dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: koldat at gmail dot com @ 2022-09-16 15:39 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

            Bug ID: 29576
           Summary: librtld.os: in function `_dl_start_profile':
                    (.text+0x9444): undefined reference to `strcpy'
           Product: glibc
           Version: 2.36
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: koldat at gmail dot com
                CC: carlos at redhat dot com
  Target Milestone: ---

When building glibc 2.36 I started to see "undefined reference to `strcpy'".

This was working for 2.36. I have found similar issue #29454 that have fixed
one problem of strcpy. Second one is still there. I have tried very latest 2.36
commit in release branch with same result (I have seen patch was backborted
there to fix one of strcpy issues).

I even replaced strcpy wiht stpccy in sprof.c (only place with strcpy withing
elf directory), but did not help. Anyone any idea what can be done?


mv -f /home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/rtld-libc.aT
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/rtld-libc.a
make[3]: Leaving directory '/home/abuild/aports/main/glibc/src/glibc-2.36/elf'
gcc -Wl,--as-needed,-O1,--sort-common  -nostdlib -nostartfiles -r -o
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/librtld.os '-Wl,-('
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/dl-allobjs.os
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/rtld-libc.a -lgcc
'-Wl,-)' \
         
-Wl,-Map,/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/librtld.os.map
gcc -Wl,--as-needed,-O1,--sort-common  -nostdlib -nostartfiles -shared -o
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/ld.so.new
\
          -Wl,-z,relro -Wl,-z,defs -Wl,-z,now   \
          -Wl,-z,pack-relative-relocs \
          /home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/librtld.os
-Wl,--version-script=/home/abuild/aports/main/glibc/src/glibc-2.36/build/ld.map
\
          -Wl,-soname=ld-linux-x86-64.so.2
/usr/lib/gcc/x86_64-alpine-linux-gnu/11.2.1/../../../../x86_64-alpine-linux-gnu/bin/ld:
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/librtld.os: in function
`_dl_start_profile':
(.text+0x9444): undefined reference to `strcpy'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1346:
/home/abuild/aports/main/glibc/src/glibc-2.36/build/elf/ld.so] Error 1
make[2]: Leaving directory '/home/abuild/aports/main/glibc/src/glibc-2.36/elf'
make[1]: *** [Makefile:484: elf/subdir_lib] Error 2
make[1]: Leaving directory '/home/abuild/aports/main/glibc/src/glibc-2.36'

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
@ 2022-09-16 15:41 ` koldat at gmail dot com
  2022-09-17 15:35 ` carlos at redhat dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: koldat at gmail dot com @ 2022-09-16 15:41 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

--- Comment #1 from Tomas Kolda <koldat at gmail dot com> ---
Sorry I meant to say "This was working for 2.35 ...."

GCC used is 11.2.1_git20220219

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
  2022-09-16 15:41 ` [Bug build/29576] " koldat at gmail dot com
@ 2022-09-17 15:35 ` carlos at redhat dot com
  2022-09-19  6:44 ` koldat at gmail dot com
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: carlos at redhat dot com @ 2022-09-17 15:35 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Tomas Kolda from comment #0)
> When building glibc 2.36 I started to see "undefined reference to `strcpy'".

How are you building this glibc?

It looks like you might be using -Os or other instead of -O2, which is required
to build all of glibc and avoid external library calls in certain parts of the
loader (where we can't have relocations or external library calls).

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
  2022-09-16 15:41 ` [Bug build/29576] " koldat at gmail dot com
  2022-09-17 15:35 ` carlos at redhat dot com
@ 2022-09-19  6:44 ` koldat at gmail dot com
  2022-09-19  6:46 ` koldat at gmail dot com
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: koldat at gmail dot com @ 2022-09-19  6:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

--- Comment #3 from Tomas Kolda <koldat at gmail dot com> ---
"-Os or other instead of -O2" - You are absolutely right. I am using Alpine
abuild that has default "-Os". I am not sure why it worked for 2.35.

Anyway, thank you so much for the hint. It resolved the problem.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
                   ` (2 preceding siblings ...)
  2022-09-19  6:44 ` koldat at gmail dot com
@ 2022-09-19  6:46 ` koldat at gmail dot com
  2022-09-19 14:07 ` adhemerval.zanella at linaro dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: koldat at gmail dot com @ 2022-09-19  6:46 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

Tomas Kolda <koldat at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Tomas Kolda <koldat at gmail dot com> ---
Not a bug. I have set CFLAGS, CPPFLAGS, CXXFLAGX to use -O2 instead of -Os.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
                   ` (3 preceding siblings ...)
  2022-09-19  6:46 ` koldat at gmail dot com
@ 2022-09-19 14:07 ` adhemerval.zanella at linaro dot org
  2022-09-19 18:09 ` carlos at redhat dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-09-19 14:07 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #5 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(In reply to Tomas Kolda from comment #4)
> Not a bug. I have set CFLAGS, CPPFLAGS, CXXFLAGX to use -O2 instead of -Os.

Ideally, we should support -Os as well. I think we should add a patch similar
to the one to avoid libcalls [1] also to fix the possible strcpy call.

[1]
https://patchwork.sourceware.org/project/glibc/patch/20220811121909.4110665-1-adhemerval.zanella@linaro.org/

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
                   ` (4 preceding siblings ...)
  2022-09-19 14:07 ` adhemerval.zanella at linaro dot org
@ 2022-09-19 18:09 ` carlos at redhat dot com
  2022-10-09 14:55 ` romain.naour at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: carlos at redhat dot com @ 2022-09-19 18:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

--- Comment #6 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Adhemerval Zanella from comment #5)
> (In reply to Tomas Kolda from comment #4)
> > Not a bug. I have set CFLAGS, CPPFLAGS, CXXFLAGX to use -O2 instead of -Os.
> 
> Ideally, we should support -Os as well. I think we should add a patch
> similar to the one to avoid libcalls [1] also to fix the possible strcpy
> call.
> 
> [1]
> https://patchwork.sourceware.org/project/glibc/patch/20220811121909.4110665-
> 1-adhemerval.zanella@linaro.org/

I agree. If we get this clean I'll talk to DJ about cloning the CI builder and
test with -Os for pre-commit CI.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
                   ` (5 preceding siblings ...)
  2022-09-19 18:09 ` carlos at redhat dot com
@ 2022-10-09 14:55 ` romain.naour at gmail dot com
  2022-10-09 22:09 ` adhemerval.zanella at linaro dot org
  2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
  8 siblings, 0 replies; 10+ messages in thread
From: romain.naour at gmail dot com @ 2022-10-09 14:55 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

romain.naour at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |romain.naour at gmail dot com

--- Comment #7 from romain.naour at gmail dot com ---
Hello,

(In reply to Adhemerval Zanella from comment #5)
> (In reply to Tomas Kolda from comment #4)
> > Not a bug. I have set CFLAGS, CPPFLAGS, CXXFLAGX to use -O2 instead of -Os.
> 
> Ideally, we should support -Os as well. I think we should add a patch
> similar to the one to avoid libcalls [1] also to fix the possible strcpy
> call.
> 
> [1]
> https://patchwork.sourceware.org/project/glibc/patch/20220811121909.4110665-
> 1-adhemerval.zanella@linaro.org/

We noticed this issue in the Buildroot gitlab-ci using glibc
2.36-44-g2628500f5dff1dd99c49a09b418b3b1ea3a6b5d3 [1].

Backporting the patch [2] allows to fix the issue.

[1] https://gitlab.com/buildroot.org/buildroot/-/jobs/3134229956
[2]
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=9dc4e29f630c6ef8299120b275e503321dc0c8c7

Best regards,
Romain

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
                   ` (6 preceding siblings ...)
  2022-10-09 14:55 ` romain.naour at gmail dot com
@ 2022-10-09 22:09 ` adhemerval.zanella at linaro dot org
  2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
  8 siblings, 0 replies; 10+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-10-09 22:09 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|NOTABUG                     |FIXED
           Assignee|unassigned at sourceware dot org   |adhemerval.zanella at linaro dot o
                   |                            |rg
   Target Milestone|---                         |2.37

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug build/29576] librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy'
  2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
                   ` (7 preceding siblings ...)
  2022-10-09 22:09 ` adhemerval.zanella at linaro dot org
@ 2022-12-29 13:00 ` adhemerval.zanella at linaro dot org
  8 siblings, 0 replies; 10+ messages in thread
From: adhemerval.zanella at linaro dot org @ 2022-12-29 13:00 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=29576

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |john.frankish at outlook dot com

--- Comment #8 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
*** Bug 29938 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-12-29 13:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-16 15:39 [Bug build/29576] New: librtld.os: in function `_dl_start_profile': (.text+0x9444): undefined reference to `strcpy' koldat at gmail dot com
2022-09-16 15:41 ` [Bug build/29576] " koldat at gmail dot com
2022-09-17 15:35 ` carlos at redhat dot com
2022-09-19  6:44 ` koldat at gmail dot com
2022-09-19  6:46 ` koldat at gmail dot com
2022-09-19 14:07 ` adhemerval.zanella at linaro dot org
2022-09-19 18:09 ` carlos at redhat dot com
2022-10-09 14:55 ` romain.naour at gmail dot com
2022-10-09 22:09 ` adhemerval.zanella at linaro dot org
2022-12-29 13:00 ` adhemerval.zanella at linaro dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).