[smart] Enhance build script with additional cleanup steps

This commit is contained in:
bernard 2025-05-14 14:31:24 +08:00 committed by Rbb666
parent 7e2b74a693
commit 1c46d55ad9
3 changed files with 6 additions and 2 deletions

View File

@ -24,10 +24,12 @@ src = Glob('*.c')
env = Environment(tools=['gcc', 'link'],
AS = AS, ASFLAGS = AFLAGS,
CC = CC, CFLAGS = CFLAGS,
CPP = CPP, AR = AR,
CPP = CPP, AR = AR,
LINK = LINK, LINKFLAGS = LFLAGS)
env.PrependENVPath('PATH', EXEC_PATH)
target = os.path.join(vdso_path, 'user', 'build', 'libvdso.so')
shared_lib = env.SharedLibrary(target=target, source=src)
Clean(shared_lib, '{vdso_usr}/vdso.lds'.format(vdso_usr=vdso_usr))
Clean(shared_lib, '.sconsign.dblite')
env.Default(shared_lib)

View File

@ -30,4 +30,6 @@ env.PrependENVPath('PATH', EXEC_PATH)
target = os.path.join(vdso_path, 'user', 'build', 'libvdso.so')
shared_lib = env.SharedLibrary(target=target, source=src)
Clean(shared_lib, '{vdso_usr}/vdso.lds'.format(vdso_usr=vdso_usr))
Clean(shared_lib, '.sconsign.dblite')
env.Default(shared_lib)

View File

@ -30,7 +30,7 @@ SECTIONS
.rela.dyn : ALIGN(8) { *(.rela .rela*) }
.rodata : {
*(.rodata*)
*(.rodata*)
*(.got)
*(.got.plt)
*(.plt)