dlundquist / sniproxy

Proxies incoming HTTP and TLS connections based on the hostname contained in the initial request of the TCP session.
BSD 2-Clause "Simplified" License
2.57k stars 398 forks source link

Don't define http_protocol and tls_protocol variables multiple times.… #373

Closed toornet closed 3 years ago

toornet commented 3 years ago

… (#1)

As of gcc 10, the code generator emits globals without explicit initializer from .bss to .data, leading to:

ld: listener.o:(.rodata+0x60): multiple definition of http_protocol'; http.o:(.data.rel.ro.local+0x0): first defined here ld: tls.o:(.data.rel.ro.local+0x0): multiple definition oftls_protocol'; listener.o:(.rodata+0x68): first defined here collect2: error: ld returned 1 exit status

Co-authored-by: Pierre-Olivier Mercier nemunaire@nemunai.re Co-authored-by: Dustin Lundquist dustin@null-ptr.net