Project

General

Profile

Actions

Bug #12148

closed

libc: _rtbootld.o needs to be built with -m32

Added by Toomas Soome almost 2 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

The i386 version needs to be built with explicit -m32 for compilers producing 64-bit code by default.

    _rtld.c: Assembler messages:
    _rtld.c:204: Error: bad register name `%rbp'
    _rtld.c:208: Error: bad register name `%rsp'
    _rtld.c:211: Error: bad register name `%r15'
    _rtld.c:212: Error: bad register name `%r14'
    _rtld.c:213: Error: bad register name `%r13'
    _rtld.c:214: Error: bad register name `%r12'
    _rtld.c:215: Error: bad register name `%rbx'
    _rtld.c:216: Error: bad register name `%rsp'

and so on...

With patch, the gcc 9 build is possible and wsdiff compare with master build is only showing differences in debug section:

libc/i386_hwcap3/pics/_rtbootld.o
NOTE: ELF .debug_str difference detected.
libc/i386_hwcap2/pics/_rtbootld.o
NOTE: ELF .debug_str difference detected.
libc/i386/pics/_rtbootld.o
NOTE: ELF .debug_str difference detected.

And this happens because we get -m32 added on command line:

libc/i386/crt/_rtbootld.s
NOTE: ASCII difference detected.

2928,2929d2927
< .LASF10:
<       .string "caddr_t" 
2994,2995c2992,2993
< .LASF106:
<       .string "GNU C99 7.4.0 -m32 -mtune=generic -march=pentium4 -g -gdwarf-2 
-O -std=gnu99 -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fpic
" 
---
> .LASF10:
>       .string "caddr_t" 
3038,3039d3035
< .LASF43:
<       .string "st_mtim" 
3041a3038,3041
> .LASF43:
>       .string "st_mtim" 
> .LASF106:
>       .string "GNU C99 7.4.0 -mtune=generic -march=pentium4 -g -gdwarf-2 -O -s
td=gnu99 -fident -finline -fno-inline-functions -fno-builtin -fno-asm -fpic" 

Actions

Also available in: Atom PDF